
In message 45BA3CB3.7020908@freescale.com you wrote:
Some boards solve this problem by specifying the options in the Makefile. However, Wolfgang says he doesn't like this.
It depends. There once was a time, when I thought something like the TQM82xx code was a good thing. Actually it was an improvement over what we had before that. But I've learned a lesson or two, and today I would not accept such a mess again.
Onthe other hand, if you just have to switch between lowboot and highboot configurations, or between configurations with LCD or without, then a bit of configuration selection in the Makefile is IMHO ok. Just don't write pages of code, please.
I presume you mean board-specific ifdefs in a config file, and not just any ifdefs. Frankly, I don't think 3 board-specific ifdefs is that many.
Neither do I. And it's definitely better than having 2 config files which are 98% copy & paste and otherwise just a PITA to keep in sync.
to the Makefile, by adding something like this to the make rule:
[if ITX and not ITX-GP] echo "#define CONFIG_COMPACT_FLASH" >> $(obj)include/config.h echo "#define CFG_MAX_FLASH_BANKS 2" >> $(obj)include/config.h echo '#define CFG_PROMPT "MPC8349E-mITX> "' >> $(obj)include/config.h
No. Please don't write code in the Makefile, just select the right configuration name, and that's it.
Best regards,
Wolfgang Denk