meta-phosphor: split image type configs to includes
We have reached branch-capacity in the bb.utils.contains checks
at 3 image types. In order to be able to more easily add additional
image types, split the differences out into additional inc-snippets
for each image type.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ibcdb5c885c67cb6d8728dfd315eb07f99b1a2173
diff --git a/meta-phosphor/conf/machine/include/obmc-bsp-common.inc b/meta-phosphor/conf/machine/include/obmc-bsp-common.inc
index 9098a8a..8a38343 100644
--- a/meta-phosphor/conf/machine/include/obmc-bsp-common.inc
+++ b/meta-phosphor/conf/machine/include/obmc-bsp-common.inc
@@ -5,25 +5,11 @@
KERNEL_CLASSES ?= "kernel-fitimage"
KERNEL_IMAGETYPES ?= "fitImage vmlinux"
-# Static images. This is the default if no other layout is specified.
-IMAGE_FSTYPES += "${@bb.utils.contains_any('DISTRO_FEATURES', \
- 'obmc-ubi-fs phosphor-mmc', \
- '', \
- 'mtd-static mtd-static-tar mtd-static-alltar', d)}"
+OBMC_IMAGE_INCLUDE = "static"
+OBMC_IMAGE_INCLUDE:df-obmc-ubi-fs = "ubi-fs"
+OBMC_IMAGE_INCLUDE:df-phosphor-mmc = "mmc"
-# UBI images.
-IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', \
- 'obmc-ubi-fs', \
- 'mtd-ubi mtd-ubi-tar', \
- '', d)}"
-
-# eMMC images.
-IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', \
- 'phosphor-mmc', \
- 'wic.xz mmc-ext4-tar', \
- '', d)}"
+require conf/machine/include/image-type/${OBMC_IMAGE_INCLUDE}.inc
INITRAMFS_CTYPE ?= "xz"
INITRAMFS_FSTYPES = "cpio.${INITRAMFS_CTYPE}"
-INITRAMFS_IMAGE = "obmc-phosphor-initramfs"
-INITRAMFS_IMAGE:df-obmc-ubi-fs = ""