[meta-intel] [PATCH] systemd-boot: disable RMC for systemd-boot EFI_PROVIDER

Todor Minchev todor.minchev at linux.intel.com
Fri Jun 23 15:58:17 PDT 2017


Previously the RMC library was always linked into systemd-boot. Non
rmc-boot EFI_PROVIDERs will not build the rmc.db and userspace tool and
therefore linking the library into these bootloaders is redundant.
This change disables RMC completely when the EFI_PROVIDER is not rmc-boot.

The default EFI_PROVIDER in meta-intel is rmc-boot. To use systemd-boot
without RMC, set EFI_PROVIDER to systemd-boot in your conf/local.conf.

Example:

EFI_PROVIDER = "systemd-boot"

Signed-off-by: Todor Minchev <todor.minchev at linux.intel.com>
---
 common/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc   | 12 ++++++++++++
 .../recipes-bsp/systemd-boot/systemd-boot/systemd-boot.inc  |  7 +++++++
 common/recipes-bsp/systemd-boot/systemd-boot_%.bbappend     | 13 +------------
 3 files changed, 20 insertions(+), 12 deletions(-)
 create mode 100644 common/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc
 create mode 100644 common/recipes-bsp/systemd-boot/systemd-boot/systemd-boot.inc

diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc b/common/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc
new file mode 100644
index 0000000..db75eb6
--- /dev/null
+++ b/common/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc
@@ -0,0 +1,12 @@
+DEPENDS_append_intel-x86-common = " rmc"
+
+EXTRA_OEMAKE_append_intel-x86-common = ' EFI_LDFLAGS="-L${STAGING_DIR_HOST}/usr/lib" EFI_CFLAGS="-I${STAGING_INCDIR}/rmc -DRMC_EFI"'
+
+SRC_URI_append_intel-x86-common = " \
+            file://0001-sd-boot-Link-RMC-library-into-bootloader-and-stub.patch \
+            file://0002-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch \
+            file://0003-sd-boot-Support-global-kernel-command-line-fragment.patch \
+            file://0004-sd-boot-Support-global-kernel-command-line-fragment-in-EFI-stub.patch \
+            file://0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch \
+            file://0001-sd-boot-stub-check-LoadOptions-contains-data.patch \
+            "
diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/systemd-boot.inc b/common/recipes-bsp/systemd-boot/systemd-boot/systemd-boot.inc
new file mode 100644
index 0000000..fcce6ce
--- /dev/null
+++ b/common/recipes-bsp/systemd-boot/systemd-boot/systemd-boot.inc
@@ -0,0 +1,7 @@
+EXTRA_OEMAKE_append_intel-x86-common = ' EFI_LDFLAGS="-L${STAGING_DIR_HOST}/usr/lib" '
+
+SRC_URI_append_intel-x86-common = " \
+            file://0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch \
+            file://0001-sd-boot-stub-check-LoadOptions-contains-data.patch \
+            "
+
diff --git a/common/recipes-bsp/systemd-boot/systemd-boot_%.bbappend b/common/recipes-bsp/systemd-boot/systemd-boot_%.bbappend
index 98eaf45..c574041 100644
--- a/common/recipes-bsp/systemd-boot/systemd-boot_%.bbappend
+++ b/common/recipes-bsp/systemd-boot/systemd-boot_%.bbappend
@@ -1,9 +1,5 @@
-DEPENDS_append_intel-x86-common = " rmc"
-
 FILESEXTRAPATHS_prepend := "${THISDIR}/systemd-boot:"
 
-EXTRA_OEMAKE_append_intel-x86-common = ' EFI_LDFLAGS="-L${STAGING_DIR_HOST}/usr/lib" EFI_CFLAGS="-I${STAGING_INCDIR}/rmc -DRMC_EFI"'
-
 # Pin systemd revision down for systemd-boot recipe.
 # Patches could not be applied cleanly when systemd in OE is updated,
 # though we don't expect a lot of changes could happen in bootloader.
@@ -14,13 +10,6 @@ EXTRA_OEMAKE_append_intel-x86-common = ' EFI_LDFLAGS="-L${STAGING_DIR_HOST}/usr/
 # Revision: systemd v232 in OE
 SRCREV_intel-x86-common = "a1e2ef7ec912902d8142e7cb5830cbfb47dba86c"
 
-SRC_URI_append_intel-x86-common = " \
-            file://0001-sd-boot-Link-RMC-library-into-bootloader-and-stub.patch \
-            file://0002-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch \
-            file://0003-sd-boot-Support-global-kernel-command-line-fragment.patch \
-            file://0004-sd-boot-Support-global-kernel-command-line-fragment-in-EFI-stub.patch \
-            file://0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch \
-            file://0001-sd-boot-stub-check-LoadOptions-contains-data.patch \
-            "
+include systemd-boot/${EFI_PROVIDER}.inc
 
 PACKAGE_ARCH_intel-x86-common = "${INTEL_COMMON_PACKAGE_ARCH}"
-- 
2.13.1



More information about the meta-intel mailing list