[PATCH RFT] ARM: lib32: bootm: support booting EFI-stubbed kernels without EFI

Ahmad Fatoum a.fatoum at barebox.org
Tue Jun 9 09:09:37 PDT 2026


The bootm_efi_check_image callback implements the global.bootm.efi aware
handling for EFI-stubbed kernels:

  - If no CONFIG_EFI_LOADER support is compiled in, boot normally
  - If CONFIG_EFI_LOADER=y, consult global.bootm.efi

In absence of this callback, the filetype match is taken literally,
which will just lead to EFI-stubbed kernel images being refused
outright.

Align ARM32 with what ARM64 and RISC-V already do and set
image_handler::check_image appropriately.

Fixes: 0fca24055c57 ("filetype: add new filetype for efi-stubbed ARM zImages")
Reported-by: Fabian Pflug <f.pflug at pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
 arch/arm/lib32/bootm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/lib32/bootm.c b/arch/arm/lib32/bootm.c
index 4bca29c3fbf8..e94bb979eff9 100644
--- a/arch/arm/lib32/bootm.c
+++ b/arch/arm/lib32/bootm.c
@@ -515,12 +515,14 @@ static int do_bootz_linux(struct image_data *data)
 static struct image_handler zimage_handler = {
 	.name = "ARM zImage",
 	.bootm = do_bootz_linux,
+	.check_image = bootm_efi_check_image,
 	.filetype = filetype_arm_zimage,
 };
 
 static struct image_handler barebox_handler = {
 	.name = "ARM barebox",
 	.bootm = do_bootm_linux,
+	.check_image = bootm_efi_check_image,
 	.filetype = filetype_arm_barebox,
 };
 
-- 
2.47.3




More information about the barebox mailing list