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

Ahmad Fatoum <[email protected]>
Newsgroups org.infradead.lists.barebox
Message-ID <[email protected]>
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 <[email protected]>
Signed-off-by: Ahmad Fatoum <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.