summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd-boot_237.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd-boot_237.bb')
-rw-r--r--meta/recipes-core/systemd/systemd-boot_237.bb70
1 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd-boot_237.bb b/meta/recipes-core/systemd/systemd-boot_237.bb
new file mode 100644
index 0000000000..afd3848f29
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-boot_237.bb
@@ -0,0 +1,70 @@
1require systemd.inc
2FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
3
4DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
5
6SRC_URI += "file://0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
7 file://0027-remove-nobody-user-group-checking.patch \
8 file://0001-Also-check-i386-i586-and-i686-for-ia32.patch \
9 file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \
10 "
11
12inherit meson pkgconfig gettext
13inherit deploy
14
15EFI_CC ?= "${CC}"
16EXTRA_OEMESON += "-Defi=true \
17 -Dgnu-efi=true \
18 -Defi-includedir=${STAGING_INCDIR}/efi \
19 -Defi-ldsdir=${STAGING_LIBDIR} \
20 -Defi-libdir=${STAGING_LIBDIR} \
21 -Dman=false \
22 -Defi-cc='${EFI_CC}' \
23 -Defi-ld='${LD}' \
24 "
25
26# install to the image as boot*.efi if its the EFI_PROVIDER,
27# otherwise install as the full name.
28# This allows multiple bootloaders to coexist in a single image.
29python __anonymous () {
30 import re
31 target = d.getVar('TARGET_ARCH')
32 prefix = "" if d.getVar('EFI_PROVIDER', True) == "systemd-boot" else "systemd-"
33 if target == "x86_64":
34 systemdimage = prefix + "bootx64.efi"
35 else:
36 systemdimage = prefix + "bootia32.efi"
37 d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage)
38 prefix = "systemd-" if prefix == "" else ""
39 d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix)
40}
41
42FILES_${PN} = "/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE}"
43
44RDEPENDS_${PN} += "virtual/systemd-bootconf"
45
46# Imported from the old gummiboot recipe
47TUNE_CCARGS_remove = "-mfpmath=sse"
48COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
49COMPATIBLE_HOST_x86-x32 = "null"
50
51do_compile() {
52 SYSTEMD_BOOT_EFI_ARCH="ia32"
53 if [ "${TARGET_ARCH}" = "x86_64" ]; then
54 SYSTEMD_BOOT_EFI_ARCH="x64"
55 fi
56
57 ninja src/boot/efi/${SYSTEMD_BOOT_IMAGE_PREFIX}${SYSTEMD_BOOT_IMAGE}
58}
59
60do_install() {
61 install -d ${D}/boot
62 install -d ${D}/boot/EFI
63 install -d ${D}/boot/EFI/BOOT
64 install ${B}/src/boot/efi/systemd-boot*.efi ${D}/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE}
65}
66
67do_deploy () {
68 install ${B}/src/boot/efi/systemd-boot*.efi ${DEPLOYDIR}
69}
70addtask deploy before do_build after do_compile