diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd-boot_255.4.bb')
| -rw-r--r-- | meta/recipes-core/systemd/systemd-boot_255.4.bb | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd-boot_255.4.bb b/meta/recipes-core/systemd/systemd-boot_255.4.bb new file mode 100644 index 0000000000..4ee25ee72f --- /dev/null +++ b/meta/recipes-core/systemd/systemd-boot_255.4.bb | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | require systemd.inc | ||
| 2 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:" | ||
| 3 | |||
| 4 | require conf/image-uefi.conf | ||
| 5 | |||
| 6 | DEPENDS = "intltool-native libcap util-linux gperf-native python3-jinja2-native python3-pyelftools-native" | ||
| 7 | |||
| 8 | inherit meson pkgconfig gettext | ||
| 9 | inherit deploy | ||
| 10 | |||
| 11 | LDFLAGS:prepend = "${@ " ".join(d.getVar('LD').split()[1:])} " | ||
| 12 | |||
| 13 | EFI_LD = "bfd" | ||
| 14 | LDFLAGS:append = " -fuse-ld=${EFI_LD}" | ||
| 15 | |||
| 16 | do_write_config[vardeps] += "EFI_LD" | ||
| 17 | do_write_config:append() { | ||
| 18 | cat >${WORKDIR}/meson-${PN}.cross <<EOF | ||
| 19 | [binaries] | ||
| 20 | c_ld = ${@meson_array('EFI_LD', d)} | ||
| 21 | EOF | ||
| 22 | } | ||
| 23 | |||
| 24 | MESON_CROSS_FILE:append = " --cross-file ${WORKDIR}/meson-${PN}.cross" | ||
| 25 | |||
| 26 | MESON_TARGET = "systemd-boot" | ||
| 27 | |||
| 28 | EXTRA_OEMESON += "-Defi=true \ | ||
| 29 | -Dbootloader=true \ | ||
| 30 | -Dman=false \ | ||
| 31 | " | ||
| 32 | |||
| 33 | # install to the image as boot*.efi if its the EFI_PROVIDER, | ||
| 34 | # otherwise install as the full name. | ||
| 35 | # This allows multiple bootloaders to coexist in a single image. | ||
| 36 | python __anonymous () { | ||
| 37 | import re | ||
| 38 | target = d.getVar('TARGET_ARCH') | ||
| 39 | prefix = "" if d.getVar('EFI_PROVIDER') == "systemd-boot" else "systemd-" | ||
| 40 | systemdimage = prefix + d.getVar("EFI_BOOT_IMAGE") | ||
| 41 | d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage) | ||
| 42 | prefix = "systemd-" if prefix == "" else "" | ||
| 43 | d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix) | ||
| 44 | } | ||
| 45 | |||
| 46 | FILES:${PN} = "${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}" | ||
| 47 | |||
| 48 | RDEPENDS:${PN} += "virtual-systemd-bootconf" | ||
| 49 | |||
| 50 | CFLAGS:append:libc-musl = " -D__DEFINED_wchar_t" | ||
| 51 | |||
| 52 | COMPATIBLE_HOST = "(aarch64.*|arm.*|x86_64.*|i.86.*)-linux" | ||
| 53 | COMPATIBLE_HOST:x86-x32 = "null" | ||
| 54 | |||
| 55 | do_install() { | ||
| 56 | install -d ${D}${EFI_FILES_PATH} | ||
| 57 | install ${B}/src/boot/efi/systemd-boot*.efi ${D}${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE} | ||
| 58 | } | ||
| 59 | |||
| 60 | do_deploy () { | ||
| 61 | install ${B}/src/boot/efi/systemd-boot*.efi ${DEPLOYDIR} | ||
| 62 | install ${B}/src/boot/efi/linux*.efi.stub ${DEPLOYDIR} | ||
| 63 | install ${B}/src/boot/efi/addon*.efi.stub ${DEPLOYDIR} | ||
| 64 | } | ||
| 65 | |||
| 66 | addtask deploy before do_build after do_compile | ||
| 67 | |||
