]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
boot-directdisk.bbclass: remove HDDIMG before create rbt/hddimg
authorRobert Yang <liezhi.yang@windriver.com>
Tue, 24 Nov 2015 12:53:58 +0000 (04:53 -0800)
committerRobert Yang <liezhi.yang@windriver.com>
Tue, 24 Nov 2015 13:18:50 +0000 (05:18 -0800)
Fixed when rebuild:
mkdosfs: file /path/to/hdd.image already exists

Signed-off-by: Robert Yang <liezhi.yang@windriver.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/* ::/