summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2025-01-15 18:27:15 -0700
committerTom Rini <[email protected]>2025-01-22 09:47:50 -0600
commit42fb767da4439e52282fb3f84046b25131573f82 (patch)
tree3a34fe87c2281600d527b2568174e141fd416955 /boot
parent36d6c89950e560094f8b21d773be44409077ea59 (diff)
vbe: Allow loading loadables if there is no firmware
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 <[email protected]>
Diffstat (limited to 'boot')
-rw-r--r--boot/vbe_common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/boot/vbe_common.c b/boot/vbe_common.c
index 8fe278ba1a9..b935513d44c 100644
--- a/boot/vbe_common.c
+++ b/boot/vbe_common.c
@@ -183,6 +183,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;