Skip to contentSkip to conversation

sdcard_image: Fix sdcard image generation

PATCH Applied Gary Thomas 3 participants 3 messages Jul 21, 2015 – Aug 9, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 classes/sdcard_image-rpi.bbclass | 1 +
 1 file changed, 1 insertion(+)
classes/sdcard_image-rpi.bbclass +1 -0
index 7592cc1..62c0768 100644
@@ -103,6 +103,7 @@ IMAGE_CMD_rpi-sdimg () {
 
 	# Create a vfat image with boot files
 	BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
+	rm -f ${WORKDIR}/boot.img
 	mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
 	mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/
 	case "${KERNEL_IMAGETYPE}" in
Signature · 1 line
1.9.1
#1 lore raw
Quoted 5 lines · Gary Thomas

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.

I meant to ping on this one.

Andreas

#2 lore raw
Quoted 7 lines · Andreas Müller
Quoted 5 lines · Gary Thomas

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.

I meant to ping on this one.

Merged to master. Thanks.

--
Andrei Gherzan