[U-Boot] nand spl build with wrong CONFIG_SYS_TEXT_BASE

Haiying Wang Haiying.Wang at freescale.com
Tue Nov 9 22:23:02 CET 2010


On Tue, 2010-11-09 at 14:11 -0700, Wolfgang Denk wrote:
> Dear Scott Wood,
> 
> In message <20101109143747.685f973f at udp111988uds.am.freescale.net> you
> wrote:
> >
> > I don't see how
> >
> > #ifdef NAND_SPL
> > #define CONFIG_SYS_TEXT_BASE xxx
> > #else
> > #define CONFIG_SYS_TEXT_BASE yyy
> > #endif
> >
> > is more of a maintenance problem than
> >
> > #define CONFIG_SYS_TEXT_BASE_SPL xxx
> > #define CONFIG_SYS_TEXT_BASE yyy
> >
> > followed by multiple instances of
> >
> > #ifdef NAND_SPL
> > do something with CONFIG_SYS_TEXT_BASE_SPL
> > #else
> > do something with CONFIG_SYS_TEXT_BASE
> > #endif
> 
> Assuming that your code really needs to know the start address of the
> image, it should probably do something like this instead:
> 
> #ifdef NAND_SPL
> #define CONFIG_SYS_TEXT_BASE xxx
> #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
> #else
> #define CONFIG_SYS_TEXT_BASE yyy
> #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
> #endif
> 
This doesn't make sense if there is still one autoconfig.mk. The value
for CONFIG_SYS_TEXT_BASE will always be yyy for NAND_SPL.

Haiying





More information about the U-Boot mailing list