summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-11-24 05:20:38 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-01 21:07:18 +0000
commit9abcd309c098558360cde2bff65be840ead25f83 (patch)
treedf1934da58427bfb26af05dd137b65eaa35d4c44 /meta/classes
parent80b3974081c4a8c604e23982a6db8fb32c616058 (diff)
downloadopenembedded-core-9abcd309c098558360cde2bff65be840ead25f83.tar.gz
openembedded-core-9abcd309c098558360cde2bff65be840ead25f83.tar.bz2
openembedded-core-9abcd309c098558360cde2bff65be840ead25f83.zip
boot-directdisk.bbclass: remove HDDIMG before create
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>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/boot-directdisk.bbclass2
1 files changed, 2 insertions, 0 deletions
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/* ::/