fix multilib issues with UEFI bootloaders
cover fix multilib issues with UEFI bootloaders
Last UEFI patchset that went in broke building not-native multilib images (like lib32-core-image-minimal). Fix this issue by listing systemd-boot as non-multilib recipe and by fixing UEFI app naming in multilib cases.
Signature · 2 lines
With best wishes Dmitry
PATCH 1/2 conf/image-uefi: fix building images for multilib case
From: Dmitry Eremin-Solenikov <[email protected]>
Building live images for lib32-core-minimal-image will fail because image target override won't match grub's override. Fix this by introducing anonymous python function. A proper fix should be to introduce multilib overrides, but it will be more intrusive.
--- meta/conf/image-uefi.conf | 11 +++++------ meta/conf/image-uefi.inc | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 meta/conf/image-uefi.inc
meta/conf/image-uefi.conf +5 -6
@@ -8,9 +8,8 @@ EFI_PREFIX ?= "/boot" # Location inside rootfs. EFI_FILES_PATH = "${EFI_PREFIX}${EFIDIR}" -# Determine name of bootloader image -EFI_BOOT_IMAGE ?= "bootINVALID.efi" -EFI_BOOT_IMAGE_x86-64 = "bootx64.efi" -EFI_BOOT_IMAGE_x86 = "bootia32.efi" -EFI_BOOT_IMAGE_aarch64 = "bootaa64.efi" -EFI_BOOT_IMAGE_arm = "bootarm.efi" +# Parsing python anonymous functions in .conf files does not work, so move it +# to .inc file +require conf/image-uefi.inc + +EFI_BOOT_IMAGE ?= "boot${EFI_ARCH}.efi"
meta/conf/image-uefi.inc new file +23 -0
@@ -0,0 +1,23 @@ +# Determine name of bootloader image +python () { + import re + if d.getVar("MLPREFIX") != "": + target = d.getVar("TARGET_ARCH_MULTILIB_ORIGINAL") + else: + target = d.getVar("TARGET_ARCH") + + if target == "x86_64": + arch = "x64" + elif re.match('i.86', target): + arch = "ia32" + elif re.match('aarch64', target): + arch = "aa64" + elif re.match('arm', target): + arch = "arm" + else: + raise bb.parse.SkipRecipe("image-uefi is incompatible with target %s" % target) + + d.setVar("EFI_ARCH", arch) +} + +
Signature · 1 line
2.23.0
PATCH 2/2 multilib.conf: add systemd-boot to non-multilib recipes list
In reply to [email protected]From: Dmitry Eremin-Solenikov <[email protected]>
Add systemd-boot to NON_MULTILIB_RECIPES so that it won't be built for multilib targets.
--- meta/conf/multilib.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/multilib.conf +1 -1
@@ -29,4 +29,4 @@ PKG_CONFIG_PATH[vardepvalueexclude] = ":${WORKDIR}/recipe-sysroot/${datadir}/pkg # These recipes don't need multilib variants, the ${BPN} PROVDES/RPROVDES # ${MLPREFIX}${BPN} -NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf" +NON_MULTILIB_RECIPES = "grub grub-efi systemd-boot make-mod-scripts ovmf"
Signature · 1 line
2.23.0
Hello,
пт, 1 нояб. 2019 г. в 17:32, <[email protected]>:
Quoted 5 lines
Last UEFI patchset that went in broke building not-native multilib images (like lib32-core-image-minimal). Fix this issue by listing systemd-boot as non-multilib recipe and by fixing UEFI app naming in multilib cases.
We'd like to unbreak such build. Is there anything wrong with these two patches? No feedback received up to this point.
Signature · 2 lines
With best wishes Dmitry