Hi Tom, On Thu, 26 Sept 2024 at 06:07, Tom Rini <[email protected]> wrote: > > On Wed, Sep 25, 2024 at 02:55:37PM +0200, Simon Glass wrote: > > Use spl_get_image_pos() to obtain the image position to jump to. Add > > the symbols used for VPL so that the correct image can be loaded. > > > > Use the functions provided for accessing these symbols and add a few > > comments too. > > > > Signed-off-by: Simon Glass <[email protected]> > > --- > > > > common/spl/spl.c | 22 ++++++++++++++++------ > > 1 file changed, 16 insertions(+), 6 deletions(-) > > > > diff --git a/common/spl/spl.c b/common/spl/spl.c > > index d01e9861f88..623e486c210 100644 > > --- a/common/spl/spl.c > > +++ b/common/spl/spl.c > > @@ -50,15 +50,19 @@ u32 *boot_params_ptr = NULL; > > > > #if CONFIG_IS_ENABLED(BINMAN_UBOOT_SYMBOLS) > > /* See spl.h for information about this */ > > +#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD) && > > !defined(CONFIG_VPL_BUILD) > > binman_sym_declare(ulong, u_boot_any, image_pos); > > binman_sym_declare(ulong, u_boot_any, size); > > +#endif > > > > -#ifdef CONFIG_TPL > > +#if defined(CONFIG_TPL) > > +/* TPL jumps straight to SPL */ > > binman_sym_declare(ulong, u_boot_spl_any, image_pos); > > binman_sym_declare(ulong, u_boot_spl_any, size); > > #endif > > > > #ifdef CONFIG_VPL > > +/* TPL jumps to VPL */ > > binman_sym_declare(ulong, u_boot_vpl_any, image_pos); > > binman_sym_declare(ulong, u_boot_vpl_any, size); > > #endif > > So I see on a64-olinuxino and others a size reduction here, as those > symbols aren't included now. Do we have something in the tooling to > ensure that we aren't now referencing / dereferencing invalid links?
Yes I noticed that on some other boards. I dug into it a bit and decided that the symbol was being declared when it didn't need to be. If the symbol were used but not declared, we get an error. Regards, Simon

