diff options
author | Gary Thomas <gary@mlbassoc.com> | 2015-07-21 05:45:30 -0600 |
---|---|---|
committer | Andrei Gherzan <andrei@gherzan.ro> | 2015-08-09 23:51:06 +0200 |
commit | d676d54f0409d7156343d9d71ad9b3e41dd21af3 (patch) | |
tree | 0402823ff6249769da048170dd18052222b847ce /classes | |
parent | f188f3d756f59fb4dc64cc1a64263c2251f76ae5 (diff) | |
download | meta-raspberrypi-d676d54f0409d7156343d9d71ad9b3e41dd21af3.tar.gz |
sdcard_image: Fix sdcard image generation
Recent updates to the MSDOS tools (OE-core is now at 3.0.28) have made
it an error to overwrite an image using mkfs.vfat. This patch fixes
that problem by removing any old/stale images, thus starting from scratch.
Signed-off-by: Gary Thomas <gary@mlbassoc.com>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/sdcard_image-rpi.bbclass | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass index 7592cc1..62c0768 100644 --- a/classes/sdcard_image-rpi.bbclass +++ b/classes/sdcard_image-rpi.bbclass | |||
@@ -103,6 +103,7 @@ IMAGE_CMD_rpi-sdimg () { | |||
103 | 103 | ||
104 | # Create a vfat image with boot files | 104 | # Create a vfat image with boot files |
105 | BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') | 105 | BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') |
106 | rm -f ${WORKDIR}/boot.img | ||
106 | mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS | 107 | mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS |
107 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ | 108 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ |
108 | case "${KERNEL_IMAGETYPE}" in | 109 | case "${KERNEL_IMAGETYPE}" in |