[PATCH 4/5] spl: binman: Let u-boot-spl/vpl symbol declarations be disabled
Alper Nebi Yasak
alpernebiyasak at gmail.com
Fri Jun 10 12:58:04 CEST 2022
The SPL/TPL_BINMAN_SYMBOLS config only disables the u_boot_any symbol.
Extend its #if directive to cover declarations for all phases. Update
the Kconfig prompt and help message to make it clearer about this.
Signed-off-by: Alper Nebi Yasak <alpernebiyasak at gmail.com>
---
common/spl/Kconfig | 12 ++++++------
common/spl/Kconfig.tpl | 12 ++++++------
common/spl/spl.c | 3 ++-
3 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 2ad2351c6eb3..f32548b8c9a7 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -186,16 +186,16 @@ config SPL_SHOW_ERRORS
This adds a small amount to SPL code size, perhaps 100 bytes.
config SPL_BINMAN_SYMBOLS
- bool "Declare binman symbols in SPL"
+ bool "Declare binman symbols for U-Boot phases in SPL"
depends on SPL_FRAMEWORK && BINMAN
default y
help
- This enables use of symbols in SPL which refer to U-Boot, enabling SPL
- to obtain the location of U-Boot simply by calling spl_get_image_pos()
- and spl_get_image_size().
+ This enables use of symbols in SPL which refer to U-Boot phases,
+ enabling SPL to obtain the location and size of its next phase simply
+ by calling spl_get_image_pos() and spl_get_image_size().
- For this to work, you must have a U-Boot image in the binman image, so
- binman can update SPL with the location of it.
+ For this to work, you must have all U-Boot phases in the same binman
+ image, so binman can update SPL with the locations of everything.
source "common/spl/Kconfig.nxp"
diff --git a/common/spl/Kconfig.tpl b/common/spl/Kconfig.tpl
index 834cb6b6dd82..3a97487c9983 100644
--- a/common/spl/Kconfig.tpl
+++ b/common/spl/Kconfig.tpl
@@ -9,16 +9,16 @@ config TPL_SIZE_LIMIT
If this value is zero, it is ignored.
config TPL_BINMAN_SYMBOLS
- bool "Declare binman symbols in TPL"
+ bool "Declare binman symbols for U-Boot phases in TPL"
depends on TPL_FRAMEWORK && BINMAN
default y
help
- This enables use of symbols in TPL which refer to U-Boot, enabling TPL
- to obtain the location of U-Boot simply by calling spl_get_image_pos()
- and spl_get_image_size().
+ This enables use of symbols in TPL which refer to U-Boot phases,
+ enabling TPL to obtain the location and size of its next phase simply
+ by calling spl_get_image_pos() and spl_get_image_size().
- For this to work, you must have a U-Boot image in the binman image, so
- binman can update TPL with the location of it.
+ For this to work, you must have all U-Boot phases in the same binman
+ image, so binman can update TPL with the locations of everything.
config TPL_FRAMEWORK
bool "Support TPL based upon the common SPL framework"
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 5630dcdb5c1e..4579289f9d83 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -55,7 +55,6 @@ u32 *boot_params_ptr = NULL;
/* See spl.h for information about this */
binman_sym_declare(ulong, u_boot_any, image_pos);
binman_sym_declare(ulong, u_boot_any, size);
-#endif
#ifdef CONFIG_TPL
binman_sym_declare(ulong, u_boot_spl, image_pos);
@@ -67,6 +66,8 @@ binman_sym_declare(ulong, u_boot_vpl, image_pos);
binman_sym_declare(ulong, u_boot_vpl, size);
#endif
+#endif /* BINMAN_SYMBOLS */
+
/* Define board data structure */
static struct bd_info bdata __attribute__ ((section(".data")));
--
2.36.1
More information about the U-Boot
mailing list