diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2019-02-26 14:38:58 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-03 15:38:13 +0000 |
commit | 38cdb19deac1fdf21f494c0b61cf4eeaf48491eb (patch) | |
tree | 430281830ea214435390120317b7ebc11d3c4471 /meta/recipes-core/systemd/systemd-boot_241.bb | |
parent | 40bc0ed88062906c310642d4fb958d34d407e98e (diff) | |
download | poky-38cdb19deac1fdf21f494c0b61cf4eeaf48491eb.tar.gz |
systemd-boot: upgrade to 241
The following two patches are added because I cannot figure
out how to pass parameter to efi-cc if it's changed to be
an array value.
systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch
systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch
(From OE-Core rev: 42ec27489135f5c2dbe708dacb5dadb0f5d9df5b)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd-boot_241.bb')
-rw-r--r-- | meta/recipes-core/systemd/systemd-boot_241.bb | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd-boot_241.bb b/meta/recipes-core/systemd/systemd-boot_241.bb new file mode 100644 index 0000000000..56e68a3d49 --- /dev/null +++ b/meta/recipes-core/systemd/systemd-boot_241.bb | |||
@@ -0,0 +1,71 @@ | |||
1 | require systemd.inc | ||
2 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:" | ||
3 | |||
4 | DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native" | ||
5 | |||
6 | # NOTE: These three patches are in theory not needed, but we haven't | ||
7 | # figured out how to correctly pass efi-cc parameter if it's an array. | ||
8 | SRC_URI += "file://0001-Revert-meson-use-an-array-option-for-efi-cc.patch \ | ||
9 | file://0001-Revert-meson-print-EFI-CC-configuration-nicely.patch \ | ||
10 | file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \ | ||
11 | " | ||
12 | |||
13 | inherit meson pkgconfig gettext | ||
14 | inherit deploy | ||
15 | |||
16 | EFI_CC ?= "${CC}" | ||
17 | EXTRA_OEMESON += "-Defi=true \ | ||
18 | -Dgnu-efi=true \ | ||
19 | -Defi-includedir=${STAGING_INCDIR}/efi \ | ||
20 | -Defi-ldsdir=${STAGING_LIBDIR} \ | ||
21 | -Defi-libdir=${STAGING_LIBDIR} \ | ||
22 | -Dman=false \ | ||
23 | -Defi-cc='${EFI_CC}' \ | ||
24 | -Defi-ld='${LD}' \ | ||
25 | " | ||
26 | |||
27 | # install to the image as boot*.efi if its the EFI_PROVIDER, | ||
28 | # otherwise install as the full name. | ||
29 | # This allows multiple bootloaders to coexist in a single image. | ||
30 | python __anonymous () { | ||
31 | import re | ||
32 | target = d.getVar('TARGET_ARCH') | ||
33 | prefix = "" if d.getVar('EFI_PROVIDER') == "systemd-boot" else "systemd-" | ||
34 | if target == "x86_64": | ||
35 | systemdimage = prefix + "bootx64.efi" | ||
36 | else: | ||
37 | systemdimage = prefix + "bootia32.efi" | ||
38 | d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage) | ||
39 | prefix = "systemd-" if prefix == "" else "" | ||
40 | d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix) | ||
41 | } | ||
42 | |||
43 | FILES_${PN} = "/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE}" | ||
44 | |||
45 | RDEPENDS_${PN} += "virtual/systemd-bootconf" | ||
46 | |||
47 | # Imported from the old gummiboot recipe | ||
48 | TUNE_CCARGS_remove = "-mfpmath=sse" | ||
49 | COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux" | ||
50 | COMPATIBLE_HOST_x86-x32 = "null" | ||
51 | |||
52 | do_compile() { | ||
53 | SYSTEMD_BOOT_EFI_ARCH="ia32" | ||
54 | if [ "${TARGET_ARCH}" = "x86_64" ]; then | ||
55 | SYSTEMD_BOOT_EFI_ARCH="x64" | ||
56 | fi | ||
57 | |||
58 | ninja src/boot/efi/${SYSTEMD_BOOT_IMAGE_PREFIX}${SYSTEMD_BOOT_IMAGE} | ||
59 | } | ||
60 | |||
61 | do_install() { | ||
62 | install -d ${D}/boot | ||
63 | install -d ${D}/boot/EFI | ||
64 | install -d ${D}/boot/EFI/BOOT | ||
65 | install ${B}/src/boot/efi/systemd-boot*.efi ${D}/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE} | ||
66 | } | ||
67 | |||
68 | do_deploy () { | ||
69 | install ${B}/src/boot/efi/systemd-boot*.efi ${DEPLOYDIR} | ||
70 | } | ||
71 | addtask deploy before do_build after do_compile | ||