aboutsummaryrefslogtreecommitdiff
path: root/include/binman_sym.h
diff options
context:
space:
mode:
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>2022-06-18 15:13:09 +0300
committerSimon Glass <sjg@chromium.org>2022-06-28 03:09:52 +0100
commitd8830cf84035120562bb490be276fab9e43d6414 (patch)
treeda462321dd8915197c5fa45e77e3d7662c99b93f /include/binman_sym.h
parent5204823c81c2be4ef3abfcaae351401f8dd5f058 (diff)
downloadu-boot-d8830cf84035120562bb490be276fab9e43d6414.zip
u-boot-d8830cf84035120562bb490be276fab9e43d6414.tar.gz
u-boot-d8830cf84035120562bb490be276fab9e43d6414.tar.bz2
spl: binman: Split binman symbols support from enabling binman
Enabling CONFIG_BINMAN makes binman run after a build to package any images specified in the device-tree. It also enables a mechanism for SPL/TPL to declare and use special linker symbols that refer to other entries in the same binman image. A similar feature that gets this info from the device-tree exists for U-Boot proper, but it is gated behind a CONFIG_BINMAN_FDT unlike the symbols. Confusingly, CONFIG_SPL/TPL_BINMAN_SYMBOLS also exist. These configs don't actually enable/disable the symbols mechanism as one would expect, but declare some symbols for U-Boot using this mechanism. Reuse the BINMAN_SYMBOLS configs to make them toggle the symbols mechanism, and declare symbols for the U-Boot phases in a dependent BINMAN_UBOOT_SYMBOLS config. Extend it to cover symbols of all phases. Update the config prompt and help message to make it clearer about this. Fix binman test binaries to work with CONFIG_IS_ENABLED(BINMAN_SYMBOLS). Co-developed-by: Peng Fan <peng.fan@nxp.com> [Alper: New config for phase symbols, update Kconfigs, commit message] Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Diffstat (limited to 'include/binman_sym.h')
-rw-r--r--include/binman_sym.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/binman_sym.h b/include/binman_sym.h
index 72e6765..8586ef8 100644
--- a/include/binman_sym.h
+++ b/include/binman_sym.h
@@ -13,7 +13,7 @@
#define BINMAN_SYM_MISSING (-1UL)
-#ifdef CONFIG_BINMAN
+#if CONFIG_IS_ENABLED(BINMAN_SYMBOLS)
/**
* binman_symname() - Internal function to get a binman symbol name
@@ -77,7 +77,7 @@
#define binman_sym(_type, _entry_name, _prop_name) \
(*(_type *)&binman_symname(_entry_name, _prop_name))
-#else /* !BINMAN */
+#else /* !CONFIG_IS_ENABLED(BINMAN_SYMBOLS) */
#define binman_sym_declare(_type, _entry_name, _prop_name)
@@ -87,6 +87,6 @@
#define binman_sym(_type, _entry_name, _prop_name) BINMAN_SYM_MISSING
-#endif /* BINMAN */
+#endif /* CONFIG_IS_ENABLED(BINMAN_SYMBOLS) */
#endif