diff options
5 files changed, 24 insertions, 13 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. diff --git a/meta-phosphor/conf/distro/openbmc-phosphor.conf b/meta-phosphor/conf/distro/openbmc-phosphor.conf index 9f8bad2bb..924e119e2 100644 --- a/meta-phosphor/conf/distro/openbmc-phosphor.conf +++ b/meta-phosphor/conf/distro/openbmc-phosphor.conf @@ -56,3 +56,5 @@ OLDEST_KERNEL = "2.6.32" KERNEL_FEATURES_append = " phosphor-gpio-keys" KERNEL_FEATURES_remove_qemuall = " phosphor-gpio-keys" + +IMAGE_CLASSES_append = " image_types_phosphor" diff --git a/meta-phosphor/conf/machine/include/obmc-bsp-common.inc b/meta-phosphor/conf/machine/include/obmc-bsp-common.inc index f4649e38a..03e73b340 100644 --- a/meta-phosphor/conf/machine/include/obmc-bsp-common.inc +++ b/meta-phosphor/conf/machine/include/obmc-bsp-common.inc @@ -10,12 +10,9 @@ UBOOT_SUFFIX ?= "bin" MACHINEOVERRIDES =. "openbmc:" -OBMC_PHOSPHOR_IMAGE_OVERLAY= "1" -IMAGE_FSTYPES += "cpio.${INITRAMFS_CTYPE}.u-boot" +IMAGE_FSTYPES += "cpio.${INITRAMFS_CTYPE}.u-boot overlay" OBMC_IMAGE_EXTRA_INSTALL_append = " u-boot-fw-utils" -IMAGE_CLASSES += "image_types_uboot" - INITRAMFS_CTYPE ?= "lzma" INITRAMFS_FSTYPES += "cpio.${INITRAMFS_CTYPE}" INITRAMFS_IMAGE = "obmc-phosphor-initramfs" |