[PATCH openbmc v5 04/11] meta-phosphor: Make image-overlay an optional feature

Joel Stanley joel at jms.id.au
Fri Jun 24 12:53:49 AEST 2016


On Fri, Jun 24, 2016 at 6:10 AM, OpenBMC Patches
<openbmc-patches at stwcx.xyz> wrote:
> 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 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 at stwcx.xyz>

Acked-by: Joel Stanley <joel at jms.id.au>

> ---
>  meta-phosphor/classes/obmc-phosphor-image.bbclass      | 15 +++++++++------
>  meta-phosphor/conf/machine/include/obmc-bsp-common.inc |  2 +-
>  2 files changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/meta-phosphor/classes/obmc-phosphor-image.bbclass b/meta-phosphor/classes/obmc-phosphor-image.bbclass
> index d3960c7..b2925c2 100644
> --- a/meta-phosphor/classes/obmc-phosphor-image.bbclass
> +++ b/meta-phosphor/classes/obmc-phosphor-image.bbclass
> @@ -48,9 +48,12 @@ 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 ""
> -
> -inherit ${@build_overlay(d)}
> +def image_overlay_enabled(d, fstype):
> +        if d.getVar('OBMC_PHOSPHOR_IMAGE_OVERLAY', True) != "1":
> +            return ""
> +        if fstype:
> +            return "overlay"
> +        return "image-overlay"
> +
> +IMAGE_FSTYPES += "${@image_overlay_enabled(d, True)}"
> +inherit ${@image_overlay_enabled(d, False)}
> diff --git a/meta-phosphor/conf/machine/include/obmc-bsp-common.inc b/meta-phosphor/conf/machine/include/obmc-bsp-common.inc
> index 8d1fd7e..2b6a163 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"
>
> --
> 2.9.0
>
>
> _______________________________________________
> openbmc mailing list
> openbmc at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc


More information about the openbmc mailing list