xref: /openbmc/u-boot/Makefile (revision 466b7410)
17ebf7443Swdenk#
2d4ca31c4Swdenk# (C) Copyright 2000-2004
37ebf7443Swdenk# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
47ebf7443Swdenk#
57ebf7443Swdenk# See file CREDITS for list of people who contributed to this
67ebf7443Swdenk# project.
77ebf7443Swdenk#
87ebf7443Swdenk# This program is free software; you can redistribute it and/or
97ebf7443Swdenk# modify it under the terms of the GNU General Public License as
107ebf7443Swdenk# published by the Free Software Foundation; either version 2 of
117ebf7443Swdenk# the License, or (at your option) any later version.
127ebf7443Swdenk#
137ebf7443Swdenk# This program is distributed in the hope that it will be useful,
147ebf7443Swdenk# but WITHOUT ANY WARRANTY; without even the implied warranty of
157ebf7443Swdenk# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
167ebf7443Swdenk# GNU General Public License for more details.
177ebf7443Swdenk#
187ebf7443Swdenk# You should have received a copy of the GNU General Public License
197ebf7443Swdenk# along with this program; if not, write to the Free Software
207ebf7443Swdenk# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
217ebf7443Swdenk# MA 02111-1307 USA
227ebf7443Swdenk#
237ebf7443Swdenk
247ebf7443SwdenkHOSTARCH := $(shell uname -m | \
257ebf7443Swdenk	sed -e s/i.86/i386/ \
267ebf7443Swdenk	    -e s/sun4u/sparc64/ \
277ebf7443Swdenk	    -e s/arm.*/arm/ \
287ebf7443Swdenk	    -e s/sa110/arm/ \
297ebf7443Swdenk	    -e s/powerpc/ppc/ \
307ebf7443Swdenk	    -e s/macppc/ppc/)
317ebf7443Swdenk
327ebf7443SwdenkHOSTOS := $(shell uname -s | tr A-Z a-z | \
337ebf7443Swdenk	    sed -e 's/\(cygwin\).*/cygwin/')
347ebf7443Swdenk
357ebf7443Swdenkexport	HOSTARCH
367ebf7443Swdenk
377ebf7443Swdenk# Deal with colliding definitions from tcsh etc.
387ebf7443SwdenkVENDOR=
397ebf7443Swdenk
407ebf7443Swdenk#########################################################################
417ebf7443Swdenk
427ebf7443SwdenkTOPDIR	:= $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
437ebf7443Swdenkexport	TOPDIR
447ebf7443Swdenk
457ebf7443Swdenkifeq (include/config.mk,$(wildcard include/config.mk))
467ebf7443Swdenk# load ARCH, BOARD, and CPU configuration
477ebf7443Swdenkinclude include/config.mk
487ebf7443Swdenkexport	ARCH CPU BOARD VENDOR
497ebf7443Swdenk# load other configuration
507ebf7443Swdenkinclude $(TOPDIR)/config.mk
517ebf7443Swdenk
527ebf7443Swdenkifndef CROSS_COMPILE
537ebf7443Swdenkifeq ($(HOSTARCH),ppc)
547ebf7443SwdenkCROSS_COMPILE =
557ebf7443Swdenkelse
567ebf7443Swdenkifeq ($(ARCH),ppc)
577ebf7443SwdenkCROSS_COMPILE = ppc_8xx-
587ebf7443Swdenkendif
597ebf7443Swdenkifeq ($(ARCH),arm)
60dc7c9a1aSwdenkCROSS_COMPILE = arm-linux-
617ebf7443Swdenkendif
622262cfeeSwdenkifeq ($(ARCH),i386)
637a8e9bedSwdenkifeq ($(HOSTARCH),i386)
647a8e9bedSwdenkCROSS_COMPILE =
657a8e9bedSwdenkelse
667a8e9bedSwdenkCROSS_COMPILE = i386-linux-
677a8e9bedSwdenkendif
682262cfeeSwdenkendif
6943d9616cSwdenkifeq ($(ARCH),mips)
7043d9616cSwdenkCROSS_COMPILE = mips_4KC-
7143d9616cSwdenkendif
724a551709Swdenkifeq ($(ARCH),nios)
734a551709SwdenkCROSS_COMPILE = nios-elf-
744a551709Swdenkendif
754e5ca3ebSwdenkifeq ($(ARCH),m68k)
764e5ca3ebSwdenkCROSS_COMPILE = m68k-elf-
774e5ca3ebSwdenkendif
78507bbe3eSwdenkifeq ($(ARCH),microblaze)
79507bbe3eSwdenkCROSS_COMPILE = mb-
80507bbe3eSwdenkendif
817ebf7443Swdenkendif
827ebf7443Swdenkendif
837ebf7443Swdenk
847ebf7443Swdenkexport	CROSS_COMPILE
857ebf7443Swdenk
867ebf7443Swdenk#########################################################################
877ebf7443Swdenk# U-Boot objects....order is important (i.e. start must be first)
887ebf7443Swdenk
897ebf7443SwdenkOBJS  = cpu/$(CPU)/start.o
902262cfeeSwdenkifeq ($(CPU),i386)
912262cfeeSwdenkOBJS += cpu/$(CPU)/start16.o
922262cfeeSwdenkOBJS += cpu/$(CPU)/reset.o
932262cfeeSwdenkendif
947ebf7443Swdenkifeq ($(CPU),ppc4xx)
957ebf7443SwdenkOBJS += cpu/$(CPU)/resetvec.o
967ebf7443Swdenkendif
9742d1f039Swdenkifeq ($(CPU),mpc85xx)
9842d1f039SwdenkOBJS += cpu/$(CPU)/resetvec.o
9942d1f039Swdenkendif
1007ebf7443Swdenk
1019fd5e31fSwdenkLIBS  = lib_generic/libgeneric.a
1029fd5e31fSwdenkLIBS += board/$(BOARDDIR)/lib$(BOARD).a
1037ebf7443SwdenkLIBS += cpu/$(CPU)/lib$(CPU).a
1047ebf7443SwdenkLIBS += lib_$(ARCH)/lib$(ARCH).a
105518e2e1aSwdenkLIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \
106518e2e1aSwdenk	fs/reiserfs/libreiserfs.a
1077ebf7443SwdenkLIBS += net/libnet.a
1087ebf7443SwdenkLIBS += disk/libdisk.a
1097ebf7443SwdenkLIBS += rtc/librtc.a
1107ebf7443SwdenkLIBS += dtt/libdtt.a
1117ebf7443SwdenkLIBS += drivers/libdrivers.a
1127152b1d0SwdenkLIBS += drivers/sk98lin/libsk98lin.a
1137ebf7443SwdenkLIBS += post/libpost.a post/cpu/libcpu.a
1147ebf7443SwdenkLIBS += common/libcommon.a
1159fd5e31fSwdenk.PHONY : $(LIBS)
116a8c7c708Swdenk
1174f7cb08eSwdenk# Add GCC lib
1183d3befa7SwdenkPLATFORM_LIBS += --no-warn-mismatch -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
1193d3befa7Swdenk
1207ebf7443Swdenk
121a8c7c708Swdenk# The "tools" are needed early, so put this first
122a8c7c708Swdenk# Don't include stuff already done in $(LIBS)
123a8c7c708SwdenkSUBDIRS	= tools \
124a8c7c708Swdenk	  examples \
125a8c7c708Swdenk	  post \
126a8c7c708Swdenk	  post/cpu
127b028f715Swdenk.PHONY : $(SUBDIRS)
128a8c7c708Swdenk
1297ebf7443Swdenk#########################################################################
130bdccc4feSwdenk#########################################################################
1317ebf7443Swdenk
132bdccc4feSwdenkALL = u-boot.srec u-boot.bin System.map
1337ebf7443Swdenk
134bdccc4feSwdenkall:		$(ALL)
1357ebf7443Swdenk
1367ebf7443Swdenku-boot.srec:	u-boot
1377ebf7443Swdenk		$(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
1387ebf7443Swdenk
1397ebf7443Swdenku-boot.bin:	u-boot
1407ebf7443Swdenk		$(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
1417ebf7443Swdenk
142bdccc4feSwdenku-boot.img:	u-boot.bin
143bdccc4feSwdenk		./tools/mkimage -A $(ARCH) -T firmware -C none \
144bdccc4feSwdenk		-a $(TEXT_BASE) -e 0 \
145bdccc4feSwdenk		-n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' include/version.h | \
146bdccc4feSwdenk			sed -e 's/"[	 ]*$$/ for $(BOARD) board"/') \
147bdccc4feSwdenk		-d $< $@
148bdccc4feSwdenk
1497ebf7443Swdenku-boot.dis:	u-boot
1507ebf7443Swdenk		$(OBJDUMP) -d $< > $@
1517ebf7443Swdenk
152a8c7c708Swdenku-boot:		depend $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)
1538bde7f77Swdenk		UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed  -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
1548bde7f77Swdenk		$(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \
1557152b1d0Swdenk			--start-group $(LIBS) $(PLATFORM_LIBS) --end-group \
156b2184c31Swdenk			-Map u-boot.map -o u-boot
1577ebf7443Swdenk
158a8c7c708Swdenk$(LIBS):
159a8c7c708Swdenk		$(MAKE) -C `dirname $@`
160a8c7c708Swdenk
161a8c7c708Swdenk$(SUBDIRS):
162b028f715Swdenk		$(MAKE) -C $@ all
1637ebf7443Swdenk
1648f713fdfSdzugdbtools:
1658f713fdfSdzu		$(MAKE) -C tools/gdb || exit 1
1668f713fdfSdzu
1677ebf7443Swdenkdepend dep:
1687ebf7443Swdenk		@for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
1697ebf7443Swdenk
1707ebf7443Swdenktags:
1717ebf7443Swdenk		ctags -w `find $(SUBDIRS) include \
172bda6c8aeSwdenk				lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \
173bda6c8aeSwdenk				fs/cramfs fs/fat fs/fdos fs/jffs2 \
174bda6c8aeSwdenk				net disk rtc dtt drivers drivers/sk98lin common \
1757ebf7443Swdenk			\( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
1767ebf7443Swdenk
1777ebf7443Swdenketags:
1787ebf7443Swdenk		etags -a `find $(SUBDIRS) include \
1797ebf7443Swdenk			\( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
1807ebf7443Swdenk
1817ebf7443SwdenkSystem.map:	u-boot
1827ebf7443Swdenk		@$(NM) $< | \
1837ebf7443Swdenk		grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
1847ebf7443Swdenk		sort > System.map
1857ebf7443Swdenk
1867ebf7443Swdenk#########################################################################
1877ebf7443Swdenkelse
1887ebf7443Swdenkall install u-boot u-boot.srec depend dep:
1897ebf7443Swdenk	@echo "System not configured - see README" >&2
1907ebf7443Swdenk	@ exit 1
1917ebf7443Swdenkendif
1927ebf7443Swdenk
1937ebf7443Swdenk#########################################################################
1947ebf7443Swdenk
1957ebf7443Swdenkunconfig:
19617d704ebSwdenk	@rm -f include/config.h include/config.mk board/*/config.tmp
1977ebf7443Swdenk
1987ebf7443Swdenk#========================================================================
1997ebf7443Swdenk# PowerPC
2007ebf7443Swdenk#========================================================================
2010db5bca8Swdenk
2020db5bca8Swdenk#########################################################################
2030db5bca8Swdenk## MPC5xx Systems
2040db5bca8Swdenk#########################################################################
2050db5bca8Swdenk
2060db5bca8Swdenkcmi_mpc5xx_config:	unconfig
2070db5bca8Swdenk	@./mkconfig $(@:_config=) ppc mpc5xx cmi
2080db5bca8Swdenk
209b6e4c403SwdenkPATI_config:		unconfig
210b6e4c403Swdenk	@./mkconfig $(@:_config=) ppc mpc5xx pati mpl
211b6e4c403Swdenk
2127ebf7443Swdenk#########################################################################
213945af8d7Swdenk## MPC5xxx Systems
214945af8d7Swdenk#########################################################################
215e35745bbSwdenkLite5200_config				\
216e35745bbSwdenkLite5200_LOWBOOT_config			\
217e35745bbSwdenkLite5200_LOWBOOT08_config		\
218e35745bbSwdenkicecube_5200_config			\
219e35745bbSwdenkicecube_5200_LOWBOOT_config		\
220e35745bbSwdenkicecube_5200_LOWBOOT08_config		\
221b2001f27Swdenkicecube_5200_DDR_config 		\
22279d696fcSwdenkicecube_5200_DDR_LOWBOOT_config 	\
22379d696fcSwdenkicecube_5200_DDR_LOWBOOT08_config	\
224e35745bbSwdenkicecube_5100_config:			unconfig
225945af8d7Swdenk	@ >include/config.h
22617d704ebSwdenk	@[ -z "$(findstring LOWBOOT_,$@)" ] || \
22717d704ebSwdenk		{ if [ "$(findstring DDR,$@)" ] ; \
22817d704ebSwdenk			then echo "TEXT_BASE = 0xFF800000" >board/icecube/config.tmp ; \
22917d704ebSwdenk			else echo "TEXT_BASE = 0xFF000000" >board/icecube/config.tmp ; \
23017d704ebSwdenk		  fi ; \
2315cf9da48Swdenk		  echo "... with LOWBOOT configuration" ; \
2325cf9da48Swdenk		}
2335cf9da48Swdenk	@[ -z "$(findstring LOWBOOT08,$@)" ] || \
2345cf9da48Swdenk		{ echo "TEXT_BASE = 0xFF800000" >board/icecube/config.tmp ; \
2355cf9da48Swdenk		  echo "... with 8 MB flash only" ; \
23617d704ebSwdenk		  echo "... with LOWBOOT configuration" ; \
2375cf9da48Swdenk		}
238b2001f27Swdenk	@[ -z "$(findstring DDR,$@)" ] || \
239b2001f27Swdenk		{ echo "#define CONFIG_MPC5200_DDR"	>>include/config.h ; \
240b2001f27Swdenk		  echo "... DDR memory revision" ; \
241b2001f27Swdenk		}
242d4ca31c4Swdenk	@[ -z "$(findstring 5200,$@)" ] || \
243d4ca31c4Swdenk		{ echo "#define CONFIG_MPC5200"		>>include/config.h ; \
244d4ca31c4Swdenk		  echo "... with MPC5200 processor" ; \
245d4ca31c4Swdenk		}
246a0f2fe52Swdenk	@[ -z "$(findstring 5100,$@)" ] || \
247945af8d7Swdenk		{ echo "#define CONFIG_MGT5100"		>>include/config.h ; \
248945af8d7Swdenk		  echo "... with MGT5100 processor" ; \
249945af8d7Swdenk		}
250945af8d7Swdenk	@./mkconfig -a IceCube ppc mpc5xxx icecube
251945af8d7Swdenk
252d4ca31c4SwdenkMINI5200_config	\
253d4ca31c4SwdenkEVAL5200_config	\
254d4ca31c4SwdenkTOP5200_config:	unconfig
255d4ca31c4Swdenk	@ echo "#define CONFIG_$(@:_config=) 1"	>include/config.h
256d4ca31c4Swdenk	@./mkconfig -a TOP5200 ppc mpc5xxx top5200 emk
257d4ca31c4Swdenk
25849822e23SwdenkPM520_config \
25949822e23SwdenkPM520_DDR_config \
26049822e23SwdenkPM520_ROMBOOT_config \
26149822e23SwdenkPM520_ROMBOOT_DDR_config:	unconfig
26249822e23Swdenk	@ >include/config.h
26349822e23Swdenk	@[ -z "$(findstring DDR,$@)" ] || \
26449822e23Swdenk		{ echo "#define CONFIG_MPC5200_DDR"	>>include/config.h ; \
26549822e23Swdenk		  echo "... DDR memory revision" ; \
26649822e23Swdenk		}
26749822e23Swdenk	@[ -z "$(findstring ROMBOOT,$@)" ] || \
26849822e23Swdenk		{ echo "#define CONFIG_BOOT_ROM" >>include/config.h ; \
26949822e23Swdenk		  echo "... booting from 8-bit flash" ; \
27049822e23Swdenk		}
27149822e23Swdenk	@./mkconfig -a PM520 ppc mpc5xxx pm520
272efa329cbSwdenk
273945af8d7Swdenk#########################################################################
2747ebf7443Swdenk## MPC8xx Systems
2757ebf7443Swdenk#########################################################################
2767ebf7443Swdenk
2772d24a3a7SwdenkAdder_config    \
2782d24a3a7SwdenkAdder87x_config \
27926238132SwdenkAdderII_config  \
2802d24a3a7Swdenk	:		unconfig
28126238132Swdenk	$(if $(findstring AdderII,$@), \
2822d24a3a7Swdenk	@echo "#define CONFIG_MPC852T" > include/config.h)
2832d24a3a7Swdenk	@./mkconfig -a Adder ppc mpc8xx adder
2842d24a3a7Swdenk
285180d3f74SwdenkADS860_config     \
286180d3f74SwdenkFADS823_config    \
287180d3f74SwdenkFADS850SAR_config \
288180d3f74SwdenkMPC86xADS_config  \
2891114257cSwdenkMPC885ADS_config  \
290180d3f74SwdenkFADS860T_config:	unconfig
2917ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx fads
2927ebf7443Swdenk
2937ebf7443SwdenkAMX860_config	:	unconfig
2947ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
2957ebf7443Swdenk
2967ebf7443Swdenkc2mon_config:		unconfig
2977ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx c2mon
2987ebf7443Swdenk
2997ebf7443SwdenkCCM_config:		unconfig
3007ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx CCM siemens
3017ebf7443Swdenk
3027ebf7443Swdenkcogent_mpc8xx_config:	unconfig
3037ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx cogent
3047ebf7443Swdenk
3053bac3513SwdenkELPT860_config:		unconfig
3063bac3513Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx elpt860 LEOX
3073bac3513Swdenk
3087ebf7443SwdenkESTEEM192E_config:	unconfig
3097ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx esteem192e
3107ebf7443Swdenk
3117ebf7443SwdenkETX094_config	:	unconfig
3127ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx etx094
3137ebf7443Swdenk
3147ebf7443SwdenkFLAGADM_config:	unconfig
3157ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx flagadm
3167ebf7443Swdenk
3177aa78614Swdenkxtract_GEN860T = $(subst _SC,,$(subst _config,,$1))
3187aa78614Swdenk
3197aa78614SwdenkGEN860T_SC_config	\
3207ebf7443SwdenkGEN860T_config: unconfig
3217aa78614Swdenk	@ >include/config.h
3227aa78614Swdenk	@[ -z "$(findstring _SC,$@)" ] || \
3237aa78614Swdenk		{ echo "#define CONFIG_SC" >>include/config.h ; \
3247aa78614Swdenk		  echo "With reduced H/W feature set (SC)..." ; \
3257aa78614Swdenk		}
3267aa78614Swdenk	@./mkconfig -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t
3277ebf7443Swdenk
3287ebf7443SwdenkGENIETV_config:	unconfig
3297ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx genietv
3307ebf7443Swdenk
3317ebf7443SwdenkGTH_config:	unconfig
3327ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx gth
3337ebf7443Swdenk
3347ebf7443Swdenkhermes_config	:	unconfig
3357ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx hermes
3367ebf7443Swdenk
337c40b2956SwdenkHMI10_config	:	unconfig
338c40b2956Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
339c40b2956Swdenk
3407ebf7443SwdenkIAD210_config: unconfig
3417ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
3427ebf7443Swdenk
3437ebf7443Swdenkxtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
3447ebf7443Swdenk
3457ebf7443SwdenkICU862_100MHz_config	\
3467ebf7443SwdenkICU862_config: unconfig
3477ebf7443Swdenk	@ >include/config.h
3487ebf7443Swdenk	@[ -z "$(findstring _100MHz,$@)" ] || \
3497ebf7443Swdenk		{ echo "#define CONFIG_100MHz"	>>include/config.h ; \
3507ebf7443Swdenk		  echo "... with 100MHz system clock" ; \
3517ebf7443Swdenk		}
3527ebf7443Swdenk	@./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
3537ebf7443Swdenk
3547ebf7443SwdenkIP860_config	:	unconfig
3557ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx ip860
3567ebf7443Swdenk
3577ebf7443SwdenkIVML24_256_config \
3587ebf7443SwdenkIVML24_128_config \
3597ebf7443SwdenkIVML24_config:	unconfig
3607ebf7443Swdenk	@ >include/config.h
3617ebf7443Swdenk	@[ -z "$(findstring IVML24_config,$@)" ] || \
3627ebf7443Swdenk		 { echo "#define CONFIG_IVML24_16M"	>>include/config.h ; \
3637ebf7443Swdenk		 }
3647ebf7443Swdenk	@[ -z "$(findstring IVML24_128_config,$@)" ] || \
3657ebf7443Swdenk		 { echo "#define CONFIG_IVML24_32M"	>>include/config.h ; \
3667ebf7443Swdenk		 }
3677ebf7443Swdenk	@[ -z "$(findstring IVML24_256_config,$@)" ] || \
3687ebf7443Swdenk		 { echo "#define CONFIG_IVML24_64M"	>>include/config.h ; \
3697ebf7443Swdenk		 }
3707ebf7443Swdenk	@./mkconfig -a IVML24 ppc mpc8xx ivm
3717ebf7443Swdenk
3727ebf7443SwdenkIVMS8_256_config \
3737ebf7443SwdenkIVMS8_128_config \
3747ebf7443SwdenkIVMS8_config:	unconfig
3757ebf7443Swdenk	@ >include/config.h
3767ebf7443Swdenk	@[ -z "$(findstring IVMS8_config,$@)" ] || \
3777ebf7443Swdenk		 { echo "#define CONFIG_IVMS8_16M"	>>include/config.h ; \
3787ebf7443Swdenk		 }
3797ebf7443Swdenk	@[ -z "$(findstring IVMS8_128_config,$@)" ] || \
3807ebf7443Swdenk		 { echo "#define CONFIG_IVMS8_32M"	>>include/config.h ; \
3817ebf7443Swdenk		 }
3827ebf7443Swdenk	@[ -z "$(findstring IVMS8_256_config,$@)" ] || \
3837ebf7443Swdenk		 { echo "#define CONFIG_IVMS8_64M"	>>include/config.h ; \
3847ebf7443Swdenk		 }
3857ebf7443Swdenk	@./mkconfig -a IVMS8 ppc mpc8xx ivm
3867ebf7443Swdenk
38756f94be3SwdenkKUP4K_config	:	unconfig
3880608e04dSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx kup4k kup
3890608e04dSwdenk
3900608e04dSwdenkKUP4X_config    :       unconfig
3910608e04dSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx kup4x kup
39256f94be3Swdenk
3937ebf7443SwdenkLANTEC_config	:	unconfig
3947ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx lantec
3957ebf7443Swdenk
3967ebf7443Swdenklwmon_config:		unconfig
3977ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx lwmon
3987ebf7443Swdenk
3997ebf7443SwdenkMBX_config	\
4007ebf7443SwdenkMBX860T_config:	unconfig
4017ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
4027ebf7443Swdenk
4037ebf7443SwdenkMHPC_config:		unconfig
4047ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
4057ebf7443Swdenk
4067ebf7443SwdenkMVS1_config :		unconfig
4077ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx mvs1
4087ebf7443Swdenk
409993cad93Swdenkxtract_NETVIA = $(subst _V2,,$(subst _config,,$1))
410993cad93Swdenk
411993cad93SwdenkNETVIA_V2_config \
4127ebf7443SwdenkNETVIA_config:		unconfig
413993cad93Swdenk	@ >include/config.h
414993cad93Swdenk	@[ -z "$(findstring NETVIA_config,$@)" ] || \
415993cad93Swdenk		 { echo "#define CONFIG_NETVIA_VERSION 1" >>include/config.h ; \
416993cad93Swdenk		  echo "... Version 1" ; \
417993cad93Swdenk		 }
418993cad93Swdenk	@[ -z "$(findstring NETVIA_V2_config,$@)" ] || \
419993cad93Swdenk		 { echo "#define CONFIG_NETVIA_VERSION 2" >>include/config.h ; \
420993cad93Swdenk		  echo "... Version 2" ; \
421993cad93Swdenk		 }
422993cad93Swdenk	@./mkconfig -a $(call xtract_NETVIA,$@) ppc mpc8xx netvia
4237ebf7443Swdenk
424c26e454dSwdenkxtract_NETPHONE = $(subst _V2,,$(subst _config,,$1))
425c26e454dSwdenk
426c26e454dSwdenkNETPHONE_V2_config \
42704a85b3bSwdenkNETPHONE_config:	unconfig
428c26e454dSwdenk	@ >include/config.h
429c26e454dSwdenk	@[ -z "$(findstring NETPHONE_config,$@)" ] || \
430c26e454dSwdenk		 { echo "#define CONFIG_NETPHONE_VERSION 1" >>include/config.h ; \
431c26e454dSwdenk		 }
432c26e454dSwdenk	@[ -z "$(findstring NETPHONE_V2_config,$@)" ] || \
433c26e454dSwdenk		 { echo "#define CONFIG_NETPHONE_VERSION 2" >>include/config.h ; \
434c26e454dSwdenk		 }
435c26e454dSwdenk	@./mkconfig -a $(call xtract_NETPHONE,$@) ppc mpc8xx netphone
43604a85b3bSwdenk
43779fa88f3Swdenkxtract_NETTA = $(subst _SWAPHOOK,,$(subst _6412,,$(subst _ISDN,,$(subst _config,,$1))))
43804a85b3bSwdenk
43979fa88f3SwdenkNETTA_ISDN_6412_SWAPHOOK_config \
44079fa88f3SwdenkNETTA_ISDN_SWAPHOOK_config \
44179fa88f3SwdenkNETTA_6412_SWAPHOOK_config \
44279fa88f3SwdenkNETTA_SWAPHOOK_config \
44379fa88f3SwdenkNETTA_ISDN_6412_config \
44404a85b3bSwdenkNETTA_ISDN_config \
44579fa88f3SwdenkNETTA_6412_config \
44604a85b3bSwdenkNETTA_config:		unconfig
44704a85b3bSwdenk	@ >include/config.h
44879fa88f3Swdenk	@[ -z "$(findstring ISDN_,$@)" ] || \
44904a85b3bSwdenk		 { echo "#define CONFIG_NETTA_ISDN 1" >>include/config.h ; \
45004a85b3bSwdenk		 }
45179fa88f3Swdenk	@[ -n "$(findstring ISDN_,$@)" ] || \
45279fa88f3Swdenk		 { echo "#undef CONFIG_NETTA_ISDN" >>include/config.h ; \
45379fa88f3Swdenk		 }
45479fa88f3Swdenk	@[ -z "$(findstring 6412_,$@)" ] || \
45579fa88f3Swdenk		 { echo "#define CONFIG_NETTA_6412 1" >>include/config.h ; \
45679fa88f3Swdenk		 }
45779fa88f3Swdenk	@[ -n "$(findstring 6412_,$@)" ] || \
45879fa88f3Swdenk		 { echo "#undef CONFIG_NETTA_6412" >>include/config.h ; \
45979fa88f3Swdenk		 }
46079fa88f3Swdenk	@[ -z "$(findstring SWAPHOOK_,$@)" ] || \
46179fa88f3Swdenk		 { echo "#define CONFIG_NETTA_SWAPHOOK 1" >>include/config.h ; \
46279fa88f3Swdenk		 }
46379fa88f3Swdenk	@[ -n "$(findstring SWAPHOOK_,$@)" ] || \
46479fa88f3Swdenk		 { echo "#undef CONFIG_NETTA_SWAPHOOK" >>include/config.h ; \
46579fa88f3Swdenk		 }
46604a85b3bSwdenk	@./mkconfig -a $(call xtract_NETTA,$@) ppc mpc8xx netta
46704a85b3bSwdenk
46879fa88f3Swdenkxtract_NETTA2 = $(subst _V2,,$(subst _config,,$1))
46979fa88f3Swdenk
47079fa88f3SwdenkNETTA2_V2_config \
47179fa88f3SwdenkNETTA2_config:		unconfig
47279fa88f3Swdenk	@ >include/config.h
47379fa88f3Swdenk	@[ -z "$(findstring NETTA2_config,$@)" ] || \
47479fa88f3Swdenk		 { echo "#define CONFIG_NETTA2_VERSION 1" >>include/config.h ; \
47579fa88f3Swdenk		 }
47679fa88f3Swdenk	@[ -z "$(findstring NETTA2_V2_config,$@)" ] || \
47779fa88f3Swdenk		 { echo "#define CONFIG_NETTA2_VERSION 2" >>include/config.h ; \
47879fa88f3Swdenk		 }
47979fa88f3Swdenk	@./mkconfig -a $(call xtract_NETTA2,$@) ppc mpc8xx netta2
48079fa88f3Swdenk
4817ebf7443SwdenkNX823_config:		unconfig
4827ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx nx823
4837ebf7443Swdenk
4847ebf7443Swdenkpcu_e_config:		unconfig
4857ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
4867ebf7443Swdenk
4873bbc899fSwdenkQS850_config:	unconfig
4883bbc899fSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx qs850 snmc
4893bbc899fSwdenk
4903bbc899fSwdenkQS823_config:	unconfig
4913bbc899fSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx qs850 snmc
4923bbc899fSwdenk
4933bbc899fSwdenkQS860T_config:	unconfig
4943bbc899fSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx qs860t snmc
4953bbc899fSwdenk
4967ebf7443SwdenkR360MPI_config:	unconfig
4977ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx r360mpi
4987ebf7443Swdenk
499682011ffSwdenkRBC823_config:	unconfig
500682011ffSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx rbc823
501682011ffSwdenk
5027ebf7443SwdenkRPXClassic_config:	unconfig
5037ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
5047ebf7443Swdenk
5057ebf7443SwdenkRPXlite_config:		unconfig
5067ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx RPXlite
5077ebf7443Swdenk
508e63c8ee3SwdenkRPXlite_DW_64_config  		\
509e63c8ee3SwdenkRPXlite_DW_LCD_config 		\
510e63c8ee3SwdenkRPXlite_DW_64_LCD_config 	\
511e63c8ee3SwdenkRPXlite_DW_NVRAM_config		\
512e63c8ee3SwdenkRPXlite_DW_NVRAM_64_config      \
513e63c8ee3SwdenkRPXlite_DW_NVRAM_LCD_config	\
514e63c8ee3SwdenkRPXlite_DW_NVRAM_64_LCD_config  \
515e63c8ee3SwdenkRPXlite_DW_config:         unconfig
516e63c8ee3Swdenk	@ >include/config.h
517e63c8ee3Swdenk	@[ -z "$(findstring _64,$@)" ] || \
518e63c8ee3Swdenk		{ echo "#define RPXlite_64MHz"		>>include/config.h ; \
519e63c8ee3Swdenk		  echo "... with 64MHz system clock ..."; \
520e63c8ee3Swdenk		}
521e63c8ee3Swdenk	@[ -z "$(findstring _LCD,$@)" ] || \
522e63c8ee3Swdenk		{ echo "#define CONFIG_LCD"          	>>include/config.h ; \
523e63c8ee3Swdenk		  echo "#define CONFIG_NEC_NL6448BC20"	>>include/config.h ; \
524e63c8ee3Swdenk		  echo "... with LCD display ..."; \
525e63c8ee3Swdenk		}
526e63c8ee3Swdenk	@[ -z "$(findstring _NVRAM,$@)" ] || \
527e63c8ee3Swdenk		{ echo "#define  CFG_ENV_IS_IN_NVRAM" 	>>include/config.h ; \
528e63c8ee3Swdenk		  echo "... with ENV in NVRAM ..."; \
529e63c8ee3Swdenk		}
530e63c8ee3Swdenk	@./mkconfig -a RPXlite_DW ppc mpc8xx RPXlite_dw
531e63c8ee3Swdenk
53273a8b27cSwdenkrmu_config:	unconfig
53373a8b27cSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx rmu
53473a8b27cSwdenk
5357ebf7443SwdenkRRvision_config:	unconfig
5367ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx RRvision
5377ebf7443Swdenk
5387ebf7443SwdenkRRvision_LCD_config:	unconfig
5397ebf7443Swdenk	@echo "#define CONFIG_LCD" >include/config.h
5407ebf7443Swdenk	@echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
5417ebf7443Swdenk	@./mkconfig -a RRvision ppc mpc8xx RRvision
5427ebf7443Swdenk
5437ebf7443SwdenkSM850_config	:	unconfig
5447ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
5457ebf7443Swdenk
5467ebf7443SwdenkSPD823TS_config:	unconfig
5477ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx spd8xx
5487ebf7443Swdenk
549dc7c9a1aSwdenksvm_sc8xx_config:	unconfig
550dc7c9a1aSwdenk	@ >include/config.h
551dc7c9a1aSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
552dc7c9a1aSwdenk
5537ebf7443SwdenkSXNI855T_config:	unconfig
5547ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx sixnet
5557ebf7443Swdenk
556db2f721fSwdenk# EMK MPC8xx based modules
557db2f721fSwdenkTOP860_config:		unconfig
558db2f721fSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx top860 emk
559db2f721fSwdenk
5607ebf7443Swdenk# Play some tricks for configuration selection
561e9132ea9Swdenk# Only 855 and 860 boards may come with FEC
562e9132ea9Swdenk# and only 823 boards may have LCD support
563e9132ea9Swdenkxtract_8xx = $(subst _LCD,,$(subst _config,,$1))
5647ebf7443Swdenk
5657ebf7443SwdenkFPS850L_config		\
566384ae025SwdenkFPS860L_config		\
567f12e568cSwdenkNSCU_config		\
5687ebf7443SwdenkTQM823L_config		\
5697ebf7443SwdenkTQM823L_LCD_config	\
5707ebf7443SwdenkTQM850L_config		\
5717ebf7443SwdenkTQM855L_config		\
5727ebf7443SwdenkTQM860L_config		\
573d126bfbdSwdenkTQM862L_config		\
574ae3af05eSwdenkTQM823M_config		\
575ae3af05eSwdenkTQM850M_config		\
576f12e568cSwdenkTQM855M_config		\
577f12e568cSwdenkTQM860M_config		\
578f12e568cSwdenkTQM862M_config		\
579c178d3daSwdenkTQM866M_config:		unconfig
5807ebf7443Swdenk	@ >include/config.h
5817ebf7443Swdenk	@[ -z "$(findstring _LCD,$@)" ] || \
5827ebf7443Swdenk		{ echo "#define CONFIG_LCD"		>>include/config.h ; \
583fd3103bbSwdenk		  echo "#define CONFIG_NEC_NL6448BC20"	>>include/config.h ; \
5847ebf7443Swdenk		  echo "... with LCD display" ; \
5857ebf7443Swdenk		}
5867ebf7443Swdenk	@./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
5877ebf7443Swdenk
5887ebf7443SwdenkTTTech_config:	unconfig
5897ebf7443Swdenk	@echo "#define CONFIG_LCD" >include/config.h
5907ebf7443Swdenk	@echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
5917ebf7443Swdenk	@./mkconfig -a TQM823L ppc mpc8xx tqm8xx
5927ebf7443Swdenk
593608c9146Swdenkv37_config:	unconfig
594608c9146Swdenk	@echo "#define CONFIG_LCD" >include/config.h
595608c9146Swdenk	@echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
596608c9146Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx v37
597608c9146Swdenk
59891e940d9Sdzuwtk_config:	unconfig
59991e940d9Sdzu	@echo "#define CONFIG_LCD" >include/config.h
60091e940d9Sdzu	@echo "#define CONFIG_SHARP_LQ065T9DR51U" >>include/config.h
60191e940d9Sdzu	@./mkconfig -a TQM823L ppc mpc8xx tqm8xx
60291e940d9Sdzu
6037ebf7443Swdenk#########################################################################
6047ebf7443Swdenk## PPC4xx Systems
6057ebf7443Swdenk#########################################################################
606e55ca7e2Swdenkxtract_4xx = $(subst _25,,$(subst _33,,$(subst _BA,,$(subst _ME,,$(subst _HI,,$(subst _config,,$1))))))
6077ebf7443Swdenk
6087ebf7443SwdenkADCIOP_config:	unconfig
6097ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx adciop esd
6107ebf7443Swdenk
6117ebf7443SwdenkAR405_config:	unconfig
6127ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
6137ebf7443Swdenk
614549826eaSstroeseASH405_config:	unconfig
615549826eaSstroese	@./mkconfig $(@:_config=) ppc ppc4xx ash405 esd
616549826eaSstroese
617549826eaSstroeseBUBINGA405EP_config:	unconfig
618549826eaSstroese	@./mkconfig $(@:_config=) ppc ppc4xx bubinga405ep
619549826eaSstroese
6207ebf7443SwdenkCANBT_config:	unconfig
6217ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx canbt esd
6227ebf7443Swdenk
62310767ccbSwdenkCATcenter_config:	unconfig
62410767ccbSwdenk	@ echo "/* CATcenter uses PPChameleon Model ME */"  > include/config.h
62510767ccbSwdenk	@ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >> include/config.h
62610767ccbSwdenk	@./mkconfig -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave
62710767ccbSwdenk
6287ebf7443SwdenkCPCI405_config	\
629549826eaSstroeseCPCI4052_config	\
630549826eaSstroeseCPCI405AB_config:	unconfig
6317ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
6327ebf7443Swdenk	@echo "BOARD_REVISION = $(@:_config=)"	>>include/config.mk
6337ebf7443Swdenk
6347ebf7443SwdenkCPCI440_config:	unconfig
6357ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
6367ebf7443Swdenk
6377ebf7443SwdenkCPCIISER4_config:	unconfig
6387ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
6397ebf7443Swdenk
6407ebf7443SwdenkCRAYL1_config:	unconfig
6417ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx L1 cray
6427ebf7443Swdenk
643cd0a9de6Swdenkcsb272_config:	unconfig
644cd0a9de6Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx csb272
645cd0a9de6Swdenk
646aa245090Swdenkcsb472_config:	unconfig
647aa245090Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx csb472
648aa245090Swdenk
6497ebf7443SwdenkDASA_SIM_config: unconfig
6507ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
6517ebf7443Swdenk
65272cd5aa7SstroeseDP405_config:	unconfig
65372cd5aa7Sstroese	@./mkconfig $(@:_config=) ppc ppc4xx dp405 esd
65472cd5aa7Sstroese
6557ebf7443SwdenkDU405_config:	unconfig
6567ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx du405 esd
6577ebf7443Swdenk
6587ebf7443SwdenkEBONY_config:	unconfig
6597ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx ebony
6607ebf7443Swdenk
6617ebf7443SwdenkERIC_config:	unconfig
6627ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx eric
6637ebf7443Swdenk
664d1cbe85bSwdenkEXBITGEN_config:	unconfig
665d1cbe85bSwdenk	@./mkconfig $(@:_config=) ppc ppc4xx exbitgen
666d1cbe85bSwdenk
66772cd5aa7SstroeseHUB405_config:	unconfig
66872cd5aa7Sstroese	@./mkconfig $(@:_config=) ppc ppc4xx hub405 esd
66972cd5aa7Sstroese
670db01a2eaSwdenkJSE_config:	unconfig
671db01a2eaSwdenk	@./mkconfig $(@:_config=) ppc ppc4xx jse
672db01a2eaSwdenk
6737ebf7443SwdenkMIP405_config:	unconfig
6747ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
6757ebf7443Swdenk
676f3e0de60SwdenkMIP405T_config:	unconfig
677f3e0de60Swdenk	@echo "#define CONFIG_MIP405T" >include/config.h
678f3e0de60Swdenk	@echo "Enable subset config for MIP405T"
679f3e0de60Swdenk	@./mkconfig -a MIP405 ppc ppc4xx mip405 mpl
680f3e0de60Swdenk
6817ebf7443SwdenkML2_config:	unconfig
6827ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx ml2
6837ebf7443Swdenk
684028ab6b5Swdenkml300_config:	unconfig
685028ab6b5Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx ml300 xilinx
686028ab6b5Swdenk
6870e6d798cSwdenkOCOTEA_config:	unconfig
6880e6d798cSwdenk	@./mkconfig $(@:_config=) ppc ppc4xx ocotea
6890e6d798cSwdenk
6907ebf7443SwdenkOCRTC_config		\
6917ebf7443SwdenkORSG_config:	unconfig
6927ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
6937ebf7443Swdenk
6947ebf7443SwdenkPCI405_config:	unconfig
6957ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
6967ebf7443Swdenk
6977ebf7443SwdenkPIP405_config:	unconfig
6987ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
6997ebf7443Swdenk
70072cd5aa7SstroesePLU405_config:	unconfig
70172cd5aa7Sstroese	@./mkconfig $(@:_config=) ppc ppc4xx plu405 esd
70272cd5aa7Sstroese
703549826eaSstroesePMC405_config:	unconfig
704549826eaSstroese	@./mkconfig $(@:_config=) ppc ppc4xx pmc405 esd
705549826eaSstroese
706e55ca7e2SwdenkPPChameleonEVB_BA_25_config	\
707e55ca7e2SwdenkPPChameleonEVB_ME_25_config	\
708e55ca7e2SwdenkPPChameleonEVB_HI_25_config	\
709e55ca7e2SwdenkPPChameleonEVB_BA_33_config	\
710e55ca7e2SwdenkPPChameleonEVB_ME_33_config	\
711e55ca7e2SwdenkPPChameleonEVB_HI_33_config:	unconfig
712fbe4b5cbSwdenk	@ >include/config.h
713fbe4b5cbSwdenk	@[ -z "$(findstring _MODEL_BA,$@)" ] || \
714fbe4b5cbSwdenk		{ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 0" >>include/config.h ; \
715fbe4b5cbSwdenk		  echo "... BASIC model" ; \
716fbe4b5cbSwdenk		}
717fbe4b5cbSwdenk	@[ -z "$(findstring _MODEL_ME,$@)" ] || \
718fbe4b5cbSwdenk		{ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >>include/config.h ; \
719fbe4b5cbSwdenk		  echo "... MEDIUM model" ; \
720fbe4b5cbSwdenk		}
721fbe4b5cbSwdenk	@[ -z "$(findstring _MODEL_HI,$@)" ] || \
722fbe4b5cbSwdenk		{ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 2" >>include/config.h ; \
723fbe4b5cbSwdenk		  echo "... HIGH-END model" ; \
724fbe4b5cbSwdenk		}
725e55ca7e2Swdenk	@[ -z "$(findstring _25,$@)" ] || \
726e55ca7e2Swdenk		{ echo "#define CONFIG_PPCHAMELEON_CLK_25" >>include/config.h ; \
727e55ca7e2Swdenk		  echo " SysClk = 25MHz" ; \
728e55ca7e2Swdenk		}
729e55ca7e2Swdenk	@[ -z "$(findstring _33,$@)" ] || \
730e55ca7e2Swdenk		{ echo "#define CONFIG_PPCHAMELEON_CLK_33" >>include/config.h ; \
731e55ca7e2Swdenk		  echo " SysClk = 33MHz" ; \
732e55ca7e2Swdenk		}
733fbe4b5cbSwdenk	@./mkconfig -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave
73412f34241Swdenk
73572cd5aa7SstroeseVOH405_config:	unconfig
73672cd5aa7Sstroese	@./mkconfig $(@:_config=) ppc ppc4xx voh405 esd
73772cd5aa7Sstroese
7387ebf7443SwdenkW7OLMC_config	\
7397ebf7443SwdenkW7OLMG_config: unconfig
7407ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx w7o
7417ebf7443Swdenk
7427ebf7443SwdenkWALNUT405_config:	unconfig
7437ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx walnut405
7447ebf7443Swdenk
745ba56f625SwdenkXPEDITE1K_config:	unconfig
746ba56f625Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx xpedite1k
747ba56f625Swdenk
7487ebf7443Swdenk#########################################################################
7497ebf7443Swdenk## MPC824x Systems
7507ebf7443Swdenk#########################################################################
751efa329cbSwdenkxtract_82xx = $(subst _BIGFLASH,,$(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1))))))
7523bac3513Swdenk
7530332990bSwdenkA3000_config: unconfig
7540332990bSwdenk	@./mkconfig $(@:_config=) ppc mpc824x a3000
7550332990bSwdenk
7567ebf7443SwdenkBMW_config: unconfig
7577ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x bmw
7587ebf7443Swdenk
7593bac3513SwdenkCPC45_config	\
7603bac3513SwdenkCPC45_ROMBOOT_config:	unconfig
7613bac3513Swdenk	@./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
7623bac3513Swdenk	@cd ./include ;				\
7633bac3513Swdenk	if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
7643bac3513Swdenk		echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
7653bac3513Swdenk		echo "... booting from 8-bit flash" ; \
7663bac3513Swdenk	else \
7673bac3513Swdenk		echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
7683bac3513Swdenk		echo "... booting from 64-bit flash" ; \
7693bac3513Swdenk	fi; \
7703bac3513Swdenk	echo "export CONFIG_BOOT_ROM" >> config.mk;
7713bac3513Swdenk
7727ebf7443SwdenkCU824_config: unconfig
7737ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x cu824
7747ebf7443Swdenk
7757abf0c58Swdenkdebris_config: unconfig
7767abf0c58Swdenk	@./mkconfig $(@:_config=) ppc mpc824x debris etin
7777abf0c58Swdenk
77880885a9dSwdenkeXalion_config: unconfig
77980885a9dSwdenk	@./mkconfig $(@:_config=) ppc mpc824x eXalion
78080885a9dSwdenk
7817ebf7443SwdenkMOUSSE_config: unconfig
7827ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x mousse
7837ebf7443Swdenk
7847ebf7443SwdenkMUSENKI_config: unconfig
7857ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x musenki
7867ebf7443Swdenk
787b4676a25SwdenkMVBLUE_config:	unconfig
788b4676a25Swdenk	@./mkconfig $(@:_config=) ppc mpc824x mvblue
789b4676a25Swdenk
7907ebf7443SwdenkOXC_config: unconfig
7917ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x oxc
7927ebf7443Swdenk
7937ebf7443SwdenkPN62_config: unconfig
7947ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x pn62
7957ebf7443Swdenk
7967ebf7443SwdenkSandpoint8240_config: unconfig
7977ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x sandpoint
7987ebf7443Swdenk
7997ebf7443SwdenkSandpoint8245_config: unconfig
8007ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x sandpoint
8017ebf7443Swdenk
802*466b7410Swdenksbc8240_config: unconfig
803*466b7410Swdenk	@./mkconfig $(@:_config=) ppc mpc824x sbc8240
804*466b7410Swdenk
805d1cbe85bSwdenkSL8245_config: unconfig
806d1cbe85bSwdenk	@./mkconfig $(@:_config=) ppc mpc824x sl8245
807d1cbe85bSwdenk
8087ebf7443Swdenkutx8245_config: unconfig
8097ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x utx8245
8107ebf7443Swdenk
8117ebf7443Swdenk#########################################################################
8127ebf7443Swdenk## MPC8260 Systems
8137ebf7443Swdenk#########################################################################
8147ebf7443Swdenk
81554387ac9Swdenkatc_config:	unconfig
81654387ac9Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 atc
81754387ac9Swdenk
8187ebf7443Swdenkcogent_mpc8260_config:	unconfig
8197ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 cogent
8207ebf7443Swdenk
8217ebf7443SwdenkCPU86_config	\
8227ebf7443SwdenkCPU86_ROMBOOT_config: unconfig
8237ebf7443Swdenk	@./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
8247ebf7443Swdenk	@cd ./include ;				\
8257ebf7443Swdenk	if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
8267ebf7443Swdenk		echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
8277ebf7443Swdenk		echo "... booting from 8-bit flash" ; \
8287ebf7443Swdenk	else \
8297ebf7443Swdenk		echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
8307ebf7443Swdenk		echo "... booting from 64-bit flash" ; \
8317ebf7443Swdenk	fi; \
8327ebf7443Swdenk	echo "export CONFIG_BOOT_ROM" >> config.mk;
8337ebf7443Swdenk
8347ebf7443Swdenkep8260_config:	unconfig
8357ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 ep8260
8367ebf7443Swdenk
8377ebf7443Swdenkgw8260_config:	unconfig
8387ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 gw8260
8397ebf7443Swdenk
8407ebf7443Swdenkhymod_config:	unconfig
8417ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 hymod
8427ebf7443Swdenk
8437ebf7443SwdenkIPHASE4539_config:	unconfig
8447ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 iphase4539
8457ebf7443Swdenk
846c3c7f861SwdenkISPAN_config		\
847c3c7f861SwdenkISPAN_REVB_config:	unconfig
848c3c7f861Swdenk	@if [ "$(findstring _REVB_,$@)" ] ; then \
849c3c7f861Swdenk		echo "#define CFG_REV_B" > include/config.h ; \
850c3c7f861Swdenk	fi
851c3c7f861Swdenk	@./mkconfig -a ISPAN ppc mpc8260 ispan
852c3c7f861Swdenk
85304a85b3bSwdenkMPC8260ADS_config	\
85404a85b3bSwdenkMPC8260ADS_33MHz_config	\
85504a85b3bSwdenkMPC8260ADS_40MHz_config	\
85604a85b3bSwdenkMPC8272ADS_config	\
85704a85b3bSwdenkPQ2FADS_config		\
85804a85b3bSwdenkPQ2FADS-VR_config	\
85904a85b3bSwdenkPQ2FADS-ZU_config	\
86004a85b3bSwdenkPQ2FADS-ZU_66MHz_config	\
86104a85b3bSwdenk	:		unconfig
86204a85b3bSwdenk	$(if $(findstring PQ2FADS,$@), \
86304a85b3bSwdenk	@echo "#define CONFIG_ADSTYPE CFG_PQ2FADS" > include/config.h, \
86404a85b3bSwdenk	@echo "#define CONFIG_ADSTYPE CFG_"$(subst MPC,,$(word 1,$(subst _, ,$@))) > include/config.h)
86504a85b3bSwdenk	$(if $(findstring MHz,$@), \
86604a85b3bSwdenk	@echo "#define CONFIG_8260_CLKIN" $(subst MHz,,$(word 2,$(subst _, ,$@)))"000000" >> include/config.h, \
86704a85b3bSwdenk	$(if $(findstring VR,$@), \
86804a85b3bSwdenk	@echo "#define CONFIG_8260_CLKIN 66000000" >> include/config.h))
86904a85b3bSwdenk	@./mkconfig -a MPC8260ADS ppc mpc8260 mpc8260ads
8707ebf7443Swdenk
871db2f721fSwdenkMPC8266ADS_config:	unconfig
872db2f721fSwdenk	@./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
873db2f721fSwdenk
874efa329cbSwdenk# PM825/PM826 default configuration:  small (= 8 MB) Flash / boot from 64-bit flash
87510f67017SwdenkPM825_config	\
876efa329cbSwdenkPM825_ROMBOOT_config	\
877efa329cbSwdenkPM825_BIGFLASH_config	\
878efa329cbSwdenkPM825_ROMBOOT_BIGFLASH_config	\
8797ebf7443SwdenkPM826_config	\
880efa329cbSwdenkPM826_ROMBOOT_config	\
881efa329cbSwdenkPM826_BIGFLASH_config	\
882efa329cbSwdenkPM826_ROMBOOT_BIGFLASH_config:	unconfig
883efa329cbSwdenk	@if [ "$(findstring PM825_,$@)" ] ; then \
884efa329cbSwdenk		echo "#define CONFIG_PCI"	>include/config.h ; \
8857ebf7443Swdenk	else \
886efa329cbSwdenk		>include/config.h ; \
887efa329cbSwdenk	fi
888efa329cbSwdenk	@if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
889efa329cbSwdenk		echo "... booting from 8-bit flash" ; \
890efa329cbSwdenk		echo "#define CONFIG_BOOT_ROM" >>include/config.h ; \
891efa329cbSwdenk		echo "TEXT_BASE = 0xFF800000" >board/pm826/config.tmp ; \
892efa329cbSwdenk		if [ "$(findstring _BIGFLASH_,$@)" ] ; then \
893efa329cbSwdenk			echo "... with 32 MB Flash" ; \
894efa329cbSwdenk			echo "#define CONFIG_FLASH_32MB" >>include/config.h ; \
8957ebf7443Swdenk		fi; \
896efa329cbSwdenk	else \
897efa329cbSwdenk		echo "... booting from 64-bit flash" ; \
898efa329cbSwdenk		if [ "$(findstring _BIGFLASH_,$@)" ] ; then \
899efa329cbSwdenk			echo "... with 32 MB Flash" ; \
900efa329cbSwdenk			echo "#define CONFIG_FLASH_32MB" >>include/config.h ; \
901efa329cbSwdenk			echo "TEXT_BASE = 0x40000000" >board/pm826/config.tmp ; \
902efa329cbSwdenk		else \
903efa329cbSwdenk			echo "TEXT_BASE = 0xFF000000" >board/pm826/config.tmp ; \
904efa329cbSwdenk		fi; \
905efa329cbSwdenk	fi
906efa329cbSwdenk	@./mkconfig -a PM826 ppc mpc8260 pm826
907efa329cbSwdenk
908efa329cbSwdenkPM828_config	\
909efa329cbSwdenkPM828_PCI_config	\
910efa329cbSwdenkPM828_ROMBOOT_config	\
911efa329cbSwdenkPM828_ROMBOOT_PCI_config:	unconfig
912efa329cbSwdenk	@if [ -z "$(findstring _PCI_,$@)" ] ; then \
913efa329cbSwdenk		echo "#define CONFIG_PCI"  >>include/config.h ; \
914efa329cbSwdenk		echo "... with PCI enabled" ; \
915efa329cbSwdenk	else \
916efa329cbSwdenk		>include/config.h ; \
917efa329cbSwdenk	fi
918efa329cbSwdenk	@if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
919efa329cbSwdenk		echo "... booting from 8-bit flash" ; \
920efa329cbSwdenk		echo "#define CONFIG_BOOT_ROM" >>include/config.h ; \
921efa329cbSwdenk		echo "TEXT_BASE = 0xFF800000" >board/pm826/config.tmp ; \
922efa329cbSwdenk	fi
923efa329cbSwdenk	@./mkconfig -a PM828 ppc mpc8260 pm828
9247ebf7443Swdenk
9257ebf7443Swdenkppmc8260_config:	unconfig
9267ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
9277ebf7443Swdenk
9287ebf7443SwdenkRPXsuper_config:	unconfig
9297ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
9307ebf7443Swdenk
9317ebf7443Swdenkrsdproto_config:	unconfig
9327ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 rsdproto
9337ebf7443Swdenk
9347ebf7443Swdenksacsng_config:	unconfig
9357ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 sacsng
9367ebf7443Swdenk
9377ebf7443Swdenksbc8260_config:	unconfig
9387ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 sbc8260
9397ebf7443Swdenk
9407ebf7443SwdenkSCM_config:		unconfig
9417ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
9427ebf7443Swdenk
94327b207fdSwdenkTQM8255_AA_config \
94427b207fdSwdenkTQM8260_AA_config \
94527b207fdSwdenkTQM8260_AB_config \
94627b207fdSwdenkTQM8260_AC_config \
94727b207fdSwdenkTQM8260_AD_config \
94827b207fdSwdenkTQM8260_AE_config \
94927b207fdSwdenkTQM8260_AF_config \
95027b207fdSwdenkTQM8260_AG_config \
95127b207fdSwdenkTQM8260_AH_config \
95227b207fdSwdenkTQM8265_AA_config:  unconfig
95327b207fdSwdenk	@case "$@" in \
95427b207fdSwdenk	TQM8255_AA_config) CTYPE=MPC8255; CFREQ=300; CACHE=no;  BMODE=8260;;  \
95527b207fdSwdenk	TQM8260_AA_config) CTYPE=MPC8260; CFREQ=200; CACHE=no;  BMODE=8260;; \
95627b207fdSwdenk	TQM8260_AB_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;;  \
95727b207fdSwdenk	TQM8260_AC_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;;  \
95827b207fdSwdenk	TQM8260_AD_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;  BMODE=60x;;  \
95927b207fdSwdenk	TQM8260_AE_config) CTYPE=MPC8260; CFREQ=266; CACHE=no;  BMODE=8260;; \
96027b207fdSwdenk	TQM8260_AF_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;  BMODE=60x;;  \
96127b207fdSwdenk	TQM8260_AG_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;  BMODE=8260;; \
96227b207fdSwdenk	TQM8260_AH_config) CTYPE=MPC8260; CFREQ=300; CACHE=yes; BMODE=60x;;  \
96327b207fdSwdenk	TQM8265_AA_config) CTYPE=MPC8265; CFREQ=300; CACHE=no;  BMODE=60x;;  \
96427b207fdSwdenk	esac; \
96527b207fdSwdenk	>include/config.h ; \
96627b207fdSwdenk	if [ "$${CTYPE}" != "MPC8260" ] ; then \
96727b207fdSwdenk		echo "#define CONFIG_$${CTYPE}"	>>include/config.h ; \
96827b207fdSwdenk	fi; \
96927b207fdSwdenk	echo "#define CONFIG_$${CFREQ}MHz"	>>include/config.h ; \
97027b207fdSwdenk	echo "... with $${CFREQ}MHz system clock" ; \
97127b207fdSwdenk	if [ "$${CACHE}" == "yes" ] ; then \
9727ebf7443Swdenk		echo "#define CONFIG_L2_CACHE"	>>include/config.h ; \
97327b207fdSwdenk		echo "... with L2 Cache support" ; \
9747ebf7443Swdenk	else \
9757ebf7443Swdenk		echo "#undef CONFIG_L2_CACHE"	>>include/config.h ; \
9767ebf7443Swdenk		echo "... without L2 Cache support" ; \
97727b207fdSwdenk	fi; \
97827b207fdSwdenk	if [ "$${BMODE}" == "60x" ] ; then \
97927b207fdSwdenk		echo "#define CONFIG_BUSMODE_60x" >>include/config.h ; \
98027b207fdSwdenk		echo "... with 60x Bus Mode" ; \
98127b207fdSwdenk	else \
98227b207fdSwdenk		echo "#undef CONFIG_BUSMODE_60x"  >>include/config.h ; \
98327b207fdSwdenk		echo "... without 60x Bus Mode" ; \
9847ebf7443Swdenk	fi
9854532cb69Swdenk	@./mkconfig -a TQM8260 ppc mpc8260 tqm8260
9867ebf7443Swdenk
98754387ac9SwdenkZPC1900_config: unconfig
98854387ac9Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 zpc1900
9897aa78614Swdenk
9904e5ca3ebSwdenk#========================================================================
9914e5ca3ebSwdenk# M68K
9924e5ca3ebSwdenk#========================================================================
9934e5ca3ebSwdenk#########################################################################
9944e5ca3ebSwdenk## Coldfire
9954e5ca3ebSwdenk#########################################################################
9964e5ca3ebSwdenk
9974e5ca3ebSwdenkM5272C3_config :		unconfig
998bf9e3b38Swdenk	@./mkconfig $(@:_config=) m68k mcf52x2 m5272c3
9994e5ca3ebSwdenk
10004e5ca3ebSwdenkM5282EVB_config :		unconfig
1001bf9e3b38Swdenk	@./mkconfig $(@:_config=) m68k mcf52x2 m5282evb
10024e5ca3ebSwdenk
10037ebf7443Swdenk#########################################################################
100442d1f039Swdenk## MPC85xx Systems
100542d1f039Swdenk#########################################################################
100642d1f039Swdenk
100742d1f039SwdenkMPC8540ADS_config:	unconfig
100842d1f039Swdenk	@./mkconfig $(@:_config=) ppc mpc85xx mpc8540ads
100942d1f039Swdenk
101042d1f039SwdenkMPC8560ADS_config:	unconfig
101142d1f039Swdenk	@./mkconfig $(@:_config=) ppc mpc85xx mpc8560ads
101242d1f039Swdenk
10137abf0c58Swdenkstxgp3_config:		unconfig
10147abf0c58Swdenk	@./mkconfig $(@:_config=) ppc mpc85xx stxgp3
10157abf0c58Swdenk
1016*466b7410Swdenksbc8560_config \
1017*466b7410Swdenksbc8560_33_config \
1018*466b7410Swdenksbc8560_66_config:      unconfig
10198b07a110Swdenk	@if [ "$(findstring _66_,$@)" ] ; then \
10208b07a110Swdenk		echo "#define CONFIG_PCI_66"  >>include/config.h ; \
10218b07a110Swdenk		echo "... 66 MHz PCI" ; \
10228b07a110Swdenk	else \
10238b07a110Swdenk		>include/config.h ; \
10248b07a110Swdenk		echo "... 33 MHz PCI" ; \
10258b07a110Swdenk	fi
1026*466b7410Swdenk	@./mkconfig -a sbc8560 ppc mpc85xx sbc8560
10278b07a110Swdenk
102842d1f039Swdenk#########################################################################
10297ebf7443Swdenk## 74xx/7xx Systems
10307ebf7443Swdenk#########################################################################
10317ebf7443Swdenk
1032c7de829cSwdenkAmigaOneG3SE_config:	unconfig
1033c7de829cSwdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
1034c7de829cSwdenk
103515647dc7SwdenkBAB7xx_config: unconfig
103615647dc7Swdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
103715647dc7Swdenk
10383a473b2aSwdenkDB64360_config:  unconfig
10393a473b2aSwdenk	@./mkconfig DB64360 ppc 74xx_7xx db64360 Marvell
10403a473b2aSwdenk
10413a473b2aSwdenkDB64460_config:  unconfig
10423a473b2aSwdenk	@./mkconfig DB64460 ppc 74xx_7xx db64460 Marvell
10433a473b2aSwdenk
104415647dc7SwdenkELPPC_config: unconfig
104515647dc7Swdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
104615647dc7Swdenk
10477ebf7443SwdenkEVB64260_config	\
10487ebf7443SwdenkEVB64260_750CX_config:	unconfig
10497ebf7443Swdenk	@./mkconfig EVB64260 ppc 74xx_7xx evb64260
10507ebf7443Swdenk
105115647dc7SwdenkP3G4_config: unconfig
10527ebf7443Swdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
10537ebf7443Swdenk
10547ebf7443SwdenkPCIPPC2_config \
10557ebf7443SwdenkPCIPPC6_config: unconfig
10567ebf7443Swdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
10577ebf7443Swdenk
105815647dc7SwdenkZUMA_config:	unconfig
105912f34241Swdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
106012f34241Swdenk
10617ebf7443Swdenk#========================================================================
10627ebf7443Swdenk# ARM
10637ebf7443Swdenk#========================================================================
10647ebf7443Swdenk#########################################################################
10657ebf7443Swdenk## StrongARM Systems
10667ebf7443Swdenk#########################################################################
10677ebf7443Swdenk
1068ea66bc88Swdenkassabet_config	:	unconfig
1069ea66bc88Swdenk	@./mkconfig $(@:_config=) arm sa1100 assabet
1070ea66bc88Swdenk
10717ebf7443Swdenkdnp1110_config	:	unconfig
10727ebf7443Swdenk	@./mkconfig $(@:_config=) arm sa1100 dnp1110
10737ebf7443Swdenk
1074855a496fSwdenkgcplus_config	:	unconfig
1075855a496fSwdenk	@./mkconfig $(@:_config=) arm sa1100 gcplus
1076855a496fSwdenk
1077855a496fSwdenklart_config	:	unconfig
1078855a496fSwdenk	@./mkconfig $(@:_config=) arm sa1100 lart
1079855a496fSwdenk
10807ebf7443Swdenkshannon_config	:	unconfig
10817ebf7443Swdenk	@./mkconfig $(@:_config=) arm sa1100 shannon
10827ebf7443Swdenk
10837ebf7443Swdenk#########################################################################
10842e5983d2Swdenk## ARM92xT Systems
10857ebf7443Swdenk#########################################################################
10867ebf7443Swdenk
1087b0639ca3Swdenkxtract_trab = $(subst _bigram,,$(subst _bigflash,,$(subst _old,,$(subst _config,,$1))))
108843d9616cSwdenk
10893ff02c27Swdenkxtract_omap1610xxx = $(subst _cs0boot,,$(subst _cs3boot,,$(subst _cs_autoboot,,$(subst _config,,$1))))
109063e73c9aSwdenk
1091a56bd922Swdenkxtract_omap730p2 = $(subst _cs0boot,,$(subst _cs3boot,, $(subst _config,,$1)))
1092a56bd922Swdenk
10933d3befa7Swdenkintegratorcp_config :	unconfig
10943d3befa7Swdenk	@./mkconfig $(@:_config=) arm arm926ejs integratorcp
10953d3befa7Swdenk
10963d3befa7Swdenkintegratorap_config :	unconfig
10973d3befa7Swdenk	@./mkconfig $(@:_config=) arm arm926ejs integratorap
10983d3befa7Swdenk
1099f832d8a1Swdenklpd7a400_config \
1100f832d8a1Swdenklpd7a404_config:	unconfig
11012d24a3a7Swdenk	@./mkconfig $(@:_config=) arm lh7a40x lpd7a40x
11023d3befa7Swdenk
11032e5983d2Swdenkomap1510inn_config :	unconfig
11042e5983d2Swdenk	@./mkconfig $(@:_config=) arm arm925t omap1510inn
11052e5983d2Swdenk
11061eaeb58eSwdenkomap5912osk_config :	unconfig
11071eaeb58eSwdenk	@./mkconfig $(@:_config=) arm arm926ejs omap5912osk
11081eaeb58eSwdenk
110963e73c9aSwdenkomap1610inn_config \
111063e73c9aSwdenkomap1610inn_cs0boot_config \
111163e73c9aSwdenkomap1610inn_cs3boot_config \
11123ff02c27Swdenkomap1610inn_cs_autoboot_config \
111363e73c9aSwdenkomap1610h2_config \
111463e73c9aSwdenkomap1610h2_cs0boot_config \
11153ff02c27Swdenkomap1610h2_cs3boot_config \
11163ff02c27Swdenkomap1610h2_cs_autoboot_config:	unconfig
111763e73c9aSwdenk	@if [ "$(findstring _cs0boot_, $@)" ] ; then \
111863e73c9aSwdenk		echo "#define CONFIG_CS0_BOOT" >> ./include/config.h ; \
1119b79a11ccSwdenk		echo "... configured for CS0 boot"; \
11203ff02c27Swdenk	elif [ "$(findstring _cs_autoboot_, $@)" ] ; then \
11213ff02c27Swdenk		echo "#define CONFIG_CS_AUTOBOOT" >> ./include/config.h ; \
11223ff02c27Swdenk		echo "... configured for CS_AUTO boot"; \
112363e73c9aSwdenk	else \
112463e73c9aSwdenk		echo "#define CONFIG_CS3_BOOT" >> ./include/config.h ; \
1125b79a11ccSwdenk		echo "... configured for CS3 boot"; \
112663e73c9aSwdenk	fi;
112763e73c9aSwdenk	@./mkconfig -a $(call xtract_omap1610xxx,$@) arm arm926ejs omap1610inn
11286f21347dSwdenk
1129a56bd922Swdenkomap730p2_config \
1130a56bd922Swdenkomap730p2_cs0boot_config \
1131a56bd922Swdenkomap730p2_cs3boot_config :	unconfig
1132a56bd922Swdenk	@if [ "$(findstring _cs0boot_, $@)" ] ; then \
1133a56bd922Swdenk		echo "#define CONFIG_CS0_BOOT" >> ./include/config.h ; \
1134a56bd922Swdenk		echo "... configured for CS0 boot"; \
1135a56bd922Swdenk	else \
1136a56bd922Swdenk		echo "#define CONFIG_CS3_BOOT" >> ./include/config.h ; \
1137a56bd922Swdenk		echo "... configured for CS3 boot"; \
1138a56bd922Swdenk	fi;
1139a56bd922Swdenk	@./mkconfig -a $(call xtract_omap730p2,$@) arm arm926ejs omap730p2
1140a56bd922Swdenk
11417ebf7443Swdenksmdk2400_config	:	unconfig
11427ebf7443Swdenk	@./mkconfig $(@:_config=) arm arm920t smdk2400
11437ebf7443Swdenk
11447ebf7443Swdenksmdk2410_config	:	unconfig
11457ebf7443Swdenk	@./mkconfig $(@:_config=) arm arm920t smdk2410
11467ebf7443Swdenk
11472d24a3a7SwdenkSX1_config :		unconfig
11482d24a3a7Swdenk	@./mkconfig $(@:_config=) arm arm925t sx1
11492d24a3a7Swdenk
1150b2001f27Swdenk# TRAB default configuration:	8 MB Flash, 32 MB RAM
115143d9616cSwdenktrab_config \
1152b0639ca3Swdenktrab_bigram_config \
1153b0639ca3Swdenktrab_bigflash_config \
1154f54ebdfaSwdenktrab_old_config:	unconfig
115543d9616cSwdenk	@ >include/config.h
1156b0639ca3Swdenk	@[ -z "$(findstring _bigram,$@)" ] || \
1157b0639ca3Swdenk		{ echo "#define CONFIG_FLASH_8MB"  >>include/config.h ; \
1158b2001f27Swdenk		  echo "#define CONFIG_RAM_32MB"   >>include/config.h ; \
1159b0639ca3Swdenk		  echo "... with 8 MB Flash, 32 MB RAM" ; \
1160b0639ca3Swdenk		}
1161b0639ca3Swdenk	@[ -z "$(findstring _bigflash,$@)" ] || \
1162b2001f27Swdenk		{ echo "#define CONFIG_FLASH_16MB" >>include/config.h ; \
1163b2001f27Swdenk		  echo "#define CONFIG_RAM_16MB"   >>include/config.h ; \
1164b0639ca3Swdenk		  echo "... with 16 MB Flash, 16 MB RAM" ; \
1165a8c7c708Swdenk		  echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
1166b0639ca3Swdenk		}
1167f54ebdfaSwdenk	@[ -z "$(findstring _old,$@)" ] || \
1168b2001f27Swdenk		{ echo "#define CONFIG_FLASH_8MB"  >>include/config.h ; \
1169b2001f27Swdenk		  echo "#define CONFIG_RAM_16MB"   >>include/config.h ; \
1170b2001f27Swdenk		  echo "... with 8 MB Flash, 16 MB RAM" ; \
1171a8c7c708Swdenk		  echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
117243d9616cSwdenk		}
117343d9616cSwdenk	@./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
11747ebf7443Swdenk
11751cb8e980SwdenkVCMA9_config	:	unconfig
11761cb8e980Swdenk	@./mkconfig $(@:_config=) arm arm920t vcma9 mpl
11771cb8e980Swdenk
11782d24a3a7Swdenkversatile_config :	unconfig
11792d24a3a7Swdenk	@./mkconfig $(@:_config=) arm arm926ejs versatile
1180074cff0dSwdenk
1181074cff0dSwdenk#########################################################################
1182074cff0dSwdenk## S3C44B0 Systems
1183074cff0dSwdenk#########################################################################
1184074cff0dSwdenk
1185074cff0dSwdenkB2_config	:	unconfig
1186074cff0dSwdenk	@./mkconfig $(@:_config=) arm s3c44b0 B2 dave
1187074cff0dSwdenk
11887ebf7443Swdenk#########################################################################
11892d24a3a7Swdenk## MC9328 (Dragonball) Systems
11902d24a3a7Swdenk#########################################################################
11912d24a3a7Swdenk
11922d24a3a7Swdenkmx1ads_config	:	unconfig
11932d24a3a7Swdenk	@./mkconfig $(@:_config=) arm mc9328 mx1ads
11942d24a3a7Swdenk
11952d24a3a7Swdenk#########################################################################
11967ebf7443Swdenk## ARM720T Systems
11977ebf7443Swdenk#########################################################################
11987ebf7443Swdenk
11997ebf7443Swdenkep7312_config	:	unconfig
12007ebf7443Swdenk	@./mkconfig $(@:_config=) arm arm720t ep7312
12017ebf7443Swdenk
12022d24a3a7Swdenkimpa7_config	:	unconfig
12032d24a3a7Swdenk	@./mkconfig $(@:_config=) arm arm720t impa7
12042d24a3a7Swdenk
12052d1a537dSwdenkmodnet50_config :	unconfig
12062d1a537dSwdenk	@./mkconfig $(@:_config=) arm arm720t modnet50
12072d1a537dSwdenk
120839539887Swdenkevb4510_config :	unconfig
120939539887Swdenk	@./mkconfig $(@:_config=) arm arm720t evb4510
121039539887Swdenk
12117ebf7443Swdenk#########################################################################
1212d9df1f4eSwdenk## AT91RM9200 Systems
1213d9df1f4eSwdenk#########################################################################
1214d9df1f4eSwdenk
1215d9df1f4eSwdenkat91rm9200dk_config	:	unconfig
1216d9df1f4eSwdenk	@./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
1217d9df1f4eSwdenk
1218d9df1f4eSwdenk#########################################################################
121943d9616cSwdenk## XScale Systems
12207ebf7443Swdenk#########################################################################
12217ebf7443Swdenk
12227ebf7443Swdenkcradle_config	:	unconfig
12234c3b21a5Swdenk	@./mkconfig $(@:_config=) arm pxa cradle
12247ebf7443Swdenk
12257ebf7443Swdenkcsb226_config	:	unconfig
12264c3b21a5Swdenk	@./mkconfig $(@:_config=) arm pxa csb226
12277ebf7443Swdenk
122843d9616cSwdenkinnokom_config	:	unconfig
12294c3b21a5Swdenk	@./mkconfig $(@:_config=) arm pxa innokom
123043d9616cSwdenk
12312d5b561eSwdenkixdp425_config	:	unconfig
12322d5b561eSwdenk	@./mkconfig $(@:_config=) arm ixp ixdp425
12332d5b561eSwdenk
123443d9616cSwdenklubbock_config	:	unconfig
12354c3b21a5Swdenk	@./mkconfig $(@:_config=) arm pxa lubbock
123643d9616cSwdenk
123752f52c14Swdenklogodl_config	:	unconfig
123852f52c14Swdenk	@./mkconfig $(@:_config=) arm pxa logodl
123952f52c14Swdenk
12403e38691eSwdenkwepep250_config	:	unconfig
12414c3b21a5Swdenk	@./mkconfig $(@:_config=) arm pxa wepep250
12423e38691eSwdenk
1243efa329cbSwdenkxm250_config	:	unconfig
1244efa329cbSwdenk	@./mkconfig $(@:_config=) arm pxa xm250
1245efa329cbSwdenk
1246ca0e7748Swdenkxsengine_config :	unconfig
1247ca0e7748Swdenk	@./mkconfig $(@:_config=) arm pxa xsengine
1248ca0e7748Swdenk
12492262cfeeSwdenk#========================================================================
12502262cfeeSwdenk# i386
12512262cfeeSwdenk#========================================================================
12522262cfeeSwdenk#########################################################################
12532262cfeeSwdenk## AMD SC520 CDP
12542262cfeeSwdenk#########################################################################
12552262cfeeSwdenksc520_cdp_config	:	unconfig
12562262cfeeSwdenk	@./mkconfig $(@:_config=) i386 i386 sc520_cdp
12572262cfeeSwdenk
12587a8e9bedSwdenksc520_spunk_config	:	unconfig
12597a8e9bedSwdenk	@./mkconfig $(@:_config=) i386 i386 sc520_spunk
12607a8e9bedSwdenk
12617a8e9bedSwdenksc520_spunk_rel_config	:	unconfig
12627a8e9bedSwdenk	@./mkconfig $(@:_config=) i386 i386 sc520_spunk
12637a8e9bedSwdenk
126443d9616cSwdenk#========================================================================
126543d9616cSwdenk# MIPS
126643d9616cSwdenk#========================================================================
12677ebf7443Swdenk#########################################################################
126843d9616cSwdenk## MIPS32 4Kc
126943d9616cSwdenk#########################################################################
127043d9616cSwdenk
1271e0ac62d7Swdenkxtract_incaip = $(subst _100MHz,,$(subst _133MHz,,$(subst _150MHz,,$(subst _config,,$1))))
1272e0ac62d7Swdenk
1273e0ac62d7Swdenkincaip_100MHz_config	\
1274e0ac62d7Swdenkincaip_133MHz_config	\
1275e0ac62d7Swdenkincaip_150MHz_config	\
127643d9616cSwdenkincaip_config: unconfig
1277e0ac62d7Swdenk	@ >include/config.h
1278e0ac62d7Swdenk	@[ -z "$(findstring _100MHz,$@)" ] || \
1279e0ac62d7Swdenk		{ echo "#define CPU_CLOCK_RATE 100000000" >>include/config.h ; \
1280e0ac62d7Swdenk		  echo "... with 100MHz system clock" ; \
1281e0ac62d7Swdenk		}
1282e0ac62d7Swdenk	@[ -z "$(findstring _133MHz,$@)" ] || \
1283e0ac62d7Swdenk		{ echo "#define CPU_CLOCK_RATE 133000000" >>include/config.h ; \
1284e0ac62d7Swdenk		  echo "... with 133MHz system clock" ; \
1285e0ac62d7Swdenk		}
1286e0ac62d7Swdenk	@[ -z "$(findstring _150MHz,$@)" ] || \
1287e0ac62d7Swdenk		{ echo "#define CPU_CLOCK_RATE 150000000" >>include/config.h ; \
1288e0ac62d7Swdenk		  echo "... with 150MHz system clock" ; \
1289e0ac62d7Swdenk		}
1290e0ac62d7Swdenk	@./mkconfig -a $(call xtract_incaip,$@) mips mips incaip
1291e0ac62d7Swdenk
1292f4863a7aSwdenktb0229_config: unconfig
1293f4863a7aSwdenk	@./mkconfig $(@:_config=) mips mips tb0229
1294f4863a7aSwdenk
1295e0ac62d7Swdenk#########################################################################
129669459791Swdenk## MIPS32 AU1X00
129769459791Swdenk#########################################################################
129869459791Swdenkdbau1000_config		: 	unconfig
129969459791Swdenk	@ >include/config.h
130069459791Swdenk	@echo "#define CONFIG_DBAU1000 1" >>include/config.h
130169459791Swdenk	@./mkconfig -a dbau1x00 mips mips dbau1x00
130269459791Swdenk
130369459791Swdenkdbau1100_config		: 	unconfig
130469459791Swdenk	@ >include/config.h
130569459791Swdenk	@echo "#define CONFIG_DBAU1100 1" >>include/config.h
130669459791Swdenk	@./mkconfig -a dbau1x00 mips mips dbau1x00
130769459791Swdenk
130869459791Swdenkdbau1500_config		: 	unconfig
130969459791Swdenk	@ >include/config.h
131069459791Swdenk	@echo "#define CONFIG_DBAU1500 1" >>include/config.h
131169459791Swdenk	@./mkconfig -a dbau1x00 mips mips dbau1x00
131269459791Swdenk
131369459791Swdenk#########################################################################
1314e0ac62d7Swdenk## MIPS64 5Kc
1315e0ac62d7Swdenk#########################################################################
131643d9616cSwdenk
13173e38691eSwdenkpurple_config :		unconfig
13183e38691eSwdenk	@./mkconfig $(@:_config=) mips mips purple
131943d9616cSwdenk
13204a551709Swdenk#========================================================================
13214a551709Swdenk# Nios
13224a551709Swdenk#========================================================================
13234a551709Swdenk#########################################################################
13244a551709Swdenk## Nios32
13254a551709Swdenk#########################################################################
13264a551709Swdenk
1327c935d3bdSwdenkDK1C20_safe_32_config		\
1328c935d3bdSwdenkDK1C20_standard_32_config	\
13294a551709SwdenkDK1C20_config:	unconfig
1330c935d3bdSwdenk	@ >include/config.h
1331c935d3bdSwdenk	@[ -z "$(findstring _safe_32,$@)" ] || \
1332c935d3bdSwdenk		{ echo "#define CONFIG_NIOS_SAFE_32 1" >>include/config.h ; \
1333c935d3bdSwdenk		  echo "... NIOS 'safe_32' configuration" ; \
1334c935d3bdSwdenk		}
1335c935d3bdSwdenk	@[ -z "$(findstring _standard_32,$@)" ] || \
1336c935d3bdSwdenk		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
1337c935d3bdSwdenk		  echo "... NIOS 'standard_32' configuration" ; \
1338c935d3bdSwdenk		}
1339c935d3bdSwdenk	@[ -z "$(findstring DK1C20_config,$@)" ] || \
1340c935d3bdSwdenk		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
1341c935d3bdSwdenk		  echo "... NIOS 'standard_32' configuration (DEFAULT)" ; \
1342c935d3bdSwdenk		}
1343c935d3bdSwdenk	@./mkconfig -a DK1C20 nios nios dk1c20 altera
1344c935d3bdSwdenk
1345c935d3bdSwdenkDK1S10_safe_32_config		\
1346c935d3bdSwdenkDK1S10_standard_32_config	\
1347ec4c544bSwdenkDK1S10_mtx_ldk_20_config	\
1348c935d3bdSwdenkDK1S10_config:	unconfig
1349c935d3bdSwdenk	@ >include/config.h
1350c935d3bdSwdenk	@[ -z "$(findstring _safe_32,$@)" ] || \
1351c935d3bdSwdenk		{ echo "#define CONFIG_NIOS_SAFE_32 1" >>include/config.h ; \
1352c935d3bdSwdenk		  echo "... NIOS 'safe_32' configuration" ; \
1353c935d3bdSwdenk		}
1354c935d3bdSwdenk	@[ -z "$(findstring _standard_32,$@)" ] || \
1355c935d3bdSwdenk		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
1356c935d3bdSwdenk		  echo "... NIOS 'standard_32' configuration" ; \
1357c935d3bdSwdenk		}
1358ec4c544bSwdenk	@[ -z "$(findstring _mtx_ldk_20,$@)" ] || \
1359ec4c544bSwdenk		{ echo "#define CONFIG_NIOS_MTX_LDK_20 1" >>include/config.h ; \
1360ec4c544bSwdenk		  echo "... NIOS 'mtx_ldk_20' configuration" ; \
1361ec4c544bSwdenk		}
1362c935d3bdSwdenk	@[ -z "$(findstring DK1S10_config,$@)" ] || \
1363c935d3bdSwdenk		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
1364c935d3bdSwdenk		  echo "... NIOS 'standard_32' configuration (DEFAULT)" ; \
1365c935d3bdSwdenk		}
1366c935d3bdSwdenk	@./mkconfig -a DK1S10 nios nios dk1s10 altera
13674a551709Swdenk
1368aaf224abSwdenkADNPESC1_DNPEVA2_base_32_config	\
1369aaf224abSwdenkADNPESC1_base_32_config		\
1370aaf224abSwdenkADNPESC1_config: unconfig
1371aaf224abSwdenk	@ >include/config.h
1372aaf224abSwdenk	@[ -z "$(findstring _DNPEVA2,$@)" ] || \
1373aaf224abSwdenk		{ echo "#define CONFIG_DNPEVA2 1" >>include/config.h ; \
1374aaf224abSwdenk		  echo "... DNP/EVA2 configuration" ; \
1375aaf224abSwdenk		}
1376aaf224abSwdenk	@[ -z "$(findstring _base_32,$@)" ] || \
1377aaf224abSwdenk		{ echo "#define CONFIG_NIOS_BASE_32 1" >>include/config.h ; \
1378aaf224abSwdenk		  echo "... NIOS 'base_32' configuration" ; \
1379aaf224abSwdenk		}
1380aaf224abSwdenk	@[ -z "$(findstring ADNPESC1_config,$@)" ] || \
1381aaf224abSwdenk		{ echo "#define CONFIG_NIOS_BASE_32 1" >>include/config.h ; \
1382aaf224abSwdenk		  echo "... NIOS 'base_32' configuration (DEFAULT)" ; \
1383aaf224abSwdenk		}
1384aaf224abSwdenk	@./mkconfig -a ADNPESC1 nios nios adnpesc1 ssv
1385aaf224abSwdenk
13864a551709Swdenk
1387507bbe3eSwdenk#========================================================================
1388507bbe3eSwdenk# MicroBlaze
1389507bbe3eSwdenk#========================================================================
1390507bbe3eSwdenk#########################################################################
1391507bbe3eSwdenk## Microblaze
1392507bbe3eSwdenk#########################################################################
1393507bbe3eSwdenksuzaku_config:	unconfig
1394507bbe3eSwdenk	@ >include/config.h
1395507bbe3eSwdenk	@echo "#define CONFIG_SUZAKU 1" >> include/config.h
1396507bbe3eSwdenk	@./mkconfig -a $(@:_config=) microblaze microblaze suzaku AtmarkTechno
1397507bbe3eSwdenk
13983e38691eSwdenk#########################################################################
13993e38691eSwdenk#########################################################################
14007ebf7443Swdenk
14017ebf7443Swdenkclean:
14027ebf7443Swdenk	find . -type f \
14037ebf7443Swdenk		\( -name 'core' -o -name '*.bak' -o -name '*~' \
14047ebf7443Swdenk		-o -name '*.o'  -o -name '*.a'  \) -print \
14057ebf7443Swdenk		| xargs rm -f
140685ec0bccSwdenk	rm -f examples/hello_world examples/timer \
14073e38691eSwdenk	      examples/eepro100_eeprom examples/sched \
14087a8e9bedSwdenk	      examples/mem_to_mem_idma2intr examples/82559_eeprom
14097ebf7443Swdenk	rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
1410bda6c8aeSwdenk	rm -f tools/mpc86x_clk
14117ebf7443Swdenk	rm -f tools/easylogo/easylogo tools/bmp_logo
14127ebf7443Swdenk	rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
1413228f29acSwdenk	rm -f tools/env/fw_printenv tools/env/fw_setenv
14147f70e853Swdenk	rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
14157e780369Swdenk	rm -f board/trab/trab_fkt
14167ebf7443Swdenk
14177ebf7443Swdenkclobber:	clean
14184c0d4c3bSwdenk	find . -type f \( -name .depend \
14194c0d4c3bSwdenk		-o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \
14204c0d4c3bSwdenk		-print0 \
14214c0d4c3bSwdenk		| xargs -0 rm -f
14227ebf7443Swdenk	rm -f $(OBJS) *.bak tags TAGS
14237ebf7443Swdenk	rm -fr *.*~
1424bdccc4feSwdenk	rm -f u-boot u-boot.map $(ALL)
1425228f29acSwdenk	rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
14263e38691eSwdenk	rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
1427b783edaeSwdenk	rm -f include/asm/proc include/asm/arch include/asm
14287ebf7443Swdenk
14297ebf7443Swdenkmrproper \
14307ebf7443Swdenkdistclean:	clobber unconfig
14317ebf7443Swdenk
14327ebf7443Swdenkbackup:
14337ebf7443Swdenk	F=`basename $(TOPDIR)` ; cd .. ; \
14347ebf7443Swdenk	gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
14357ebf7443Swdenk
14367ebf7443Swdenk#########################################################################
1437