* [PATCH] fix systemd-boot for non x64 targets
@ 2022-10-20 2:56 Felix Moessbauer
2022-10-26 14:03 ` Anton Mikanovich
0 siblings, 1 reply; 2+ messages in thread
From: Felix Moessbauer @ 2022-10-20 2:56 UTC (permalink / raw)
To: isar-users; +Cc: jan.kiszka, Felix Moessbauer
With the recently introduced cross-imaging, all imager dependencies are
installed for the build architecture but not the target / distro
architecture. This is correct for tools, but not for architecture
specific files that are copied into the target rootfs.
By that, arm64 targets got bootx64.efi loaders installed, making it
impossible to boot the image.
For grub, we already have architecture specific support based on package
names. This patch introduces the same for systemd-boot. Here, the
architecture is not encoded in the package name, but in the architecture
field. To avoid conflicts with other packages in the buildchroot-host,
from bookworm on, we only depend on systemd-boot-efi,
as this package provides the efi stubs and is co-installable for
multiple architectures. For older releases, this is not possible but
depending on systemd works as well.
In theory this could conflict with a build-arch systemd installed into
the buildchroot-host, but as almost all dependencies are now installed
using sbuilder and schroot, this case is very unlikely.
In this case, a user still can disable cross for the imaging.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta/conf/distro/debian-common.conf | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/conf/distro/debian-common.conf b/meta/conf/distro/debian-common.conf
index a2c23cb4..c18eebc2 100644
--- a/meta/conf/distro/debian-common.conf
+++ b/meta/conf/distro/debian-common.conf
@@ -28,9 +28,9 @@ GRUB_BOOTLOADER_INSTALL_arm64 = "grub-efi-arm64-bin"
SYSLINUX_BOOTLOADER_INSTALL = "syslinux syslinux-common"
-SYSTEMD_BOOTLOADER_INSTALL = "systemd"
-SYSTEMD_BOOTLOADER_INSTALL_debian-bookworm = "systemd-boot"
-SYSTEMD_BOOTLOADER_INSTALL_debian-sid-ports = "systemd-boot"
+SYSTEMD_BOOTLOADER_INSTALL = "systemd:${DISTRO_ARCH}"
+SYSTEMD_BOOTLOADER_INSTALL_debian-bookworm = "systemd-boot-efi:${DISTRO_ARCH}"
+SYSTEMD_BOOTLOADER_INSTALL_debian-sid-ports = "systemd-boot-efi:${DISTRO_ARCH}"
COMPAT_DISTRO_ARCH_amd64 = "i386"
COMPAT_DISTRO_ARCH_arm64 = "armhf"
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fix systemd-boot for non x64 targets
2022-10-20 2:56 [PATCH] fix systemd-boot for non x64 targets Felix Moessbauer
@ 2022-10-26 14:03 ` Anton Mikanovich
0 siblings, 0 replies; 2+ messages in thread
From: Anton Mikanovich @ 2022-10-26 14:03 UTC (permalink / raw)
To: Felix Moessbauer, isar-users; +Cc: jan.kiszka
20.10.2022 05:56, Felix Moessbauer wrote:
> With the recently introduced cross-imaging, all imager dependencies are
> installed for the build architecture but not the target / distro
> architecture. This is correct for tools, but not for architecture
> specific files that are copied into the target rootfs.
> By that, arm64 targets got bootx64.efi loaders installed, making it
> impossible to boot the image.
>
> For grub, we already have architecture specific support based on package
> names. This patch introduces the same for systemd-boot. Here, the
> architecture is not encoded in the package name, but in the architecture
> field. To avoid conflicts with other packages in the buildchroot-host,
> from bookworm on, we only depend on systemd-boot-efi,
> as this package provides the efi stubs and is co-installable for
> multiple architectures. For older releases, this is not possible but
> depending on systemd works as well.
>
> In theory this could conflict with a build-arch systemd installed into
> the buildchroot-host, but as almost all dependencies are now installed
> using sbuilder and schroot, this case is very unlikely.
> In this case, a user still can disable cross for the imaging.
>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
Applied to next, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-26 14:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20 2:56 [PATCH] fix systemd-boot for non x64 targets Felix Moessbauer
2022-10-26 14:03 ` Anton Mikanovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox