summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-11-24 04:53:58 -0800
committerRobert Yang <liezhi.yang@windriver.com>2015-11-24 05:18:50 -0800
commit266f248aad0b753bdf8ce55744e0576021ee0db2 (patch)
treed73775e6a149d2d5cd4ecf40df9efef182a28188
parent6f98c39418c60b7c0b25b30983d2e5257158a6a4 (diff)
downloadopenembedded-core-contrib-rbt/hddimg.tar.gz
openembedded-core-contrib-rbt/hddimg.tar.bz2
openembedded-core-contrib-rbt/hddimg.zip
boot-directdisk.bbclass: remove HDDIMG before createrbt/hddimg
Fixed when rebuild: mkdosfs: file /path/to/hdd.image already exists Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-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/* ::/