[oe-commits] [openembedded-core] 06/06: boot-directdisk.bbclass: remove HDDIMG before create

git at git.openembedded.org git at git.openembedded.org
Mon May 9 13:37:53 UTC 2016


rpurdie pushed a commit to branch jethro
in repository openembedded-core.

commit 69b49e8dc45cf60defba547d93e663df42c92127
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Sun Apr 24 18:10:38 2016 -0700

    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 at windriver.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    (cherry-pick from 9abcd309c098558360cde2bff65be840ead25f83)
    Signed-off-by: Tim Kilbourn <tkilbourn at gmail.com>
    Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/boot-directdisk.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass
index 600e21a..b324d89 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/* ::/
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list