Hi all, This series improves CONFIG_SPL_LOAD_FIT_FULL support on RISC-V, primarily to enable loading OpenSBI as firmware and recording loadable images (e.g., U-Boot) into the FDT passed to the next boot stage. This aligns spl_load_fit_image() with the behaviour already present in spl_load_simple_fit().
Patch summary: 1/5: Allow IH_OS_OPENSBI in fit_image_load() so OpenSBI firmware can be loaded without error. 2/5: Enable spl_load_fit_image() for RAM boot when CONFIG_SPL_LOAD_FIT_FULL is selected. 3/5: Use map_sysmem() for FDT address handling to keep the code sandbox‑friendly. 4/5: Record loadables into spl_image->fdt_addr during FIT load, providing the entry addresses needed by subsequent stages (e.g., OpenSBI). 5/5: Add a unit test to verify that loadables are correctly recorded in the FDT. Tested with provided sandbox test with a grafted FIT image containing OpenSBI (firmware), U‑Boot (loadable) and a DTB. However some issues still present: - This works only if FIT Image contains dtb blob, spl_load_simple_fit() on the other hand relocates gd->fdt_blob to the end of U-Boot; It's currently unclear to me if spl_load_fit_image() should do the same. - I am not sure if sandbox test is a right thing to do, still i think it's better than relying on QEMU for testing in this case; - We require grafted FIT as u-boot.img doesn't contains anything than U-boot Proper for sandbox; Please advice. Only one patch remained fro previous RFC series: Link: https://lore.kernel.org/r/20260619-riscv-full-fit-image-support-v1-0-c6477cf4f...@maquefel.me Signed-off-by: Nikita Shubin <[email protected]> --- Nikita Shubin (5): image: fit: allow IH_OS_OPENSBI in fit_image_load() common: spl: ram: Add LOAD_FIT_FULL support spl: fit: Use map_sysmem() with buffers for fdt address spl: fit: Record loadables to spl_image->fdt_addr spl: fit: Add test to check loadables boot/image-fit.c | 1 + common/spl/spl_fit.c | 48 ++++++++++--- common/spl/spl_ram.c | 12 ++-- test/image/spl_load.c | 195 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 241 insertions(+), 15 deletions(-) --- base-commit: baa64b2f892890f00a377eac4a3e685472bb56b5 change-id: 20260731-riscv-full-fit-support-320d38f8311e Best regards, -- Nikita Shubin
