diff options
author | Adrian Bunk <bunk@stusta.de> | 2019-12-09 16:44:01 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-28 23:25:41 +0000 |
commit | ad4bafd16558340200b7ba56573c5705ca0a751f (patch) | |
tree | 060cf640389a3213fcac25e8ccae457345359145 /meta/recipes-core/systemd/systemd-boot_243.2.bb | |
parent | ba6d88d8fa7b7a82ad8e265ff6f590fe2d640d34 (diff) | |
download | poky-ad4bafd16558340200b7ba56573c5705ca0a751f.tar.gz |
systemd: Rename the files instead of using PV
(From OE-Core rev: fb5491995ca2118bc52f8d73953f5531b91dd861)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd-boot_243.2.bb')
-rw-r--r-- | meta/recipes-core/systemd/systemd-boot_243.2.bb | 70 |
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 @@ | |||
1 | require systemd.inc | ||
2 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:" | ||
3 | |||
4 | require conf/image-uefi.conf | ||
5 | |||
6 | DEPENDS = "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. | ||
10 | SRC_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 | |||
16 | inherit meson pkgconfig gettext | ||
17 | inherit deploy | ||
18 | |||
19 | EFI_CC ?= "${CC}" | ||
20 | EXTRA_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. | ||
34 | python __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 | |||
44 | FILES_${PN} = "${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}" | ||
45 | |||
46 | RDEPENDS_${PN} += "virtual/systemd-bootconf" | ||
47 | |||
48 | # Imported from the old gummiboot recipe | ||
49 | TUNE_CCARGS_remove = "-mfpmath=sse" | ||
50 | COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux" | ||
51 | COMPATIBLE_HOST_x86-x32 = "null" | ||
52 | |||
53 | do_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 | |||
62 | do_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 | |||
67 | do_deploy () { | ||
68 | install ${B}/src/boot/efi/systemd-boot*.efi ${DEPLOYDIR} | ||
69 | } | ||
70 | addtask deploy before do_build after do_compile | ||