]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
bootm: warn about load address for IH_TYPE_KERNEL_NOLOAD in FIT
authorNora Schiffer <nora.schiffer@ew.tq-group.com>
Mon, 22 Jun 2026 11:19:32 +0000 (13:19 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 3 Jul 2026 16:11:11 +0000 (10:11 -0600)
The load address is ignored for IH_TYPE_KERNEL_NOLOAD. Instead of
failing the boot when none is set, it makes more sense to warn when it
*is* set.

Signed-off-by: Nora Schiffer <nora.schiffer@ew.tq-group.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
boot/bootm.c

index 7c9a6f8297604a19f2f1738a92e6f1ad4c52f2c1..b1cc6fe6c5c3f53a4bbf2b34c4d5cca351096371 100644 (file)
@@ -371,11 +371,17 @@ static int bootm_find_os(const char *cmd_name, const char *addr_fit)
                images.os.end = fit_get_end(images.fit_hdr_os);
 
                if (fit_image_get_load(images.fit_hdr_os, images.fit_noffset_os,
-                                      &images.os.load)) {
+                                      &images.os.load) &&
+                   images.os.type != IH_TYPE_KERNEL_NOLOAD) {
                        puts("Can't get image load address!\n");
                        bootstage_error(BOOTSTAGE_ID_FIT_LOADADDR);
                        return 1;
                }
+               if (images.os.load && images.os.type == IH_TYPE_KERNEL_NOLOAD) {
+                       puts("WARNING: load address set for kernel_noload image, ignoring\n");
+                       images.os.load = 0;
+               }
+
                break;
 #endif
 #ifdef CONFIG_ANDROID_BOOT_IMAGE