xref: /openbmc/u-boot/Makefile (revision b4676a25)
17ebf7443Swdenk#
27ebf7443Swdenk# (C) Copyright 2000, 2001, 2002
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
757ebf7443Swdenkendif
767ebf7443Swdenkendif
777ebf7443Swdenk
787ebf7443Swdenkexport	CROSS_COMPILE
797ebf7443Swdenk
807ebf7443Swdenk#########################################################################
817ebf7443Swdenk# U-Boot objects....order is important (i.e. start must be first)
827ebf7443Swdenk
837ebf7443SwdenkOBJS  =	cpu/$(CPU)/start.o
842262cfeeSwdenkifeq ($(CPU),i386)
852262cfeeSwdenkOBJS +=	cpu/$(CPU)/start16.o
862262cfeeSwdenkOBJS +=	cpu/$(CPU)/reset.o
872262cfeeSwdenkendif
887ebf7443Swdenkifeq ($(CPU),ppc4xx)
897ebf7443SwdenkOBJS +=	cpu/$(CPU)/resetvec.o
907ebf7443Swdenkendif
9142d1f039Swdenkifeq ($(CPU),mpc85xx)
9242d1f039SwdenkOBJS += cpu/$(CPU)/resetvec.o
9342d1f039Swdenkendif
947ebf7443Swdenk
957ebf7443SwdenkLIBS  =	board/$(BOARDDIR)/lib$(BOARD).a
967ebf7443SwdenkLIBS += cpu/$(CPU)/lib$(CPU).a
977ebf7443SwdenkLIBS += lib_$(ARCH)/lib$(ARCH).a
9871f95118SwdenkLIBS += fs/jffs2/libjffs2.a fs/fdos/libfdos.a fs/fat/libfat.a
997ebf7443SwdenkLIBS += net/libnet.a
1007ebf7443SwdenkLIBS += disk/libdisk.a
1017ebf7443SwdenkLIBS += rtc/librtc.a
1027ebf7443SwdenkLIBS += dtt/libdtt.a
1037ebf7443SwdenkLIBS += drivers/libdrivers.a
1047152b1d0SwdenkLIBS += drivers/sk98lin/libsk98lin.a
1057ebf7443SwdenkLIBS += post/libpost.a post/cpu/libcpu.a
1067ebf7443SwdenkLIBS += common/libcommon.a
1077ebf7443SwdenkLIBS += lib_generic/libgeneric.a
108a8c7c708Swdenk
1094f7cb08eSwdenk# Add GCC lib
110fc3e2165SwdenkPLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
1117ebf7443Swdenk
112a8c7c708Swdenk# The "tools" are needed early, so put this first
113a8c7c708Swdenk# Don't include stuff already done in $(LIBS)
114a8c7c708SwdenkSUBDIRS	= tools \
115a8c7c708Swdenk	  examples \
116a8c7c708Swdenk	  post \
117a8c7c708Swdenk	  post/cpu
118a8c7c708Swdenk
1197ebf7443Swdenk#########################################################################
120bdccc4feSwdenk#########################################################################
1217ebf7443Swdenk
122bdccc4feSwdenkALL = u-boot.srec u-boot.bin System.map
1237ebf7443Swdenk
124bdccc4feSwdenkall:		$(ALL)
1257ebf7443Swdenk
1267ebf7443Swdenku-boot.srec:	u-boot
1277ebf7443Swdenk		$(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
1287ebf7443Swdenk
1297ebf7443Swdenku-boot.bin:	u-boot
1307ebf7443Swdenk		$(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
1317ebf7443Swdenk
132bdccc4feSwdenku-boot.img:	u-boot.bin
133bdccc4feSwdenk		./tools/mkimage -A $(ARCH) -T firmware -C none \
134bdccc4feSwdenk		-a $(TEXT_BASE) -e 0 \
135bdccc4feSwdenk		-n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' include/version.h | \
136bdccc4feSwdenk			sed -e 's/"[	 ]*$$/ for $(BOARD) board"/') \
137bdccc4feSwdenk		-d $< $@
138bdccc4feSwdenk
1397ebf7443Swdenku-boot.dis:	u-boot
1407ebf7443Swdenk		$(OBJDUMP) -d $< > $@
1417ebf7443Swdenk
142a8c7c708Swdenku-boot:		depend $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)
1438bde7f77Swdenk		UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed  -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
1448bde7f77Swdenk		$(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \
1457152b1d0Swdenk			--start-group $(LIBS) $(PLATFORM_LIBS) --end-group \
146b2184c31Swdenk			-Map u-boot.map -o u-boot
1477ebf7443Swdenk
148a8c7c708Swdenk$(LIBS):
149a8c7c708Swdenk		$(MAKE) -C `dirname $@`
150a8c7c708Swdenk
151a8c7c708Swdenk$(SUBDIRS):
152a8c7c708Swdenk		@echo "#### MAKE $@ ####"
153a8c7c708Swdenk		$(MAKE) -C $@
1547ebf7443Swdenk
1558f713fdfSdzugdbtools:
1568f713fdfSdzu		$(MAKE) -C tools/gdb || exit 1
1578f713fdfSdzu
1587ebf7443Swdenkdepend dep:
1597ebf7443Swdenk		@for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
1607ebf7443Swdenk
1617ebf7443Swdenktags:
1627ebf7443Swdenk		ctags -w `find $(SUBDIRS) include \
1637ebf7443Swdenk			\( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
1647ebf7443Swdenk
1657ebf7443Swdenketags:
1667ebf7443Swdenk		etags -a `find $(SUBDIRS) include \
1677ebf7443Swdenk			\( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
1687ebf7443Swdenk
1697ebf7443SwdenkSystem.map:	u-boot
1707ebf7443Swdenk		@$(NM) $< | \
1717ebf7443Swdenk		grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
1727ebf7443Swdenk		sort > System.map
1737ebf7443Swdenk
1747ebf7443Swdenk#########################################################################
1757ebf7443Swdenkelse
1767ebf7443Swdenkall install u-boot u-boot.srec depend dep:
1777ebf7443Swdenk	@echo "System not configured - see README" >&2
1787ebf7443Swdenk	@ exit 1
1797ebf7443Swdenkendif
1807ebf7443Swdenk
1817ebf7443Swdenk#########################################################################
1827ebf7443Swdenk
1837ebf7443Swdenkunconfig:
1847ebf7443Swdenk	rm -f include/config.h include/config.mk
1857ebf7443Swdenk
1867ebf7443Swdenk#========================================================================
1877ebf7443Swdenk# PowerPC
1887ebf7443Swdenk#========================================================================
1890db5bca8Swdenk
1900db5bca8Swdenk#########################################################################
1910db5bca8Swdenk## MPC5xx Systems
1920db5bca8Swdenk#########################################################################
1930db5bca8Swdenk
1940db5bca8Swdenkcmi_mpc5xx_config:	unconfig
1950db5bca8Swdenk	@./mkconfig $(@:_config=) ppc mpc5xx cmi
1960db5bca8Swdenk
1977ebf7443Swdenk#########################################################################
198945af8d7Swdenk## MPC5xxx Systems
199945af8d7Swdenk#########################################################################
2005cf9da48SwdenkMPC5200LITE_config		\
2015cf9da48SwdenkMPC5200LITE_LOWBOOT_config	\
2025cf9da48SwdenkMPC5200LITE_LOWBOOT08_config	\
203a0f2fe52Swdenkicecube_5200_config		\
204945af8d7SwdenkIceCube_5200_config		\
205945af8d7SwdenkIceCube_5100_config:		unconfig
206945af8d7Swdenk	@ >include/config.h
2075cf9da48Swdenk	@[ -z "$(findstring LOWBOOT,$@)" ] || \
2085cf9da48Swdenk		{ echo "TEXT_BASE = 0xFF000000" >board/icecube/config.tmp ; \
2095cf9da48Swdenk		  echo "... with LOWBOOT configuration" ; \
2105cf9da48Swdenk		}
2115cf9da48Swdenk	@[ -z "$(findstring LOWBOOT08,$@)" ] || \
2125cf9da48Swdenk		{ echo "TEXT_BASE = 0xFF800000" >board/icecube/config.tmp ; \
2135cf9da48Swdenk		  echo "... with 8 MB flash only" ; \
2145cf9da48Swdenk		}
215a0f2fe52Swdenk	@[ -z "$(findstring 5200,$@)" ] || \
216945af8d7Swdenk		{ echo "#define CONFIG_MPC5200"		>>include/config.h ; \
217945af8d7Swdenk		  echo "... with MPC5200 processor" ; \
218945af8d7Swdenk		}
219a0f2fe52Swdenk	@[ -z "$(findstring 5100,$@)" ] || \
220945af8d7Swdenk		{ echo "#define CONFIG_MGT5100"		>>include/config.h ; \
221945af8d7Swdenk		  echo "... with MGT5100 processor" ; \
222945af8d7Swdenk		}
223945af8d7Swdenk	@./mkconfig -a IceCube ppc mpc5xxx icecube
224945af8d7Swdenk
225945af8d7Swdenk#########################################################################
2267ebf7443Swdenk## MPC8xx Systems
2277ebf7443Swdenk#########################################################################
2287ebf7443Swdenk
2290cb61d7dSwdenkAdderII_config:	unconfig
2300cb61d7dSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx adderII
2310cb61d7dSwdenk
2327ebf7443SwdenkADS860_config:	unconfig
2337ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx fads
2347ebf7443Swdenk
2357ebf7443SwdenkAMX860_config	:	unconfig
2367ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
2377ebf7443Swdenk
238fd3103bbSwdenkbms2003_config	:	unconfig
239fd3103bbSwdenk	@echo "#define CONFIG_BMS2003" >include/config.h
240fd3103bbSwdenk	@echo "#define CONFIG_LCD" >>include/config.h
241fd3103bbSwdenk	@echo "#define CONFIG_NEC_NL6448BC33_54" >>include/config.h
242fd3103bbSwdenk	@./mkconfig -a TQM823L ppc mpc8xx tqm8xx
243fd3103bbSwdenk
2447ebf7443Swdenkc2mon_config:		unconfig
2457ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx c2mon
2467ebf7443Swdenk
2477ebf7443SwdenkCCM_config:		unconfig
2487ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx CCM siemens
2497ebf7443Swdenk
2507ebf7443Swdenkcogent_mpc8xx_config:	unconfig
2517ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx cogent
2527ebf7443Swdenk
2533bac3513SwdenkELPT860_config:		unconfig
2543bac3513Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx elpt860 LEOX
2553bac3513Swdenk
2567ebf7443SwdenkESTEEM192E_config:	unconfig
2577ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx esteem192e
2587ebf7443Swdenk
2597ebf7443SwdenkETX094_config	:	unconfig
2607ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx etx094
2617ebf7443Swdenk
2627ebf7443SwdenkFADS823_config	\
2637ebf7443SwdenkFADS850SAR_config \
2642535d602SwdenkMPC86xADS_config \
2657ebf7443SwdenkFADS860T_config:	unconfig
2667ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx fads
2677ebf7443Swdenk
2687ebf7443SwdenkFLAGADM_config:	unconfig
2697ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx flagadm
2707ebf7443Swdenk
2717aa78614Swdenkxtract_GEN860T = $(subst _SC,,$(subst _config,,$1))
2727aa78614Swdenk
2737aa78614SwdenkGEN860T_SC_config	\
2747ebf7443SwdenkGEN860T_config: unconfig
2757aa78614Swdenk	@ >include/config.h
2767aa78614Swdenk	@[ -z "$(findstring _SC,$@)" ] || \
2777aa78614Swdenk		{ echo "#define CONFIG_SC" >>include/config.h ; \
2787aa78614Swdenk		  echo "With reduced H/W feature set (SC)..." ; \
2797aa78614Swdenk		}
2807aa78614Swdenk	@./mkconfig -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t
2817ebf7443Swdenk
2827ebf7443SwdenkGENIETV_config:	unconfig
2837ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx genietv
2847ebf7443Swdenk
2857ebf7443SwdenkGTH_config:	unconfig
2867ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx gth
2877ebf7443Swdenk
2887ebf7443Swdenkhermes_config	:	unconfig
2897ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx hermes
2907ebf7443Swdenk
2917ebf7443SwdenkIAD210_config: unconfig
2927ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
2937ebf7443Swdenk
2947ebf7443Swdenkxtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
2957ebf7443Swdenk
2967ebf7443SwdenkICU862_100MHz_config	\
2977ebf7443SwdenkICU862_config: unconfig
2987ebf7443Swdenk	@ >include/config.h
2997ebf7443Swdenk	@[ -z "$(findstring _100MHz,$@)" ] || \
3007ebf7443Swdenk		{ echo "#define CONFIG_100MHz"	>>include/config.h ; \
3017ebf7443Swdenk		  echo "... with 100MHz system clock" ; \
3027ebf7443Swdenk		}
3037ebf7443Swdenk	@./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
3047ebf7443Swdenk
3057ebf7443SwdenkIP860_config	:	unconfig
3067ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx ip860
3077ebf7443Swdenk
3087ebf7443SwdenkIVML24_256_config \
3097ebf7443SwdenkIVML24_128_config \
3107ebf7443SwdenkIVML24_config:	unconfig
3117ebf7443Swdenk	@ >include/config.h
3127ebf7443Swdenk	@[ -z "$(findstring IVML24_config,$@)" ] || \
3137ebf7443Swdenk		 { echo "#define CONFIG_IVML24_16M"	>>include/config.h ; \
3147ebf7443Swdenk		 }
3157ebf7443Swdenk	@[ -z "$(findstring IVML24_128_config,$@)" ] || \
3167ebf7443Swdenk		 { echo "#define CONFIG_IVML24_32M"	>>include/config.h ; \
3177ebf7443Swdenk		 }
3187ebf7443Swdenk	@[ -z "$(findstring IVML24_256_config,$@)" ] || \
3197ebf7443Swdenk		 { echo "#define CONFIG_IVML24_64M"	>>include/config.h ; \
3207ebf7443Swdenk		 }
3217ebf7443Swdenk	@./mkconfig -a IVML24 ppc mpc8xx ivm
3227ebf7443Swdenk
3237ebf7443SwdenkIVMS8_256_config \
3247ebf7443SwdenkIVMS8_128_config \
3257ebf7443SwdenkIVMS8_config:	unconfig
3267ebf7443Swdenk	@ >include/config.h
3277ebf7443Swdenk	@[ -z "$(findstring IVMS8_config,$@)" ] || \
3287ebf7443Swdenk		 { echo "#define CONFIG_IVMS8_16M"	>>include/config.h ; \
3297ebf7443Swdenk		 }
3307ebf7443Swdenk	@[ -z "$(findstring IVMS8_128_config,$@)" ] || \
3317ebf7443Swdenk		 { echo "#define CONFIG_IVMS8_32M"	>>include/config.h ; \
3327ebf7443Swdenk		 }
3337ebf7443Swdenk	@[ -z "$(findstring IVMS8_256_config,$@)" ] || \
3347ebf7443Swdenk		 { echo "#define CONFIG_IVMS8_64M"	>>include/config.h ; \
3357ebf7443Swdenk		 }
3367ebf7443Swdenk	@./mkconfig -a IVMS8 ppc mpc8xx ivm
3377ebf7443Swdenk
33856f94be3SwdenkKUP4K_config	:	unconfig
33956f94be3Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx kup4k
34056f94be3Swdenk
3417ebf7443SwdenkLANTEC_config	:	unconfig
3427ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx lantec
3437ebf7443Swdenk
3447ebf7443Swdenklwmon_config:		unconfig
3457ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx lwmon
3467ebf7443Swdenk
3477ebf7443SwdenkMBX_config	\
3487ebf7443SwdenkMBX860T_config:	unconfig
3497ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
3507ebf7443Swdenk
3517ebf7443SwdenkMHPC_config:		unconfig
3527ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
3537ebf7443Swdenk
3547ebf7443SwdenkMVS1_config :		unconfig
3557ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx mvs1
3567ebf7443Swdenk
357993cad93Swdenkxtract_NETVIA = $(subst _V2,,$(subst _config,,$1))
358993cad93Swdenk
359993cad93SwdenkNETVIA_V2_config \
3607ebf7443SwdenkNETVIA_config:		unconfig
361993cad93Swdenk	@ >include/config.h
362993cad93Swdenk	@[ -z "$(findstring NETVIA_config,$@)" ] || \
363993cad93Swdenk		 { echo "#define CONFIG_NETVIA_VERSION 1" >>include/config.h ; \
364993cad93Swdenk		  echo "... Version 1" ; \
365993cad93Swdenk		 }
366993cad93Swdenk	@[ -z "$(findstring NETVIA_V2_config,$@)" ] || \
367993cad93Swdenk		 { echo "#define CONFIG_NETVIA_VERSION 2" >>include/config.h ; \
368993cad93Swdenk		  echo "... Version 2" ; \
369993cad93Swdenk		 }
370993cad93Swdenk	@./mkconfig -a $(call xtract_NETVIA,$@) ppc mpc8xx netvia
3717ebf7443Swdenk
3727ebf7443SwdenkNX823_config:		unconfig
3737ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx nx823
3747ebf7443Swdenk
3757ebf7443Swdenkpcu_e_config:		unconfig
3767ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
3777ebf7443Swdenk
3787ebf7443SwdenkR360MPI_config:	unconfig
3797ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx r360mpi
3807ebf7443Swdenk
381682011ffSwdenkRBC823_config:	unconfig
382682011ffSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx rbc823
383682011ffSwdenk
3847ebf7443SwdenkRPXClassic_config:	unconfig
3857ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
3867ebf7443Swdenk
3877ebf7443SwdenkRPXlite_config:		unconfig
3887ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx RPXlite
3897ebf7443Swdenk
39073a8b27cSwdenkrmu_config:	unconfig
39173a8b27cSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx rmu
39273a8b27cSwdenk
3937ebf7443SwdenkRRvision_config:	unconfig
3947ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx RRvision
3957ebf7443Swdenk
3967ebf7443SwdenkRRvision_LCD_config:	unconfig
3977ebf7443Swdenk	@echo "#define CONFIG_LCD" >include/config.h
3987ebf7443Swdenk	@echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
3997ebf7443Swdenk	@./mkconfig -a RRvision ppc mpc8xx RRvision
4007ebf7443Swdenk
4017ebf7443SwdenkSM850_config	:	unconfig
4027ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
4037ebf7443Swdenk
4047ebf7443SwdenkSPD823TS_config:	unconfig
4057ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx spd8xx
4067ebf7443Swdenk
407dc7c9a1aSwdenksvm_sc8xx_config:	unconfig
408dc7c9a1aSwdenk	@ >include/config.h
409dc7c9a1aSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
410dc7c9a1aSwdenk
4117ebf7443SwdenkSXNI855T_config:	unconfig
4127ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx sixnet
4137ebf7443Swdenk
414db2f721fSwdenk# EMK MPC8xx based modules
415db2f721fSwdenkTOP860_config:		unconfig
416db2f721fSwdenk	@./mkconfig $(@:_config=) ppc mpc8xx top860 emk
417db2f721fSwdenk
4187ebf7443Swdenk# Play some tricks for configuration selection
41973a8b27cSwdenk# All boards can come with 50 MHz (default), 66MHz, 80MHz or 100 MHz clock,
4207ebf7443Swdenk# but only 855 and 860 boards may come with FEC
4217ebf7443Swdenk# and 823 boards may have LCD support
42273a8b27cSwdenkxtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _100MHz,,$(subst _LCD,,$(subst _config,,$1)))))
4237ebf7443Swdenk
4247ebf7443SwdenkFPS850L_config		\
425384ae025SwdenkFPS860L_config		\
426f12e568cSwdenkNSCU_config		\
4277ebf7443SwdenkTQM823L_config		\
4287ebf7443SwdenkTQM823L_66MHz_config	\
4297ebf7443SwdenkTQM823L_80MHz_config	\
4307ebf7443SwdenkTQM823L_LCD_config	\
4317ebf7443SwdenkTQM823L_LCD_66MHz_config \
4327ebf7443SwdenkTQM823L_LCD_80MHz_config \
4337ebf7443SwdenkTQM850L_config		\
4347ebf7443SwdenkTQM850L_66MHz_config	\
4357ebf7443SwdenkTQM850L_80MHz_config	\
4367ebf7443SwdenkTQM855L_config		\
4377ebf7443SwdenkTQM855L_66MHz_config	\
4387ebf7443SwdenkTQM855L_80MHz_config	\
4397ebf7443SwdenkTQM860L_config		\
4407ebf7443SwdenkTQM860L_66MHz_config	\
4417ebf7443SwdenkTQM860L_80MHz_config	\
442d126bfbdSwdenkTQM862L_config		\
443d126bfbdSwdenkTQM862L_66MHz_config	\
44473a8b27cSwdenkTQM862L_80MHz_config	\
445ae3af05eSwdenkTQM823M_config		\
446ae3af05eSwdenkTQM823M_66MHz_config	\
447ae3af05eSwdenkTQM823M_80MHz_config	\
448ae3af05eSwdenkTQM850M_config		\
449ae3af05eSwdenkTQM850M_66MHz_config	\
450ae3af05eSwdenkTQM850M_80MHz_config	\
451f12e568cSwdenkTQM855M_config		\
452f12e568cSwdenkTQM855M_66MHz_config	\
453f12e568cSwdenkTQM855M_80MHz_config	\
454f12e568cSwdenkTQM860M_config		\
455f12e568cSwdenkTQM860M_66MHz_config	\
456f12e568cSwdenkTQM860M_80MHz_config	\
457f12e568cSwdenkTQM862M_config		\
458f12e568cSwdenkTQM862M_66MHz_config	\
459f12e568cSwdenkTQM862M_80MHz_config	\
46071f95118SwdenkTQM862M_100MHz_config:	unconfig
4617ebf7443Swdenk	@ >include/config.h
4627ebf7443Swdenk	@[ -z "$(findstring _66MHz,$@)" ] || \
4637ebf7443Swdenk		{ echo "#define CONFIG_66MHz"		>>include/config.h ; \
4647ebf7443Swdenk		  echo "... with 66MHz system clock" ; \
4657ebf7443Swdenk		}
4667ebf7443Swdenk	@[ -z "$(findstring _80MHz,$@)" ] || \
4677ebf7443Swdenk		{ echo "#define CONFIG_80MHz"		>>include/config.h ; \
4687ebf7443Swdenk		  echo "... with 80MHz system clock" ; \
4697ebf7443Swdenk		}
47073a8b27cSwdenk	@[ -z "$(findstring _100MHz,$@)" ] || \
47173a8b27cSwdenk		{ echo "#define CONFIG_100MHz"		>>include/config.h ; \
47273a8b27cSwdenk		  echo "... with 100MHz system clock" ; \
47373a8b27cSwdenk		}
4747ebf7443Swdenk	@[ -z "$(findstring _LCD,$@)" ] || \
4757ebf7443Swdenk		{ echo "#define CONFIG_LCD"		>>include/config.h ; \
476fd3103bbSwdenk		  echo "#define CONFIG_NEC_NL6448BC20"	>>include/config.h ; \
4777ebf7443Swdenk		  echo "... with LCD display" ; \
4787ebf7443Swdenk		}
4797ebf7443Swdenk	@./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
4807ebf7443Swdenk
4817ebf7443SwdenkTTTech_config:	unconfig
4827ebf7443Swdenk	@echo "#define CONFIG_LCD" >include/config.h
4837ebf7443Swdenk	@echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
4847ebf7443Swdenk	@./mkconfig -a TQM823L ppc mpc8xx tqm8xx
4857ebf7443Swdenk
486608c9146Swdenkv37_config:	unconfig
487608c9146Swdenk	@echo "#define CONFIG_LCD" >include/config.h
488608c9146Swdenk	@echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
489608c9146Swdenk	@./mkconfig $(@:_config=) ppc mpc8xx v37
490608c9146Swdenk
49191e940d9Sdzuwtk_config:	unconfig
49291e940d9Sdzu	@echo "#define CONFIG_LCD" >include/config.h
49391e940d9Sdzu	@echo "#define CONFIG_SHARP_LQ065T9DR51U" >>include/config.h
49491e940d9Sdzu	@./mkconfig -a TQM823L ppc mpc8xx tqm8xx
49591e940d9Sdzu
4967ebf7443Swdenk#########################################################################
4977ebf7443Swdenk## PPC4xx Systems
4987ebf7443Swdenk#########################################################################
499fbe4b5cbSwdenkxtract_4xx = $(subst _MODEL_BA,,$(subst _MODEL_ME,,$(subst _MODEL_HI,,$(subst _config,,$1))))
5007ebf7443Swdenk
5017ebf7443SwdenkADCIOP_config:	unconfig
5027ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx adciop esd
5037ebf7443Swdenk
5047ebf7443SwdenkAR405_config:	unconfig
5057ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
5067ebf7443Swdenk
507549826eaSstroeseASH405_config:	unconfig
508549826eaSstroese	@./mkconfig $(@:_config=) ppc ppc4xx ash405 esd
509549826eaSstroese
510549826eaSstroeseBUBINGA405EP_config:unconfig
511549826eaSstroese	@./mkconfig $(@:_config=) ppc ppc4xx bubinga405ep
512549826eaSstroese
5137ebf7443SwdenkCANBT_config:	unconfig
5147ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx canbt esd
5157ebf7443Swdenk
5167ebf7443SwdenkCPCI405_config	\
517549826eaSstroeseCPCI4052_config	\
518549826eaSstroeseCPCI405AB_config:	unconfig
5197ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
5207ebf7443Swdenk	@echo "BOARD_REVISION = $(@:_config=)"	>>include/config.mk
5217ebf7443Swdenk
5227ebf7443SwdenkCPCI440_config:	unconfig
5237ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
5247ebf7443Swdenk
5257ebf7443SwdenkCPCIISER4_config:	unconfig
5267ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
5277ebf7443Swdenk
5287ebf7443SwdenkCRAYL1_config:unconfig
5297ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx L1 cray
5307ebf7443Swdenk
5317ebf7443SwdenkDASA_SIM_config: unconfig
5327ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
5337ebf7443Swdenk
53472cd5aa7SstroeseDP405_config:	unconfig
53572cd5aa7Sstroese	@./mkconfig $(@:_config=) ppc ppc4xx dp405 esd
53672cd5aa7Sstroese
5377ebf7443SwdenkDU405_config:	unconfig
5387ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx du405 esd
5397ebf7443Swdenk
5407ebf7443SwdenkEBONY_config:unconfig
5417ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx ebony
5427ebf7443Swdenk
5437ebf7443SwdenkERIC_config:unconfig
5447ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx eric
5457ebf7443Swdenk
546d1cbe85bSwdenkEXBITGEN_config:unconfig
547d1cbe85bSwdenk	@./mkconfig $(@:_config=) ppc ppc4xx exbitgen
548d1cbe85bSwdenk
54972cd5aa7SstroeseHUB405_config:	unconfig
55072cd5aa7Sstroese	@./mkconfig $(@:_config=) ppc ppc4xx hub405 esd
55172cd5aa7Sstroese
5527ebf7443SwdenkMIP405_config:unconfig
5537ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
5547ebf7443Swdenk
555f3e0de60SwdenkMIP405T_config:unconfig
556f3e0de60Swdenk	@echo "#define CONFIG_MIP405T" >include/config.h
557f3e0de60Swdenk	@echo "Enable subset config for MIP405T"
558f3e0de60Swdenk	@./mkconfig -a MIP405 ppc ppc4xx mip405 mpl
559f3e0de60Swdenk
5607ebf7443SwdenkML2_config:unconfig
5617ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx ml2
5627ebf7443Swdenk
5637ebf7443SwdenkOCRTC_config		\
5647ebf7443SwdenkORSG_config:	unconfig
5657ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
5667ebf7443Swdenk
5677ebf7443SwdenkPCI405_config:	unconfig
5687ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
5697ebf7443Swdenk
5707ebf7443SwdenkPIP405_config:unconfig
5717ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
5727ebf7443Swdenk
57372cd5aa7SstroesePLU405_config:	unconfig
57472cd5aa7Sstroese	@./mkconfig $(@:_config=) ppc ppc4xx plu405 esd
57572cd5aa7Sstroese
576549826eaSstroesePMC405_config:	unconfig
577549826eaSstroese	@./mkconfig $(@:_config=) ppc ppc4xx pmc405 esd
578549826eaSstroese
579fbe4b5cbSwdenkPPChameleonEVB_MODEL_BA_config	\
580fbe4b5cbSwdenkPPChameleonEVB_MODEL_ME_config	\
581fbe4b5cbSwdenkPPChameleonEVB_MODEL_HI_config	\
58212f34241SwdenkPPChameleonEVB_config:	unconfig
583fbe4b5cbSwdenk	@ >include/config.h
584fbe4b5cbSwdenk	@[ -z "$(findstring _MODEL_BA,$@)" ] || \
585fbe4b5cbSwdenk		{ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 0" >>include/config.h ; \
586fbe4b5cbSwdenk		  echo "... BASIC model" ; \
587fbe4b5cbSwdenk		}
588fbe4b5cbSwdenk	@[ -z "$(findstring _MODEL_ME,$@)" ] || \
589fbe4b5cbSwdenk		{ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >>include/config.h ; \
590fbe4b5cbSwdenk		  echo "... MEDIUM model" ; \
591fbe4b5cbSwdenk		}
592fbe4b5cbSwdenk	@[ -z "$(findstring _MODEL_HI,$@)" ] || \
593fbe4b5cbSwdenk		{ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 2" >>include/config.h ; \
594fbe4b5cbSwdenk		  echo "... HIGH-END model" ; \
595fbe4b5cbSwdenk		}
596fbe4b5cbSwdenk	@./mkconfig -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave
59712f34241Swdenk
59872cd5aa7SstroeseVOH405_config:	unconfig
59972cd5aa7Sstroese	@./mkconfig $(@:_config=) ppc ppc4xx voh405 esd
60072cd5aa7Sstroese
6017ebf7443SwdenkW7OLMC_config	\
6027ebf7443SwdenkW7OLMG_config: unconfig
6037ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx w7o
6047ebf7443Swdenk
6057ebf7443SwdenkWALNUT405_config:unconfig
6067ebf7443Swdenk	@./mkconfig $(@:_config=) ppc ppc4xx walnut405
6077ebf7443Swdenk
6087ebf7443Swdenk#########################################################################
6097ebf7443Swdenk## MPC824x Systems
6107ebf7443Swdenk#########################################################################
6113bac3513Swdenkxtract_82xx = $(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1)))))
6123bac3513Swdenk
6130332990bSwdenkA3000_config: unconfig
6140332990bSwdenk	@./mkconfig $(@:_config=) ppc mpc824x a3000
6150332990bSwdenk
6167ebf7443SwdenkBMW_config: unconfig
6177ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x bmw
6187ebf7443Swdenk
6193bac3513SwdenkCPC45_config	\
6203bac3513SwdenkCPC45_ROMBOOT_config:	unconfig
6213bac3513Swdenk	@./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
6223bac3513Swdenk	@cd ./include ;				\
6233bac3513Swdenk	if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
6243bac3513Swdenk		echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
6253bac3513Swdenk		echo "... booting from 8-bit flash" ; \
6263bac3513Swdenk	else \
6273bac3513Swdenk		echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
6283bac3513Swdenk		echo "... booting from 64-bit flash" ; \
6293bac3513Swdenk	fi; \
6303bac3513Swdenk	echo "export CONFIG_BOOT_ROM" >> config.mk;
6313bac3513Swdenk
6327ebf7443SwdenkCU824_config: unconfig
6337ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x cu824
6347ebf7443Swdenk
6357ebf7443SwdenkMOUSSE_config: unconfig
6367ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x mousse
6377ebf7443Swdenk
6387ebf7443SwdenkMUSENKI_config: unconfig
6397ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x musenki
6407ebf7443Swdenk
641*b4676a25SwdenkMVBLUE_config:	unconfig
642*b4676a25Swdenk	@./mkconfig $(@:_config=) ppc mpc824x mvblue
643*b4676a25Swdenk
6447ebf7443SwdenkOXC_config: unconfig
6457ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x oxc
6467ebf7443Swdenk
6477ebf7443SwdenkPN62_config: unconfig
6487ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x pn62
6497ebf7443Swdenk
6507ebf7443SwdenkSandpoint8240_config: unconfig
6517ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x sandpoint
6527ebf7443Swdenk
6537ebf7443SwdenkSandpoint8245_config: unconfig
6547ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x sandpoint
6557ebf7443Swdenk
656d1cbe85bSwdenkSL8245_config: unconfig
657d1cbe85bSwdenk	@./mkconfig $(@:_config=) ppc mpc824x sl8245
658d1cbe85bSwdenk
6597ebf7443Swdenkutx8245_config: unconfig
6607ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc824x utx8245
6617ebf7443Swdenk
6627ebf7443Swdenk#########################################################################
6637ebf7443Swdenk## MPC8260 Systems
6647ebf7443Swdenk#########################################################################
6657ebf7443Swdenk
66654387ac9Swdenkatc_config:	unconfig
66754387ac9Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 atc
66854387ac9Swdenk
6697ebf7443Swdenkcogent_mpc8260_config:	unconfig
6707ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 cogent
6717ebf7443Swdenk
6727ebf7443SwdenkCPU86_config	\
6737ebf7443SwdenkCPU86_ROMBOOT_config: unconfig
6747ebf7443Swdenk	@./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
6757ebf7443Swdenk	@cd ./include ;				\
6767ebf7443Swdenk	if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
6777ebf7443Swdenk		echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
6787ebf7443Swdenk		echo "... booting from 8-bit flash" ; \
6797ebf7443Swdenk	else \
6807ebf7443Swdenk		echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
6817ebf7443Swdenk		echo "... booting from 64-bit flash" ; \
6827ebf7443Swdenk	fi; \
6837ebf7443Swdenk	echo "export CONFIG_BOOT_ROM" >> config.mk;
6847ebf7443Swdenk
6857ebf7443Swdenkep8260_config:	unconfig
6867ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 ep8260
6877ebf7443Swdenk
6887ebf7443Swdenkgw8260_config:	unconfig
6897ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 gw8260
6907ebf7443Swdenk
6917ebf7443Swdenkhymod_config:	unconfig
6927ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 hymod
6937ebf7443Swdenk
6947ebf7443SwdenkIPHASE4539_config:	unconfig
6957ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 iphase4539
6967ebf7443Swdenk
6977ebf7443SwdenkMPC8260ADS_config:	unconfig
6987ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 mpc8260ads
6997ebf7443Swdenk
700db2f721fSwdenkMPC8266ADS_config:	unconfig
701db2f721fSwdenk	@./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
702db2f721fSwdenk
70310f67017SwdenkPM825_config	\
70410f67017SwdenkPM825_ROMBOOT_config: unconfig
70510f67017Swdenk	@echo "#define CONFIG_PCI"	>include/config.h
70610f67017Swdenk	@./mkconfig -a PM826 ppc mpc8260 pm826
70710f67017Swdenk	@cd ./include ;				\
70810f67017Swdenk	if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
70910f67017Swdenk		echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
71010f67017Swdenk		echo "... booting from 8-bit flash" ; \
71110f67017Swdenk	else \
71210f67017Swdenk		echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
71310f67017Swdenk		echo "... booting from 64-bit flash" ; \
71410f67017Swdenk	fi; \
71510f67017Swdenk	echo "export CONFIG_BOOT_ROM" >> config.mk; \
71610f67017Swdenk
7177ebf7443SwdenkPM826_config	\
7187ebf7443SwdenkPM826_ROMBOOT_config: unconfig
7197ebf7443Swdenk	@./mkconfig $(call xtract_82xx,$@) ppc mpc8260 pm826
7207ebf7443Swdenk	@cd ./include ;				\
7217ebf7443Swdenk	if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
7227ebf7443Swdenk		echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
7237ebf7443Swdenk		echo "... booting from 8-bit flash" ; \
7247ebf7443Swdenk	else \
7257ebf7443Swdenk		echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
7267ebf7443Swdenk		echo "... booting from 64-bit flash" ; \
7277ebf7443Swdenk	fi; \
7287ebf7443Swdenk	echo "export CONFIG_BOOT_ROM" >> config.mk; \
7297ebf7443Swdenk
7307ebf7443Swdenkppmc8260_config:	unconfig
7317ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
7327ebf7443Swdenk
7337ebf7443SwdenkRPXsuper_config:	unconfig
7347ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
7357ebf7443Swdenk
7367ebf7443Swdenkrsdproto_config:	unconfig
7377ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 rsdproto
7387ebf7443Swdenk
7397ebf7443Swdenksacsng_config:	unconfig
7407ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 sacsng
7417ebf7443Swdenk
7427ebf7443Swdenksbc8260_config:	unconfig
7437ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 sbc8260
7447ebf7443Swdenk
7457ebf7443SwdenkSCM_config:		unconfig
7467ebf7443Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
7477ebf7443Swdenk
74827b207fdSwdenkTQM8255_AA_config \
74927b207fdSwdenkTQM8260_AA_config \
75027b207fdSwdenkTQM8260_AB_config \
75127b207fdSwdenkTQM8260_AC_config \
75227b207fdSwdenkTQM8260_AD_config \
75327b207fdSwdenkTQM8260_AE_config \
75427b207fdSwdenkTQM8260_AF_config \
75527b207fdSwdenkTQM8260_AG_config \
75627b207fdSwdenkTQM8260_AH_config \
75727b207fdSwdenkTQM8265_AA_config:  unconfig
75827b207fdSwdenk	@case "$@" in \
75927b207fdSwdenk	TQM8255_AA_config) CTYPE=MPC8255; CFREQ=300; CACHE=no;  BMODE=8260;;  \
76027b207fdSwdenk	TQM8260_AA_config) CTYPE=MPC8260; CFREQ=200; CACHE=no;  BMODE=8260;; \
76127b207fdSwdenk	TQM8260_AB_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;;  \
76227b207fdSwdenk	TQM8260_AC_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;;  \
76327b207fdSwdenk	TQM8260_AD_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;  BMODE=60x;;  \
76427b207fdSwdenk	TQM8260_AE_config) CTYPE=MPC8260; CFREQ=266; CACHE=no;  BMODE=8260;; \
76527b207fdSwdenk	TQM8260_AF_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;  BMODE=60x;;  \
76627b207fdSwdenk	TQM8260_AG_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;  BMODE=8260;; \
76727b207fdSwdenk	TQM8260_AH_config) CTYPE=MPC8260; CFREQ=300; CACHE=yes; BMODE=60x;;  \
76827b207fdSwdenk	TQM8265_AA_config) CTYPE=MPC8265; CFREQ=300; CACHE=no;  BMODE=60x;;  \
76927b207fdSwdenk	esac; \
77027b207fdSwdenk	>include/config.h ; \
77127b207fdSwdenk	if [ "$${CTYPE}" != "MPC8260" ] ; then \
77227b207fdSwdenk		echo "#define CONFIG_$${CTYPE}"	>>include/config.h ; \
77327b207fdSwdenk	fi; \
77427b207fdSwdenk	echo "#define CONFIG_$${CFREQ}MHz"	>>include/config.h ; \
77527b207fdSwdenk	echo "... with $${CFREQ}MHz system clock" ; \
77627b207fdSwdenk	if [ "$${CACHE}" == "yes" ] ; then \
7777ebf7443Swdenk		echo "#define CONFIG_L2_CACHE"	>>include/config.h ; \
77827b207fdSwdenk		echo "... with L2 Cache support" ; \
7797ebf7443Swdenk	else \
7807ebf7443Swdenk		echo "#undef CONFIG_L2_CACHE"	>>include/config.h ; \
7817ebf7443Swdenk		echo "... without L2 Cache support" ; \
78227b207fdSwdenk	fi; \
78327b207fdSwdenk	if [ "$${BMODE}" == "60x" ] ; then \
78427b207fdSwdenk		echo "#define CONFIG_BUSMODE_60x" >>include/config.h ; \
78527b207fdSwdenk		echo "... with 60x Bus Mode" ; \
78627b207fdSwdenk	else \
78727b207fdSwdenk		echo "#undef CONFIG_BUSMODE_60x"  >>include/config.h ; \
78827b207fdSwdenk		echo "... without 60x Bus Mode" ; \
7897ebf7443Swdenk	fi
7904532cb69Swdenk	@./mkconfig -a TQM8260 ppc mpc8260 tqm8260
7917ebf7443Swdenk
79254387ac9SwdenkZPC1900_config: unconfig
79354387ac9Swdenk	@./mkconfig $(@:_config=) ppc mpc8260 zpc1900
7947aa78614Swdenk
7957ebf7443Swdenk#########################################################################
79642d1f039Swdenk## MPC85xx Systems
79742d1f039Swdenk#########################################################################
79842d1f039Swdenk
79942d1f039SwdenkMPC8540ADS_config:      unconfig
80042d1f039Swdenk	@./mkconfig $(@:_config=) ppc mpc85xx mpc8540ads
80142d1f039Swdenk
80242d1f039SwdenkMPC8560ADS_config:      unconfig
80342d1f039Swdenk	@./mkconfig $(@:_config=) ppc mpc85xx mpc8560ads
80442d1f039Swdenk
80542d1f039Swdenk#########################################################################
8067ebf7443Swdenk## 74xx/7xx Systems
8077ebf7443Swdenk#########################################################################
8087ebf7443Swdenk
809c7de829cSwdenkAmigaOneG3SE_config:	unconfig
810c7de829cSwdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
811c7de829cSwdenk
81215647dc7SwdenkBAB7xx_config: unconfig
81315647dc7Swdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
81415647dc7Swdenk
81515647dc7Swdenkdebris_config: unconfig
81615647dc7Swdenk	@./mkconfig $(@:_config=) ppc mpc824x debris etin
81715647dc7Swdenk
81815647dc7SwdenkELPPC_config: unconfig
81915647dc7Swdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
82015647dc7Swdenk
8217ebf7443SwdenkEVB64260_config	\
8227ebf7443SwdenkEVB64260_750CX_config:	unconfig
8237ebf7443Swdenk	@./mkconfig EVB64260 ppc 74xx_7xx evb64260
8247ebf7443Swdenk
82515647dc7SwdenkP3G4_config: unconfig
8267ebf7443Swdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
8277ebf7443Swdenk
8287ebf7443SwdenkPCIPPC2_config \
8297ebf7443SwdenkPCIPPC6_config: unconfig
8307ebf7443Swdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
8317ebf7443Swdenk
83215647dc7SwdenkZUMA_config:	unconfig
83312f34241Swdenk	@./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
83412f34241Swdenk
8357ebf7443Swdenk#========================================================================
8367ebf7443Swdenk# ARM
8377ebf7443Swdenk#========================================================================
8387ebf7443Swdenk#########################################################################
8397ebf7443Swdenk## StrongARM Systems
8407ebf7443Swdenk#########################################################################
8417ebf7443Swdenk
842dc7c9a1aSwdenkat91rm9200dk_config	:	unconfig
843dc7c9a1aSwdenk	@./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
844dc7c9a1aSwdenk
8457ebf7443Swdenklart_config	:	unconfig
8467ebf7443Swdenk	@./mkconfig $(@:_config=) arm sa1100 lart
8477ebf7443Swdenk
8487ebf7443Swdenkdnp1110_config	:	unconfig
8497ebf7443Swdenk	@./mkconfig $(@:_config=) arm sa1100 dnp1110
8507ebf7443Swdenk
8517ebf7443Swdenkshannon_config	:	unconfig
8527ebf7443Swdenk	@./mkconfig $(@:_config=) arm sa1100 shannon
8537ebf7443Swdenk
8547ebf7443Swdenk#########################################################################
8552e5983d2Swdenk## ARM92xT Systems
8567ebf7443Swdenk#########################################################################
8577ebf7443Swdenk
858b0639ca3Swdenkxtract_trab = $(subst _bigram,,$(subst _bigflash,,$(subst _old,,$(subst _config,,$1))))
85943d9616cSwdenk
8602e5983d2Swdenkomap1510inn_config :	unconfig
8612e5983d2Swdenk	@./mkconfig $(@:_config=) arm arm925t omap1510inn
8622e5983d2Swdenk
8636f21347dSwdenkomap1610inn_config :	unconfig
8646f21347dSwdenk	@./mkconfig $(@:_config=) arm arm926ejs omap1610inn
8656f21347dSwdenk
8667ebf7443Swdenksmdk2400_config	:	unconfig
8677ebf7443Swdenk	@./mkconfig $(@:_config=) arm arm920t smdk2400
8687ebf7443Swdenk
8697ebf7443Swdenksmdk2410_config	:	unconfig
8707ebf7443Swdenk	@./mkconfig $(@:_config=) arm arm920t smdk2410
8717ebf7443Swdenk
87243d9616cSwdenktrab_config \
873b0639ca3Swdenktrab_bigram_config \
874b0639ca3Swdenktrab_bigflash_config \
875f54ebdfaSwdenktrab_old_config:	unconfig
87643d9616cSwdenk	@ >include/config.h
877b0639ca3Swdenk	@[ -z "$(findstring _bigram,$@)" ] || \
878b0639ca3Swdenk		{ echo "#define CONFIG_FLASH_8MB" >>include/config.h ; \
879b0639ca3Swdenk		  echo "... with 8 MB Flash, 32 MB RAM" ; \
880b0639ca3Swdenk		}
881b0639ca3Swdenk	@[ -z "$(findstring _bigflash,$@)" ] || \
882b0639ca3Swdenk		{ echo "#define CONFIG_RAM_16MB" >>include/config.h ; \
883b0639ca3Swdenk		  echo "... with 16 MB Flash, 16 MB RAM" ; \
884a8c7c708Swdenk		  echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
885b0639ca3Swdenk		}
886f54ebdfaSwdenk	@[ -z "$(findstring _old,$@)" ] || \
887f54ebdfaSwdenk		{ echo "#define CONFIG_OLD_VERSION" >>include/config.h ; \
888f54ebdfaSwdenk		  echo "... with small memory configuration" ; \
889a8c7c708Swdenk		  echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
89043d9616cSwdenk		}
89143d9616cSwdenk	@./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
8927ebf7443Swdenk
8931cb8e980SwdenkVCMA9_config	:	unconfig
8941cb8e980Swdenk	@./mkconfig $(@:_config=) arm arm920t vcma9 mpl
8951cb8e980Swdenk
8967ebf7443Swdenk#########################################################################
8977ebf7443Swdenk## ARM720T Systems
8987ebf7443Swdenk#########################################################################
8997ebf7443Swdenk
9007ebf7443Swdenkimpa7_config	:	unconfig
9017ebf7443Swdenk	@./mkconfig $(@:_config=) arm arm720t impa7
9027ebf7443Swdenk
9037ebf7443Swdenkep7312_config	:	unconfig
9047ebf7443Swdenk	@./mkconfig $(@:_config=) arm arm720t ep7312
9057ebf7443Swdenk
9067ebf7443Swdenk#########################################################################
90743d9616cSwdenk## XScale Systems
9087ebf7443Swdenk#########################################################################
9097ebf7443Swdenk
9107ebf7443Swdenkcradle_config	:	unconfig
9114c3b21a5Swdenk	@./mkconfig $(@:_config=) arm pxa cradle
9127ebf7443Swdenk
9137ebf7443Swdenkcsb226_config	:	unconfig
9144c3b21a5Swdenk	@./mkconfig $(@:_config=) arm pxa csb226
9157ebf7443Swdenk
91643d9616cSwdenkinnokom_config	:	unconfig
9174c3b21a5Swdenk	@./mkconfig $(@:_config=) arm pxa innokom
91843d9616cSwdenk
9192d5b561eSwdenkixdp425_config	:	unconfig
9202d5b561eSwdenk	@./mkconfig $(@:_config=) arm ixp ixdp425
9212d5b561eSwdenk
92243d9616cSwdenklubbock_config	:	unconfig
9234c3b21a5Swdenk	@./mkconfig $(@:_config=) arm pxa lubbock
92443d9616cSwdenk
92552f52c14Swdenklogodl_config	:	unconfig
92652f52c14Swdenk	@./mkconfig $(@:_config=) arm pxa logodl
92752f52c14Swdenk
9283e38691eSwdenkwepep250_config	:	unconfig
9294c3b21a5Swdenk	@./mkconfig $(@:_config=) arm pxa wepep250
9303e38691eSwdenk
9312262cfeeSwdenk#========================================================================
9322262cfeeSwdenk# i386
9332262cfeeSwdenk#========================================================================
9342262cfeeSwdenk#########################################################################
9352262cfeeSwdenk## AMD SC520 CDP
9362262cfeeSwdenk#########################################################################
9372262cfeeSwdenksc520_cdp_config	:	unconfig
9382262cfeeSwdenk	@./mkconfig $(@:_config=) i386 i386 sc520_cdp
9392262cfeeSwdenk
9407a8e9bedSwdenksc520_spunk_config	:	unconfig
9417a8e9bedSwdenk	@./mkconfig $(@:_config=) i386 i386 sc520_spunk
9427a8e9bedSwdenk
9437a8e9bedSwdenksc520_spunk_rel_config	:	unconfig
9447a8e9bedSwdenk	@./mkconfig $(@:_config=) i386 i386 sc520_spunk
9457a8e9bedSwdenk
94643d9616cSwdenk#========================================================================
94743d9616cSwdenk# MIPS
94843d9616cSwdenk#========================================================================
9497ebf7443Swdenk#########################################################################
95043d9616cSwdenk## MIPS32 4Kc
95143d9616cSwdenk#########################################################################
95243d9616cSwdenk
953e0ac62d7Swdenkxtract_incaip = $(subst _100MHz,,$(subst _133MHz,,$(subst _150MHz,,$(subst _config,,$1))))
954e0ac62d7Swdenk
955e0ac62d7Swdenkincaip_100MHz_config	\
956e0ac62d7Swdenkincaip_133MHz_config	\
957e0ac62d7Swdenkincaip_150MHz_config	\
95843d9616cSwdenkincaip_config: unconfig
959e0ac62d7Swdenk	@ >include/config.h
960e0ac62d7Swdenk	@[ -z "$(findstring _100MHz,$@)" ] || \
961e0ac62d7Swdenk		{ echo "#define CPU_CLOCK_RATE 100000000" >>include/config.h ; \
962e0ac62d7Swdenk		  echo "... with 100MHz system clock" ; \
963e0ac62d7Swdenk		}
964e0ac62d7Swdenk	@[ -z "$(findstring _133MHz,$@)" ] || \
965e0ac62d7Swdenk		{ echo "#define CPU_CLOCK_RATE 133000000" >>include/config.h ; \
966e0ac62d7Swdenk		  echo "... with 133MHz system clock" ; \
967e0ac62d7Swdenk		}
968e0ac62d7Swdenk	@[ -z "$(findstring _150MHz,$@)" ] || \
969e0ac62d7Swdenk		{ echo "#define CPU_CLOCK_RATE 150000000" >>include/config.h ; \
970e0ac62d7Swdenk		  echo "... with 150MHz system clock" ; \
971e0ac62d7Swdenk		}
972e0ac62d7Swdenk	@./mkconfig -a $(call xtract_incaip,$@) mips mips incaip
973e0ac62d7Swdenk
974e0ac62d7Swdenk#########################################################################
975e0ac62d7Swdenk## MIPS64 5Kc
976e0ac62d7Swdenk#########################################################################
97743d9616cSwdenk
9783e38691eSwdenkpurple_config :		unconfig
9793e38691eSwdenk	@./mkconfig $(@:_config=) mips mips purple
98043d9616cSwdenk
9814a551709Swdenk#========================================================================
9824a551709Swdenk# Nios
9834a551709Swdenk#========================================================================
9844a551709Swdenk#########################################################################
9854a551709Swdenk## Nios32
9864a551709Swdenk#########################################################################
9874a551709Swdenk
9884a551709SwdenkDK1C20_config:	unconfig
9894a551709Swdenk	@./mkconfig $(@:_config=) nios nios dk1c20
9904a551709Swdenk
9914a551709Swdenk
9923e38691eSwdenk#########################################################################
993a2663ea4Swdenk## MIPS32 AU1X00
9945da627a4Swdenk#########################################################################
995a2663ea4Swdenkdbau1000_config		: 	unconfig
996a2663ea4Swdenk	@ >include/config.h
997a2663ea4Swdenk	@echo "#define CONFIG_DBAU1000 1" >>include/config.h
998a2663ea4Swdenk	@./mkconfig -a dbau1x00 mips mips dbau1x00
999a2663ea4Swdenk
1000a2663ea4Swdenkdbau1100_config		: 	unconfig
1001a2663ea4Swdenk	@ >include/config.h
1002a2663ea4Swdenk	@echo "#define CONFIG_DBAU1100 1" >>include/config.h
1003a2663ea4Swdenk	@./mkconfig -a dbau1x00 mips mips dbau1x00
1004a2663ea4Swdenk
1005a2663ea4Swdenkdbau1500_config		: 	unconfig
1006a2663ea4Swdenk	@ >include/config.h
1007a2663ea4Swdenk	@echo "#define CONFIG_DBAU1500 1" >>include/config.h
1008a2663ea4Swdenk	@./mkconfig -a dbau1x00 mips mips dbau1x00
10095da627a4Swdenk
10105da627a4Swdenk#########################################################################
10113e38691eSwdenk#########################################################################
10127ebf7443Swdenk
10137ebf7443Swdenkclean:
10147ebf7443Swdenk	find . -type f \
10157ebf7443Swdenk		\( -name 'core' -o -name '*.bak' -o -name '*~' \
10167ebf7443Swdenk		-o -name '*.o'  -o -name '*.a'  \) -print \
10177ebf7443Swdenk		| xargs rm -f
101885ec0bccSwdenk	rm -f examples/hello_world examples/timer \
10193e38691eSwdenk	      examples/eepro100_eeprom examples/sched \
10207a8e9bedSwdenk	      examples/mem_to_mem_idma2intr examples/82559_eeprom
10217a8e9bedSwdenk
10227ebf7443Swdenk	rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
10237ebf7443Swdenk	rm -f tools/easylogo/easylogo tools/bmp_logo
10247ebf7443Swdenk	rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
1025228f29acSwdenk	rm -f tools/env/fw_printenv tools/env/fw_setenv
10267f70e853Swdenk	rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
10275cf9da48Swdenk	rm -f board/trab/trab_fkt board/*/config.tmp
10287ebf7443Swdenk
10297ebf7443Swdenkclobber:	clean
10307ebf7443Swdenk	find . -type f \
10317ebf7443Swdenk		\( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
10327ebf7443Swdenk		-print \
10337ebf7443Swdenk		| xargs rm -f
10347ebf7443Swdenk	rm -f $(OBJS) *.bak tags TAGS
10357ebf7443Swdenk	rm -fr *.*~
1036bdccc4feSwdenk	rm -f u-boot u-boot.map $(ALL)
1037228f29acSwdenk	rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
10383e38691eSwdenk	rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
1039b783edaeSwdenk	rm -f include/asm/proc include/asm/arch include/asm
10407ebf7443Swdenk
10417ebf7443Swdenkmrproper \
10427ebf7443Swdenkdistclean:	clobber unconfig
10437ebf7443Swdenk
10447ebf7443Swdenkbackup:
10457ebf7443Swdenk	F=`basename $(TOPDIR)` ; cd .. ; \
10467ebf7443Swdenk	gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
10477ebf7443Swdenk
10487ebf7443Swdenk#########################################################################
1049