[PATCH 07/15] vbe: Allow loading loadables if there is no firmware

Simon Glass sjg at chromium.org
Thu Jan 9 13:30:02 CET 2025


In some cases only the 'loadable' property is present in the FIT.
Handle this by loading the first such image.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 boot/vbe_common.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/boot/vbe_common.c b/boot/vbe_common.c
index 02e2c4ae066..4b297e780b3 100644
--- a/boot/vbe_common.c
+++ b/boot/vbe_common.c
@@ -96,6 +96,13 @@ int vbe_read_fit(struct udevice *blk, ulong area_offset, ulong area_size,
 			     IH_ARCH_DEFAULT, image_ph(phase, IH_TYPE_FIRMWARE),
 			     BOOTSTAGE_ID_FIT_SPL_START, FIT_LOAD_IGNORED,
 			     &load_addr, &len);
+	if (ret == -ENOENT) {
+		ret = fit_image_load(&images, addr, &fit_uname,
+				     &fit_uname_config, IH_ARCH_DEFAULT,
+				     image_ph(phase, IH_TYPE_LOADABLE),
+				     BOOTSTAGE_ID_FIT_SPL_START,
+				     FIT_LOAD_IGNORED, &load_addr, &len);
+	}
 	if (ret < 0)
 		return log_msg_ret("ld", ret);
 	node = ret;
-- 
2.34.1



More information about the U-Boot mailing list