summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd-boot_243.2.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd-boot_243.2.bb')
-rw-r--r--meta/recipes-core/systemd/systemd-boot_243.2.bb70
1 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd-boot_243.2.bb b/meta/recipes-core/systemd/systemd-boot_243.2.bb
new file mode 100644
index 0000000000..515abc289b
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-boot_243.2.bb
@@ -0,0 +1,70 @@
1require systemd.inc
2FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
3
4require conf/image-uefi.conf
5
6DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
7
8# NOTE: These three patches are in theory not needed, but we haven't
9# figured out how to correctly pass efi-cc parameter if it's an array.
10SRC_URI += "file://0001-Revert-meson-use-an-array-option-for-efi-cc.patch \
11 file://0001-Revert-meson-print-EFI-CC-configuration-nicely.patch \
12 file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \
13 file://0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch \
14 "
15
16inherit meson pkgconfig gettext
17inherit deploy
18
19EFI_CC ?= "${CC}"
20EXTRA_OEMESON += "-Defi=true \
21 -Dgnu-efi=true \
22 -Defi-includedir=${STAGING_INCDIR}/efi \
23 -Defi-ldsdir=${STAGING_LIBDIR} \
24 -Defi-libdir=${STAGING_LIBDIR} \
25 -Dman=false \
26 -Defi-cc='${EFI_CC}' \
27 -Defi-ld='${LD}' \
28 -Defi-objcopy='${OBJCOPY}' \
29 "
30
31# install to the image as boot*.efi if its the EFI_PROVIDER,
32# otherwise install as the full name.
33# This allows multiple bootloaders to coexist in a single image.
34python __anonymous () {
35 import re
36 target = d.getVar('TARGET_ARCH')
37 prefix = "" if d.getVar('EFI_PROVIDER') == "systemd-boot" else "systemd-"
38 systemdimage = prefix + d.getVar("EFI_BOOT_IMAGE")
39 d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage)
40 prefix = "systemd-" if prefix == "" else ""
41 d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix)
42}
43
44FILES_${PN} = "${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}"
45
46RDEPENDS_${PN} += "virtual/systemd-bootconf"
47
48# Imported from the old gummiboot recipe
49TUNE_CCARGS_remove = "-mfpmath=sse"
50COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
51COMPATIBLE_HOST_x86-x32 = "null"
52
53do_compile() {
54 SYSTEMD_BOOT_EFI_ARCH="ia32"
55 if [ "${TARGET_ARCH}" = "x86_64" ]; then
56 SYSTEMD_BOOT_EFI_ARCH="x64"
57 fi
58
59 ninja src/boot/efi/${SYSTEMD_BOOT_IMAGE_PREFIX}${SYSTEMD_BOOT_IMAGE}
60}
61
62do_install() {
63 install -d ${D}${EFI_FILES_PATH}
64 install ${B}/src/boot/efi/systemd-boot*.efi ${D}${EFI_FILES_PATH}/${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