Skip to contentSkip to conversation

boot-directdisk.bbclass: remove HDDIMG before create

PATCH New Robert Yang 1 participant 2 messages Nov 24, 2015

lore
Share & tools
lore
#0 lore raw

cover boot-directdisk.bbclass: remove HDDIMG before create

The following changes since commit 6f98c39418c60b7c0b25b30983d2e5257158a6a4:

gcc: Drop 4.8 (2015-11-16 14:59:07 +0000)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/hddimg
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/hddimg

Robert Yang (1):
boot-directdisk.bbclass: remove HDDIMG before create

 meta/classes/boot-directdisk.bbclass |    2 ++
 1 file changed, 2 insertions(+)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 boot-directdisk.bbclass: remove HDDIMG before create

Fixed when rebuild:
mkdosfs: file /path/to/hdd.image already exists

---
 meta/classes/boot-directdisk.bbclass |    2 ++
 1 file changed, 2 insertions(+)
meta/classes/boot-directdisk.bbclass +2 -0
index 600e21a..b324d89 100644
@@ -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/* ::/
 
Signature · 1 line
1.7.9.5