[PATCH 2/5] boot: fit: decompress kernel when in SPL

Francesco Valla francesco at valla.it
Tue Apr 28 22:24:43 CEST 2026


During the esecution of fit_image_load() in full U-Boot, the kernel is
not decompressed as this step is typically performed by the bootm
command logic afterward. This is not however true when doing a falcon
boot from SPL; enable the decompression in this case (i.e., if
CONFIG_SPL_OS_BOOT is set).

Signed-off-by: Francesco Valla <francesco at valla.it>
---
 boot/image-fit.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/boot/image-fit.c b/boot/image-fit.c
index 9aa165a38cd9..f3ddee940dbd 100644
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -2291,9 +2291,10 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
 	if (!fit_image_get_comp(fit, noffset, &comp) &&
 	    comp != IH_COMP_NONE &&
 	    load_op != FIT_LOAD_IGNORED &&
-	    !(image_type == IH_TYPE_KERNEL ||
-	      image_type == IH_TYPE_KERNEL_NOLOAD ||
-	      image_type == IH_TYPE_RAMDISK)) {
+	    image_type != IH_TYPE_RAMDISK &&
+	    (CONFIG_IS_ENABLED(OS_BOOT) ||
+	     image_type != IH_TYPE_KERNEL ||
+	     image_type != IH_TYPE_KERNEL_NOLOAD)) {
 		ulong max_decomp_len = len * 20;
 
 		log_debug("decompressing image\n");

-- 
2.54.0



More information about the U-Boot mailing list