[PATCH 2/5] common: spl: ram: Add LOAD_FIT_FULL support
Nikita Shubin <[email protected]>
| Newsgroups | gmane.comp.boot-loaders.u-boot |
|---|---|
| Message-ID | <20260807-riscv-full-fit-support-v1-2-21a34f79c350__7184.33865565515$1786090443$gmane$org@maquefel.me> |
Allow booting with spl_load_fit_image() if LOAD_FIT_FULL enabled. Signed-off-by: Nikita Shubin <[email protected]> --- common/spl/spl_ram.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c index 0c501cf02f2..551cd8f4e2d 100644 --- a/common/spl/spl_ram.c +++ b/common/spl/spl_ram.c @@ -81,11 +81,15 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) && image_get_magic(header) == FDT_MAGIC) { - struct spl_load_info load; - debug("Found FIT\n"); - spl_load_init(&load, spl_ram_load_read, NULL, 1); - ret = spl_load_simple_fit(spl_image, &load, 0, header); + if (CONFIG_IS_ENABLED(LOAD_FIT_FULL)) { + ret = spl_load_fit_image(spl_image, header); + } else { + struct spl_load_info load; + + spl_load_init(&load, spl_ram_load_read, NULL, 1); + ret = spl_load_simple_fit(spl_image, &load, 0, header); + } } else { ulong u_boot_pos = spl_get_image_pos(); -- 2.52.0