overlay: Adopt upstream style conventions

Removed a handful of unused variables.

Use upstream style conventions, which seem to be:
 - pep8 for python
 - tabs for shellcode
 - 8 space indent everywhere else

Change-Id: I4de549ecf02472096a54234379cd7cce8c219c48
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/classes/image-overlay.bbclass b/classes/image-overlay.bbclass
index 1d8272a..64a8356 100644
--- a/classes/image-overlay.bbclass
+++ b/classes/image-overlay.bbclass
@@ -1,6 +1,3 @@
-PACKAGES = " "
-EXCLUDE_FROM_WORLD = "1"
-
 IMAGE_BASETYPE ?= "squashfs-xz"
 OVERLAY_BASETYPE ?= "jffs2"
 
@@ -9,8 +6,6 @@
 IMAGE_TYPEDEP_overlay = "${IMAGE_BASETYPE}"
 IMAGE_TYPES_MASKED += "overlay"
 
-ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.${IMAGE_BASETYPE}"
-
 FLASH_IMAGE_NAME ?= "flash-${MACHINE}-${DATETIME}"
 FLASH_IMAGE_NAME[vardepsexclude] = "DATETIME"
 FLASH_IMAGE_LINK ?= "flash-${MACHINE}"
@@ -34,54 +29,54 @@
 # $(( ${FLASH_SIZE} - ${FLASH_RWFS_OFFSET} ))
 
 mk_nor_image() {
-       image_dst="$1"
-       image_size_kb=$2
-       dd if=/dev/zero bs=1k count=${image_size_kb} \
-              | tr '\000' '\377' > ${image_dst}
+	image_dst="$1"
+	image_size_kb=$2
+	dd if=/dev/zero bs=1k count=$image_size_kb \
+		| tr '\000' '\377' > $image_dst
 }
 
 do_generate_flash() {
-       ddir="${DEPLOY_DIR_IMAGE}"
-       kernel="${FLASH_KERNEL_IMAGE}"
-       uboot="u-boot.${UBOOT_SUFFIX}"
-       rootfs="${IMAGE_LINK_NAME}.${IMAGE_BASETYPE}"
-       rwfs="rwfs.${OVERLAY_BASETYPE}"
+	ddir="${DEPLOY_DIR_IMAGE}"
+	kernel="${FLASH_KERNEL_IMAGE}"
+	uboot="u-boot.${UBOOT_SUFFIX}"
+	rootfs="${IMAGE_LINK_NAME}.${IMAGE_BASETYPE}"
+	rwfs="rwfs.${OVERLAY_BASETYPE}"
 
-       if [ ! -f $ddir/$kernel ]; then
-              bbfatal "Kernel file ${ddir}/${kernel} does not exist"
-       fi
-       if [ ! -f $ddir/$uboot ]; then
-              bbfatal "U-boot file ${ddir}/${uboot} does not exist"
-       fi
-       if [ ! -f $ddir/$rootfs ]; then
-              bbfatal "Rootfs file ${ddir}/${rootfs} does not exist"
-       fi
+	if [ ! -f $ddir/$kernel ]; then
+		bbfatal "Kernel file $ddir/$kernel does not exist"
+	fi
+	if [ ! -f $ddir/$uboot ]; then
+		bbfatal "U-boot file $ddir/$uboot does not exist"
+	fi
+	if [ ! -f $ddir/$rootfs ]; then
+		bbfatal "Rootfs file $ddir/$rootfs does not exist"
+	fi
 
-       mk_nor_image ${ddir}/${rwfs} ${RWFS_SIZE}
-       if [ "${OVERLAY_BASETYPE}" != jffs2 ]; then
-              mkfs.${OVERLAY_BASETYPE} ${OVERLAY_MKFS_OPTS} ${ddir}/${rwfs} || \
-                     bbfatal "mkfs rwfs"
-       fi
+	mk_nor_image $ddir/$rwfs ${RWFS_SIZE}
+	if [ "${OVERLAY_BASETYPE}" != jffs2 ]; then
+		mkfs.${OVERLAY_BASETYPE} ${OVERLAY_MKFS_OPTS} $ddir/$rwfs || \
+			bbfatal "mkfs rwfs"
+	fi
 
-       dst="${ddir}/${FLASH_IMAGE_NAME}"
-       rm -rf $dst
-       mk_nor_image ${dst} ${FLASH_SIZE}
-       dd if=${ddir}/${uboot} of=${dst} bs=1k conv=notrunc seek=${FLASH_UBOOT_OFFSET}
-       dd if=${ddir}/${kernel} of=${dst} bs=1k conv=notrunc seek=${FLASH_KERNEL_OFFSET}
-       dd if=${ddir}/${rootfs} of=${dst} bs=1k conv=notrunc seek=${FLASH_ROFS_OFFSET}
-       dd if=${ddir}/${rwfs} of=${dst} bs=1k conv=notrunc seek=${FLASH_RWFS_OFFSET}
-       dstlink="${ddir}/${FLASH_IMAGE_LINK}"
-       rm -rf $dstlink
-       ln -sf ${FLASH_IMAGE_NAME} $dstlink
+	dst="$ddir/${FLASH_IMAGE_NAME}"
+	rm -rf $dst
+	mk_nor_image $dst ${FLASH_SIZE}
+	dd if=$ddir/$uboot of=$dst bs=1k conv=notrunc seek=${FLASH_UBOOT_OFFSET}
+	dd if=$ddir/$kernel of=$dst bs=1k conv=notrunc seek=${FLASH_KERNEL_OFFSET}
+	dd if=$ddir/$rootfs of=$dst bs=1k conv=notrunc seek=${FLASH_ROFS_OFFSET}
+	dd if=$ddir/$rwfs of=$dst bs=1k conv=notrunc seek=${FLASH_RWFS_OFFSET}
+	dstlink="$ddir/${FLASH_IMAGE_LINK}"
+	rm -rf $dstlink
+	ln -sf ${FLASH_IMAGE_NAME} $dstlink
 
-       ln -sf ${FLASH_IMAGE_NAME} ${ddir}/image-bmc
-       ln -sf ${uboot} ${ddir}/image-u-boot
-       ln -sf ${kernel} ${ddir}/image-kernel
-       ln -sf ${rootfs} ${ddir}/image-rofs
-       ln -sf ${rwfs} ${ddir}/image-rwfs
+	ln -sf ${FLASH_IMAGE_NAME} $ddir/image-bmc
+	ln -sf $uboot $ddir/image-u-boot
+	ln -sf $kernel $ddir/image-kernel
+	ln -sf $rootfs $ddir/image-rofs
+	ln -sf $rwfs $ddir/image-rwfs
 
-       tar -h -cvf ${ddir}/${MACHINE}-${DATETIME}.all.tar -C ${ddir} image-bmc
-       tar -h -cvf ${ddir}/${MACHINE}-${DATETIME}.tar -C ${ddir} image-u-boot image-kernel image-rofs image-rwfs
+	tar -h -cvf $ddir/${MACHINE}-${DATETIME}.all.tar -C $ddir image-bmc
+	tar -h -cvf $ddir/${MACHINE}-${DATETIME}.tar -C $ddir image-u-boot image-kernel image-rofs image-rwfs
 }
 do_generate_flash[vardepsexclude] = "DATETIME"