]> code.ossystems Code Review - openembedded-core.git/commitdiff
boot-directdisk.bbclass: remove HDDIMG before create
authorRobert Yang <liezhi.yang@windriver.com>
Tue, 24 Nov 2015 13:20:38 +0000 (05:20 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 1 Dec 2015 21:07:18 +0000 (21:07 +0000)
Fixed when rebuild:
mkdosfs: file /path/to/hdd.image already exists

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/boot-directdisk.bbclass

index 600e21abcfee68836b76822492631c0b9eb638f2..b324d890203ae5d4a87035f9fe13db2c35769286 100644 (file)
@@ -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/* ::/