[PATCH] bootm: have bootm_open_fit return -ENOSYS if support missing
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Apr 9 01:30:23 PDT 2025
Otherwise, os_type will be determined unconditionally for the FIT image
buffer. As the buffer has zero size, this leads to an os_type of
filetype_unknown. The ARM32 support has an "ARM raw image" that matches
against filetype_unknown leading eventually to a crash trying to execute
the FIT image's FDT header.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
common/bootm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/bootm.c b/common/bootm.c
index 739be02fe571..a26ea82684a6 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -618,7 +618,7 @@ static int bootm_open_fit(struct image_data *data)
int ret;
if (!IS_ENABLED(CONFIG_FITIMAGE))
- return 0;
+ return -ENOSYS;
header = (struct fdt_header *)data->os_header;
flen = bootm_get_os_size(data);
--
2.39.5
More information about the barebox
mailing list