[U-Boot-Users] [PATCH] Add support for the MPC8349E-mITX-GP

Wolfgang Denk wd at denx.de
Fri Jan 26 22:17:53 CET 2007


In message <45BA3CB3.7020908 at 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_




More information about the U-Boot mailing list