1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 13:29:49 +00:00

systemd-boot: switch to image-uefi.conf

Use variables from image-uefi.conf instead of hardcoding them in the recipe.

(From OE-Core rev: 4acac3560cb819e0cd992e02441621dab1beada7)

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Dmitry Eremin-Solenikov
2019-09-18 16:12:45 +03:00
committed by Richard Purdie
parent a1acf2c150
commit 6501eacfa2
@@ -1,6 +1,8 @@
require systemd.inc require systemd.inc
FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:" FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
require conf/image-uefi.conf
DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native" DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
# NOTE: These three patches are in theory not needed, but we haven't # NOTE: These three patches are in theory not needed, but we haven't
@@ -33,16 +35,13 @@ python __anonymous () {
import re import re
target = d.getVar('TARGET_ARCH') target = d.getVar('TARGET_ARCH')
prefix = "" if d.getVar('EFI_PROVIDER') == "systemd-boot" else "systemd-" prefix = "" if d.getVar('EFI_PROVIDER') == "systemd-boot" else "systemd-"
if target == "x86_64": systemdimage = prefix + d.getVar("EFI_BOOT_IMAGE")
systemdimage = prefix + "bootx64.efi"
else:
systemdimage = prefix + "bootia32.efi"
d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage) d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage)
prefix = "systemd-" if prefix == "" else "" prefix = "systemd-" if prefix == "" else ""
d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix) d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix)
} }
FILES_${PN} = "/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE}" FILES_${PN} = "${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}"
RDEPENDS_${PN} += "virtual/systemd-bootconf" RDEPENDS_${PN} += "virtual/systemd-bootconf"
@@ -61,10 +60,8 @@ do_compile() {
} }
do_install() { do_install() {
install -d ${D}/boot install -d ${D}${EFI_FILES_PATH}
install -d ${D}/boot/EFI install ${B}/src/boot/efi/systemd-boot*.efi ${D}${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}
install -d ${D}/boot/EFI/BOOT
install ${B}/src/boot/efi/systemd-boot*.efi ${D}/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE}
} }
do_deploy () { do_deploy () {