From: Haiying Wang Date: Tue, 9 Nov 2010 16:23:02 -0500 Subject: [U-Boot] nand spl build with wrong CONFIG_SYS_TEXT_BASE In-Reply-To: <20101109211141.D9A2D4F4@gemini.denx.de> References: <1288970062.1855.44.camel@haiying-laptop> <20101107213129.CA432220@gemini.denx.de> <1289230710.1900.27.camel@haiying-laptop> <20101108163053.E973613077C4@gemini.denx.de> <1289240747.1900.58.camel@haiying-laptop> <20101108233626.82904D48956@gemini.denx.de> <1289314359.2168.20.camel@haiying-laptop> <20101109162343.31A76D314CE@gemini.denx.de> <20101109102643.45d7f398@udp111988uds.am.freescale.net> <20101109171853.8ADBAD0D220@gemini.denx.de> <20101109122218.13f168dd@udp111988uds.am.freescale.net> <20101109185947.76137EA443@gemini.denx.de> <20101109130427.5e918954@udp111988uds.am.freescale.net> <20101109201300.531344F4@gemini.denx.de> <20101109143747.685f973f@udp111988uds.am.freescale.net> <20101109211141.D9A2D4F4@gemini.denx.de> Message-ID: <1289337782.2168.148.camel@haiying-laptop> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, 2010-11-09 at 14:11 -0700, Wolfgang Denk wrote: > Dear Scott Wood, > > In message <20101109143747.685f973f@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