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 <california.l.sullivan@intel.com>
This commit is contained in:
California Sullivan 2018-03-21 15:16:20 -07:00
parent f2502f90ab
commit 3342d3715e

View File

@ -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"