All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] fix multilib issues with UEFI bootloaders
@ 2019-11-01 14:31 dbaryshkov
  2019-11-01 14:31 ` [PATCH 1/2] conf/image-uefi: fix building images for multilib case dbaryshkov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dbaryshkov @ 2019-11-01 14:31 UTC (permalink / raw)
  To: openembedded-core

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.

-- 
With best wishes
Dmitry


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] conf/image-uefi: fix building images for multilib case
  2019-11-01 14:31 [PATCH 0/2] fix multilib issues with UEFI bootloaders dbaryshkov
@ 2019-11-01 14:31 ` dbaryshkov
  2019-11-01 14:31 ` [PATCH 2/2] multilib.conf: add systemd-boot to non-multilib recipes list dbaryshkov
  2019-11-27 12:53 ` [PATCH 0/2] fix multilib issues with UEFI bootloaders Dmitry Eremin-Solenikov
  2 siblings, 0 replies; 4+ messages in thread
From: dbaryshkov @ 2019-11-01 14:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Dmitry Eremin-Solenikov

From: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>

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.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
---
 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

diff --git a/meta/conf/image-uefi.conf b/meta/conf/image-uefi.conf
index aaeff12ccb80..57fd18f02742 100644
--- a/meta/conf/image-uefi.conf
+++ b/meta/conf/image-uefi.conf
@@ -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"
diff --git a/meta/conf/image-uefi.inc b/meta/conf/image-uefi.inc
new file mode 100644
index 000000000000..94c5813494cb
--- /dev/null
+++ b/meta/conf/image-uefi.inc
@@ -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)
+}
+
+
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] multilib.conf: add systemd-boot to non-multilib recipes list
  2019-11-01 14:31 [PATCH 0/2] fix multilib issues with UEFI bootloaders dbaryshkov
  2019-11-01 14:31 ` [PATCH 1/2] conf/image-uefi: fix building images for multilib case dbaryshkov
@ 2019-11-01 14:31 ` dbaryshkov
  2019-11-27 12:53 ` [PATCH 0/2] fix multilib issues with UEFI bootloaders Dmitry Eremin-Solenikov
  2 siblings, 0 replies; 4+ messages in thread
From: dbaryshkov @ 2019-11-01 14:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Dmitry Eremin-Solenikov

From: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>

Add systemd-boot to NON_MULTILIB_RECIPES so that it won't be built for multilib targets.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
---
 meta/conf/multilib.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index cfed3fbbd07f..c734a121e12d 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -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"
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] fix multilib issues with UEFI bootloaders
  2019-11-01 14:31 [PATCH 0/2] fix multilib issues with UEFI bootloaders dbaryshkov
  2019-11-01 14:31 ` [PATCH 1/2] conf/image-uefi: fix building images for multilib case dbaryshkov
  2019-11-01 14:31 ` [PATCH 2/2] multilib.conf: add systemd-boot to non-multilib recipes list dbaryshkov
@ 2019-11-27 12:53 ` Dmitry Eremin-Solenikov
  2 siblings, 0 replies; 4+ messages in thread
From: Dmitry Eremin-Solenikov @ 2019-11-27 12:53 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer, Richard Purdie

Hello,

пт, 1 нояб. 2019 г. в 17:32, <dbaryshkov@gmail.com>:
>
> 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.

-- 
With best wishes
Dmitry


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-27 12:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-01 14:31 [PATCH 0/2] fix multilib issues with UEFI bootloaders dbaryshkov
2019-11-01 14:31 ` [PATCH 1/2] conf/image-uefi: fix building images for multilib case dbaryshkov
2019-11-01 14:31 ` [PATCH 2/2] multilib.conf: add systemd-boot to non-multilib recipes list dbaryshkov
2019-11-27 12:53 ` [PATCH 0/2] fix multilib issues with UEFI bootloaders Dmitry Eremin-Solenikov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.