| Message ID | 20250422143501.99565-10-mikko.rapeli@linaro.org |
|---|---|
| State | New |
| Headers | show |
| Series | systemd based initrd and modular kernel support | expand |
On Tue, 2025-04-22 at 17:35 +0300, Mikko Rapeli via lists.openembedded.org wrote: > On x86 family builds, grub and systemd-boot are always included and thus > get built and deployed before wic image builds. On aarch64 builds > that was not the case. Result is that some builds added systemd-boot binaries > to the wic image ESP partition and some not, though bugs in wic plugins > contributed here too since missing files were silently ignored. > Boot of such images fails since firmware is not able to load the > default EFI binaries. > > Adding EFI_PROVIDER to WKS_FILE_DEPENDS_BOOTLOADERS is not possible > because of parsing order so adding grub-efi and systemd-boot > to aarch64 and systemd-boot to arm depends > which makes sure their do_deploy is always executed > before wic image is generated. Thus systemd-boot and grub > binaries will get copied from deploy directory to the wic > image ESP partition, and boot of the images succeeds. > > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> > --- > meta/classes-recipe/image_types_wic.bbclass | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/meta/classes-recipe/image_types_wic.bbclass b/meta/classes-recipe/image_types_wic.bbclass > index 10888bc12b..b2f450026d 100644 > --- a/meta/classes-recipe/image_types_wic.bbclass > +++ b/meta/classes-recipe/image_types_wic.bbclass > @@ -113,6 +113,8 @@ WKS_FILE_DEPENDS_DEFAULT += "bmaptool-native cdrtools-native btrfs-tools-native > # Unified kernel images need objcopy > WKS_FILE_DEPENDS_DEFAULT += "virtual/cross-binutils" > WKS_FILE_DEPENDS_BOOTLOADERS = "" > +WKS_FILE_DEPENDS_BOOTLOADERS:aarch64 = "grub-efi systemd-boot" > +WKS_FILE_DEPENDS_BOOTLOADERS:arm = "systemd-boot" > WKS_FILE_DEPENDS_BOOTLOADERS:x86 = "syslinux grub-efi systemd-boot os-release" > WKS_FILE_DEPENDS_BOOTLOADERS:x86-64 = "syslinux systemd-boot os-release" > WKS_FILE_DEPENDS_BOOTLOADERS:x86-x32 = "syslinux grub-efi" Several of us had questions in patch review about why some entries had os-release and some did not. We believe other uki changes have obsoleted the need for that but it would be good to remove it if so and keep these entries looking consistent. Cheers, Richard
diff --git a/meta/classes-recipe/image_types_wic.bbclass b/meta/classes-recipe/image_types_wic.bbclass index 10888bc12b..b2f450026d 100644 --- a/meta/classes-recipe/image_types_wic.bbclass +++ b/meta/classes-recipe/image_types_wic.bbclass @@ -113,6 +113,8 @@ WKS_FILE_DEPENDS_DEFAULT += "bmaptool-native cdrtools-native btrfs-tools-native # Unified kernel images need objcopy WKS_FILE_DEPENDS_DEFAULT += "virtual/cross-binutils" WKS_FILE_DEPENDS_BOOTLOADERS = "" +WKS_FILE_DEPENDS_BOOTLOADERS:aarch64 = "grub-efi systemd-boot" +WKS_FILE_DEPENDS_BOOTLOADERS:arm = "systemd-boot" WKS_FILE_DEPENDS_BOOTLOADERS:x86 = "syslinux grub-efi systemd-boot os-release" WKS_FILE_DEPENDS_BOOTLOADERS:x86-64 = "syslinux systemd-boot os-release" WKS_FILE_DEPENDS_BOOTLOADERS:x86-x32 = "syslinux grub-efi"
On x86 family builds, grub and systemd-boot are always included and thus get built and deployed before wic image builds. On aarch64 builds that was not the case. Result is that some builds added systemd-boot binaries to the wic image ESP partition and some not, though bugs in wic plugins contributed here too since missing files were silently ignored. Boot of such images fails since firmware is not able to load the default EFI binaries. Adding EFI_PROVIDER to WKS_FILE_DEPENDS_BOOTLOADERS is not possible because of parsing order so adding grub-efi and systemd-boot to aarch64 and systemd-boot to arm depends which makes sure their do_deploy is always executed before wic image is generated. Thus systemd-boot and grub binaries will get copied from deploy directory to the wic image ESP partition, and boot of the images succeeds. Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> --- meta/classes-recipe/image_types_wic.bbclass | 2 ++ 1 file changed, 2 insertions(+)