From 3342d3715ec829f720e1590f45ad84e6b7226145 Mon Sep 17 00:00:00 2001 From: California Sullivan Date: Wed, 21 Mar 2018 15:16:20 -0700 Subject: systemd-boot/rmc-boot.inc: make it work with EFI image enhancements 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 --- 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" -- cgit v1.2.3-54-g00ecf