* [PATCH RFT] ARM: lib32: bootm: support booting EFI-stubbed kernels without EFI
@ 2026-06-09 16:09 Ahmad Fatoum
2026-06-10 11:55 ` Fabian Pflug
2026-06-11 15:55 ` Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2026-06-09 16:09 UTC (permalink / raw)
To: barebox; +Cc: Fabian Pflug, Ahmad Fatoum
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@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RFT] ARM: lib32: bootm: support booting EFI-stubbed kernels without EFI
2026-06-09 16:09 [PATCH RFT] ARM: lib32: bootm: support booting EFI-stubbed kernels without EFI Ahmad Fatoum
@ 2026-06-10 11:55 ` Fabian Pflug
2026-06-11 15:55 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Fabian Pflug @ 2026-06-10 11:55 UTC (permalink / raw)
To: Ahmad Fatoum, barebox
On Tue, 2026-06-09 at 18:09 +0200, Ahmad Fatoum wrote:
> 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@pengutronix.de>
Tested-by: Fabian Pflug <f.pflug@pengutronix.de>
> Signed-off-by: Ahmad Fatoum <a.fatoum@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,
> };
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RFT] ARM: lib32: bootm: support booting EFI-stubbed kernels without EFI
2026-06-09 16:09 [PATCH RFT] ARM: lib32: bootm: support booting EFI-stubbed kernels without EFI Ahmad Fatoum
2026-06-10 11:55 ` Fabian Pflug
@ 2026-06-11 15:55 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2026-06-11 15:55 UTC (permalink / raw)
To: barebox, Ahmad Fatoum; +Cc: Fabian Pflug
On Tue, 09 Jun 2026 18:09:37 +0200, Ahmad Fatoum wrote:
> 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.
>
> [...]
Applied, thanks!
[1/1] ARM: lib32: bootm: support booting EFI-stubbed kernels without EFI
https://git.pengutronix.de/cgit/barebox/commit/?id=f06425b6aa3f (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-11 15:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-09 16:09 [PATCH RFT] ARM: lib32: bootm: support booting EFI-stubbed kernels without EFI Ahmad Fatoum
2026-06-10 11:55 ` Fabian Pflug
2026-06-11 15:55 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox