[PATCH RFC 0/2] RISC-V SPL: fix OpenSBI FIT loading and OS entry point retrieval
Nikita Shubin
nikita.shubin at maquefel.me
Fri Jun 19 14:52:56 CEST 2026
Hi all !
I've recetly tried enabling CONFIG_SPL_LOAD_FIT_FULL on RISC-V and
encountered some minor issues, fixed as following:
Patch 1 adds IH_OS_OPENSBI to fit_image_load() so OpenSBI firmware
can be loaded without error.
Patch 2 fixes spl_invoke_opensbi() which currently tries to locate the
next-stage OS (U-Boot or Linux) by parsing spl_image->fdt_addr. That
FDT is device tree for next stage, not the FIT image itself. The fix
stores uboot_addr and kernel_addr in spl_image_info during loadables
phase and uses these in spl_invoke_opensbi(), falling back to FDT parsing
only if no address is stored.
Tested with FIT containing OpenSBI, U-Boot, and DTB (also kernel and
ramsidk but that's not important).
Question is - if Full FIT wasn't tested with RISC-V U-Boot SPL or i am
doing something wrong ?
Configuration is quite simple and is working without CONFIG_SPL_LOAD_FIT_FULL
just fine:
```
conf1 {
description = "U-Boot+OpenSBI";
fdt = "fdt1";
firmware = "opensbi";
loadables = "uboot";
};
```
Signed-off-by: Nikita Shubin <nikita.shubin at maquefel.me>
---
Changes in v2:
- EDITME: describe what is new in this series revision.
- EDITME: use bulletpoints and terse descriptions.
- Link to v1: https://lore.kernel.org/r/20260619-riscv-full-fit-image-support-v1-0-545e221ed37d@maquefel.me
---
Nikita Shubin (2):
image: fit: allow IH_OS_OPENSBI in fit_image_load()
spl: opensbi: fix OS image address retrieval from FIT
boot/image-fit.c | 1 +
common/spl/spl_fit.c | 8 ++++++++
common/spl/spl_opensbi.c | 33 +++++++++++++++++++--------------
include/spl.h | 8 ++++++++
4 files changed, 36 insertions(+), 14 deletions(-)
---
base-commit: 922cf29dd8045f7348ce0f20145f46e8235faf21
change-id: 20260619-riscv-full-fit-image-support-01e092032f06
Best regards,
--
Nikita Shubin
More information about the U-Boot
mailing list