[PATCH 05/45] spl: Use binman suffix allow symbols of any SPL etype
Simon Glass
sjg at chromium.org
Sun Sep 25 17:02:08 CEST 2022
At present we use symbols for the u-boot-spl entry, but this is not always
what we want. For example, sandbox actually jumps to a u-boot-spl-elf
entry, since sandbox executables are ELF files.
We already handle this with U-Boot by using the '-any' suffix. Add it for
SPL as well.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
common/spl/spl.c | 16 ++++++++--------
include/spl.h | 8 ++++----
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/common/spl/spl.c b/common/spl/spl.c
index e550d1cb174..55b638209ae 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -59,13 +59,13 @@ binman_sym_declare(ulong, u_boot_any, image_pos);
binman_sym_declare(ulong, u_boot_any, size);
#ifdef CONFIG_TPL
-binman_sym_declare(ulong, u_boot_spl, image_pos);
-binman_sym_declare(ulong, u_boot_spl, size);
+binman_sym_declare(ulong, u_boot_spl_any, image_pos);
+binman_sym_declare(ulong, u_boot_spl_any, size);
#endif
#ifdef CONFIG_VPL
-binman_sym_declare(ulong, u_boot_vpl, image_pos);
-binman_sym_declare(ulong, u_boot_vpl, size);
+binman_sym_declare(ulong, u_boot_vpl_any, image_pos);
+binman_sym_declare(ulong, u_boot_vpl_any, size);
#endif
#endif /* BINMAN_UBOOT_SYMBOLS */
@@ -159,10 +159,10 @@ ulong spl_get_image_pos(void)
#ifdef CONFIG_VPL
if (spl_next_phase() == PHASE_VPL)
- return binman_sym(ulong, u_boot_vpl, image_pos);
+ return binman_sym(ulong, u_boot_vpl_any, image_pos);
#endif
return spl_next_phase() == PHASE_SPL ?
- binman_sym(ulong, u_boot_spl, image_pos) :
+ binman_sym(ulong, u_boot_spl_any, image_pos) :
binman_sym(ulong, u_boot_any, image_pos);
}
@@ -173,10 +173,10 @@ ulong spl_get_image_size(void)
#ifdef CONFIG_VPL
if (spl_next_phase() == PHASE_VPL)
- return binman_sym(ulong, u_boot_vpl, size);
+ return binman_sym(ulong, u_boot_vpl_any, size);
#endif
return spl_next_phase() == PHASE_SPL ?
- binman_sym(ulong, u_boot_spl, size) :
+ binman_sym(ulong, u_boot_spl_any, size) :
binman_sym(ulong, u_boot_any, size);
}
diff --git a/include/spl.h b/include/spl.h
index bac5ea29b7d..a89830d24fd 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -286,10 +286,10 @@ struct spl_load_info {
*/
binman_sym_extern(ulong, u_boot_any, image_pos);
binman_sym_extern(ulong, u_boot_any, size);
-binman_sym_extern(ulong, u_boot_spl, image_pos);
-binman_sym_extern(ulong, u_boot_spl, size);
-binman_sym_extern(ulong, u_boot_vpl, image_pos);
-binman_sym_extern(ulong, u_boot_vpl, size);
+binman_sym_extern(ulong, u_boot_spl_any, image_pos);
+binman_sym_extern(ulong, u_boot_spl_any, size);
+binman_sym_extern(ulong, u_boot_vpl_any, image_pos);
+binman_sym_extern(ulong, u_boot_vpl_any, size);
/**
* spl_get_image_pos() - get the image position of the next phase
--
2.37.3.998.g577e59143f-goog
More information about the U-Boot
mailing list