summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd-boot_234.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd-boot_234.bb')
-rw-r--r--meta/recipes-core/systemd/systemd-boot_234.bb28
1 files changed, 25 insertions, 3 deletions
diff --git a/meta/recipes-core/systemd/systemd-boot_234.bb b/meta/recipes-core/systemd/systemd-boot_234.bb
index 88a14ac61e..2d29df8be7 100644
--- a/meta/recipes-core/systemd/systemd-boot_234.bb
+++ b/meta/recipes-core/systemd/systemd-boot_234.bb
@@ -18,6 +18,26 @@ EXTRA_OECONF = " --enable-gnuefi \
18 EFI_CC='${EFI_CC}' \ 18 EFI_CC='${EFI_CC}' \
19 " 19 "
20 20
21# install to the image as boot*.efi if its the EFI_PROVIDER,
22# otherwise install as the full name.
23# This allows multiple bootloaders to coexist in a single image.
24python __anonymous () {
25 import re
26 target = d.getVar('TARGET_ARCH')
27 prefix = "" if d.getVar('EFI_PROVIDER', True) == "systemd-boot" else "systemd-"
28 if target == "x86_64":
29 systemdimage = prefix + "bootx64.efi"
30 else:
31 systemdimage = prefix + "bootia32.efi"
32 d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage)
33 prefix = "systemd-" if prefix == "" else ""
34 d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix)
35}
36
37FILES_${PN} = "/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE}"
38
39RDEPENDS_${PN} += "virtual/systemd-bootconf"
40
21# Imported from the old gummiboot recipe 41# Imported from the old gummiboot recipe
22TUNE_CCARGS_remove = "-mfpmath=sse" 42TUNE_CCARGS_remove = "-mfpmath=sse"
23COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux" 43COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
@@ -29,12 +49,14 @@ do_compile() {
29 SYSTEMD_BOOT_EFI_ARCH="x64" 49 SYSTEMD_BOOT_EFI_ARCH="x64"
30 fi 50 fi
31 51
32 oe_runmake systemd-boot${SYSTEMD_BOOT_EFI_ARCH}.efi 52 oe_runmake ${SYSTEMD_BOOT_IMAGE_PREFIX}${SYSTEMD_BOOT_IMAGE}
33} 53}
34 54
35do_install() { 55do_install() {
36 # Bypass systemd installation with a NOP 56 install -d ${D}/boot
37 : 57 install -d ${D}/boot/EFI
58 install -d ${D}/boot/EFI/BOOT
59 install ${B}/systemd-boot*.efi ${D}/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE}
38} 60}
39 61
40do_deploy () { 62do_deploy () {