xref: /openbmc/u-boot/Makefile (revision 7abf0c58)
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#########################################################################
2155cf9da48SwdenkMPC5200LITE_config		\
2165cf9da48SwdenkMPC5200LITE_LOWBOOT_config	\
2175cf9da48SwdenkMPC5200LITE_LOWBOOT08_config	\
218b2001f27Swdenkicecube_5200_DDR_config		\
219b2001f27SwdenkIceCube_5200_DDR_config		\
22079d696fcSwdenkicecube_5200_DDR_LOWBOOT_config \
22179d696fcSwdenkicecube_5200_DDR_LOWBOOT08_config \
222a0f2fe52Swdenkicecube_5200_config		\
223945af8d7SwdenkIceCube_5200_config		\
224945af8d7SwdenkIceCube_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
258efa329cbSwdenkPM520_config:	unconfig
259efa329cbSwdenk	@./mkconfig $(@:_config=) ppc mpc5xxx pm520
260efa329cbSwdenk
261945af8d7Swdenk#########################################################################
2627ebf7443Swdenk## MPC8xx Systems
2637ebf7443Swdenk#########################################################################
2647ebf7443Swdenk
2650cb61d7dSwdenkAdderII_config:	unconfig
2660cb61d7dSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx adderII
2670cb61d7dSwdenk
268180d3f74SwdenkADS860_config     \
269180d3f74SwdenkDUET_ADS_config   \
270180d3f74SwdenkFADS823_config    \
271180d3f74SwdenkFADS850SAR_config \
272180d3f74SwdenkMPC86xADS_config  \
273180d3f74SwdenkFADS860T_config:	unconfig
2747ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx fads
2757ebf7443Swdenk
2767ebf7443SwdenkAMX860_config	:	unconfig
2777ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
2787ebf7443Swdenk
2797ebf7443Swdenkc2mon_config:		unconfig
2807ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx c2mon
2817ebf7443Swdenk
2827ebf7443SwdenkCCM_config:		unconfig
2837ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx CCM siemens
2847ebf7443Swdenk
2857ebf7443Swdenkcogent_mpc8xx_config:	unconfig
2867ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx cogent
2877ebf7443Swdenk
2883bac3513SwdenkELPT860_config:		unconfig
2893bac3513Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx elpt860 LEOX
2903bac3513Swdenk
2917ebf7443SwdenkESTEEM192E_config:	unconfig
2927ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx esteem192e
2937ebf7443Swdenk
2947ebf7443SwdenkETX094_config	:	unconfig
2957ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx etx094
2967ebf7443Swdenk
2977ebf7443SwdenkFLAGADM_config:	unconfig
2987ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx flagadm
2997ebf7443Swdenk
3007aa78614Swdenkxtract_GEN860T = $(subst _SC,,$(subst _config,,$1))
3017aa78614Swdenk
3027aa78614SwdenkGEN860T_SC_config	\
3037ebf7443SwdenkGEN860T_config: unconfig
3047aa78614Swdenk	@ >include/config.h
3057aa78614Swdenk	@[ -z "$(findstring _SC,$@)" ] || \
3067aa78614Swdenk		{ echo "#define CONFIG_SC" >>include/config.h ; \
3077aa78614Swdenk		  echo "With reduced H/W feature set (SC)..." ; \
3087aa78614Swdenk		}
3097aa78614Swdenk	@./mkconfig -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t
3107ebf7443Swdenk
3117ebf7443SwdenkGENIETV_config:	unconfig
3127ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx genietv
3137ebf7443Swdenk
3147ebf7443SwdenkGTH_config:	unconfig
3157ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx gth
3167ebf7443Swdenk
3177ebf7443Swdenkhermes_config	:	unconfig
3187ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx hermes
3197ebf7443Swdenk
320c40b2956SwdenkHMI10_config	:	unconfig
321c40b2956Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
322c40b2956Swdenk
3237ebf7443SwdenkIAD210_config: unconfig
3247ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
3257ebf7443Swdenk
3267ebf7443Swdenkxtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
3277ebf7443Swdenk
3287ebf7443SwdenkICU862_100MHz_config	\
3297ebf7443SwdenkICU862_config: unconfig
3307ebf7443Swdenk	@ >include/config.h
3317ebf7443Swdenk	@[ -z "$(findstring _100MHz,$@)" ] || \
3327ebf7443Swdenk		{ echo "#define CONFIG_100MHz"	>>include/config.h ; \
3337ebf7443Swdenk		  echo "... with 100MHz system clock" ; \
3347ebf7443Swdenk		}
3357ebf7443Swdenk	@./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
3367ebf7443Swdenk
3377ebf7443SwdenkIP860_config	:	unconfig
3387ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx ip860
3397ebf7443Swdenk
3407ebf7443SwdenkIVML24_256_config \
3417ebf7443SwdenkIVML24_128_config \
3427ebf7443SwdenkIVML24_config:	unconfig
3437ebf7443Swdenk	@ >include/config.h
3447ebf7443Swdenk	@[ -z "$(findstring IVML24_config,$@)" ] || \
3457ebf7443Swdenk		 { echo "#define CONFIG_IVML24_16M"	>>include/config.h ; \
3467ebf7443Swdenk		 }
3477ebf7443Swdenk	@[ -z "$(findstring IVML24_128_config,$@)" ] || \
3487ebf7443Swdenk		 { echo "#define CONFIG_IVML24_32M"	>>include/config.h ; \
3497ebf7443Swdenk		 }
3507ebf7443Swdenk	@[ -z "$(findstring IVML24_256_config,$@)" ] || \
3517ebf7443Swdenk		 { echo "#define CONFIG_IVML24_64M"	>>include/config.h ; \
3527ebf7443Swdenk		 }
3537ebf7443Swdenk	@./mkconfig -a IVML24 ppc mpc8xx ivm
3547ebf7443Swdenk
3557ebf7443SwdenkIVMS8_256_config \
3567ebf7443SwdenkIVMS8_128_config \
3577ebf7443SwdenkIVMS8_config:	unconfig
3587ebf7443Swdenk	@ >include/config.h
3597ebf7443Swdenk	@[ -z "$(findstring IVMS8_config,$@)" ] || \
3607ebf7443Swdenk		 { echo "#define CONFIG_IVMS8_16M"	>>include/config.h ; \
3617ebf7443Swdenk		 }
3627ebf7443Swdenk	@[ -z "$(findstring IVMS8_128_config,$@)" ] || \
3637ebf7443Swdenk		 { echo "#define CONFIG_IVMS8_32M"	>>include/config.h ; \
3647ebf7443Swdenk		 }
3657ebf7443Swdenk	@[ -z "$(findstring IVMS8_256_config,$@)" ] || \
3667ebf7443Swdenk		 { echo "#define CONFIG_IVMS8_64M"	>>include/config.h ; \
3677ebf7443Swdenk		 }
3687ebf7443Swdenk	@./mkconfig -a IVMS8 ppc mpc8xx ivm
3697ebf7443Swdenk
37056f94be3SwdenkKUP4K_config	:	unconfig
3710608e04dSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx kup4k kup
3720608e04dSwdenk
3730608e04dSwdenkKUP4X_config    :       unconfig
3740608e04dSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx kup4x kup
37556f94be3Swdenk
3767ebf7443SwdenkLANTEC_config	:	unconfig
3777ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx lantec
3787ebf7443Swdenk
3797ebf7443Swdenklwmon_config:		unconfig
3807ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx lwmon
3817ebf7443Swdenk
3827ebf7443SwdenkMBX_config	\
3837ebf7443SwdenkMBX860T_config:	unconfig
3847ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
3857ebf7443Swdenk
3867ebf7443SwdenkMHPC_config:		unconfig
3877ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
3887ebf7443Swdenk
3897ebf7443SwdenkMVS1_config :		unconfig
3907ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx mvs1
3917ebf7443Swdenk
392993cad93Swdenkxtract_NETVIA = $(subst _V2,,$(subst _config,,$1))
393993cad93Swdenk
394993cad93SwdenkNETVIA_V2_config \
3957ebf7443SwdenkNETVIA_config:		unconfig
396993cad93Swdenk	@ >include/config.h
397993cad93Swdenk	@[ -z "$(findstring NETVIA_config,$@)" ] || \
398993cad93Swdenk		 { echo "#define CONFIG_NETVIA_VERSION 1" >>include/config.h ; \
399993cad93Swdenk		  echo "... Version 1" ; \
400993cad93Swdenk		 }
401993cad93Swdenk	@[ -z "$(findstring NETVIA_V2_config,$@)" ] || \
402993cad93Swdenk		 { echo "#define CONFIG_NETVIA_VERSION 2" >>include/config.h ; \
403993cad93Swdenk		  echo "... Version 2" ; \
404993cad93Swdenk		 }
405993cad93Swdenk	@./mkconfig -a $(call xtract_NETVIA,$@) ppc mpc8xx netvia
4067ebf7443Swdenk
407c26e454dSwdenkxtract_NETPHONE = $(subst _V2,,$(subst _config,,$1))
408c26e454dSwdenk
409c26e454dSwdenkNETPHONE_V2_config \
41004a85b3bSwdenkNETPHONE_config:	unconfig
411c26e454dSwdenk	@ >include/config.h
412c26e454dSwdenk	@[ -z "$(findstring NETPHONE_config,$@)" ] || \
413c26e454dSwdenk		 { echo "#define CONFIG_NETPHONE_VERSION 1" >>include/config.h ; \
414c26e454dSwdenk		 }
415c26e454dSwdenk	@[ -z "$(findstring NETPHONE_V2_config,$@)" ] || \
416c26e454dSwdenk		 { echo "#define CONFIG_NETPHONE_VERSION 2" >>include/config.h ; \
417c26e454dSwdenk		 }
418c26e454dSwdenk	@./mkconfig -a $(call xtract_NETPHONE,$@) ppc mpc8xx netphone
41904a85b3bSwdenk
42004a85b3bSwdenkxtract_NETTA = $(subst _ISDN,,$(subst _config,,$1))
42104a85b3bSwdenk
42204a85b3bSwdenkNETTA_ISDN_config \
42304a85b3bSwdenkNETTA_config:		unconfig
42404a85b3bSwdenk	@ >include/config.h
42504a85b3bSwdenk	@[ -z "$(findstring NETTA_config,$@)" ] || \
42604a85b3bSwdenk		 { echo "#undef CONFIG_NETTA_ISDN" >>include/config.h ; \
42704a85b3bSwdenk		 }
42804a85b3bSwdenk	@[ -z "$(findstring NETTA_ISDN_config,$@)" ] || \
42904a85b3bSwdenk		 { echo "#define CONFIG_NETTA_ISDN 1" >>include/config.h ; \
43004a85b3bSwdenk		 }
43104a85b3bSwdenk	@./mkconfig -a $(call xtract_NETTA,$@) ppc mpc8xx netta
43204a85b3bSwdenk
4337ebf7443SwdenkNX823_config:		unconfig
4347ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx nx823
4357ebf7443Swdenk
4367ebf7443Swdenkpcu_e_config:		unconfig
4377ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
4387ebf7443Swdenk
4393bbc899fSwdenkQS850_config:	unconfig
4403bbc899fSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx qs850 snmc
4413bbc899fSwdenk
4423bbc899fSwdenkQS823_config:	unconfig
4433bbc899fSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx qs850 snmc
4443bbc899fSwdenk
4453bbc899fSwdenkQS860T_config:	unconfig
4463bbc899fSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx qs860t snmc
4473bbc899fSwdenk
4487ebf7443SwdenkR360MPI_config:	unconfig
4497ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx r360mpi
4507ebf7443Swdenk
451682011ffSwdenkRBC823_config:	unconfig
452682011ffSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx rbc823
453682011ffSwdenk
4547ebf7443SwdenkRPXClassic_config:	unconfig
4557ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
4567ebf7443Swdenk
4577ebf7443SwdenkRPXlite_config:		unconfig
4587ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx RPXlite
4597ebf7443Swdenk
46073a8b27cSwdenkrmu_config:	unconfig
46173a8b27cSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx rmu
46273a8b27cSwdenk
4637ebf7443SwdenkRRvision_config:	unconfig
4647ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx RRvision
4657ebf7443Swdenk
4667ebf7443SwdenkRRvision_LCD_config:	unconfig
4677ebf7443Swdenk	@echo "#define CONFIG_LCD" >include/config.h
4687ebf7443Swdenk	@echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
4697ebf7443Swdenk	@./mkconfig -a RRvision ppc mpc8xx RRvision
4707ebf7443Swdenk
4717ebf7443SwdenkSM850_config	:	unconfig
4727ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
4737ebf7443Swdenk
4747ebf7443SwdenkSPD823TS_config:	unconfig
4757ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx spd8xx
4767ebf7443Swdenk
477dc7c9a1aSwdenksvm_sc8xx_config:	unconfig
478dc7c9a1aSwdenk	@ >include/config.h
479dc7c9a1aSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
480dc7c9a1aSwdenk
4817ebf7443SwdenkSXNI855T_config:	unconfig
4827ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx sixnet
4837ebf7443Swdenk
484db2f721fSwdenk# EMK MPC8xx based modules
485db2f721fSwdenkTOP860_config:		unconfig
486db2f721fSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx top860 emk
487db2f721fSwdenk
4887ebf7443Swdenk# Play some tricks for configuration selection
48973a8b27cSwdenk# All boards can come with 50 MHz (default), 66MHz, 80MHz or 100 MHz clock,
4907ebf7443Swdenk# but only 855 and 860 boards may come with FEC
4917ebf7443Swdenk# and 823 boards may have LCD support
492d4ca31c4Swdenkxtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _100MHz,,$(subst _133MHz,,$(subst _LCD,,$(subst _config,,$1))))))
4937ebf7443Swdenk
4947ebf7443SwdenkFPS850L_config		\
495384ae025SwdenkFPS860L_config		\
496f12e568cSwdenkNSCU_config		\
4977ebf7443SwdenkTQM823L_config		\
4987ebf7443SwdenkTQM823L_66MHz_config	\
4997ebf7443SwdenkTQM823L_80MHz_config	\
5007ebf7443SwdenkTQM823L_LCD_config	\
5017ebf7443SwdenkTQM823L_LCD_66MHz_config \
5027ebf7443SwdenkTQM823L_LCD_80MHz_config \
5037ebf7443SwdenkTQM850L_config		\
5047ebf7443SwdenkTQM850L_66MHz_config	\
5057ebf7443SwdenkTQM850L_80MHz_config	\
5067ebf7443SwdenkTQM855L_config		\
5077ebf7443SwdenkTQM855L_66MHz_config	\
5087ebf7443SwdenkTQM855L_80MHz_config	\
5097ebf7443SwdenkTQM860L_config		\
5107ebf7443SwdenkTQM860L_66MHz_config	\
5117ebf7443SwdenkTQM860L_80MHz_config	\
512d126bfbdSwdenkTQM862L_config		\
513d126bfbdSwdenkTQM862L_66MHz_config	\
51473a8b27cSwdenkTQM862L_80MHz_config	\
515ae3af05eSwdenkTQM823M_config		\
516ae3af05eSwdenkTQM823M_66MHz_config	\
517ae3af05eSwdenkTQM823M_80MHz_config	\
518ae3af05eSwdenkTQM850M_config		\
519ae3af05eSwdenkTQM850M_66MHz_config	\
520ae3af05eSwdenkTQM850M_80MHz_config	\
521f12e568cSwdenkTQM855M_config		\
522f12e568cSwdenkTQM855M_66MHz_config	\
523f12e568cSwdenkTQM855M_80MHz_config	\
524f12e568cSwdenkTQM860M_config		\
525f12e568cSwdenkTQM860M_66MHz_config	\
526f12e568cSwdenkTQM860M_80MHz_config	\
527f12e568cSwdenkTQM862M_config		\
528f12e568cSwdenkTQM862M_66MHz_config	\
529f12e568cSwdenkTQM862M_80MHz_config	\
530d4ca31c4SwdenkTQM862M_100MHz_config	\
531c178d3daSwdenkTQM866M_config:		unconfig
5327ebf7443Swdenk	@ >include/config.h
5337ebf7443Swdenk	@[ -z "$(findstring _66MHz,$@)" ] || \
5347ebf7443Swdenk		{ echo "#define CONFIG_66MHz"		>>include/config.h ; \
5357ebf7443Swdenk		  echo "... with 66MHz system clock" ; \
5367ebf7443Swdenk		}
5377ebf7443Swdenk	@[ -z "$(findstring _80MHz,$@)" ] || \
5387ebf7443Swdenk		{ echo "#define CONFIG_80MHz"		>>include/config.h ; \
5397ebf7443Swdenk		  echo "... with 80MHz system clock" ; \
5407ebf7443Swdenk		}
54173a8b27cSwdenk	@[ -z "$(findstring _100MHz,$@)" ] || \
54273a8b27cSwdenk		{ echo "#define CONFIG_100MHz"		>>include/config.h ; \
54373a8b27cSwdenk		  echo "... with 100MHz system clock" ; \
54473a8b27cSwdenk		}
545d4ca31c4Swdenk	@[ -z "$(findstring _133MHz,$@)" ] || \
546d4ca31c4Swdenk		{ echo "#define CONFIG_133MHz"		>>include/config.h ; \
547d4ca31c4Swdenk		  echo "... with 133MHz system clock" ; \
548d4ca31c4Swdenk		}
5497ebf7443Swdenk	@[ -z "$(findstring _LCD,$@)" ] || \
5507ebf7443Swdenk		{ echo "#define CONFIG_LCD"		>>include/config.h ; \
551fd3103bbSwdenk		  echo "#define CONFIG_NEC_NL6448BC20"	>>include/config.h ; \
5527ebf7443Swdenk		  echo "... with LCD display" ; \
5537ebf7443Swdenk		}
5547ebf7443Swdenk	@./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
5557ebf7443Swdenk
5567ebf7443SwdenkTTTech_config:	unconfig
5577ebf7443Swdenk	@echo "#define CONFIG_LCD" >include/config.h
5587ebf7443Swdenk	@echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
5597ebf7443Swdenk	@./mkconfig -a TQM823L ppc mpc8xx tqm8xx
5607ebf7443Swdenk
561608c9146Swdenkv37_config:	unconfig
562608c9146Swdenk	@echo "#define CONFIG_LCD" >include/config.h
563608c9146Swdenk	@echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
564608c9146Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx v37
565608c9146Swdenk
56691e940d9Sdzuwtk_config:	unconfig
56791e940d9Sdzu	@echo "#define CONFIG_LCD" >include/config.h
56891e940d9Sdzu	@echo "#define CONFIG_SHARP_LQ065T9DR51U" >>include/config.h
56991e940d9Sdzu	@./mkconfig -a TQM823L ppc mpc8xx tqm8xx
57091e940d9Sdzu
5717ebf7443Swdenk#########################################################################
5727ebf7443Swdenk## PPC4xx Systems
5737ebf7443Swdenk#########################################################################
574fbe4b5cbSwdenkxtract_4xx = $(subst _MODEL_BA,,$(subst _MODEL_ME,,$(subst _MODEL_HI,,$(subst _config,,$1))))
5757ebf7443Swdenk
5767ebf7443SwdenkADCIOP_config:	unconfig
5777ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx adciop esd
5787ebf7443Swdenk
5797ebf7443SwdenkAR405_config:	unconfig
5807ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
5817ebf7443Swdenk
582549826eaSstroeseASH405_config:	unconfig
583549826eaSstroese	@./mkconfig $(@:_config=) ppc ppc4xx ash405 esd
584549826eaSstroese
585549826eaSstroeseBUBINGA405EP_config:	unconfig
586549826eaSstroese	@./mkconfig $(@:_config=) ppc ppc4xx bubinga405ep
587549826eaSstroese
5887ebf7443SwdenkCANBT_config:	unconfig
5897ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx canbt esd
5907ebf7443Swdenk
5917ebf7443SwdenkCPCI405_config	\
592549826eaSstroeseCPCI4052_config	\
593549826eaSstroeseCPCI405AB_config:	unconfig
5947ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
5957ebf7443Swdenk	@echo "BOARD_REVISION = $(@:_config=)"	>>include/config.mk
5967ebf7443Swdenk
5977ebf7443SwdenkCPCI440_config:	unconfig
5987ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
5997ebf7443Swdenk
6007ebf7443SwdenkCPCIISER4_config:	unconfig
6017ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
6027ebf7443Swdenk
6037ebf7443SwdenkCRAYL1_config:	unconfig
6047ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx L1 cray
6057ebf7443Swdenk
606cd0a9de6Swdenkcsb272_config:	unconfig
607cd0a9de6Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx csb272
608cd0a9de6Swdenk
6097ebf7443SwdenkDASA_SIM_config: unconfig
6107ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
6117ebf7443Swdenk
61272cd5aa7SstroeseDP405_config:	unconfig
61372cd5aa7Sstroese	@./mkconfig $(@:_config=) ppc ppc4xx dp405 esd
61472cd5aa7Sstroese
6157ebf7443SwdenkDU405_config:	unconfig
6167ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx du405 esd
6177ebf7443Swdenk
6187ebf7443SwdenkEBONY_config:	unconfig
6197ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx ebony
6207ebf7443Swdenk
6217ebf7443SwdenkERIC_config:	unconfig
6227ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx eric
6237ebf7443Swdenk
624d1cbe85bSwdenkEXBITGEN_config:	unconfig
625d1cbe85bSwdenk	@./mkconfig $(@:_config=) ppc ppc4xx exbitgen
626d1cbe85bSwdenk
62772cd5aa7SstroeseHUB405_config:	unconfig
62872cd5aa7Sstroese	@./mkconfig $(@:_config=) ppc ppc4xx hub405 esd
62972cd5aa7Sstroese
630db01a2eaSwdenkJSE_config:	unconfig
631db01a2eaSwdenk	@./mkconfig $(@:_config=) ppc ppc4xx jse
632db01a2eaSwdenk
6337ebf7443SwdenkMIP405_config:	unconfig
6347ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
6357ebf7443Swdenk
636f3e0de60SwdenkMIP405T_config:	unconfig
637f3e0de60Swdenk	@echo "#define CONFIG_MIP405T" >include/config.h
638f3e0de60Swdenk	@echo "Enable subset config for MIP405T"
639f3e0de60Swdenk	@./mkconfig -a MIP405 ppc ppc4xx mip405 mpl
640f3e0de60Swdenk
6417ebf7443SwdenkML2_config:	unconfig
6427ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx ml2
6437ebf7443Swdenk
644028ab6b5Swdenkml300_config:	unconfig
645028ab6b5Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx ml300 xilinx
646028ab6b5Swdenk
6470e6d798cSwdenkOCOTEA_config:	unconfig
6480e6d798cSwdenk	@./mkconfig $(@:_config=) ppc ppc4xx ocotea
6490e6d798cSwdenk
6507ebf7443SwdenkOCRTC_config		\
6517ebf7443SwdenkORSG_config:	unconfig
6527ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
6537ebf7443Swdenk
6547ebf7443SwdenkPCI405_config:	unconfig
6557ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
6567ebf7443Swdenk
6577ebf7443SwdenkPIP405_config:	unconfig
6587ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
6597ebf7443Swdenk
66072cd5aa7SstroesePLU405_config:	unconfig
66172cd5aa7Sstroese	@./mkconfig $(@:_config=) ppc ppc4xx plu405 esd
66272cd5aa7Sstroese
663549826eaSstroesePMC405_config:	unconfig
664549826eaSstroese	@./mkconfig $(@:_config=) ppc ppc4xx pmc405 esd
665549826eaSstroese
666fbe4b5cbSwdenkPPChameleonEVB_MODEL_BA_config	\
667fbe4b5cbSwdenkPPChameleonEVB_MODEL_ME_config	\
668fbe4b5cbSwdenkPPChameleonEVB_MODEL_HI_config	\
66912f34241SwdenkPPChameleonEVB_config:	unconfig
670fbe4b5cbSwdenk	@ >include/config.h
671fbe4b5cbSwdenk	@[ -z "$(findstring _MODEL_BA,$@)" ] || \
672fbe4b5cbSwdenk		{ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 0" >>include/config.h ; \
673fbe4b5cbSwdenk		  echo "... BASIC model" ; \
674fbe4b5cbSwdenk		}
675fbe4b5cbSwdenk	@[ -z "$(findstring _MODEL_ME,$@)" ] || \
676fbe4b5cbSwdenk		{ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >>include/config.h ; \
677fbe4b5cbSwdenk		  echo "... MEDIUM model" ; \
678fbe4b5cbSwdenk		}
679fbe4b5cbSwdenk	@[ -z "$(findstring _MODEL_HI,$@)" ] || \
680fbe4b5cbSwdenk		{ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 2" >>include/config.h ; \
681fbe4b5cbSwdenk		  echo "... HIGH-END model" ; \
682fbe4b5cbSwdenk		}
683fbe4b5cbSwdenk	@./mkconfig -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave
68412f34241Swdenk
68572cd5aa7SstroeseVOH405_config:	unconfig
68672cd5aa7Sstroese	@./mkconfig $(@:_config=) ppc ppc4xx voh405 esd
68772cd5aa7Sstroese
6887ebf7443SwdenkW7OLMC_config	\
6897ebf7443SwdenkW7OLMG_config: unconfig
6907ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx w7o
6917ebf7443Swdenk
6927ebf7443SwdenkWALNUT405_config:	unconfig
6937ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx walnut405
6947ebf7443Swdenk
695ba56f625SwdenkXPEDITE1K_config:	unconfig
696ba56f625Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx xpedite1k
697ba56f625Swdenk
6987ebf7443Swdenk#########################################################################
6997ebf7443Swdenk## MPC824x Systems
7007ebf7443Swdenk#########################################################################
701efa329cbSwdenkxtract_82xx = $(subst _BIGFLASH,,$(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1))))))
7023bac3513Swdenk
7030332990bSwdenkA3000_config: unconfig
7040332990bSwdenk	@./mkconfig $(@:_config=) ppc mpc824x a3000
7050332990bSwdenk
7067ebf7443SwdenkBMW_config: unconfig
7077ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x bmw
7087ebf7443Swdenk
7093bac3513SwdenkCPC45_config	\
7103bac3513SwdenkCPC45_ROMBOOT_config:	unconfig
7113bac3513Swdenk	@./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
7123bac3513Swdenk	@cd ./include ;				\
7133bac3513Swdenk	if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
7143bac3513Swdenk		echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
7153bac3513Swdenk		echo "... booting from 8-bit flash" ; \
7163bac3513Swdenk	else \
7173bac3513Swdenk		echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
7183bac3513Swdenk		echo "... booting from 64-bit flash" ; \
7193bac3513Swdenk	fi; \
7203bac3513Swdenk	echo "export CONFIG_BOOT_ROM" >> config.mk;
7213bac3513Swdenk
7227ebf7443SwdenkCU824_config: unconfig
7237ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x cu824
7247ebf7443Swdenk
725*7abf0c58Swdenkdebris_config: unconfig
726*7abf0c58Swdenk	@./mkconfig $(@:_config=) ppc mpc824x debris etin
727*7abf0c58Swdenk
72880885a9dSwdenkeXalion_config: unconfig
72980885a9dSwdenk	@./mkconfig $(@:_config=) ppc mpc824x eXalion
73080885a9dSwdenk
7317ebf7443SwdenkMOUSSE_config: unconfig
7327ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x mousse
7337ebf7443Swdenk
7347ebf7443SwdenkMUSENKI_config: unconfig
7357ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x musenki
7367ebf7443Swdenk
737b4676a25SwdenkMVBLUE_config:	unconfig
738b4676a25Swdenk	@./mkconfig $(@:_config=) ppc mpc824x mvblue
739b4676a25Swdenk
7407ebf7443SwdenkOXC_config: unconfig
7417ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x oxc
7427ebf7443Swdenk
7437ebf7443SwdenkPN62_config: unconfig
7447ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x pn62
7457ebf7443Swdenk
7467ebf7443SwdenkSandpoint8240_config: unconfig
7477ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x sandpoint
7487ebf7443Swdenk
7497ebf7443SwdenkSandpoint8245_config: unconfig
7507ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x sandpoint
7517ebf7443Swdenk
752d1cbe85bSwdenkSL8245_config: unconfig
753d1cbe85bSwdenk	@./mkconfig $(@:_config=) ppc mpc824x sl8245
754d1cbe85bSwdenk
7557ebf7443Swdenkutx8245_config: unconfig
7567ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x utx8245
7577ebf7443Swdenk
7587ebf7443Swdenk#########################################################################
7597ebf7443Swdenk## MPC8260 Systems
7607ebf7443Swdenk#########################################################################
7617ebf7443Swdenk
76254387ac9Swdenkatc_config:	unconfig
76354387ac9Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 atc
76454387ac9Swdenk
7657ebf7443Swdenkcogent_mpc8260_config:	unconfig
7667ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 cogent
7677ebf7443Swdenk
7687ebf7443SwdenkCPU86_config	\
7697ebf7443SwdenkCPU86_ROMBOOT_config: unconfig
7707ebf7443Swdenk	@./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
7717ebf7443Swdenk	@cd ./include ;				\
7727ebf7443Swdenk	if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
7737ebf7443Swdenk		echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
7747ebf7443Swdenk		echo "... booting from 8-bit flash" ; \
7757ebf7443Swdenk	else \
7767ebf7443Swdenk		echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
7777ebf7443Swdenk		echo "... booting from 64-bit flash" ; \
7787ebf7443Swdenk	fi; \
7797ebf7443Swdenk	echo "export CONFIG_BOOT_ROM" >> config.mk;
7807ebf7443Swdenk
7817ebf7443Swdenkep8260_config:	unconfig
7827ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 ep8260
7837ebf7443Swdenk
7847ebf7443Swdenkgw8260_config:	unconfig
7857ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 gw8260
7867ebf7443Swdenk
7877ebf7443Swdenkhymod_config:	unconfig
7887ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 hymod
7897ebf7443Swdenk
7907ebf7443SwdenkIPHASE4539_config:	unconfig
7917ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 iphase4539
7927ebf7443Swdenk
79304a85b3bSwdenkMPC8260ADS_config	\
79404a85b3bSwdenkMPC8260ADS_33MHz_config	\
79504a85b3bSwdenkMPC8260ADS_40MHz_config	\
79604a85b3bSwdenkMPC8272ADS_config	\
79704a85b3bSwdenkPQ2FADS_config		\
79804a85b3bSwdenkPQ2FADS-VR_config	\
79904a85b3bSwdenkPQ2FADS-ZU_config	\
80004a85b3bSwdenkPQ2FADS-ZU_66MHz_config	\
80104a85b3bSwdenk	:		unconfig
80204a85b3bSwdenk	$(if $(findstring PQ2FADS,$@), \
80304a85b3bSwdenk	@echo "#define CONFIG_ADSTYPE CFG_PQ2FADS" > include/config.h, \
80404a85b3bSwdenk	@echo "#define CONFIG_ADSTYPE CFG_"$(subst MPC,,$(word 1,$(subst _, ,$@))) > include/config.h)
80504a85b3bSwdenk	$(if $(findstring MHz,$@), \
80604a85b3bSwdenk	@echo "#define CONFIG_8260_CLKIN" $(subst MHz,,$(word 2,$(subst _, ,$@)))"000000" >> include/config.h, \
80704a85b3bSwdenk	$(if $(findstring VR,$@), \
80804a85b3bSwdenk	@echo "#define CONFIG_8260_CLKIN 66000000" >> include/config.h))
80904a85b3bSwdenk	@./mkconfig -a MPC8260ADS ppc mpc8260 mpc8260ads
8107ebf7443Swdenk
811db2f721fSwdenkMPC8266ADS_config:	unconfig
812db2f721fSwdenk	@./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
813db2f721fSwdenk
814efa329cbSwdenk# PM825/PM826 default configuration:  small (= 8 MB) Flash / boot from 64-bit flash
81510f67017SwdenkPM825_config	\
816efa329cbSwdenkPM825_ROMBOOT_config	\
817efa329cbSwdenkPM825_BIGFLASH_config	\
818efa329cbSwdenkPM825_ROMBOOT_BIGFLASH_config	\
8197ebf7443SwdenkPM826_config	\
820efa329cbSwdenkPM826_ROMBOOT_config	\
821efa329cbSwdenkPM826_BIGFLASH_config	\
822efa329cbSwdenkPM826_ROMBOOT_BIGFLASH_config:	unconfig
823efa329cbSwdenk	@if [ "$(findstring PM825_,$@)" ] ; then \
824efa329cbSwdenk		echo "#define CONFIG_PCI"	>include/config.h ; \
8257ebf7443Swdenk	else \
826efa329cbSwdenk		>include/config.h ; \
827efa329cbSwdenk	fi
828efa329cbSwdenk	@if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
829efa329cbSwdenk		echo "... booting from 8-bit flash" ; \
830efa329cbSwdenk		echo "#define CONFIG_BOOT_ROM" >>include/config.h ; \
831efa329cbSwdenk		echo "TEXT_BASE = 0xFF800000" >board/pm826/config.tmp ; \
832efa329cbSwdenk		if [ "$(findstring _BIGFLASH_,$@)" ] ; then \
833efa329cbSwdenk			echo "... with 32 MB Flash" ; \
834efa329cbSwdenk			echo "#define CONFIG_FLASH_32MB" >>include/config.h ; \
8357ebf7443Swdenk		fi; \
836efa329cbSwdenk	else \
837efa329cbSwdenk		echo "... booting from 64-bit flash" ; \
838efa329cbSwdenk		if [ "$(findstring _BIGFLASH_,$@)" ] ; then \
839efa329cbSwdenk			echo "... with 32 MB Flash" ; \
840efa329cbSwdenk			echo "#define CONFIG_FLASH_32MB" >>include/config.h ; \
841efa329cbSwdenk			echo "TEXT_BASE = 0x40000000" >board/pm826/config.tmp ; \
842efa329cbSwdenk		else \
843efa329cbSwdenk			echo "TEXT_BASE = 0xFF000000" >board/pm826/config.tmp ; \
844efa329cbSwdenk		fi; \
845efa329cbSwdenk	fi
846efa329cbSwdenk	@./mkconfig -a PM826 ppc mpc8260 pm826
847efa329cbSwdenk
848efa329cbSwdenkPM828_config	\
849efa329cbSwdenkPM828_PCI_config	\
850efa329cbSwdenkPM828_ROMBOOT_config	\
851efa329cbSwdenkPM828_ROMBOOT_PCI_config:	unconfig
852efa329cbSwdenk	@if [ -z "$(findstring _PCI_,$@)" ] ; then \
853efa329cbSwdenk		echo "#define CONFIG_PCI"  >>include/config.h ; \
854efa329cbSwdenk		echo "... with PCI enabled" ; \
855efa329cbSwdenk	else \
856efa329cbSwdenk		>include/config.h ; \
857efa329cbSwdenk	fi
858efa329cbSwdenk	@if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
859efa329cbSwdenk		echo "... booting from 8-bit flash" ; \
860efa329cbSwdenk		echo "#define CONFIG_BOOT_ROM" >>include/config.h ; \
861efa329cbSwdenk		echo "TEXT_BASE = 0xFF800000" >board/pm826/config.tmp ; \
862efa329cbSwdenk	fi
863efa329cbSwdenk	@./mkconfig -a PM828 ppc mpc8260 pm828
8647ebf7443Swdenk
8657ebf7443Swdenkppmc8260_config:	unconfig
8667ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
8677ebf7443Swdenk
8687ebf7443SwdenkRPXsuper_config:	unconfig
8697ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
8707ebf7443Swdenk
8717ebf7443Swdenkrsdproto_config:	unconfig
8727ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 rsdproto
8737ebf7443Swdenk
8747ebf7443Swdenksacsng_config:	unconfig
8757ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 sacsng
8767ebf7443Swdenk
8777ebf7443Swdenksbc8260_config:	unconfig
8787ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 sbc8260
8797ebf7443Swdenk
8807ebf7443SwdenkSCM_config:		unconfig
8817ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
8827ebf7443Swdenk
88327b207fdSwdenkTQM8255_AA_config \
88427b207fdSwdenkTQM8260_AA_config \
88527b207fdSwdenkTQM8260_AB_config \
88627b207fdSwdenkTQM8260_AC_config \
88727b207fdSwdenkTQM8260_AD_config \
88827b207fdSwdenkTQM8260_AE_config \
88927b207fdSwdenkTQM8260_AF_config \
89027b207fdSwdenkTQM8260_AG_config \
89127b207fdSwdenkTQM8260_AH_config \
89227b207fdSwdenkTQM8265_AA_config:  unconfig
89327b207fdSwdenk	@case "$@" in \
89427b207fdSwdenk	TQM8255_AA_config) CTYPE=MPC8255; CFREQ=300; CACHE=no;  BMODE=8260;;  \
89527b207fdSwdenk	TQM8260_AA_config) CTYPE=MPC8260; CFREQ=200; CACHE=no;  BMODE=8260;; \
89627b207fdSwdenk	TQM8260_AB_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;;  \
89727b207fdSwdenk	TQM8260_AC_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;;  \
89827b207fdSwdenk	TQM8260_AD_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;  BMODE=60x;;  \
89927b207fdSwdenk	TQM8260_AE_config) CTYPE=MPC8260; CFREQ=266; CACHE=no;  BMODE=8260;; \
90027b207fdSwdenk	TQM8260_AF_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;  BMODE=60x;;  \
90127b207fdSwdenk	TQM8260_AG_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;  BMODE=8260;; \
90227b207fdSwdenk	TQM8260_AH_config) CTYPE=MPC8260; CFREQ=300; CACHE=yes; BMODE=60x;;  \
90327b207fdSwdenk	TQM8265_AA_config) CTYPE=MPC8265; CFREQ=300; CACHE=no;  BMODE=60x;;  \
90427b207fdSwdenk	esac; \
90527b207fdSwdenk	>include/config.h ; \
90627b207fdSwdenk	if [ "$${CTYPE}" != "MPC8260" ] ; then \
90727b207fdSwdenk		echo "#define CONFIG_$${CTYPE}"	>>include/config.h ; \
90827b207fdSwdenk	fi; \
90927b207fdSwdenk	echo "#define CONFIG_$${CFREQ}MHz"	>>include/config.h ; \
91027b207fdSwdenk	echo "... with $${CFREQ}MHz system clock" ; \
91127b207fdSwdenk	if [ "$${CACHE}" == "yes" ] ; then \
9127ebf7443Swdenk		echo "#define CONFIG_L2_CACHE"	>>include/config.h ; \
91327b207fdSwdenk		echo "... with L2 Cache support" ; \
9147ebf7443Swdenk	else \
9157ebf7443Swdenk		echo "#undef CONFIG_L2_CACHE"	>>include/config.h ; \
9167ebf7443Swdenk		echo "... without L2 Cache support" ; \
91727b207fdSwdenk	fi; \
91827b207fdSwdenk	if [ "$${BMODE}" == "60x" ] ; then \
91927b207fdSwdenk		echo "#define CONFIG_BUSMODE_60x" >>include/config.h ; \
92027b207fdSwdenk		echo "... with 60x Bus Mode" ; \
92127b207fdSwdenk	else \
92227b207fdSwdenk		echo "#undef CONFIG_BUSMODE_60x"  >>include/config.h ; \
92327b207fdSwdenk		echo "... without 60x Bus Mode" ; \
9247ebf7443Swdenk	fi
9254532cb69Swdenk	@./mkconfig -a TQM8260 ppc mpc8260 tqm8260
9267ebf7443Swdenk
92754387ac9SwdenkZPC1900_config: unconfig
92854387ac9Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 zpc1900
9297aa78614Swdenk
9304e5ca3ebSwdenk#========================================================================
9314e5ca3ebSwdenk# M68K
9324e5ca3ebSwdenk#========================================================================
9334e5ca3ebSwdenk#########################################################################
9344e5ca3ebSwdenk## Coldfire
9354e5ca3ebSwdenk#########################################################################
9364e5ca3ebSwdenk
9374e5ca3ebSwdenkM5272C3_config :		unconfig
938bf9e3b38Swdenk	@./mkconfig $(@:_config=) m68k mcf52x2 m5272c3
9394e5ca3ebSwdenk
9404e5ca3ebSwdenkM5282EVB_config :		unconfig
941bf9e3b38Swdenk	@./mkconfig $(@:_config=) m68k mcf52x2 m5282evb
9424e5ca3ebSwdenk
9437ebf7443Swdenk#########################################################################
94442d1f039Swdenk## MPC85xx Systems
94542d1f039Swdenk#########################################################################
94642d1f039Swdenk
94742d1f039SwdenkMPC8540ADS_config:      unconfig
94842d1f039Swdenk	@./mkconfig $(@:_config=) ppc mpc85xx mpc8540ads
94942d1f039Swdenk
95042d1f039SwdenkMPC8560ADS_config:      unconfig
95142d1f039Swdenk	@./mkconfig $(@:_config=) ppc mpc85xx mpc8560ads
95242d1f039Swdenk
953*7abf0c58Swdenkstxgp3_config:      unconfig
954*7abf0c58Swdenk	@./mkconfig $(@:_config=) ppc mpc85xx stxgp3
955*7abf0c58Swdenk
95642d1f039Swdenk#########################################################################
9577ebf7443Swdenk## 74xx/7xx Systems
9587ebf7443Swdenk#########################################################################
9597ebf7443Swdenk
960c7de829cSwdenkAmigaOneG3SE_config:	unconfig
961c7de829cSwdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
962c7de829cSwdenk
96315647dc7SwdenkBAB7xx_config: unconfig
96415647dc7Swdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
96515647dc7Swdenk
9663a473b2aSwdenkDB64360_config:  unconfig
9673a473b2aSwdenk	@./mkconfig DB64360 ppc 74xx_7xx db64360 Marvell
9683a473b2aSwdenk
9693a473b2aSwdenkDB64460_config:  unconfig
9703a473b2aSwdenk	@./mkconfig DB64460 ppc 74xx_7xx db64460 Marvell
9713a473b2aSwdenk
97215647dc7SwdenkELPPC_config: unconfig
97315647dc7Swdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
97415647dc7Swdenk
9757ebf7443SwdenkEVB64260_config	\
9767ebf7443SwdenkEVB64260_750CX_config:	unconfig
9777ebf7443Swdenk	@./mkconfig EVB64260 ppc 74xx_7xx evb64260
9787ebf7443Swdenk
97915647dc7SwdenkP3G4_config: unconfig
9807ebf7443Swdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
9817ebf7443Swdenk
9827ebf7443SwdenkPCIPPC2_config \
9837ebf7443SwdenkPCIPPC6_config: unconfig
9847ebf7443Swdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
9857ebf7443Swdenk
98615647dc7SwdenkZUMA_config:	unconfig
98712f34241Swdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
98812f34241Swdenk
9897ebf7443Swdenk#========================================================================
9907ebf7443Swdenk# ARM
9917ebf7443Swdenk#========================================================================
9927ebf7443Swdenk#########################################################################
9937ebf7443Swdenk## StrongARM Systems
9947ebf7443Swdenk#########################################################################
9957ebf7443Swdenk
996ea66bc88Swdenkassabet_config	:	unconfig
997ea66bc88Swdenk	@./mkconfig $(@:_config=) arm sa1100 assabet
998ea66bc88Swdenk
9997ebf7443Swdenkdnp1110_config	:	unconfig
10007ebf7443Swdenk	@./mkconfig $(@:_config=) arm sa1100 dnp1110
10017ebf7443Swdenk
1002855a496fSwdenkgcplus_config	:	unconfig
1003855a496fSwdenk	@./mkconfig $(@:_config=) arm sa1100 gcplus
1004855a496fSwdenk
1005855a496fSwdenklart_config	:	unconfig
1006855a496fSwdenk	@./mkconfig $(@:_config=) arm sa1100 lart
1007855a496fSwdenk
10087ebf7443Swdenkshannon_config	:	unconfig
10097ebf7443Swdenk	@./mkconfig $(@:_config=) arm sa1100 shannon
10107ebf7443Swdenk
10117ebf7443Swdenk#########################################################################
10122e5983d2Swdenk## ARM92xT Systems
10137ebf7443Swdenk#########################################################################
10147ebf7443Swdenk
1015b0639ca3Swdenkxtract_trab = $(subst _bigram,,$(subst _bigflash,,$(subst _old,,$(subst _config,,$1))))
101643d9616cSwdenk
101763e73c9aSwdenkxtract_omap1610xxx = $(subst _cs0boot,,$(subst _cs3boot,, $(subst _config,,$1)))
101863e73c9aSwdenk
1019232c150aSwdenkSX1_config :		unconfig
1020232c150aSwdenk	@./mkconfig $(@:_config=) arm arm925t sx1
1021232c150aSwdenk
10223d3befa7Swdenkintegratorcp_config :	unconfig
10233d3befa7Swdenk	@./mkconfig $(@:_config=) arm arm926ejs integratorcp
10243d3befa7Swdenk
10253d3befa7Swdenkintegratorap_config :	unconfig
10263d3befa7Swdenk	@./mkconfig $(@:_config=) arm arm926ejs integratorap
10273d3befa7Swdenk
10283d3befa7Swdenkversatile_config :	unconfig
10293d3befa7Swdenk	@./mkconfig $(@:_config=) arm arm926ejs versatile
10303d3befa7Swdenk
10312e5983d2Swdenkomap1510inn_config :	unconfig
10322e5983d2Swdenk	@./mkconfig $(@:_config=) arm arm925t omap1510inn
10332e5983d2Swdenk
103463e73c9aSwdenkomap1610inn_config \
103563e73c9aSwdenkomap1610inn_cs0boot_config \
103663e73c9aSwdenkomap1610inn_cs3boot_config \
103763e73c9aSwdenkomap1610h2_config \
103863e73c9aSwdenkomap1610h2_cs0boot_config \
103963e73c9aSwdenkomap1610h2_cs3boot_config :	unconfig
104063e73c9aSwdenk	@if [ "$(findstring _cs0boot_, $@)" ] ; then \
104163e73c9aSwdenk		echo "#define CONFIG_CS0_BOOT" >> ./include/config.h ; \
1042b79a11ccSwdenk		echo "... configured for CS0 boot"; \
104363e73c9aSwdenk	else \
104463e73c9aSwdenk		echo "#define CONFIG_CS3_BOOT" >> ./include/config.h ; \
1045b79a11ccSwdenk		echo "... configured for CS3 boot"; \
104663e73c9aSwdenk	fi;
104763e73c9aSwdenk	@./mkconfig -a $(call xtract_omap1610xxx,$@) arm arm926ejs omap1610inn
10486f21347dSwdenk
10497ebf7443Swdenksmdk2400_config	:	unconfig
10507ebf7443Swdenk	@./mkconfig $(@:_config=) arm arm920t smdk2400
10517ebf7443Swdenk
10527ebf7443Swdenksmdk2410_config	:	unconfig
10537ebf7443Swdenk	@./mkconfig $(@:_config=) arm arm920t smdk2410
10547ebf7443Swdenk
1055b2001f27Swdenk# TRAB default configuration:	8 MB Flash, 32 MB RAM
105643d9616cSwdenktrab_config \
1057b0639ca3Swdenktrab_bigram_config \
1058b0639ca3Swdenktrab_bigflash_config \
1059f54ebdfaSwdenktrab_old_config:	unconfig
106043d9616cSwdenk	@ >include/config.h
1061b0639ca3Swdenk	@[ -z "$(findstring _bigram,$@)" ] || \
1062b0639ca3Swdenk		{ echo "#define CONFIG_FLASH_8MB"  >>include/config.h ; \
1063b2001f27Swdenk		  echo "#define CONFIG_RAM_32MB"   >>include/config.h ; \
1064b0639ca3Swdenk		  echo "... with 8 MB Flash, 32 MB RAM" ; \
1065b0639ca3Swdenk		}
1066b0639ca3Swdenk	@[ -z "$(findstring _bigflash,$@)" ] || \
1067b2001f27Swdenk		{ echo "#define CONFIG_FLASH_16MB" >>include/config.h ; \
1068b2001f27Swdenk		  echo "#define CONFIG_RAM_16MB"   >>include/config.h ; \
1069b0639ca3Swdenk		  echo "... with 16 MB Flash, 16 MB RAM" ; \
1070a8c7c708Swdenk		  echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
1071b0639ca3Swdenk		}
1072f54ebdfaSwdenk	@[ -z "$(findstring _old,$@)" ] || \
1073b2001f27Swdenk		{ echo "#define CONFIG_FLASH_8MB"  >>include/config.h ; \
1074b2001f27Swdenk		  echo "#define CONFIG_RAM_16MB"   >>include/config.h ; \
1075b2001f27Swdenk		  echo "... with 8 MB Flash, 16 MB RAM" ; \
1076a8c7c708Swdenk		  echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
107743d9616cSwdenk		}
107843d9616cSwdenk	@./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
10797ebf7443Swdenk
10801cb8e980SwdenkVCMA9_config	:	unconfig
10811cb8e980Swdenk	@./mkconfig $(@:_config=) arm arm920t vcma9 mpl
10821cb8e980Swdenk
1083074cff0dSwdenk
1084074cff0dSwdenk#########################################################################
1085074cff0dSwdenk## S3C44B0 Systems
1086074cff0dSwdenk#########################################################################
1087074cff0dSwdenk
1088074cff0dSwdenkB2_config	:	unconfig
1089074cff0dSwdenk	@./mkconfig $(@:_config=) arm s3c44b0 B2 dave
1090074cff0dSwdenk
10917ebf7443Swdenk#########################################################################
10927ebf7443Swdenk## ARM720T Systems
10937ebf7443Swdenk#########################################################################
10947ebf7443Swdenk
10957ebf7443Swdenkimpa7_config	:	unconfig
10967ebf7443Swdenk	@./mkconfig $(@:_config=) arm arm720t impa7
10977ebf7443Swdenk
10987ebf7443Swdenkep7312_config	:	unconfig
10997ebf7443Swdenk	@./mkconfig $(@:_config=) arm arm720t ep7312
11007ebf7443Swdenk
11012d1a537dSwdenkmodnet50_config :	unconfig
11022d1a537dSwdenk	@./mkconfig $(@:_config=) arm arm720t modnet50
11032d1a537dSwdenk
11047ebf7443Swdenk#########################################################################
1105d9df1f4eSwdenk## AT91RM9200 Systems
1106d9df1f4eSwdenk#########################################################################
1107d9df1f4eSwdenk
1108d9df1f4eSwdenkat91rm9200dk_config	:	unconfig
1109d9df1f4eSwdenk	@./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
1110d9df1f4eSwdenk
1111d9df1f4eSwdenk#########################################################################
111243d9616cSwdenk## XScale Systems
11137ebf7443Swdenk#########################################################################
11147ebf7443Swdenk
11157ebf7443Swdenkcradle_config	:	unconfig
11164c3b21a5Swdenk	@./mkconfig $(@:_config=) arm pxa cradle
11177ebf7443Swdenk
11187ebf7443Swdenkcsb226_config	:	unconfig
11194c3b21a5Swdenk	@./mkconfig $(@:_config=) arm pxa csb226
11207ebf7443Swdenk
112143d9616cSwdenkinnokom_config	:	unconfig
11224c3b21a5Swdenk	@./mkconfig $(@:_config=) arm pxa innokom
112343d9616cSwdenk
11242d5b561eSwdenkixdp425_config	:	unconfig
11252d5b561eSwdenk	@./mkconfig $(@:_config=) arm ixp ixdp425
11262d5b561eSwdenk
112743d9616cSwdenklubbock_config	:	unconfig
11284c3b21a5Swdenk	@./mkconfig $(@:_config=) arm pxa lubbock
112943d9616cSwdenk
113052f52c14Swdenklogodl_config	:	unconfig
113152f52c14Swdenk	@./mkconfig $(@:_config=) arm pxa logodl
113252f52c14Swdenk
11333e38691eSwdenkwepep250_config	:	unconfig
11344c3b21a5Swdenk	@./mkconfig $(@:_config=) arm pxa wepep250
11353e38691eSwdenk
1136efa329cbSwdenkxm250_config	:	unconfig
1137efa329cbSwdenk	@./mkconfig $(@:_config=) arm pxa xm250
1138efa329cbSwdenk
11392262cfeeSwdenk#========================================================================
11402262cfeeSwdenk# i386
11412262cfeeSwdenk#========================================================================
11422262cfeeSwdenk#########################################################################
11432262cfeeSwdenk## AMD SC520 CDP
11442262cfeeSwdenk#########################################################################
11452262cfeeSwdenksc520_cdp_config	:	unconfig
11462262cfeeSwdenk	@./mkconfig $(@:_config=) i386 i386 sc520_cdp
11472262cfeeSwdenk
11487a8e9bedSwdenksc520_spunk_config	:	unconfig
11497a8e9bedSwdenk	@./mkconfig $(@:_config=) i386 i386 sc520_spunk
11507a8e9bedSwdenk
11517a8e9bedSwdenksc520_spunk_rel_config	:	unconfig
11527a8e9bedSwdenk	@./mkconfig $(@:_config=) i386 i386 sc520_spunk
11537a8e9bedSwdenk
115443d9616cSwdenk#========================================================================
115543d9616cSwdenk# MIPS
115643d9616cSwdenk#========================================================================
11577ebf7443Swdenk#########################################################################
115843d9616cSwdenk## MIPS32 4Kc
115943d9616cSwdenk#########################################################################
116043d9616cSwdenk
1161e0ac62d7Swdenkxtract_incaip = $(subst _100MHz,,$(subst _133MHz,,$(subst _150MHz,,$(subst _config,,$1))))
1162e0ac62d7Swdenk
1163e0ac62d7Swdenkincaip_100MHz_config	\
1164e0ac62d7Swdenkincaip_133MHz_config	\
1165e0ac62d7Swdenkincaip_150MHz_config	\
116643d9616cSwdenkincaip_config: unconfig
1167e0ac62d7Swdenk	@ >include/config.h
1168e0ac62d7Swdenk	@[ -z "$(findstring _100MHz,$@)" ] || \
1169e0ac62d7Swdenk		{ echo "#define CPU_CLOCK_RATE 100000000" >>include/config.h ; \
1170e0ac62d7Swdenk		  echo "... with 100MHz system clock" ; \
1171e0ac62d7Swdenk		}
1172e0ac62d7Swdenk	@[ -z "$(findstring _133MHz,$@)" ] || \
1173e0ac62d7Swdenk		{ echo "#define CPU_CLOCK_RATE 133000000" >>include/config.h ; \
1174e0ac62d7Swdenk		  echo "... with 133MHz system clock" ; \
1175e0ac62d7Swdenk		}
1176e0ac62d7Swdenk	@[ -z "$(findstring _150MHz,$@)" ] || \
1177e0ac62d7Swdenk		{ echo "#define CPU_CLOCK_RATE 150000000" >>include/config.h ; \
1178e0ac62d7Swdenk		  echo "... with 150MHz system clock" ; \
1179e0ac62d7Swdenk		}
1180e0ac62d7Swdenk	@./mkconfig -a $(call xtract_incaip,$@) mips mips incaip
1181e0ac62d7Swdenk
1182f4863a7aSwdenktb0229_config: unconfig
1183f4863a7aSwdenk	@./mkconfig $(@:_config=) mips mips tb0229
1184f4863a7aSwdenk
1185e0ac62d7Swdenk#########################################################################
1186e0ac62d7Swdenk## MIPS64 5Kc
1187e0ac62d7Swdenk#########################################################################
118843d9616cSwdenk
11893e38691eSwdenkpurple_config :		unconfig
11903e38691eSwdenk	@./mkconfig $(@:_config=) mips mips purple
119143d9616cSwdenk
11924a551709Swdenk#========================================================================
11934a551709Swdenk# Nios
11944a551709Swdenk#========================================================================
11954a551709Swdenk#########################################################################
11964a551709Swdenk## Nios32
11974a551709Swdenk#########################################################################
11984a551709Swdenk
1199c935d3bdSwdenkDK1C20_safe_32_config		\
1200c935d3bdSwdenkDK1C20_standard_32_config	\
12014a551709SwdenkDK1C20_config:	unconfig
1202c935d3bdSwdenk	@ >include/config.h
1203c935d3bdSwdenk	@[ -z "$(findstring _safe_32,$@)" ] || \
1204c935d3bdSwdenk		{ echo "#define CONFIG_NIOS_SAFE_32 1" >>include/config.h ; \
1205c935d3bdSwdenk		  echo "... NIOS 'safe_32' configuration" ; \
1206c935d3bdSwdenk		}
1207c935d3bdSwdenk	@[ -z "$(findstring _standard_32,$@)" ] || \
1208c935d3bdSwdenk		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
1209c935d3bdSwdenk		  echo "... NIOS 'standard_32' configuration" ; \
1210c935d3bdSwdenk		}
1211c935d3bdSwdenk	@[ -z "$(findstring DK1C20_config,$@)" ] || \
1212c935d3bdSwdenk		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
1213c935d3bdSwdenk		  echo "... NIOS 'standard_32' configuration (DEFAULT)" ; \
1214c935d3bdSwdenk		}
1215c935d3bdSwdenk	@./mkconfig -a DK1C20 nios nios dk1c20 altera
1216c935d3bdSwdenk
1217c935d3bdSwdenkDK1S10_safe_32_config		\
1218c935d3bdSwdenkDK1S10_standard_32_config	\
1219ec4c544bSwdenkDK1S10_mtx_ldk_20_config	\
1220c935d3bdSwdenkDK1S10_config:	unconfig
1221c935d3bdSwdenk	@ >include/config.h
1222c935d3bdSwdenk	@[ -z "$(findstring _safe_32,$@)" ] || \
1223c935d3bdSwdenk		{ echo "#define CONFIG_NIOS_SAFE_32 1" >>include/config.h ; \
1224c935d3bdSwdenk		  echo "... NIOS 'safe_32' configuration" ; \
1225c935d3bdSwdenk		}
1226c935d3bdSwdenk	@[ -z "$(findstring _standard_32,$@)" ] || \
1227c935d3bdSwdenk		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
1228c935d3bdSwdenk		  echo "... NIOS 'standard_32' configuration" ; \
1229c935d3bdSwdenk		}
1230ec4c544bSwdenk	@[ -z "$(findstring _mtx_ldk_20,$@)" ] || \
1231ec4c544bSwdenk		{ echo "#define CONFIG_NIOS_MTX_LDK_20 1" >>include/config.h ; \
1232ec4c544bSwdenk		  echo "... NIOS 'mtx_ldk_20' configuration" ; \
1233ec4c544bSwdenk		}
1234c935d3bdSwdenk	@[ -z "$(findstring DK1S10_config,$@)" ] || \
1235c935d3bdSwdenk		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
1236c935d3bdSwdenk		  echo "... NIOS 'standard_32' configuration (DEFAULT)" ; \
1237c935d3bdSwdenk		}
1238c935d3bdSwdenk	@./mkconfig -a DK1S10 nios nios dk1s10 altera
12394a551709Swdenk
1240aaf224abSwdenkADNPESC1_DNPEVA2_base_32_config	\
1241aaf224abSwdenkADNPESC1_base_32_config		\
1242aaf224abSwdenkADNPESC1_config: unconfig
1243aaf224abSwdenk	@ >include/config.h
1244aaf224abSwdenk	@[ -z "$(findstring _DNPEVA2,$@)" ] || \
1245aaf224abSwdenk		{ echo "#define CONFIG_DNPEVA2 1" >>include/config.h ; \
1246aaf224abSwdenk		  echo "... DNP/EVA2 configuration" ; \
1247aaf224abSwdenk		}
1248aaf224abSwdenk	@[ -z "$(findstring _base_32,$@)" ] || \
1249aaf224abSwdenk		{ echo "#define CONFIG_NIOS_BASE_32 1" >>include/config.h ; \
1250aaf224abSwdenk		  echo "... NIOS 'base_32' configuration" ; \
1251aaf224abSwdenk		}
1252aaf224abSwdenk	@[ -z "$(findstring ADNPESC1_config,$@)" ] || \
1253aaf224abSwdenk		{ echo "#define CONFIG_NIOS_BASE_32 1" >>include/config.h ; \
1254aaf224abSwdenk		  echo "... NIOS 'base_32' configuration (DEFAULT)" ; \
1255aaf224abSwdenk		}
1256aaf224abSwdenk	@./mkconfig -a ADNPESC1 nios nios adnpesc1 ssv
1257aaf224abSwdenk
12584a551709Swdenk
1259507bbe3eSwdenk#========================================================================
1260507bbe3eSwdenk# MicroBlaze
1261507bbe3eSwdenk#========================================================================
1262507bbe3eSwdenk#########################################################################
1263507bbe3eSwdenk## Microblaze
1264507bbe3eSwdenk#########################################################################
1265507bbe3eSwdenksuzaku_config:	unconfig
1266507bbe3eSwdenk	@ >include/config.h
1267507bbe3eSwdenk	@echo "#define CONFIG_SUZAKU 1" >> include/config.h
1268507bbe3eSwdenk	@./mkconfig -a $(@:_config=) microblaze microblaze suzaku AtmarkTechno
1269507bbe3eSwdenk
12703e38691eSwdenk#########################################################################
1271a2663ea4Swdenk## MIPS32 AU1X00
12725da627a4Swdenk#########################################################################
1273a2663ea4Swdenkdbau1000_config		: 	unconfig
1274a2663ea4Swdenk	@ >include/config.h
1275a2663ea4Swdenk	@echo "#define CONFIG_DBAU1000 1" >>include/config.h
1276a2663ea4Swdenk	@./mkconfig -a dbau1x00 mips mips dbau1x00
1277a2663ea4Swdenk
1278a2663ea4Swdenkdbau1100_config		: 	unconfig
1279a2663ea4Swdenk	@ >include/config.h
1280a2663ea4Swdenk	@echo "#define CONFIG_DBAU1100 1" >>include/config.h
1281a2663ea4Swdenk	@./mkconfig -a dbau1x00 mips mips dbau1x00
1282a2663ea4Swdenk
1283a2663ea4Swdenkdbau1500_config		: 	unconfig
1284a2663ea4Swdenk	@ >include/config.h
1285a2663ea4Swdenk	@echo "#define CONFIG_DBAU1500 1" >>include/config.h
1286a2663ea4Swdenk	@./mkconfig -a dbau1x00 mips mips dbau1x00
12875da627a4Swdenk
12885da627a4Swdenk#########################################################################
12893e38691eSwdenk#########################################################################
12907ebf7443Swdenk
12917ebf7443Swdenkclean:
12927ebf7443Swdenk	find . -type f \
12937ebf7443Swdenk		\( -name 'core' -o -name '*.bak' -o -name '*~' \
12947ebf7443Swdenk		-o -name '*.o'  -o -name '*.a'  \) -print \
12957ebf7443Swdenk		| xargs rm -f
129685ec0bccSwdenk	rm -f examples/hello_world examples/timer \
12973e38691eSwdenk	      examples/eepro100_eeprom examples/sched \
12987a8e9bedSwdenk	      examples/mem_to_mem_idma2intr examples/82559_eeprom
12997ebf7443Swdenk	rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
1300bda6c8aeSwdenk	rm -f tools/mpc86x_clk
13017ebf7443Swdenk	rm -f tools/easylogo/easylogo tools/bmp_logo
13027ebf7443Swdenk	rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
1303228f29acSwdenk	rm -f tools/env/fw_printenv tools/env/fw_setenv
13047f70e853Swdenk	rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
13057e780369Swdenk	rm -f board/trab/trab_fkt
13067ebf7443Swdenk
13077ebf7443Swdenkclobber:	clean
13087ebf7443Swdenk	find . -type f \
13097ebf7443Swdenk		\( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
13107ebf7443Swdenk		-print \
13117ebf7443Swdenk		| xargs rm -f
13127ebf7443Swdenk	rm -f $(OBJS) *.bak tags TAGS
13137ebf7443Swdenk	rm -fr *.*~
1314bdccc4feSwdenk	rm -f u-boot u-boot.map $(ALL)
1315228f29acSwdenk	rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
13163e38691eSwdenk	rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
1317b783edaeSwdenk	rm -f include/asm/proc include/asm/arch include/asm
13187ebf7443Swdenk
13197ebf7443Swdenkmrproper \
13207ebf7443Swdenkdistclean:	clobber unconfig
13217ebf7443Swdenk
13227ebf7443Swdenkbackup:
13237ebf7443Swdenk	F=`basename $(TOPDIR)` ; cd .. ; \
13247ebf7443Swdenk	gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
13257ebf7443Swdenk
13267ebf7443Swdenk#########################################################################
1327