diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2019-07-30 00:14:11 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-10-23 15:52:33 +0300 |
commit | f494bb5f2bc3561fd6d5f04c11039b7161d27d38 (patch) | |
tree | 44e5d7c6ac4ecc757a33bd59abfc5fd88becb7f1 | |
parent | e67e9dba7a42bb87ab06f4bb8245ebb2c3cb705e (diff) | |
download | openbmc-f494bb5f2bc3561fd6d5f04c11039b7161d27d38.tar.xz |
image_types_phosphor: Split make_rwfs()
The make_rwfs() was doing some cleanup before creating the rwfs file.
Split it into two functions clean_rwfs() and make_rwfs() for cases where
some prep work is needed before calling the rwfs command, such as when
using mkfs.ext4 that needs to have a file created before it's converted
into ext4.
(From meta-phosphor rev: e82e8bc686b0a17f29d1d296f1d52543f2bc5ae0)
Change-Id: Idebaab86bfd6ff0c02444d9c62543e97e9ba0dcd
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
-rw-r--r-- | meta-phosphor/classes/image_types_phosphor.bbclass | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/meta-phosphor/classes/image_types_phosphor.bbclass b/meta-phosphor/classes/image_types_phosphor.bbclass index 3d919df0f..dea8c3c12 100644 --- a/meta-phosphor/classes/image_types_phosphor.bbclass +++ b/meta-phosphor/classes/image_types_phosphor.bbclass @@ -92,6 +92,15 @@ mk_empty_image() { | tr '\000' '\377' > $image_dst } +clean_rwfs() { + type=$1 + shift + + rm -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type + rm -rf $type + mkdir $type +} + make_rwfs() { type=$1 cmd=$2 @@ -99,14 +108,13 @@ make_rwfs() { shift opts="$@" - rm -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type - rm -rf $type - mkdir $type + mkdir -p $type $cmd $opts } do_generate_rwfs_static() { + clean_rwfs ${OVERLAY_BASETYPE} make_rwfs ${OVERLAY_BASETYPE} "${FLASH_STATIC_RWFS_CMD}" ${OVERLAY_MKFS_OPTS} } do_generate_rwfs_static[dirs] = " ${S}/static" @@ -115,6 +123,7 @@ do_generate_rwfs_static[depends] += " \ " do_generate_rwfs_ubi() { + clean_rwfs ${FLASH_UBI_OVERLAY_BASETYPE} make_rwfs ${FLASH_UBI_OVERLAY_BASETYPE} "${FLASH_UBI_RWFS_CMD}" } do_generate_rwfs_ubi[dirs] = " ${S}/ubi" |