[PATCH 1/7] spl: guard u_boot_any with X86
Peng Fan (OSS)
peng.fan at oss.nxp.com
Sat May 7 11:21:36 CEST 2022
From: Peng Fan <peng.fan at 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 at 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;
--
2.36.0
More information about the U-Boot
mailing list