Message ID | 20220520141048.20034-9-peng.fan@oss.nxp.com |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
Series | arm64: binman: use binman symbols for imx | expand |
On 20/05/2022 17:10, Peng Fan (OSS) wrote: > From: Peng Fan <peng.fan@nxp.com> > > There is case that CONFIG_BINMAN is defined, but > CONFIG_SPL_BINMAN_SYMBOLS is not defined. In that case, there will be > build failure. So use CONFIG_SPL_BINMAN_SYMBOLS to guard the macros, and > define CONFIG_SPL_BINMAN_SYMBOLS in binman syms test. I guess they should be CONFIG_IS_ENABLED(BINMAN_SYMBOLS) instead, as there's also a CONFIG_TPL_BINMAN_SYMBOLS. > > Tested-by: Tim Harvey <tharvey@gateworks.com> #imx8m[m,n,p]-venice > Signed-off-by: Peng Fan <peng.fan@nxp.com> > --- > include/binman_sym.h | 2 +- > tools/binman/test/u_boot_binman_syms.c | 1 + > tools/binman/test/u_boot_binman_syms_size.c | 1 + > 3 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/include/binman_sym.h b/include/binman_sym.h > index 72e6765fe52..548d8f5654c 100644 > --- a/include/binman_sym.h > +++ b/include/binman_sym.h > @@ -13,7 +13,7 @@ > > #define BINMAN_SYM_MISSING (-1UL) > > -#ifdef CONFIG_BINMAN > +#ifdef CONFIG_SPL_BINMAN_SYMBOLS > > /** > * binman_symname() - Internal function to get a binman symbol name > diff --git a/tools/binman/test/u_boot_binman_syms.c b/tools/binman/test/u_boot_binman_syms.c > index 37fc339ce84..f4a4d1f6846 100644 > --- a/tools/binman/test/u_boot_binman_syms.c > +++ b/tools/binman/test/u_boot_binman_syms.c > @@ -6,6 +6,7 @@ > */ > > #define CONFIG_BINMAN > +#define CONFIG_SPL_BINMAN_SYMBOLS > #include <binman_sym.h> > > binman_sym_declare(unsigned long, u_boot_spl_any, offset); > diff --git a/tools/binman/test/u_boot_binman_syms_size.c b/tools/binman/test/u_boot_binman_syms_size.c > index 7224bc1863c..3a01d8ca4be 100644 > --- a/tools/binman/test/u_boot_binman_syms_size.c > +++ b/tools/binman/test/u_boot_binman_syms_size.c > @@ -6,6 +6,7 @@ > */ > > #define CONFIG_BINMAN > +#define CONFIG_SPL_BINMAN_SYMBOLS > #include <binman_sym.h> > > binman_sym_declare(char, u_boot_spl, pos);
> Subject: Re: [PATCH V4 8/8] binman_sym: guard with > CONFIG_SPL_BINMAN_SYMBOLS > > On 20/05/2022 17:10, Peng Fan (OSS) wrote: > > From: Peng Fan <peng.fan@nxp.com> > > > > There is case that CONFIG_BINMAN is defined, but > > CONFIG_SPL_BINMAN_SYMBOLS is not defined. In that case, there will be > > build failure. So use CONFIG_SPL_BINMAN_SYMBOLS to guard the macros, > > and define CONFIG_SPL_BINMAN_SYMBOLS in binman syms test. > > I guess they should be CONFIG_IS_ENABLED(BINMAN_SYMBOLS) instead, as > there's also a CONFIG_TPL_BINMAN_SYMBOLS. No. CONFIG_IS_ENABLED not work, because there is no defconfig generated. Regards, Peng. > > > > > Tested-by: Tim Harvey <tharvey@gateworks.com> #imx8m[m,n,p]-venice > > Signed-off-by: Peng Fan <peng.fan@nxp.com> > > --- > > include/binman_sym.h | 2 +- > > tools/binman/test/u_boot_binman_syms.c | 1 + > > tools/binman/test/u_boot_binman_syms_size.c | 1 + > > 3 files changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/include/binman_sym.h b/include/binman_sym.h index > > 72e6765fe52..548d8f5654c 100644 > > --- a/include/binman_sym.h > > +++ b/include/binman_sym.h > > @@ -13,7 +13,7 @@ > > > > #define BINMAN_SYM_MISSING (-1UL) > > > > -#ifdef CONFIG_BINMAN > > +#ifdef CONFIG_SPL_BINMAN_SYMBOLS > > > > /** > > * binman_symname() - Internal function to get a binman symbol name > > diff --git a/tools/binman/test/u_boot_binman_syms.c > > b/tools/binman/test/u_boot_binman_syms.c > > index 37fc339ce84..f4a4d1f6846 100644 > > --- a/tools/binman/test/u_boot_binman_syms.c > > +++ b/tools/binman/test/u_boot_binman_syms.c > > @@ -6,6 +6,7 @@ > > */ > > > > #define CONFIG_BINMAN > > +#define CONFIG_SPL_BINMAN_SYMBOLS > > #include <binman_sym.h> > > > > binman_sym_declare(unsigned long, u_boot_spl_any, offset); diff --git > > a/tools/binman/test/u_boot_binman_syms_size.c > > b/tools/binman/test/u_boot_binman_syms_size.c > > index 7224bc1863c..3a01d8ca4be 100644 > > --- a/tools/binman/test/u_boot_binman_syms_size.c > > +++ b/tools/binman/test/u_boot_binman_syms_size.c > > @@ -6,6 +6,7 @@ > > */ > > > > #define CONFIG_BINMAN > > +#define CONFIG_SPL_BINMAN_SYMBOLS > > #include <binman_sym.h> > > > > binman_sym_declare(char, u_boot_spl, pos);
diff --git a/include/binman_sym.h b/include/binman_sym.h index 72e6765fe52..548d8f5654c 100644 --- a/include/binman_sym.h +++ b/include/binman_sym.h @@ -13,7 +13,7 @@ #define BINMAN_SYM_MISSING (-1UL) -#ifdef CONFIG_BINMAN +#ifdef CONFIG_SPL_BINMAN_SYMBOLS /** * binman_symname() - Internal function to get a binman symbol name diff --git a/tools/binman/test/u_boot_binman_syms.c b/tools/binman/test/u_boot_binman_syms.c index 37fc339ce84..f4a4d1f6846 100644 --- a/tools/binman/test/u_boot_binman_syms.c +++ b/tools/binman/test/u_boot_binman_syms.c @@ -6,6 +6,7 @@ */ #define CONFIG_BINMAN +#define CONFIG_SPL_BINMAN_SYMBOLS #include <binman_sym.h> binman_sym_declare(unsigned long, u_boot_spl_any, offset); diff --git a/tools/binman/test/u_boot_binman_syms_size.c b/tools/binman/test/u_boot_binman_syms_size.c index 7224bc1863c..3a01d8ca4be 100644 --- a/tools/binman/test/u_boot_binman_syms_size.c +++ b/tools/binman/test/u_boot_binman_syms_size.c @@ -6,6 +6,7 @@ */ #define CONFIG_BINMAN +#define CONFIG_SPL_BINMAN_SYMBOLS #include <binman_sym.h> binman_sym_declare(char, u_boot_spl, pos);