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 other entries in
+ the same binman image as the SPL. These can be declared with the
+ binman_sym_declare(type, entry, prop) macro and accessed by the
+ binman_sym(type, entry, prop) macro defined in binman_sym.h.
- 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.
+ See tools/binman/binman.rst for a detailed explanation.
+
+config SPL_BINMAN_UBOOT_SYMBOLS
+ bool "Declare binman symbols for U-Boot phases in SPL"
+ depends on SPL_BINMAN_SYMBOLS
+ default y
+ help
+ 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 all U-Boot phases in the same binman
+ image, so binman can update SPL with the locations of everything.
source "common/spl/Kconfig.nxp"
If this value is zero, it is ignored.
config TPL_BINMAN_SYMBOLS
- bool "Declare binman symbols in TPL"
+ bool "Support binman symbols 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 other entries in
+ the same binman image as the TPL. These can be declared with the
+ binman_sym_declare(type, entry, prop) macro and accessed by the
+ binman_sym(type, entry, prop) macro defined in binman_sym.h.
- 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.
+ See tools/binman/binman.rst for a detailed explanation.
+
+config TPL_BINMAN_UBOOT_SYMBOLS
+ bool "Declare binman symbols for U-Boot phases in TPL"
+ depends on TPL_BINMAN_SYMBOLS
+ default y
+ help
+ 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 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"
u32 *boot_params_ptr = NULL;
-#if CONFIG_IS_ENABLED(BINMAN_SYMBOLS)
+#if CONFIG_IS_ENABLED(BINMAN_UBOOT_SYMBOLS)
/* 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);
binman_sym_declare(ulong, u_boot_vpl, size);
#endif
+#endif /* BINMAN_UBOOT_SYMBOLS */
+
/* Define board data structure */
static struct bd_info bdata __attribute__ ((section(".data")));
ulong spl_get_image_pos(void)
{
- if (!CONFIG_IS_ENABLED(BINMAN_SYMBOLS))
+ if (!CONFIG_IS_ENABLED(BINMAN_UBOOT_SYMBOLS))
return BINMAN_SYM_MISSING;
#ifdef CONFIG_VPL
ulong spl_get_image_size(void)
{
- if (!CONFIG_IS_ENABLED(BINMAN_SYMBOLS))
+ if (!CONFIG_IS_ENABLED(BINMAN_UBOOT_SYMBOLS))
return BINMAN_SYM_MISSING;
#ifdef CONFIG_VPL
#define BINMAN_SYM_MISSING (-1UL)
-#ifdef CONFIG_BINMAN
+#if CONFIG_IS_ENABLED(BINMAN_SYMBOLS)
/**
* binman_symname() - Internal function to get a binman symbol name
#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)
#define binman_sym(_type, _entry_name, _prop_name) BINMAN_SYM_MISSING
-#endif /* BINMAN */
+#endif /* CONFIG_IS_ENABLED(BINMAN_SYMBOLS) */
#endif
OBJCOPY = $(CROSS_COMPILE)objcopy
VPATH := $(SRC)
-CFLAGS := -march=i386 -m32 -nostdlib -I $(SRC)../../../include \
+CFLAGS := -march=i386 -m32 -nostdlib -I $(SRC)../../../include -I $(SRC) \
-Wl,--no-dynamic-linker
LDS_UCODE := -T $(SRC)u_boot_ucode_ptr.lds
--- /dev/null
+#define CONFIG_BINMAN 1
+#define CONFIG_SPL_BUILD 1
+#define CONFIG_SPL_BINMAN_SYMBOLS 1
* Simple program to create some binman symbols. This is used by binman tests.
*/
-#define CONFIG_BINMAN
+#include <linux/kconfig.h>
#include <binman_sym.h>
binman_sym_declare(unsigned long, u_boot_spl_any, offset);
* Simple program to create some binman symbols. This is used by binman tests.
*/
-#define CONFIG_BINMAN
+#include <linux/kconfig.h>
#include <binman_sym.h>
binman_sym_declare(char, u_boot_spl, pos);