aboutsummaryrefslogtreecommitdiff
path: root/common/spl/spl.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-09-15 09:59:47 -0400
committerTom Rini <trini@konsulko.com>2022-09-15 09:59:47 -0400
commitd9e85eeebabd5fc0c95be96bd70fa7362eb89f33 (patch)
treef3f4c2a9d5d19e8b548ce6ed98fbd5610d30bdd7 /common/spl/spl.c
parent1520af3f8450bb58168fe1cc827a56d435e9f74c (diff)
parent0cd933bb4bd74084d942c42098ebf9e07d9e0f63 (diff)
Merge branch '2022-09-15-general-improvements' into next
- Add uncompressed kernel image support to falcon mode, TEE improvements, make xyz-modem timeout configurable, gpio updates and other assorted improvements.
Diffstat (limited to 'common/spl/spl.c')
-rw-r--r--common/spl/spl.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 29e0898f03..828f72f30b 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -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)) {
@@ -405,6 +425,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
return 0;
}
#endif
+#endif
if (!spl_parse_board_header(spl_image, bootdev, (const void *)header, sizeof(*header)))
return 0;