diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-07-22 21:49:25 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-08-01 22:02:12 +0300 |
commit | 97cce000ece7fbe9b1fcebd8b265e978f826fff5 (patch) | |
tree | 75d1a0335d1c31ab2d5cb424679fa22f2228845d /meta-phosphor/classes | |
parent | 8bf414ab205abd0e38261558d03861868cef3d8d (diff) | |
download | openbmc-97cce000ece7fbe9b1fcebd8b265e978f826fff5.tar.xz |
overlay: remove OBMC_PHOSPHOR_IMAGE_OVERLAY
Solve the problem resulting in the addition of this variable
differently, such that it can be removed and image type
selection can be selected in the standard way using IMAGE_FSTYPES.
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: Ice94e8f278f00b8b4d344244bfb87dddeb173a23
Diffstat (limited to 'meta-phosphor/classes')
-rw-r--r-- | meta-phosphor/classes/image_types_phosphor.bbclass | 16 | ||||
-rw-r--r-- | meta-phosphor/classes/obmc-phosphor-debug-tarball.bbclass | 6 | ||||
-rw-r--r-- | meta-phosphor/classes/obmc-phosphor-image.bbclass | 8 |
3 files changed, 21 insertions, 9 deletions
diff --git a/meta-phosphor/classes/image_types_phosphor.bbclass b/meta-phosphor/classes/image_types_phosphor.bbclass new file mode 100644 index 000000000..eef1b1c67 --- /dev/null +++ b/meta-phosphor/classes/image_types_phosphor.bbclass @@ -0,0 +1,16 @@ +# Base image class extension, inlined into every image. + +def build_uboot(d): + fstypes = d.getVar('IMAGE_FSTYPES', True).split() + if any([x.endswith('u-boot') for x in fstypes]): + return 'image_types_uboot' + return '' + + +# Inherit u-boot classes if legacy uboot images are in use. +IMAGE_TYPE_uboot = '${@build_uboot(d)}' +inherit ${IMAGE_TYPE_uboot} + +# Inherit the overlay class if overlay is in use. +IMAGE_TYPE_overlay = '${@bb.utils.contains("IMAGE_FSTYPES", "overlay", "image-overlay", "", d)}' +inherit ${IMAGE_TYPE_overlay} diff --git a/meta-phosphor/classes/obmc-phosphor-debug-tarball.bbclass b/meta-phosphor/classes/obmc-phosphor-debug-tarball.bbclass index 0e5dbd2d3..a7d2dc49b 100644 --- a/meta-phosphor/classes/obmc-phosphor-debug-tarball.bbclass +++ b/meta-phosphor/classes/obmc-phosphor-debug-tarball.bbclass @@ -1,7 +1,11 @@ +# IMAGE_FSTYPES must appear before image.bbclass +# is inherited otherwise image.bbclass will inherit +# "live" image fstypes that we don't want. +IMAGE_FSTYPES = "tar.xz" + inherit image inherit obmc-phosphor-license -IMAGE_FSTYPES = "tar.xz" IMAGE_INSTALL_append = " busybox packagegroup-obmc-phosphor-debugtools" # Override from image_types.bbclass to restrict tarball to /usr tree. diff --git a/meta-phosphor/classes/obmc-phosphor-image.bbclass b/meta-phosphor/classes/obmc-phosphor-image.bbclass index 4758c8a4a..9b0a547e6 100644 --- a/meta-phosphor/classes/obmc-phosphor-image.bbclass +++ b/meta-phosphor/classes/obmc-phosphor-image.bbclass @@ -95,14 +95,6 @@ CORE_IMAGE_EXTRA_INSTALL_append = " bash \ OBMC_IMAGE_EXTRA_INSTALL ?= "" -def image_overlay_enabled(d, ifEnabledStr): - if d.getVar('OBMC_PHOSPHOR_IMAGE_OVERLAY', True) != "1": - return "" - return ifEnabledStr - -IMAGE_FSTYPES += "${@image_overlay_enabled(d, "overlay")}" -inherit ${@image_overlay_enabled(d, "image-overlay")} - do_image_complete[depends] += "obmc-phosphor-debug-tarball:do_image_complete" # The /etc/version file is misleading and not useful. Remove it. |