[PATCH v3 2/3] arm: mvebu: mvebu_armada-37xx: Define the loadaddr environment variable

Luka Kovacic luka.kovacic at sartura.hr
Mon Aug 16 10:21:19 CEST 2021


Hello Pali,

On Fri, Aug 13, 2021 at 3:59 PM Pali Rohár <pali at kernel.org> wrote:
>
> On Friday 13 August 2021 01:39:37 Luka Kovacic wrote:
> > Add the loadaddr U-Boot environment variable, as this is available in
> > the stock Marvell U-Boot by default on Marvell Armada A37XX platforms.
> >
> > Signed-off-by: Luka Kovacic <luka.kovacic at sartura.hr>
> > Cc: Luka Perkov <luka.perkov at sartura.hr>
> > Cc: Robert Marko <robert.marko at sartura.hr>
> > ---
> >  include/configs/mvebu_armada-37xx.h | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/include/configs/mvebu_armada-37xx.h b/include/configs/mvebu_armada-37xx.h
> > index 8e8bcfa018..6901680e32 100644
> > --- a/include/configs/mvebu_armada-37xx.h
> > +++ b/include/configs/mvebu_armada-37xx.h
> > @@ -110,6 +110,7 @@
> >
> >  /* fdt_addr and kernel_addr are needed for existing distribution boot scripts */
> >  #define CONFIG_EXTRA_ENV_SETTINGS    \
> > +     "loadaddr=0x6000000\0"          \
>
> Now I see where is the issue...
>
> In file include/env_default.h is:
>
> #ifdef  CONFIG_LOADADDR
>         "loadaddr="     __stringify(CONFIG_LOADADDR)    "\0"
> #endif
>
> So default value for loadaddr= is set only when CONFIG_LOADADDR is
> defined.
>
> But lot of cmd load commands are using config option
> CONFIG_SYS_LOAD_ADDR as a default value for load address.
>
> And also for espressobin we set correct value into CONFIG_SYS_LOAD_ADDR.
>
> I'm looking at the u-boot code and CONFIG_LOADADDR is used only by
> cmd/qfw.c and include/env_default.h. And on all other places (in cmd
> load commands) is used CONFIG_SYS_LOAD_ADDR.
>
> So for me it looks like that cmd/qfw.c and include/env_default.h should
> be fixed to use CONFIG_SYS_LOAD_ADDR instead of CONFIG_LOADADDR.

Thanks, this makes sense now.
I can correct this in the next patchset if that's okay with you.

>
> >       "scriptaddr=0x6d00000\0"        \
> >       "pxefile_addr_r=0x6e00000\0"    \
> >       "fdt_addr=0x6f00000\0"          \
> > --
> > 2.31.1
> >

Kind regards,
Luka


More information about the U-Boot mailing list