* [PATCH v3 0/5] systemd-boot: Locate imager deps in buildchroot
@ 2022-09-23 12:43 Felix Moessbauer
2022-09-23 12:43 ` [PATCH v3 1/5] fix: do not overwrite kernel_dir in efi-isar wic Felix Moessbauer
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Felix Moessbauer @ 2022-09-23 12:43 UTC (permalink / raw)
To: isar-users; +Cc: amikan, jan.kiszka, henning.schild, Felix Moessbauer
Changes since v2:
- add missing imager dep to qemuamd64-focal multiconfig
Changes since v1:
- fix overwrite of kernel_dir in bootimg-efi-isar in a non-intrusive way (p1)
- implement systemd-boot logic in a way without having inline-changes to the wic plugin
Best regards,
Felix
Felix Moessbauer (5):
fix: do not overwrite kernel_dir in efi-isar wic
wic: locate systemd-boot efi files in buildchroot
Rework imager support for systemd-boot
Install systemd-boot into buildchroot for qemuarm
qemuamd64-focal: add missing install of imager dep
meta-isar/conf/multiconfig/qemuamd64-focal.conf | 4 +++-
meta-isar/conf/multiconfig/qemuarm-bookworm.conf | 2 +-
meta/conf/distro/debian-common.conf | 6 +++---
meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 7 ++++++-
4 files changed, 13 insertions(+), 6 deletions(-)
--
2.30.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 1/5] fix: do not overwrite kernel_dir in efi-isar wic
2022-09-23 12:43 [PATCH v3 0/5] systemd-boot: Locate imager deps in buildchroot Felix Moessbauer
@ 2022-09-23 12:43 ` Felix Moessbauer
2022-09-23 12:43 ` [PATCH v3 2/5] wic: locate systemd-boot efi files in buildchroot Felix Moessbauer
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Felix Moessbauer @ 2022-09-23 12:43 UTC (permalink / raw)
To: isar-users; +Cc: amikan, jan.kiszka, henning.schild, Felix Moessbauer
This fixes the overwrite of the kernel_dir in bootimg-efi-isar
without having in-line changes.
The change is written in a way that makes it easy to update the
plugin without having to resolve merge conflicts.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
index 6e6cd6ec..bdc04547 100644
--- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
+++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
@@ -436,10 +436,15 @@ class BootimgEFIPlugin(SourcePlugin):
grub_cmd += "reiserfs regexp " + grub_modules
exec_cmd(grub_cmd)
elif source_params['loader'] == 'systemd-boot':
+ # backup kernel dir before overwriting
+ kernel_dir_orig = kernel_dir
kernel_dir = os.path.join(rootfs_dir['ROOTFS_DIR'], "usr/lib/systemd/boot/efi/")
+
for mod in [x for x in os.listdir(kernel_dir) if x.startswith("systemd-")]:
cp_cmd = "cp %s/%s %s/EFI/BOOT/%s" % (kernel_dir, mod, hdddir, mod[8:])
exec_cmd(cp_cmd, True)
+
+ kernel_dir = kernel_dir_orig
else:
raise WicError("unrecognized bootimg-efi-isar loader: %s" %
source_params['loader'])
--
2.30.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 2/5] wic: locate systemd-boot efi files in buildchroot
2022-09-23 12:43 [PATCH v3 0/5] systemd-boot: Locate imager deps in buildchroot Felix Moessbauer
2022-09-23 12:43 ` [PATCH v3 1/5] fix: do not overwrite kernel_dir in efi-isar wic Felix Moessbauer
@ 2022-09-23 12:43 ` Felix Moessbauer
2022-09-23 12:43 ` [PATCH v3 3/5] Rework imager support for systemd-boot Felix Moessbauer
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Felix Moessbauer @ 2022-09-23 12:43 UTC (permalink / raw)
To: isar-users; +Cc: amikan, jan.kiszka, henning.schild, Felix Moessbauer
This patch locates the systemd-boot efi files in the
buildchroot and not the target chroot.
By that, no imager-specifc dependencies have to be installed
in the target rootfs.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
index bdc04547..006c8bc2 100644
--- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
+++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
@@ -438,7 +438,7 @@ class BootimgEFIPlugin(SourcePlugin):
elif source_params['loader'] == 'systemd-boot':
# backup kernel dir before overwriting
kernel_dir_orig = kernel_dir
- kernel_dir = os.path.join(rootfs_dir['ROOTFS_DIR'], "usr/lib/systemd/boot/efi/")
+ kernel_dir = "/usr/lib/systemd/boot/efi/"
for mod in [x for x in os.listdir(kernel_dir) if x.startswith("systemd-")]:
cp_cmd = "cp %s/%s %s/EFI/BOOT/%s" % (kernel_dir, mod, hdddir, mod[8:])
--
2.30.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 3/5] Rework imager support for systemd-boot
2022-09-23 12:43 [PATCH v3 0/5] systemd-boot: Locate imager deps in buildchroot Felix Moessbauer
2022-09-23 12:43 ` [PATCH v3 1/5] fix: do not overwrite kernel_dir in efi-isar wic Felix Moessbauer
2022-09-23 12:43 ` [PATCH v3 2/5] wic: locate systemd-boot efi files in buildchroot Felix Moessbauer
@ 2022-09-23 12:43 ` Felix Moessbauer
2022-09-23 12:43 ` [PATCH v3 4/5] Install systemd-boot into buildchroot for qemuarm Felix Moessbauer
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Felix Moessbauer @ 2022-09-23 12:43 UTC (permalink / raw)
To: isar-users; +Cc: amikan, jan.kiszka, henning.schild, Felix Moessbauer
This is an addendum to a1e441.
As the imager now reads the systemd-boot files from the
buildchroot, we install the systemd-boot deps there (instead of
installing into the target image).
By that, use SYSTEMD_BOOTLOADER_INSTALL together with
IMAGER_INSTALL in configs.
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 9203b34b..a2c23cb4 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_PREINSTALL = "systemd"
-SYSTEMD_BOOTLOADER_PREINSTALL_debian-bookworm = "systemd-boot"
-SYSTEMD_BOOTLOADER_PREINSTALL_debian-sid-ports = "systemd-boot"
+SYSTEMD_BOOTLOADER_INSTALL = "systemd"
+SYSTEMD_BOOTLOADER_INSTALL_debian-bookworm = "systemd-boot"
+SYSTEMD_BOOTLOADER_INSTALL_debian-sid-ports = "systemd-boot"
COMPAT_DISTRO_ARCH_amd64 = "i386"
COMPAT_DISTRO_ARCH_arm64 = "armhf"
--
2.30.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 4/5] Install systemd-boot into buildchroot for qemuarm
2022-09-23 12:43 [PATCH v3 0/5] systemd-boot: Locate imager deps in buildchroot Felix Moessbauer
` (2 preceding siblings ...)
2022-09-23 12:43 ` [PATCH v3 3/5] Rework imager support for systemd-boot Felix Moessbauer
@ 2022-09-23 12:43 ` Felix Moessbauer
2022-09-23 12:43 ` [PATCH v3 5/5] qemuamd64-focal: add missing install of imager dep Felix Moessbauer
2022-09-28 9:24 ` [PATCH v3 0/5] systemd-boot: Locate imager deps in buildchroot Anton Mikanovich
5 siblings, 0 replies; 7+ messages in thread
From: Felix Moessbauer @ 2022-09-23 12:43 UTC (permalink / raw)
To: isar-users; +Cc: amikan, jan.kiszka, henning.schild, Felix Moessbauer
This patch reworks the qemuarm target and installs
the systemd-boot dependency into the buildchroot
rather than the target chroot.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta-isar/conf/multiconfig/qemuarm-bookworm.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-isar/conf/multiconfig/qemuarm-bookworm.conf b/meta-isar/conf/multiconfig/qemuarm-bookworm.conf
index c82abf30..126935b0 100644
--- a/meta-isar/conf/multiconfig/qemuarm-bookworm.conf
+++ b/meta-isar/conf/multiconfig/qemuarm-bookworm.conf
@@ -6,4 +6,4 @@ DISTRO ?= "debian-bookworm"
IMAGE_FSTYPES_append = " wic"
WKS_FILE ?= "sdimage-efi-sd"
-IMAGE_PREINSTALL += "${SYSTEMD_BOOTLOADER_PREINSTALL}"
+IMAGER_INSTALL += "${SYSTEMD_BOOTLOADER_INSTALL}"
--
2.30.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 5/5] qemuamd64-focal: add missing install of imager dep
2022-09-23 12:43 [PATCH v3 0/5] systemd-boot: Locate imager deps in buildchroot Felix Moessbauer
` (3 preceding siblings ...)
2022-09-23 12:43 ` [PATCH v3 4/5] Install systemd-boot into buildchroot for qemuarm Felix Moessbauer
@ 2022-09-23 12:43 ` Felix Moessbauer
2022-09-28 9:24 ` [PATCH v3 0/5] systemd-boot: Locate imager deps in buildchroot Anton Mikanovich
5 siblings, 0 replies; 7+ messages in thread
From: Felix Moessbauer @ 2022-09-23 12:43 UTC (permalink / raw)
To: isar-users; +Cc: amikan, jan.kiszka, henning.schild, Felix Moessbauer
This patch adds the missing systemd bootloader dependency to
qemuamd64-focal.
This is now explicitly required, as the imager locates the efi files
in the buildchroot and not in the target chroot, where the
systemd package is not automatically available.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta-isar/conf/multiconfig/qemuamd64-focal.conf | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta-isar/conf/multiconfig/qemuamd64-focal.conf b/meta-isar/conf/multiconfig/qemuamd64-focal.conf
index d3566ada..3de0b809 100644
--- a/meta-isar/conf/multiconfig/qemuamd64-focal.conf
+++ b/meta-isar/conf/multiconfig/qemuamd64-focal.conf
@@ -1,7 +1,9 @@
#
-# Copyright (c) Siemens AG, 2018-2020
+# Copyright (c) Siemens AG, 2018-2022
#
# SPDX-License-Identifier: MIT
MACHINE ?= "qemuamd64"
DISTRO ?= "ubuntu-focal"
+
+IMAGER_INSTALL += "${SYSTEMD_BOOTLOADER_INSTALL}"
--
2.30.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 0/5] systemd-boot: Locate imager deps in buildchroot
2022-09-23 12:43 [PATCH v3 0/5] systemd-boot: Locate imager deps in buildchroot Felix Moessbauer
` (4 preceding siblings ...)
2022-09-23 12:43 ` [PATCH v3 5/5] qemuamd64-focal: add missing install of imager dep Felix Moessbauer
@ 2022-09-28 9:24 ` Anton Mikanovich
5 siblings, 0 replies; 7+ messages in thread
From: Anton Mikanovich @ 2022-09-28 9:24 UTC (permalink / raw)
To: Felix Moessbauer, isar-users; +Cc: jan.kiszka, henning.schild
23.09.2022 15:43, Felix Moessbauer wrote:
> Changes since v2:
>
> - add missing imager dep to qemuamd64-focal multiconfig
>
> Changes since v1:
>
> - fix overwrite of kernel_dir in bootimg-efi-isar in a non-intrusive way (p1)
> - implement systemd-boot logic in a way without having inline-changes to the wic plugin
>
> Best regards,
> Felix
>
>
> Felix Moessbauer (5):
> fix: do not overwrite kernel_dir in efi-isar wic
> wic: locate systemd-boot efi files in buildchroot
> Rework imager support for systemd-boot
> Install systemd-boot into buildchroot for qemuarm
> qemuamd64-focal: add missing install of imager dep
>
> meta-isar/conf/multiconfig/qemuamd64-focal.conf | 4 +++-
> meta-isar/conf/multiconfig/qemuarm-bookworm.conf | 2 +-
> meta/conf/distro/debian-common.conf | 6 +++---
> meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 7 ++++++-
> 4 files changed, 13 insertions(+), 6 deletions(-)
>
Applied to next, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-09-28 9:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-23 12:43 [PATCH v3 0/5] systemd-boot: Locate imager deps in buildchroot Felix Moessbauer
2022-09-23 12:43 ` [PATCH v3 1/5] fix: do not overwrite kernel_dir in efi-isar wic Felix Moessbauer
2022-09-23 12:43 ` [PATCH v3 2/5] wic: locate systemd-boot efi files in buildchroot Felix Moessbauer
2022-09-23 12:43 ` [PATCH v3 3/5] Rework imager support for systemd-boot Felix Moessbauer
2022-09-23 12:43 ` [PATCH v3 4/5] Install systemd-boot into buildchroot for qemuarm Felix Moessbauer
2022-09-23 12:43 ` [PATCH v3 5/5] qemuamd64-focal: add missing install of imager dep Felix Moessbauer
2022-09-28 9:24 ` [PATCH v3 0/5] systemd-boot: Locate imager deps in buildchroot Anton Mikanovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox