[U-Boot] nand spl build with wrong CONFIG_SYS_TEXT_BASE

Wolfgang Denk wd at denx.de
Mon Nov 8 17:30:53 CET 2010


Dear Haiying Wang,

In message <1289230710.1900.27.camel at haiying-laptop> you wrote:
> 
> 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

This looks broken to me. If you have CONFIG_NAND not defined you have
no CONFIG_SYS_TEXT_BASE definition at all.

> 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"

Well, I guess it also showed where the previous definition came from?

> In fact, your change above seems no meaning for NAND _SPL because
> NAND_SPL also has CONFIG_NAND defined.

Well, then your bord entry in boards.cfg makes no sense. The
NAND-booting board configurations auto-define "CONFIG_NAND". If this
is not what you want then please feel free to change it.

> > 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.:)

If there is any such code left, it should be cleaned up.

> 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.

Try to find out where that redefine is coming from, and fix that. And
fix the ",NAND" flag in boards.cfg if this is not what you want.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Copy from one, it's plagiarism; copy from two, it's research.


More information about the U-Boot mailing list