Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v5 1/4] wic bootimg-efi.py: fail build if no binaries installed
@ 2025-05-28 12:56 Mikko Rapeli
  2025-05-28 12:56 ` [PATCH v5 2/4] image_types_wic.bbclass: depend on grub-efi and systemd-boot on aarch64, systemd-boot on arm Mikko Rapeli
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Mikko Rapeli @ 2025-05-28 12:56 UTC (permalink / raw)
  To: openembedded-core; +Cc: Mikko Rapeli

With systemd-boot, some builds included correct EFI
bootloader binaries and some not. Thus some builds
booted and some not. Check that some boot binary
was installed so that build fails if none were installed.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
 scripts/lib/wic/plugins/source/bootimg-efi.py | 7 +++++++
 1 file changed, 7 insertions(+)

v5: separated from modular kernel changes, changed from shell "ls" command to
    python glob

diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 96c710bf77..e0ee2f7127 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -367,6 +367,13 @@ class BootimgEFIPlugin(SourcePlugin):
             else:
                 raise WicError("unrecognized bootimg-efi loader: %s" %
                                source_params['loader'])
+
+            # must have installed at least one EFI bootloader
+            out = glob(os.path.join(hdddir, 'EFI', 'BOOT', 'boot*.efi'))
+            logger.debug("Installed systemd-boot files:\n%s" % out)
+            if not out:
+                raise WicError("No EFI loaders installed to ESP partition. Check that grub-efi, systemd-boot or similar is installed.")
+
         except KeyError:
             raise WicError("bootimg-efi requires a loader, none specified")
 
-- 
2.43.0



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

end of thread, other threads:[~2025-05-30  8:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-28 12:56 [PATCH v5 1/4] wic bootimg-efi.py: fail build if no binaries installed Mikko Rapeli
2025-05-28 12:56 ` [PATCH v5 2/4] image_types_wic.bbclass: depend on grub-efi and systemd-boot on aarch64, systemd-boot on arm Mikko Rapeli
2025-05-28 12:56 ` [PATCH v5 3/4] image_types_wic.bbclass: remove os-release from WKS_FILE_DEPENDS_BOOTLOADERS on x86 and x86_64 Mikko Rapeli
2025-05-28 12:56 ` [PATCH v5 4/4] image_types_wic.bbclass: capture verbose wic output by default Mikko Rapeli
2025-05-29 13:55 ` [OE-core] [PATCH v5 1/4] wic bootimg-efi.py: fail build if no binaries installed Mathieu Dubois-Briand
2025-05-30  8:30   ` Mikko Rapeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox