On Tue, 9 Nov 2010 21:13:00 +0100 Wolfgang Denk <w...@denx.de> wrote:
> Dear Scott Wood, > > In message <20101109130427.5e918...@udp111988uds.am.freescale.net> you wrote: > > > > > For me it is on the fly when running a single "make all" sees these > > > values changing. > > > > In any case, the right answer is a separate autoconf.mk per image. > > NAK. If different images need to be linked with different text base > addresses, they should use separate variables. > > Having these lists of #ifdef's and needing to know "umm, now we're in > the context of building FOO image, so TEXT_BASE might be that; oh, > wrong, it's the other #if branch actually, it should be this" is just > what you see right now: a maintenance nightmare. 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 And as I've pointed out, this gets to be an even bigger mess with larger SPLs that want to pull in bigger chunks of U-Boot based on CONFIG_ symbols. Are we going to have to create an SPL version of each of them, too? And a third version of each symbol, for a three-stage boot? Are you going to insist that we rip out all the other CONFIG_ symbols that are conditional on NAND_SPL (but happen to not be referred to in makefiles -- is that really the meaningful semantic difference here)? CONFIG_SYS_HRCW_HIGH versus CONFIG_SYS_HRCW_HIGH_SPL? CONFIG_DEFAULT_IMMR versus CONFIG_DEFAULT_IMMR_SPL? Should we replace CONFIG_NS16550_MIN_FUNCTIONS with directly ifdeffing NAND_SPL in the serial code? > Lets get rid of this mess, and use a separate variable for each > separate purpose. It is the same purpose. The problem is treating separate, only somewhat related image builds as being the same build and requiring that they have the same config. They have separate makefiles, separate linker scripts, separate everything except some shared code... and autoconf.mk. Just because we got away with it until now does not make it the right thing to do. -Scott _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot