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

Timur Tabi timur at freescale.com
Fri Jan 26 22:24:30 CET 2007


Wolfgang Denk wrote:

>> 	[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.

The patch currently does this:

MPC8349ITX_config \
MPC8349ITX_LOWBOOT_config \
MPC8349ITXGP_config:	unconfig
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/mpc8349itx
	@CTYPE=$(subst MPC,,$(@:_config=)); \
	echo "#define CONFIG_MPC$${CTYPE}" >> $(obj)include/config.h
	@if [ "$(findstring GP,$@)" ] ; then \
		echo "TEXT_BASE = 0xFE000000" >$(obj)board/mpc8349itx/config.tmp ; \
	fi
	@if [ "$(findstring LOWBOOT,$@)" ] ; then \
		echo "TEXT_BASE = 0xFE000000" >$(obj)board/mpc8349itx/config.tmp ; \
	fi
	@$(MKCONFIG) -a MPC8349ITX ppc mpc83xx mpc8349itx

Is this bad?  Should I have done this instead:

MPC8349ITX_config:	unconfig
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/mpc8349itx
	@echo "#define CONFIG_MPC8349ITX" >> $(obj)include/config.h
	@$(MKCONFIG) -a MPC8349ITX ppc mpc83xx mpc8349itx

MPC8349ITX_LOWBOOT_config:	unconfig
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/mpc8349itx
	@echo "#define CONFIG_MPC8349ITX" >> $(obj)include/config.h
	@echo "TEXT_BASE = 0xFE000000" >$(obj)board/mpc8349itx/config.tmp 		 
@$(MKCONFIG) -a MPC8349ITX ppc mpc83xx mpc8349itx

MPC8349ITXGP_config:	unconfig
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/mpc8349itx
	@echo "#define CONFIG_MPC8349ITXGP" >> $(obj)include/config.h
	@echo "TEXT_BASE = 0xFE000000" >$(obj)board/mpc8349itx/config.tmp 		 
@$(MKCONFIG) -a MPC8349ITX ppc mpc83xx mpc8349itx

-- 
Timur Tabi
Linux Kernel Developer @ Freescale




More information about the U-Boot mailing list