From: Robert Yang Date: Tue, 24 Nov 2015 13:20:38 +0000 (-0800) Subject: boot-directdisk.bbclass: remove HDDIMG before create X-Git-Tag: 2016-4~2189 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=9abcd309c098558360cde2bff65be840ead25f83;p=openembedded-core.git boot-directdisk.bbclass: remove HDDIMG before create Fixed when rebuild: mkdosfs: file /path/to/hdd.image already exists Signed-off-by: Robert Yang Signed-off-by: Ross Burton --- diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass index 600e21abcf..b324d89020 100644 --- a/meta/classes/boot-directdisk.bbclass +++ b/meta/classes/boot-directdisk.bbclass @@ -121,6 +121,8 @@ build_boot_dd() { # done in blocks, thus the mod by 16 instead of 32. BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16))) + # Remove it since mkdosfs would fail when it exists + rm -f $HDDIMG mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C $HDDIMG $BLOCKS mcopy -i $HDDIMG -s $HDDDIR/* ::/