[PATCH openbmc v2 5/6] meta-phosphor: Make image-overlay a machine feature.

OpenBMC Patches openbmc-patches at stwcx.xyz
Tue Jun 21 09:20:33 AEST 2016


From: Patrick Williams <patrick at stwcx.xyz>

Previously, obmc-bsp-common.inc added "overlay" to the IMAGE_FSTYPES
but this only has meaning if the 'image-overlay' class is used.  The
obmc-phosphor-image class explicitly includes 'image-overlay' when
appropriate but no other images (ie. ones that come with yocto) do.

Changed obmc-bsp-common to instead enable a machine feature called
"image-overlay".  Then in obmc-phosphor-image we add "overlay" to
the IMAGE_FSTYPES only when enabled as a machine feature.

This will (hopefully) fix both non-phosphor images on hardware platforms
and all images on simulation platforms.
---
 meta-phosphor/classes/obmc-phosphor-image.bbclass      | 4 ++++
 meta-phosphor/conf/machine/include/obmc-bsp-common.inc | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta-phosphor/classes/obmc-phosphor-image.bbclass b/meta-phosphor/classes/obmc-phosphor-image.bbclass
index d3960c7..2d13fff 100644
--- a/meta-phosphor/classes/obmc-phosphor-image.bbclass
+++ b/meta-phosphor/classes/obmc-phosphor-image.bbclass
@@ -48,6 +48,10 @@ CORE_IMAGE_EXTRA_INSTALL_append = " bash \
 
 OBMC_IMAGE_EXTRA_INSTALL ?= ""
 
+IMAGE_FSTYPES += \
+    "${@bb.utils.contains("MACHINE_FEATURES", "image-overlay", \
+                          "overlay", "", d)}"
+
 def build_overlay(d):
         if bb.utils.contains("IMAGE_FSTYPES", "overlay", "overlay", "0", d) != "0":
                 return "image-overlay"
diff --git a/meta-phosphor/conf/machine/include/obmc-bsp-common.inc b/meta-phosphor/conf/machine/include/obmc-bsp-common.inc
index 8d1fd7e..3e2ec34 100644
--- a/meta-phosphor/conf/machine/include/obmc-bsp-common.inc
+++ b/meta-phosphor/conf/machine/include/obmc-bsp-common.inc
@@ -13,7 +13,7 @@ UBOOT_SUFFIX ?= "bin"
 
 MACHINEOVERRIDES =. "openbmc:"
 
-IMAGE_FSTYPES += "overlay"
+MACHINE_FEATURES += "image-overlay"
 IMAGE_FSTYPES += "cpio.${INITRAMFS_CTYPE}.u-boot"
 OBMC_IMAGE_EXTRA_INSTALL_append = " u-boot-fw-utils"
 
-- 
2.9.0




More information about the openbmc mailing list