Skip to contentSkip to conversation

boot-directdisk.bbclass: remove HDDIMG before create

PATCH In review Tim Kilbourn 2 participants 2 messages Apr 20, 2016

lore
Share & tools
lore
#0 lore raw

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

From: Robert Yang <[email protected]>

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

(cherry-pick from 9abcd309c098558360cde2bff65be840ead25f83)

---
 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.9.1
#1 lore raw
Quoted 27 lines · Tim Kilbourn

From: Robert Yang <[email protected]>

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

(cherry-pick from 9abcd309c098558360cde2bff65be840ead25f83)

---
 meta/classes/boot-directdisk.bbclass | 2 ++
 1 file changed, 2 insertions(+)
meta/classes/boot-directdisk.bbclass +2 -1
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/* ::/
 
--
Quoted 2 lines

1.9.1

This one has bitten us too. +1

Quoted 5 lines

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core