
From: Peng Fan peng.fan@nxp.com
set the symbol as weak not work if LTO is enabled. Since u_boot_any is only used on X86 for now, so guard it with X86, otherwise build break if we use BINMAN_SYMBOLS on i.MX.
Signed-off-by: Peng Fan peng.fan@nxp.com --- common/spl/spl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/common/spl/spl.c b/common/spl/spl.c index c8c463f80bd..4b28180467a 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -50,7 +50,7 @@ DECLARE_GLOBAL_DATA_PTR;
u32 *boot_params_ptr = NULL;
-#if CONFIG_IS_ENABLED(BINMAN_SYMBOLS) +#if CONFIG_IS_ENABLED(BINMAN_SYMBOLS) && CONFIG_IS_ENABLED(X86) /* See spl.h for information about this */ binman_sym_declare(ulong, u_boot_any, image_pos); binman_sym_declare(ulong, u_boot_any, size); @@ -148,7 +148,7 @@ void spl_fixup_fdt(void *fdt_blob) #endif }
-#if CONFIG_IS_ENABLED(BINMAN_SYMBOLS) +#if CONFIG_IS_ENABLED(BINMAN_SYMBOLS) && CONFIG_IS_ENABLED(X86) ulong spl_get_image_pos(void) { #ifdef CONFIG_VPL @@ -221,7 +221,11 @@ __weak struct image_header *spl_get_load_buffer(ssize_t offset, size_t size)
void spl_set_header_raw_uboot(struct spl_image_info *spl_image) { +#if CONFIG_IS_ENABLED(X86) ulong u_boot_pos = binman_sym(ulong, u_boot_any, image_pos); +#else + ulong u_boot_pos = BINMAN_SYM_MISSING; +#endif
spl_image->size = CONFIG_SYS_MONITOR_LEN;