[meta-intel] [PATCH 2/3] systemd-boot/rmc-boot.inc: make it work with EFI image enhancements

California Sullivan california.l.sullivan at intel.com
Thu Mar 22 08:31:27 PDT 2018


Give it an RPROVIDES rmc-boot so that EFI_PROVIDER rmc-boot can be used
as an install target. RDEPENDS on rmc-db to satisfy its runtime
dependencies. Also add python snippet to set its IMAGE/IMAGE_PREFIX
target for when its chosen as EFI_PROVIDER.

These changes let it work well with the new wks.in file, where
previously it couldn't work with wic at all.

Signed-off-by: California Sullivan <california.l.sullivan at intel.com>
---
 recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc b/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc
index e27d4951..bbe3aea2 100644
--- a/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc
+++ b/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc
@@ -1,6 +1,19 @@
 # This patchset contains hooks that allows systemd-boot to use RMC capablilities.
+python __anonymous () {
+    import re
+    target = d.getVar('TARGET_ARCH')
+    prefix = "" if d.getVar('EFI_PROVIDER') == "rmc-boot" else "systemd-"
+    if target == "x86_64":
+        systemdimage = prefix + "bootx64.efi"
+    else:
+        systemdimage = prefix + "bootia32.efi"
+    d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage)
+    prefix = "systemd-" if prefix == "" else ""
+    d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix)
+}
 
 DEPENDS_append_intel-x86-common = " rmc rmc-efi"
+RDEPENDS_${PN}_append_intel-x86-common = " rmc-db"
 
 EXTRA_OEMESON_append_intel-x86-common = ' \
                   -Drmc-includedir="${STAGING_INCDIR}/rmc" \
@@ -13,3 +26,5 @@ SRC_URI_append_intel-x86-common = " \
             file://0004-sd-boot-Support-global-kernel-command-line-fragment.patch \
             file://0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch \
             "
+
+RPROVIDES_${PN} += "rmc-boot"
-- 
2.14.3



More information about the meta-intel mailing list