From c9cb41e293556e64bb8adb0fabd6b9608acb3211 Mon Sep 17 00:00:00 2001 From: Mikko Rapeli Date: Fri, 30 May 2025 14:37:41 +0300 Subject: wic bootimg-efi.py: fail build if no binaries installed 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. (From OE-Core rev: 93fad905b9d5f5cee89408901e4be1630955ab75) Signed-off-by: Mikko Rapeli Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- scripts/lib/wic/plugins/source/bootimg-efi.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scripts/lib/wic/plugins/source/bootimg-efi.py') diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index 96c710bf77..38da5080fb 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 EFI loader 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") -- cgit v1.2.3-54-g00ecf