From: Dmitry Eremin-Solenikov <dmitry_eremin-soleni...@mentor.com> Replace anonymous function setting GRUB_* variables with static configuration, since systemd-boot.bbclass will use fixed names for systemd bootloader.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-soleni...@mentor.com> --- meta/recipes-core/systemd/systemd-boot_243.bb | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/meta/recipes-core/systemd/systemd-boot_243.bb b/meta/recipes-core/systemd/systemd-boot_243.bb index 515abc289bef..5d07177a335c 100644 --- a/meta/recipes-core/systemd/systemd-boot_243.bb +++ b/meta/recipes-core/systemd/systemd-boot_243.bb @@ -28,20 +28,9 @@ EXTRA_OEMESON += "-Defi=true \ -Defi-objcopy='${OBJCOPY}' \ " -# install to the image as boot*.efi if its the EFI_PROVIDER, -# otherwise install as the full name. -# This allows multiple bootloaders to coexist in a single image. -python __anonymous () { - import re - target = d.getVar('TARGET_ARCH') - prefix = "" if d.getVar('EFI_PROVIDER') == "systemd-boot" else "systemd-" - systemdimage = prefix + d.getVar("EFI_BOOT_IMAGE") - d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage) - prefix = "systemd-" if prefix == "" else "" - d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix) -} +SYSTEMD_BOOT_IMAGE = "systemd-${EFI_BOOT_IMAGE}" -FILES_${PN} = "${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}" +FILES_${PN} = "${EFI_FILES_PATH}" RDEPENDS_${PN} += "virtual/systemd-bootconf" @@ -56,12 +45,16 @@ do_compile() { SYSTEMD_BOOT_EFI_ARCH="x64" fi - ninja src/boot/efi/${SYSTEMD_BOOT_IMAGE_PREFIX}${SYSTEMD_BOOT_IMAGE} + ninja src/boot/efi/${SYSTEMD_BOOT_IMAGE} } do_install() { install -d ${D}${EFI_FILES_PATH} - install ${B}/src/boot/efi/systemd-boot*.efi ${D}${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE} + if [ "${EFI_PROVIDER}" = "${BPN}" ] ; then + install ${B}/src/boot/efi/systemd-boot*.efi ${D}${EFI_FILES_PATH}/${EFI_BOOT_IMAGE} + else + install ${B}/src/boot/efi/systemd-boot*.efi ${D}${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE} + fi } do_deploy () { -- 2.23.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core