[meta-intel] [PATCHv2 7/7] rmc: Use DISTRO_FEATURES as feature switch

Jianxun Zhang jianxun.zhang at linux.intel.com
Mon Jul 18 18:00:57 PDT 2016


From: Saul Wold <sgw at linux.intel.com>

This refactoring is based on Saul Wold's initial attempt
to have a more appropriate switch than using EFI_PROVIDER,
to capture the whole RMC feature.

Now put DISTRO_FEATURES_append = " rmc" in a conf file to
enable RMC feature.

RMC patches in systemd-boot, gnu-efi and EFI installer are
not effective in build unless the feature is enabled.

Signed-off-by: Jianxun Zhang <jianxun.zhang at linux.intel.com>
---
 conf/layer.conf          | 16 ++++++++++++++++
 documentation/README.rmc |  5 ++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/conf/layer.conf b/conf/layer.conf
index d8e5000..8e22186 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -15,3 +15,19 @@ LICENSE_PATH += "${LAYERDIR}/common/custom-licenses"
 # This should only be incremented on significant changes that will
 # cause compatibility issues with other layers
 LAYERVERSION_intel = "3"
+
+
+# Exclude RMC patches unless RMC Feature is eanbled
+RMC_BBMASK := "${LAYERDIR}/common/recipes-bsp/systemd-boot/systemd-boot.*\.bbappend \
+               ${LAYERDIR}/common/recipes-core/initrdscripts/initramfs-live-install-efi.*\.bbappend \
+               ${LAYERDIR}/common/recipes-bsp/gnu-efi/gnu-efi.*\.bbappend"
+
+BBMASK += "${RMC_BBMASK}"
+
+BBMASK_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'rmc', '${RMC_BBMASK}', '', d)}"
+
+# Override EFI_PROVIDER when RMC Feature is enabled
+
+EFI_PROVIDER_rmc_bootloader = "rmc-systemd-boot"
+
+OVERRIDES_append  = ":${@bb.utils.contains('DISTRO_FEATURES', 'rmc', 'rmc_bootloader', '', d)}"
diff --git a/documentation/README.rmc b/documentation/README.rmc
index eb31d22..d00b5ef 100644
--- a/documentation/README.rmc
+++ b/documentation/README.rmc
@@ -153,7 +153,10 @@ up first, so it must be “INSTALLER.CONFIG”.
 Enable RMC Feature
 --------------------------------------------------------------------------------
 To Enable RMC feature in build, add the below line in a conf file:
-EFI_PROVIDER="rmc-systemd-boot"
+DISTRO_FEATURES_append = " rmc"
+
+Note: To ensure its whole functionality, RMC Feature overrides any bootloader
+selected in EFI_PROVIDER with its own bootloader.
 
 
 
-- 
2.7.4



More information about the meta-intel mailing list