]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Add in the ability to load and boot an uncompressed kernel image during the Falcon...
authorNathan Barrett-Morrison <nathan.morrison@timesys.com>
Wed, 2 Feb 2022 20:05:18 +0000 (15:05 -0500)
committerTom Rini <trini@konsulko.com>
Wed, 14 Sep 2022 19:23:03 +0000 (15:23 -0400)
This is required for architectures which do not support compressed kernel images (i.e. ARM64).  This is only used while not booting via FIT image.

Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/lib/Makefile
common/spl/spl.c

index d137b4bf0fed7e59a2e583b326c4021a3f58681b..62cf80f3739c821aad74901466a786d1d758dc83 100644 (file)
@@ -35,7 +35,10 @@ obj-$(CONFIG_CMD_BOOTM) += bootm.o
 obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o
 else
 obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) += spl.o
-obj-$(CONFIG_SPL_FRAMEWORK) += zimage.o
+ifdef CONFIG_SPL_FRAMEWORK
+obj-$(CONFIG_CMD_BOOTI) += image.o
+obj-$(CONFIG_CMD_BOOTZ) += zimage.o
+endif
 obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
 endif
 ifdef CONFIG_ARM64
index 29e0898f03de15b1dd01c675fd24c3fad00ed0eb..828f72f30b178a01d105fc00cd63d57eac82284c 100644 (file)
@@ -116,6 +116,11 @@ int __weak bootz_setup(ulong image, ulong *start, ulong *end)
 {
         return 1;
 }
+
+int __weak booti_setup(ulong image, ulong *relocated_addr, ulong *size, bool force_reloc)
+{
+        return 1;
+}
 #endif
 
 /* Weak default function for arch/board-specific fixups to the spl_image_info */
@@ -391,6 +396,21 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
 #endif
 
 #if CONFIG_IS_ENABLED(OS_BOOT)
+#if defined(CMD_BOOTI)
+               ulong start, size;
+
+               if (!booti_setup((ulong)header, &start, &size, 0)) {
+                       spl_image->name = "Linux";
+                       spl_image->os = IH_OS_LINUX;
+                       spl_image->load_addr = start;
+                       spl_image->entry_point = start;
+                       spl_image->size = size;
+                       debug(SPL_TPL_PROMPT
+                             "payload Image, load addr: 0x%lx size: %d\n",
+                             spl_image->load_addr, spl_image->size);
+                       return 0;
+               }
+#elif defined(CMD_BOOTZ)
                ulong start, end;
 
                if (!bootz_setup((ulong)header, &start, &end)) {
@@ -404,6 +424,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
                              spl_image->load_addr, spl_image->size);
                        return 0;
                }
+#endif
 #endif
 
                if (!spl_parse_board_header(spl_image, bootdev, (const void *)header, sizeof(*header)))