[PATCH v3 5/6] openbmc: Lift mkfs opts to variables and use OVERRIDES capability
Andrew Jeffery
andrew at aj.id.au
Wed Feb 24 01:45:02 AEDT 2016
Moves the ext4-specific mkfs options out to configuration variables.
OVERLAY_MKFS_OPTS can be overridden using the usual bitbake OVERRIDES
mechanism, where the override postfix is 'rwfs-${OVERLAY_BASETYPE}',
e.g. rwfs-ext4.
Signed-off-by: Andrew Jeffery <andrew at aj.id.au>
---
.../classes/obmc-phosphor-image_types_uboot.bbclass | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/meta-phosphor/classes/obmc-phosphor-image_types_uboot.bbclass b/meta-phosphor/classes/obmc-phosphor-image_types_uboot.bbclass
index 96193a3..f75cdc1 100644
--- a/meta-phosphor/classes/obmc-phosphor-image_types_uboot.bbclass
+++ b/meta-phosphor/classes/obmc-phosphor-image_types_uboot.bbclass
@@ -23,6 +23,12 @@ FLASH_ROFS_OFFSET ?= "4864"
FLASH_RWFS_OFFSET ?= "28672"
RWFS_SIZE ?= "4096"
+# Avoid setting 'ext4' or 'jffs2' in OVERRIDES as this breaks the build. Prefix
+# with 'rwfs-' to avoid option collisions.
+DISTROOVERRIDES .= ":rwfs-${OVERLAY_BASETYPE}"
+
+OVERLAY_MKFS_OPTS_rwfs-ext4 = "-b 4096 -F -O^huge_file"
+
# $(( ${FLASH_SIZE} - ${FLASH_RWFS_OFFSET} ))
# IMAGE_POSTPROCESS_COMMAND += "do_generate_flash"
@@ -58,8 +64,12 @@ do_generate_flash() {
fi
oe_mkimage "${initrd}" "${INITRD_CTYPE}" || bbfatal "oe_mkimage initrd"
+
mk_nor_image ${ddir}/${rwfs} ${RWFS_SIZE}
- mkfs.${OVERLAY_BASETYPE} -b 4096 -F -O^huge_file ${ddir}/${rwfs} || bbfatal "mkfs rwfs"
+ if [ "${OVERLAY_BASETYPE}" != jffs2 ]; then
+ mkfs.${OVERLAY_BASETYPE} ${OVERLAY_MKFS_OPTS} ${ddir}/${rwfs} || \
+ bbfatal "mkfs rwfs"
+ fi
dst="${ddir}/${FLASH_IMAGE_NAME}"
rm -rf $dst
--
2.5.0
More information about the openbmc
mailing list