sdcard_image bbclass: add support to copy over payload from rootfs to vfat
authorKoen Kooi <koen@dominion.thruhere.net>
Fri, 4 Nov 2011 07:42:25 +0000 (08:42 +0100)
committerKoen Kooi <koen@dominion.thruhere.net>
Fri, 4 Nov 2011 07:42:25 +0000 (08:42 +0100)
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
classes/sdcard_image.bbclass

index bf0f0aa624d9db144563214c8a4cef012e2b49d8..9d582bdcb000697f5ff8635d4e1d2441c1eb1418 100644 (file)
@@ -20,6 +20,9 @@ BOOTPARTNAME ?= "${MACHINE}"
 
 IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}"
 
+# Files and/or directories to be copied into the vfat partition
+FATPAYLOAD ?= ""
+
 IMAGE_CMD_sdimg () {
        SDIMG=${WORKDIR}/sd.img
 
@@ -103,6 +106,13 @@ IMAGE_CMD_sdimg () {
                cp -v ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.$suffix ${WORKDIR}/tmp-mnt-boot/u-boot.$suffix 
        fi
 
+       if [ -n ${FATPAYLOAD} ] ; then
+               echo "Copying payload into VFAT"
+               for entry in ${FATPAYLOAD} ; do
+                       cp -av $entry ${WORKDIR}/tmp-mnt-boot
+               done
+       fi
+
        # Cleanup VFAT mount
        echo "Cleaning up VFAT mount"
        umount ${WORKDIR}/tmp-mnt-boot