mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Fabian Pflug <f.pflug@pengutronix.de>,
	Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH RFT] ARM: lib32: bootm: support booting EFI-stubbed kernels without EFI
Date: Tue,  9 Jun 2026 18:09:37 +0200	[thread overview]
Message-ID: <20260609160939.2032936-1-a.fatoum@barebox.org> (raw)

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




             reply	other threads:[~2026-06-09 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09 16:09 Ahmad Fatoum [this message]
2026-06-10 11:55 ` Fabian Pflug
2026-06-11 15:55 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260609160939.2032936-1-a.fatoum@barebox.org \
    --to=a.fatoum@barebox.org \
    --cc=barebox@lists.infradead.org \
    --cc=f.pflug@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox