diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2019-07-30 19:27:46 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-10-23 15:52:33 +0300 |
commit | 5a5753a3c4d3c347094f20a8cb295cc6871a5975 (patch) | |
tree | 46a9f8703b1cb978cb9a70bed4ea8c8e26d8a714 /meta-phosphor/classes/image_types_phosphor.bbclass | |
parent | f494bb5f2bc3561fd6d5f04c11039b7161d27d38 (diff) | |
download | openbmc-5a5753a3c4d3c347094f20a8cb295cc6871a5975.tar.xz |
image_types_phosphor: Add do_generate_rwfs_ext4()
Create a new do_generate_rwfs_ext4() function that generates an empty
ext4 rwfs image file of arbitrary size 1MB. This file is needed to create
a tarball image for code update to use. The size can later be updated,
this commit is intended as a first step for creating a tarball with ext4
image files.
(From meta-phosphor rev: 846990eb90e662176c9e8c395e1093ebf7e6934c)
Change-Id: Idf9cd1dc4f79c2f6cf7f567b8abaf35123a5ca6a
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/classes/image_types_phosphor.bbclass')
-rw-r--r-- | meta-phosphor/classes/image_types_phosphor.bbclass | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/meta-phosphor/classes/image_types_phosphor.bbclass b/meta-phosphor/classes/image_types_phosphor.bbclass index dea8c3c12..54cbfa5ba 100644 --- a/meta-phosphor/classes/image_types_phosphor.bbclass +++ b/meta-phosphor/classes/image_types_phosphor.bbclass @@ -16,6 +16,7 @@ IMAGE_BASETYPE ?= "squashfs-xz" OVERLAY_BASETYPE ?= "jffs2" FLASH_UBI_BASETYPE ?= "${IMAGE_BASETYPE}" FLASH_UBI_OVERLAY_BASETYPE ?= "ubifs" +FLASH_EXT4_OVERLAY_BASETYPE ?= "ext4" IMAGE_TYPES += "mtd-static mtd-static-alltar mtd-static-tar mtd-ubi mtd-ubi-tar" @@ -77,13 +78,16 @@ python() { # Instead, prefix the overlay override value with 'rwfs-' to avoid collisions. DISTROOVERRIDES .= ":static-rwfs-${OVERLAY_BASETYPE}" DISTROOVERRIDES .= ":ubi-rwfs-${FLASH_UBI_OVERLAY_BASETYPE}" +DISTROOVERRIDES .= ":mmc-rwfs-${FLASH_EXT4_OVERLAY_BASETYPE}" JFFS2_RWFS_CMD = "mkfs.jffs2 --root=jffs2 --faketime --output=${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.jffs2" UBIFS_RWFS_CMD = "mkfs.ubifs -r ubifs -c ${FLASH_UBI_RWFS_LEBS} -m ${FLASH_PAGE_SIZE} -e ${FLASH_LEB_SIZE} ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ubifs" +EXT4_RWFS_CMD = "mkfs.ext4 -F ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.rwfs.ext4" FLASH_STATIC_RWFS_CMD_static-rwfs-jffs2 = "${JFFS2_RWFS_CMD}" FLASH_UBI_RWFS_CMD_ubi-rwfs-jffs2 = "${JFFS2_RWFS_CMD}" FLASH_UBI_RWFS_CMD_ubi-rwfs-ubifs = "${UBIFS_RWFS_CMD}" +FLASH_EXT4_RWFS_CMD_mmc-rwfs-ext4 = "${EXT4_RWFS_CMD}" mk_empty_image() { image_dst="$1" @@ -131,6 +135,16 @@ do_generate_rwfs_ubi[depends] += " \ mtd-utils-native:do_populate_sysroot \ " +do_generate_rwfs_ext4() { + clean_rwfs rwfs.${FLASH_EXT4_OVERLAY_BASETYPE} + mk_empty_image ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.rwfs.ext4 1024 + make_rwfs ${FLASH_EXT4_OVERLAY_BASETYPE} "${FLASH_EXT4_RWFS_CMD}" ${OVERLAY_MKFS_OPTS} +} +do_generate_rwfs_ext4[dirs] = " ${S}/ext4" +do_generate_rwfs_ext4[depends] += " \ + e2fsprogs-native:do_populate_sysroot \ + " + add_volume() { config_file=$1 vol_id=$2 @@ -415,6 +429,7 @@ addtask copy_signing_pubkey after do_rootfs addtask generate_phosphor_manifest after do_rootfs addtask generate_rwfs_static after do_rootfs addtask generate_rwfs_ubi after do_rootfs +addtask generate_rwfs_ext4 after do_rootfs python() { types = d.getVar('IMAGE_FSTYPES', True).split() |