summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd
diff options
context:
space:
mode:
authorCalifornia Sullivan <california.l.sullivan@intel.com>2018-02-28 18:15:11 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-06 06:35:42 -0800
commit8cc106d403d53eb64c842fb2ffbd50fb52abb677 (patch)
treea7c4fadbb38bcef90114531fc572aa87d39b6657 /meta/recipes-core/systemd
parent00acdebbeda4812a49b8f06a82748f6a515e9460 (diff)
downloadpoky-8cc106d403d53eb64c842fb2ffbd50fb52abb677.tar.gz
systemd-boot: add package that installs to boot
If the EFI_PROVIDER is systemd-boot, install as boot(x64|ia32) as per convention. If its not the EFI_PROVIDER, install as systemd-boot(x64|ia32), as to not collide with other possible bootloaders. (From OE-Core rev: 551925bc49707821d0d621369fd33fde6b836d8c) Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd')
-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 () {