diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-06-20 22:06:54 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-06-24 23:22:18 +0300 |
commit | 205469475226853ec068be3c75819d745c3d0ccf (patch) | |
tree | a1aecb9568d21b9ff2fd465e64b0f21a1b083192 /meta-phosphor | |
parent | d9cd4a0b4683d9054b4985013f6b2232ef8740f0 (diff) | |
download | openbmc-205469475226853ec068be3c75819d745c3d0ccf.tar.xz |
meta-phosphor: Make image-overlay an optional feature
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 an obmc-phosphor-image feature
by setting OBMC_PHOSPHOR_IMAGE_OVERLAY=1. Then in obmc-phosphor-image we
add "overlay" to the IMAGE_FSTYPES only when the feature is enabled.
This will fix both non-phosphor images on hardware platforms and all images
on simulation platforms.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'meta-phosphor')
-rw-r--r-- | meta-phosphor/classes/obmc-phosphor-image.bbclass | 11 | ||||
-rw-r--r-- | meta-phosphor/conf/machine/include/obmc-bsp-common.inc | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/meta-phosphor/classes/obmc-phosphor-image.bbclass b/meta-phosphor/classes/obmc-phosphor-image.bbclass index d3960c737..2d97cdef6 100644 --- a/meta-phosphor/classes/obmc-phosphor-image.bbclass +++ b/meta-phosphor/classes/obmc-phosphor-image.bbclass @@ -48,9 +48,10 @@ CORE_IMAGE_EXTRA_INSTALL_append = " bash \ OBMC_IMAGE_EXTRA_INSTALL ?= "" -def build_overlay(d): - if bb.utils.contains("IMAGE_FSTYPES", "overlay", "overlay", "0", d) != "0": - return "image-overlay" - return "" +def image_overlay_enabled(d, ifEnabledStr): + if d.getVar('OBMC_PHOSPHOR_IMAGE_OVERLAY', True) != "1": + return "" + return ifEnabledStr -inherit ${@build_overlay(d)} +IMAGE_FSTYPES += "${@image_overlay_enabled(d, "overlay")}" +inherit ${@image_overlay_enabled(d, "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 8d1fd7ef5..2b6a1632b 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" +OBMC_PHOSPHOR_IMAGE_OVERLAY= "1" IMAGE_FSTYPES += "cpio.${INITRAMFS_CTYPE}.u-boot" OBMC_IMAGE_EXTRA_INSTALL_append = " u-boot-fw-utils" |