[U-Boot] nand spl build with wrong CONFIG_SYS_TEXT_BASE
Haiying Wang
Haiying.Wang at freescale.com
Mon Nov 8 16:38:30 CET 2010
Dear Wolfgang,
On Sun, 2010-11-07 at 14:31 -0700, Wolfgang Denk wrote:
> Dear Haiying Wang,
>
> In message <1288970062.1855.44.camel at haiying-laptop> you wrote:
> >
> > Wolfgang's latest commit to change all TEXT_BASE to
> CONFIG_SYS_TEXT_BASE
> > breaks the build for nand_spl. He defined CONFIG_SYS_TEXT_BASE in
> board
>
> Which board(s) / configuration(s) are you talkign about?
I meant freescale 8536/8569/p1_p2 boards, and their NAND_config build.
> > header file for CONFIG_NAND, and renamed TEXT_BASE to
> > CONFIG_SYS_TEXT_BASE in nand_spl/board/.../Makefile. Then for
> > u-boot-spl, the CONFIG_SYS_TEXT_BASE is always the value defined in
> > header file, which is, for example, 0xf8f82000 for
> MPC8536/8569/p1_p2/,
> > not the one defined in nand-spl's Makefile, which is 0xfff00000.
> Thus it
>
> It is fundamentally broken to define such settings in a Makefile. They
> do not belong there, an never did.
>
> If you take for example the MPC8536DS_NAND configuration, this defines
> CONFIG_NAND as indication for the NAND booting config option, so it
> should be trivial to add some
>
> #ifdef CONFIG_NAND
> #define CONFIG_SYS_TEXT_BASE ...
> #else
> #define CONFIG_SYS_TEXT_BASE ...
> #endif
>
> to the respective board config file(s).
Before sending last email, I modified the CONFIG_SYS_TEXT_BASE in 8536DS
header file like this:
#ifdef CONFIG_NAND
#ifdef CONFIG_NAND_SPL
#define CONFIG_SYS_TEXT_BASE 0xfff00000
#else
#define CONFIG_SYS_TEXT_BASE 0xf8f82000
#endif
#endif
but still get 0xf8f82000 for NAND SPL image, which should have
0xfff00000 as its CONFIG_SYS_TEXT_BASE. And build log showed me
"warning: "CONFIG_SYS_TEXT_BASE" redefined"
In fact, your change above seems no meaning for NAND _SPL because
NAND_SPL also has CONFIG_NAND defined.
> > Can you take a look at it? Defining CONFIG_SYS_TEXT_BASE in header
> file
> > does impact the TEXT_BASE defined in Makefile for nand_spl.
>
> Please remove any such defines from Makefiles.
You meant the CONFIG_SYS_TEXT_BASE can only be defined in board header
files? But you change all the TEXT_BASE to CONFIG_SYS_TEXT_BASE in the
Makefile or config.mk for almost all boards under nand_spl, which I
guess you were OK with it.:)
I did not understand why old way to define TEXT_BASE in Makefile worked
but changing it to CONFIG_SYS_TEXT_BASE doesn't work any more. And as
you pointed out, defining CONFIG_SYS_TEXT_BASE in header file is the
right way, but it did not work for nans_spl for now.
Thanks.
Haiying
>
More information about the U-Boot
mailing list