From 928e817c442b0771f89317289046f51c07460b0f Mon Sep 17 00:00:00 2001 From: Gary Thomas Date: Mon, 15 Jun 2015 08:41:33 -0600 Subject: image_types_fsl: Fix boot.img overwrite error 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: mkfs.vfat: file XXXX/tmp/work/nitrogen6x-poky-linux-gnueabi/network-demo-image/1.0-r0/boot.img already exists mkfs.fat 3.0.28 (2015-05-16) WARNING: exit code 1 from a shell command. This patch fixes the problem by removing any old/stale images before trying to create the VFAT file system images. Change-Id: I74e02fd512b43315b29698f534192632d7780df2 Signed-off-by: Gary Thomas Signed-off-by: Otavio Salvador --- classes/image_types_fsl.bbclass | 2 ++ 1 file changed, 2 insertions(+) (limited to 'classes') diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass index 1ebcb06..b542549 100644 --- a/classes/image_types_fsl.bbclass +++ b/classes/image_types_fsl.bbclass @@ -152,6 +152,7 @@ generate_imx_sdcard () { # Create boot partition image BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \ | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 1024 }') + 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}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE} @@ -255,6 +256,7 @@ generate_mxs_sdcard () { BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \ | awk '/ 2 / { print substr($4, 1, length($4 -1)) / 1024 }') + 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}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE} if test -n "${KERNEL_DEVICETREE}"; then -- cgit v1.2.3-54-g00ecf