From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Fri, 26 Jan 2007 22:17:53 +0100 Subject: [U-Boot-Users] [PATCH] Add support for the MPC8349E-mITX-GP In-Reply-To: Your message of "Fri, 26 Jan 2007 11:38:59 CST." <45BA3CB3.7020908@freescale.com> Message-ID: <20070126211753.6AE0B35342C@atlas.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de He had quite a powerful intellect, but it was as powerful like a locomotive, and ran on rails and was therefore almost impossible to steer. - Terry Pratchett, _Lords and Ladies_