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