xref: /openbmc/u-boot/Makefile (revision 2cfaa1aa)
1#
2# (C) Copyright 2000-2008
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
5# See file CREDITS for list of people who contributed to this
6# project.
7#
8# This program is free software; you can redistribute it and/or
9# modify it under the terms of the GNU General Public License as
10# published by the Free Software Foundatio; either version 2 of
11# the License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21# MA 02111-1307 USA
22#
23
24VERSION = 1
25PATCHLEVEL = 3
26SUBLEVEL = 1
27EXTRAVERSION =
28U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
29VERSION_FILE = $(obj)include/version_autogenerated.h
30
31HOSTARCH := $(shell uname -m | \
32	sed -e s/i.86/i386/ \
33	    -e s/sun4u/sparc64/ \
34	    -e s/arm.*/arm/ \
35	    -e s/sa110/arm/ \
36	    -e s/powerpc/ppc/ \
37	    -e s/ppc64/ppc/ \
38	    -e s/macppc/ppc/)
39
40HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \
41	    sed -e 's/\(cygwin\).*/cygwin/')
42
43export	HOSTARCH HOSTOS
44
45# Deal with colliding definitions from tcsh etc.
46VENDOR=
47
48#########################################################################
49# Allow for silent builds
50ifeq (,$(findstring s,$(MAKEFLAGS)))
51XECHO = echo
52else
53XECHO = :
54endif
55
56#########################################################################
57#
58# U-boot build supports producing a object files to the separate external
59# directory. Two use cases are supported:
60#
61# 1) Add O= to the make command line
62# 'make O=/tmp/build all'
63#
64# 2) Set environement variable BUILD_DIR to point to the desired location
65# 'export BUILD_DIR=/tmp/build'
66# 'make'
67#
68# The second approach can also be used with a MAKEALL script
69# 'export BUILD_DIR=/tmp/build'
70# './MAKEALL'
71#
72# Command line 'O=' setting overrides BUILD_DIR environent variable.
73#
74# When none of the above methods is used the local build is performed and
75# the object files are placed in the source directory.
76#
77
78ifdef O
79ifeq ("$(origin O)", "command line")
80BUILD_DIR := $(O)
81endif
82endif
83
84ifneq ($(BUILD_DIR),)
85saved-output := $(BUILD_DIR)
86
87# Attempt to create a output directory.
88$(shell [ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR})
89
90# Verify if it was successful.
91BUILD_DIR := $(shell cd $(BUILD_DIR) && /bin/pwd)
92$(if $(BUILD_DIR),,$(error output directory "$(saved-output)" does not exist))
93endif # ifneq ($(BUILD_DIR),)
94
95OBJTREE		:= $(if $(BUILD_DIR),$(BUILD_DIR),$(CURDIR))
96SRCTREE		:= $(CURDIR)
97TOPDIR		:= $(SRCTREE)
98LNDIR		:= $(OBJTREE)
99export	TOPDIR SRCTREE OBJTREE
100
101MKCONFIG	:= $(SRCTREE)/mkconfig
102export MKCONFIG
103
104ifneq ($(OBJTREE),$(SRCTREE))
105REMOTE_BUILD	:= 1
106export REMOTE_BUILD
107endif
108
109# $(obj) and (src) are defined in config.mk but here in main Makefile
110# we also need them before config.mk is included which is the case for
111# some targets like unconfig, clean, clobber, distclean, etc.
112ifneq ($(OBJTREE),$(SRCTREE))
113obj := $(OBJTREE)/
114src := $(SRCTREE)/
115else
116obj :=
117src :=
118endif
119export obj src
120
121#########################################################################
122
123ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk))
124
125# load ARCH, BOARD, and CPU configuration
126include $(obj)include/config.mk
127export	ARCH CPU BOARD VENDOR SOC
128
129ifndef CROSS_COMPILE
130ifeq ($(HOSTARCH),$(ARCH))
131CROSS_COMPILE =
132else
133ifeq ($(ARCH),ppc)
134CROSS_COMPILE = ppc_8xx-
135endif
136ifeq ($(ARCH),arm)
137CROSS_COMPILE = arm-linux-
138endif
139ifeq ($(ARCH),i386)
140CROSS_COMPILE = i386-linux-
141endif
142ifeq ($(ARCH),mips)
143CROSS_COMPILE = mips_4KC-
144endif
145ifeq ($(ARCH),nios)
146CROSS_COMPILE = nios-elf-
147endif
148ifeq ($(ARCH),nios2)
149CROSS_COMPILE = nios2-elf-
150endif
151ifeq ($(ARCH),m68k)
152CROSS_COMPILE = m68k-elf-
153endif
154ifeq ($(ARCH),microblaze)
155CROSS_COMPILE = mb-
156endif
157ifeq ($(ARCH),blackfin)
158CROSS_COMPILE = bfin-uclinux-
159endif
160ifeq ($(ARCH),avr32)
161CROSS_COMPILE = avr32-linux-
162endif
163ifeq ($(ARCH),sh)
164CROSS_COMPILE = sh4-linux-
165endif	# sh
166endif	# HOSTARCH,ARCH
167endif	# CROSS_COMPILE
168
169export	CROSS_COMPILE
170
171# load other configuration
172include $(TOPDIR)/config.mk
173
174#########################################################################
175# U-Boot objects....order is important (i.e. start must be first)
176
177OBJS  = cpu/$(CPU)/start.o
178ifeq ($(CPU),i386)
179OBJS += cpu/$(CPU)/start16.o
180OBJS += cpu/$(CPU)/reset.o
181endif
182ifeq ($(CPU),ppc4xx)
183OBJS += cpu/$(CPU)/resetvec.o
184endif
185ifeq ($(CPU),mpc85xx)
186OBJS += cpu/$(CPU)/resetvec.o
187endif
188ifeq ($(CPU),bf533)
189OBJS += cpu/$(CPU)/start1.o	cpu/$(CPU)/interrupt.o	cpu/$(CPU)/cache.o
190OBJS += cpu/$(CPU)/flush.o	cpu/$(CPU)/init_sdram.o
191endif
192ifeq ($(CPU),bf537)
193OBJS += cpu/$(CPU)/start1.o	cpu/$(CPU)/interrupt.o	cpu/$(CPU)/cache.o
194OBJS += cpu/$(CPU)/flush.o	cpu/$(CPU)/init_sdram.o
195endif
196ifeq ($(CPU),bf561)
197OBJS += cpu/$(CPU)/start1.o	cpu/$(CPU)/interrupt.o	cpu/$(CPU)/cache.o
198OBJS += cpu/$(CPU)/flush.o 	cpu/$(CPU)/init_sdram.o
199endif
200
201OBJS := $(addprefix $(obj),$(OBJS))
202
203LIBS  = lib_generic/libgeneric.a
204LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \
205	"board/$(VENDOR)/common/lib$(VENDOR).a"; fi)
206LIBS += board/$(BOARDDIR)/lib$(BOARD).a
207LIBS += cpu/$(CPU)/lib$(CPU).a
208ifdef SOC
209LIBS += cpu/$(CPU)/$(SOC)/lib$(SOC).a
210endif
211ifeq ($(CPU),ixp)
212LIBS += cpu/ixp/npe/libnpe.a
213endif
214LIBS += lib_$(ARCH)/lib$(ARCH).a
215LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \
216	fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a
217LIBS += net/libnet.a
218LIBS += disk/libdisk.a
219LIBS += drivers/bios_emulator/libatibiosemu.a
220LIBS += drivers/block/libblock.a
221LIBS += drivers/hwmon/libhwmon.a
222LIBS += drivers/i2c/libi2c.a
223LIBS += drivers/input/libinput.a
224LIBS += drivers/misc/libmisc.a
225LIBS += drivers/mtd/libmtd.a
226LIBS += drivers/mtd/nand/libnand.a
227LIBS += drivers/mtd/nand_legacy/libnand_legacy.a
228LIBS += drivers/mtd/onenand/libonenand.a
229LIBS += drivers/net/libnet.a
230LIBS += drivers/net/sk98lin/libsk98lin.a
231LIBS += drivers/pci/libpci.a
232LIBS += drivers/pcmcia/libpcmcia.a
233ifeq ($(CPU),mpc83xx)
234LIBS += drivers/qe/qe.a
235endif
236ifeq ($(CPU),mpc85xx)
237LIBS += drivers/qe/qe.a
238endif
239LIBS += drivers/rtc/librtc.a
240LIBS += drivers/serial/libserial.a
241LIBS += drivers/usb/libusb.a
242LIBS += drivers/video/libvideo.a
243LIBS += post/libpost.a post/drivers/libpostdrivers.a
244LIBS += $(shell if [ -d post/lib_$(ARCH) ]; then echo \
245	"post/lib_$(ARCH)/libpost$(ARCH).a"; fi)
246LIBS += $(shell if [ -d post/lib_$(ARCH)/fpu ]; then echo \
247	"post/lib_$(ARCH)/fpu/libpost$(ARCH)fpu.a"; fi)
248LIBS += $(shell if [ -d post/cpu/$(CPU) ]; then echo \
249	"post/cpu/$(CPU)/libpost$(CPU).a"; fi)
250LIBS += $(shell if [ -d post/board/$(BOARDDIR) ]; then echo \
251	"post/board/$(BOARDDIR)/libpost$(BOARD).a"; fi)
252LIBS += common/libcommon.a
253LIBS += libfdt/libfdt.a
254ifeq ($(CONFIG_API),y)
255LIBS += api/libapi.a
256endif
257
258LIBS := $(addprefix $(obj),$(LIBS))
259.PHONY : $(LIBS)
260
261# Add GCC lib
262PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
263
264# The "tools" are needed early, so put this first
265# Don't include stuff already done in $(LIBS)
266SUBDIRS	= tools \
267	  examples
268
269ifeq ($(CONFIG_API),y)
270SUBDIRS += api_examples
271endif
272
273.PHONY : $(SUBDIRS)
274
275ifeq ($(CONFIG_NAND_U_BOOT),y)
276NAND_SPL = nand_spl
277U_BOOT_NAND = $(obj)u-boot-nand.bin
278endif
279
280__OBJS := $(subst $(obj),,$(OBJS))
281__LIBS := $(subst $(obj),,$(LIBS))
282
283#########################################################################
284#########################################################################
285
286ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND)
287
288all:		$(ALL)
289
290$(obj)u-boot.hex:	$(obj)u-boot
291		$(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@
292
293$(obj)u-boot.srec:	$(obj)u-boot
294		$(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
295
296$(obj)u-boot.bin:	$(obj)u-boot
297		$(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
298
299$(obj)u-boot.img:	$(obj)u-boot.bin
300		./tools/mkimage -A $(ARCH) -T firmware -C none \
301		-a $(TEXT_BASE) -e 0 \
302		-n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
303			sed -e 's/"[	 ]*$$/ for $(BOARD) board"/') \
304		-d $< $@
305
306$(obj)u-boot.sha1:	$(obj)u-boot.bin
307		$(obj)tools/ubsha1 $(obj)u-boot.bin
308
309$(obj)u-boot.dis:	$(obj)u-boot
310		$(OBJDUMP) -d $< > $@
311
312$(obj)u-boot:		depend $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)
313		UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed  -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
314		cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
315			--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
316			-Map u-boot.map -o u-boot
317
318$(OBJS):	$(obj)include/autoconf.mk
319		$(MAKE) -C cpu/$(CPU) $(if $(REMOTE_BUILD),$@,$(notdir $@))
320
321$(LIBS):	$(obj)include/autoconf.mk
322		$(MAKE) -C $(dir $(subst $(obj),,$@))
323
324$(SUBDIRS):	$(obj)include/autoconf.mk
325		$(MAKE) -C $@ all
326
327$(NAND_SPL):	$(VERSION_FILE)	$(obj)include/autoconf.mk
328		$(MAKE) -C nand_spl/board/$(BOARDDIR) all
329
330$(U_BOOT_NAND):	$(NAND_SPL) $(obj)u-boot.bin $(obj)include/autoconf.mk
331		cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
332
333$(VERSION_FILE):
334		@( echo -n "#define U_BOOT_VERSION \"U-Boot " ; \
335		echo -n "$(U_BOOT_VERSION)" ; \
336		echo -n $(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion \
337			 $(TOPDIR)) ; \
338		echo "\"" ) > $(VERSION_FILE)
339
340gdbtools:
341		$(MAKE) -C tools/gdb all || exit 1
342
343updater:
344		$(MAKE) -C tools/updater all || exit 1
345
346env:
347		$(MAKE) -C tools/env all MTD_VERSION=${MTD_VERSION} || exit 1
348
349depend dep:	$(VERSION_FILE)
350		for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir _depend ; done
351
352TAG_SUBDIRS += include
353TAG_SUBDIRS += lib_generic board/$(BOARDDIR)
354TAG_SUBDIRS += cpu/$(CPU)
355TAG_SUBDIRS += lib_$(ARCH)
356TAG_SUBDIRS += fs/cramfs
357TAG_SUBDIRS += fs/fat
358TAG_SUBDIRS += fs/fdos
359TAG_SUBDIRS += fs/jffs2
360TAG_SUBDIRS += net
361TAG_SUBDIRS += disk
362TAG_SUBDIRS += common
363TAG_SUBDIRS += drivers/bios_emulator
364TAG_SUBDIRS += drivers/block
365TAG_SUBDIRS += drivers/hwmon
366TAG_SUBDIRS += drivers/i2c
367TAG_SUBDIRS += drivers/input
368TAG_SUBDIRS += drivers/misc
369TAG_SUBDIRS += drivers/mtd
370TAG_SUBDIRS += drivers/mtd/nand
371TAG_SUBDIRS += drivers/mtd/nand_legacy
372TAG_SUBDIRS += drivers/mtd/onenand
373TAG_SUBDIRS += drivers/net
374TAG_SUBDIRS += drivers/net/sk98lin
375TAG_SUBDIRS += drivers/pci
376TAG_SUBDIRS += drivers/pcmcia
377TAG_SUBDIRS += drivers/qe
378TAG_SUBDIRS += drivers/rtc
379TAG_SUBDIRS += drivers/serial
380TAG_SUBDIRS += drivers/usb
381TAG_SUBDIRS += drivers/video
382
383tags ctags:
384		ctags -w -o $(obj)ctags `find $(SUBDIRS) $(TAG_SUBDIRS) \
385						-name '*.[ch]' -print`
386
387etags:
388		etags -a -o $(obj)etags `find $(SUBDIRS) $(TAG_SUBDIRS) \
389						-name '*.[ch]' -print`
390
391$(obj)System.map:	$(obj)u-boot
392		@$(NM) $< | \
393		grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
394		sort > $(obj)System.map
395
396#
397# Auto-generate the autoconf.mk file (which is included by all makefiles)
398#
399# This target actually generates 2 files; autoconf.mk and autoconf.mk.dep.
400# the dep file is only include in this top level makefile to determine when
401# to regenerate the autoconf.mk file.
402$(obj)include/autoconf.mk: $(obj)include/config.h $(VERSION_FILE)
403	@$(XECHO) Generating include/autoconf.mk ; \
404	: Generate the dependancies ; \
405	$(CC) -M $(HOST_CFLAGS) $(CPPFLAGS) -MQ $@ include/common.h > $@.dep ; \
406	: Extract the config macros ; \
407	$(CPP) $(CFLAGS) -dM include/common.h | sed -n -f tools/scripts/define2mk.sed > $@
408
409sinclude $(obj)include/autoconf.mk.dep
410
411#########################################################################
412else	# !config.mk
413all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \
414$(obj)u-boot.img $(obj)u-boot.dis $(obj)u-boot \
415$(SUBDIRS) $(VERSION_FILE) gdbtools updater env depend \
416dep tags ctags etags $(obj)System.map:
417	@echo "System not configured - see README" >&2
418	@ exit 1
419endif	# config.mk
420
421.PHONY : CHANGELOG
422CHANGELOG:
423	git log --no-merges U-Boot-1_1_5.. | \
424	unexpand -a | sed -e 's/\s\s*$$//' > $@
425
426#########################################################################
427
428unconfig:
429	@rm -f $(obj)include/config.h $(obj)include/config.mk \
430		$(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \
431		$(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep
432
433#========================================================================
434# PowerPC
435#========================================================================
436
437#########################################################################
438## MPC5xx Systems
439#########################################################################
440
441canmb_config:	unconfig
442	@$(MKCONFIG) -a canmb ppc mpc5xxx canmb
443
444cmi_mpc5xx_config:	unconfig
445	@$(MKCONFIG) $(@:_config=) ppc mpc5xx cmi
446
447PATI_config:		unconfig
448	@$(MKCONFIG) $(@:_config=) ppc mpc5xx pati mpl
449
450#########################################################################
451## MPC5xxx Systems
452#########################################################################
453
454aev_config: unconfig
455	@$(MKCONFIG) -a aev ppc mpc5xxx tqm5200
456
457BC3450_config:	unconfig
458	@$(MKCONFIG) -a BC3450 ppc mpc5xxx bc3450
459
460cpci5200_config:  unconfig
461	@$(MKCONFIG) -a cpci5200  ppc mpc5xxx cpci5200 esd
462
463hmi1001_config:	unconfig
464	@$(MKCONFIG) hmi1001 ppc mpc5xxx hmi1001
465
466Lite5200_config				\
467Lite5200_LOWBOOT_config			\
468Lite5200_LOWBOOT08_config		\
469icecube_5200_config			\
470icecube_5200_LOWBOOT_config		\
471icecube_5200_LOWBOOT08_config		\
472icecube_5200_DDR_config			\
473icecube_5200_DDR_LOWBOOT_config		\
474icecube_5200_DDR_LOWBOOT08_config	\
475icecube_5100_config:			unconfig
476	@mkdir -p $(obj)include
477	@mkdir -p $(obj)board/icecube
478	@ >$(obj)include/config.h
479	@[ -z "$(findstring LOWBOOT_,$@)" ] || \
480		{ if [ "$(findstring DDR,$@)" ] ; \
481			then echo "TEXT_BASE = 0xFF800000" >$(obj)board/icecube/config.tmp ; \
482			else echo "TEXT_BASE = 0xFF000000" >$(obj)board/icecube/config.tmp ; \
483		  fi ; \
484		  $(XECHO) "... with LOWBOOT configuration" ; \
485		}
486	@[ -z "$(findstring LOWBOOT08,$@)" ] || \
487		{ echo "TEXT_BASE = 0xFF800000" >$(obj)board/icecube/config.tmp ; \
488		  echo "... with 8 MB flash only" ; \
489		  $(XECHO) "... with LOWBOOT configuration" ; \
490		}
491	@[ -z "$(findstring DDR,$@)" ] || \
492		{ echo "#define CONFIG_MPC5200_DDR"	>>$(obj)include/config.h ; \
493		  $(XECHO) "... DDR memory revision" ; \
494		}
495	@[ -z "$(findstring 5200,$@)" ] || \
496		{ echo "#define CONFIG_MPC5200"		>>$(obj)include/config.h ; \
497		  $(XECHO) "... with MPC5200 processor" ; \
498		}
499	@[ -z "$(findstring 5100,$@)" ] || \
500		{ echo "#define CONFIG_MGT5100"		>>$(obj)include/config.h ; \
501		  $(XECHO) "... with MGT5100 processor" ; \
502		}
503	@$(MKCONFIG) -a IceCube ppc mpc5xxx icecube
504
505jupiter_config:	unconfig
506	@$(MKCONFIG) jupiter ppc mpc5xxx jupiter
507
508v38b_config: unconfig
509	@$(MKCONFIG) -a v38b ppc mpc5xxx v38b
510
511inka4x0_config:	unconfig
512	@$(MKCONFIG) inka4x0 ppc mpc5xxx inka4x0
513
514lite5200b_config	\
515lite5200b_PM_config	\
516lite5200b_LOWBOOT_config:	unconfig
517	@mkdir -p $(obj)include
518	@mkdir -p $(obj)board/icecube
519	@ >$(obj)include/config.h
520	@ echo "#define CONFIG_MPC5200_DDR"	>>$(obj)include/config.h
521	@ $(XECHO) "... DDR memory revision"
522	@ echo "#define CONFIG_MPC5200"		>>$(obj)include/config.h
523	@ echo "#define CONFIG_LITE5200B"	>>$(obj)include/config.h
524	@[ -z "$(findstring _PM_,$@)" ] || \
525		{ echo "#define CONFIG_LITE5200B_PM"	>>$(obj)include/config.h ; \
526		  $(XECHO) "... with power management (low-power mode) support" ; \
527		}
528	@[ -z "$(findstring LOWBOOT_,$@)" ] || \
529		{ echo "TEXT_BASE = 0xFF000000" >$(obj)board/icecube/config.tmp ; \
530		  $(XECHO) "... with LOWBOOT configuration" ; \
531		}
532	@ $(XECHO) "... with MPC5200B processor"
533	@$(MKCONFIG) -a IceCube  ppc mpc5xxx icecube
534
535mcc200_config	\
536mcc200_SDRAM_config	\
537mcc200_highboot_config	\
538mcc200_COM12_config	\
539mcc200_COM12_SDRAM_config	\
540mcc200_COM12_highboot_config	\
541mcc200_COM12_highboot_SDRAM_config	\
542mcc200_highboot_SDRAM_config	\
543prs200_config	\
544prs200_DDR_config	\
545prs200_highboot_config	\
546prs200_highboot_DDR_config:	unconfig
547	@mkdir -p $(obj)include
548	@mkdir -p $(obj)board/mcc200
549	@ >$(obj)include/config.h
550	@[ -n "$(findstring highboot,$@)" ] || \
551		{ $(XECHO) "... with lowboot configuration" ; \
552		}
553	@[ -z "$(findstring highboot,$@)" ] || \
554		{ echo "TEXT_BASE = 0xFFF00000" >$(obj)board/mcc200/config.tmp ; \
555		  $(XECHO) "... with highboot configuration" ; \
556		}
557	@[ -n "$(findstring _SDRAM,$@)" ] || \
558		{ if [ -n "$(findstring mcc200,$@)" ]; \
559		  then \
560			$(XECHO) "... with DDR" ; \
561		  else \
562			if [ -n "$(findstring _DDR,$@)" ];\
563			then \
564				$(XECHO) "... with DDR" ; \
565			else \
566				echo "#define CONFIG_MCC200_SDRAM" >>$(obj)include/config.h ;\
567				$(XECHO) "... with SDRAM" ; \
568			fi; \
569		  fi; \
570		}
571	@[ -z "$(findstring _SDRAM,$@)" ] || \
572		{ echo "#define CONFIG_MCC200_SDRAM"	>>$(obj)include/config.h ; \
573		  $(XECHO) "... with SDRAM" ; \
574		}
575	@[ -z "$(findstring COM12,$@)" ] || \
576		{ echo "#define CONFIG_CONSOLE_COM12"	>>$(obj)include/config.h ; \
577		  $(XECHO) "... with console on COM12" ; \
578		}
579	@[ -z "$(findstring prs200,$@)" ] || \
580		{ echo "#define CONFIG_PRS200"  >>$(obj)include/config.h ;\
581		}
582	@$(MKCONFIG) -n $@ -a mcc200 ppc mpc5xxx mcc200
583
584mecp5200_config:  unconfig
585	@$(MKCONFIG) mecp5200  ppc mpc5xxx mecp5200 esd
586
587munices_config:	unconfig
588	@$(MKCONFIG) munices ppc mpc5xxx munices
589
590o2dnt_config:
591	@$(MKCONFIG) o2dnt ppc mpc5xxx o2dnt
592
593pf5200_config:  unconfig
594	@$(MKCONFIG) pf5200  ppc mpc5xxx pf5200 esd
595
596PM520_config \
597PM520_DDR_config \
598PM520_ROMBOOT_config \
599PM520_ROMBOOT_DDR_config:	unconfig
600	@mkdir -p $(obj)include
601	@ >$(obj)include/config.h
602	@[ -z "$(findstring DDR,$@)" ] || \
603		{ echo "#define CONFIG_MPC5200_DDR"	>>$(obj)include/config.h ; \
604		  $(XECHO) "... DDR memory revision" ; \
605		}
606	@[ -z "$(findstring ROMBOOT,$@)" ] || \
607		{ echo "#define CONFIG_BOOT_ROM" >>$(obj)include/config.h ; \
608		  $(XECHO) "... booting from 8-bit flash" ; \
609		}
610	@$(MKCONFIG) -a PM520 ppc mpc5xxx pm520
611
612smmaco4_config: unconfig
613	@$(MKCONFIG) -a smmaco4 ppc mpc5xxx tqm5200
614
615cm5200_config:	unconfig
616	@./mkconfig -a cm5200 ppc mpc5xxx cm5200
617
618spieval_config:	unconfig
619	@$(MKCONFIG) -a spieval ppc mpc5xxx tqm5200
620
621TB5200_B_config \
622TB5200_config:	unconfig
623	@mkdir -p $(obj)include
624	@[ -z "$(findstring _B,$@)" ] || \
625		{ echo "#define CONFIG_TQM5200_B"	>>$(obj)include/config.h ; \
626		  $(XECHO) "... with MPC5200B processor" ; \
627		}
628	@$(MKCONFIG) -n $@ -a TB5200 ppc mpc5xxx tqm5200
629
630MINI5200_config	\
631EVAL5200_config	\
632TOP5200_config:	unconfig
633	@mkdir -p $(obj)include
634	@ echo "#define CONFIG_$(@:_config=) 1"	>$(obj)include/config.h
635	@$(MKCONFIG) -n $@ -a TOP5200 ppc mpc5xxx top5200 emk
636
637Total5100_config		\
638Total5200_config		\
639Total5200_lowboot_config	\
640Total5200_Rev2_config		\
641Total5200_Rev2_lowboot_config:	unconfig
642	@mkdir -p $(obj)include
643	@mkdir -p $(obj)board/total5200
644	@ >$(obj)include/config.h
645	@[ -z "$(findstring 5100,$@)" ] || \
646		{ echo "#define CONFIG_MGT5100"		>>$(obj)include/config.h ; \
647		  $(XECHO) "... with MGT5100 processor" ; \
648		}
649	@[ -z "$(findstring 5200,$@)" ] || \
650		{ echo "#define CONFIG_MPC5200"		>>$(obj)include/config.h ; \
651		  $(XECHO) "... with MPC5200 processor" ; \
652		}
653	@[ -n "$(findstring Rev,$@)" ] || \
654		{ echo "#define CONFIG_TOTAL5200_REV 1"	>>$(obj)include/config.h ; \
655		  $(XECHO) "... revision 1 board" ; \
656		}
657	@[ -z "$(findstring Rev2_,$@)" ] || \
658		{ echo "#define CONFIG_TOTAL5200_REV 2"	>>$(obj)include/config.h ; \
659		  $(XECHO) "... revision 2 board" ; \
660		}
661	@[ -z "$(findstring lowboot_,$@)" ] || \
662		{ echo "TEXT_BASE = 0xFE000000" >$(obj)board/total5200/config.tmp ; \
663		  $(XECHO) "... with lowboot configuration" ; \
664		}
665	@$(MKCONFIG) -a Total5200 ppc mpc5xxx total5200
666
667cam5200_config \
668cam5200_niosflash_config \
669fo300_config \
670MiniFAP_config \
671TQM5200S_config \
672TQM5200S_HIGHBOOT_config \
673TQM5200_B_config \
674TQM5200_B_HIGHBOOT_config \
675TQM5200_config	\
676TQM5200_STK100_config:	unconfig
677	@mkdir -p $(obj)include
678	@mkdir -p $(obj)board/tqm5200
679	@ >$(obj)include/config.h
680	@[ -z "$(findstring cam5200,$@)" ] || \
681		{ echo "#define CONFIG_CAM5200"	>>$(obj)include/config.h ; \
682		  echo "#define CONFIG_TQM5200S"	>>$(obj)include/config.h ; \
683		  echo "#define CONFIG_TQM5200_B"	>>$(obj)include/config.h ; \
684		  $(XECHO) "... TQM5200S on Cam5200" ; \
685		}
686	@[ -z "$(findstring niosflash,$@)" ] || \
687		{ echo "#define CONFIG_CAM5200_NIOSFLASH"	>>$(obj)include/config.h ; \
688		  $(XECHO) "... with NIOS flash driver" ; \
689		}
690	@[ -z "$(findstring fo300,$@)" ] || \
691		{ echo "#define CONFIG_FO300"	>>$(obj)include/config.h ; \
692		  $(XECHO) "... TQM5200 on FO300" ; \
693		}
694	@[ -z "$(findstring MiniFAP,$@)" ] || \
695		{ echo "#define CONFIG_MINIFAP"	>>$(obj)include/config.h ; \
696		  $(XECHO) "... TQM5200_AC on MiniFAP" ; \
697		}
698	@[ -z "$(findstring STK100,$@)" ] || \
699		{ echo "#define CONFIG_STK52XX_REV100"	>>$(obj)include/config.h ; \
700		  $(XECHO) "... on a STK52XX.100 base board" ; \
701		}
702	@[ -z "$(findstring TQM5200_B,$@)" ] || \
703		{ echo "#define CONFIG_TQM5200_B"	>>$(obj)include/config.h ; \
704		}
705	@[ -z "$(findstring TQM5200S,$@)" ] || \
706		{ echo "#define CONFIG_TQM5200S"	>>$(obj)include/config.h ; \
707		  echo "#define CONFIG_TQM5200_B"	>>$(obj)include/config.h ; \
708		}
709	@[ -z "$(findstring HIGHBOOT,$@)" ] || \
710		{ echo "TEXT_BASE = 0xFFF00000" >$(obj)board/tqm5200/config.tmp ; \
711		}
712	@$(MKCONFIG) -n $@ -a TQM5200 ppc mpc5xxx tqm5200
713uc101_config:		unconfig
714	@$(MKCONFIG) uc101 ppc mpc5xxx uc101
715motionpro_config:	unconfig
716	@$(MKCONFIG) motionpro ppc mpc5xxx motionpro
717
718
719#########################################################################
720## MPC512x Systems
721#########################################################################
722ads5121_config: unconfig
723	@$(MKCONFIG) ads5121 ppc mpc512x ads5121
724
725
726#########################################################################
727## MPC8xx Systems
728#########################################################################
729
730Adder_config    \
731Adder87x_config \
732AdderII_config  \
733	:		unconfig
734	@mkdir -p $(obj)include
735	$(if $(findstring AdderII,$@), \
736	@echo "#define CONFIG_MPC852T" > $(obj)include/config.h)
737	@$(MKCONFIG) -a Adder ppc mpc8xx adder
738
739AdderUSB_config:	unconfig
740	@./mkconfig -a AdderUSB ppc mpc8xx adder
741
742ADS860_config     \
743FADS823_config    \
744FADS850SAR_config \
745MPC86xADS_config  \
746MPC885ADS_config  \
747FADS860T_config:	unconfig
748	@$(MKCONFIG) $(@:_config=) ppc mpc8xx fads
749
750AMX860_config	:	unconfig
751	@$(MKCONFIG) $(@:_config=) ppc mpc8xx amx860 westel
752
753c2mon_config:		unconfig
754	@$(MKCONFIG) $(@:_config=) ppc mpc8xx c2mon
755
756CCM_config:		unconfig
757	@$(MKCONFIG) $(@:_config=) ppc mpc8xx CCM siemens
758
759cogent_mpc8xx_config:	unconfig
760	@$(MKCONFIG) $(@:_config=) ppc mpc8xx cogent
761
762ELPT860_config:		unconfig
763	@$(MKCONFIG) $(@:_config=) ppc mpc8xx elpt860 LEOX
764
765EP88x_config:		unconfig
766	@$(MKCONFIG) $(@:_config=) ppc mpc8xx ep88x
767
768ESTEEM192E_config:	unconfig
769	@$(MKCONFIG) $(@:_config=) ppc mpc8xx esteem192e
770
771ETX094_config	:	unconfig
772	@$(MKCONFIG) $(@:_config=) ppc mpc8xx etx094
773
774FLAGADM_config:	unconfig
775	@$(MKCONFIG) $(@:_config=) ppc mpc8xx flagadm
776
777xtract_GEN860T = $(subst _SC,,$(subst _config,,$1))
778
779GEN860T_SC_config	\
780GEN860T_config: unconfig
781	@mkdir -p $(obj)include
782	@ >$(obj)include/config.h
783	@[ -z "$(findstring _SC,$@)" ] || \
784		{ echo "#define CONFIG_SC" >>$(obj)include/config.h ; \
785		  $(XECHO) "With reduced H/W feature set (SC)..." ; \
786		}
787	@$(MKCONFIG) -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t
788
789GENIETV_config:	unconfig
790	@$(MKCONFIG) $(@:_config=) ppc mpc8xx genietv
791
792GTH_config:	unconfig
793	@$(MKCONFIG) $(@:_config=) ppc mpc8xx gth
794
795hermes_config	:	unconfig
796	@$(MKCONFIG) $(@:_config=) ppc mpc8xx hermes
797
798HMI10_config	:	unconfig
799	@$(MKCONFIG) $(@:_config=) ppc mpc8xx tqm8xx
800
801IAD210_config: unconfig
802	@$(MKCONFIG) $(@:_config=) ppc mpc8xx IAD210 siemens
803
804xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
805
806ICU862_100MHz_config	\
807ICU862_config: unconfig
808	@mkdir -p $(obj)include
809	@ >$(obj)include/config.h
810	@[ -z "$(findstring _100MHz,$@)" ] || \
811		{ echo "#define CONFIG_100MHz"	>>$(obj)include/config.h ; \
812		  $(XECHO) "... with 100MHz system clock" ; \
813		}
814	@$(MKCONFIG) -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
815
816IP860_config	:	unconfig
817	@$(MKCONFIG) $(@:_config=) ppc mpc8xx ip860
818
819IVML24_256_config \
820IVML24_128_config \
821IVML24_config:	unconfig
822	@mkdir -p $(obj)include
823	@ >$(obj)include/config.h
824	@[ -z "$(findstring IVML24_config,$@)" ] || \
825		 { echo "#define CONFIG_IVML24_16M"	>>$(obj)include/config.h ; \
826		 }
827	@[ -z "$(findstring IVML24_128_config,$@)" ] || \
828		 { echo "#define CONFIG_IVML24_32M"	>>$(obj)include/config.h ; \
829		 }
830	@[ -z "$(findstring IVML24_256_config,$@)" ] || \
831		 { echo "#define CONFIG_IVML24_64M"	>>$(obj)include/config.h ; \
832		 }
833	@$(MKCONFIG) -a IVML24 ppc mpc8xx ivm
834
835IVMS8_256_config \
836IVMS8_128_config \
837IVMS8_config:	unconfig
838	@mkdir -p $(obj)include
839	@ >$(obj)include/config.h
840	@[ -z "$(findstring IVMS8_config,$@)" ] || \
841		 { echo "#define CONFIG_IVMS8_16M"	>>$(obj)include/config.h ; \
842		 }
843	@[ -z "$(findstring IVMS8_128_config,$@)" ] || \
844		 { echo "#define CONFIG_IVMS8_32M"	>>$(obj)include/config.h ; \
845		 }
846	@[ -z "$(findstring IVMS8_256_config,$@)" ] || \
847		 { echo "#define CONFIG_IVMS8_64M"	>>$(obj)include/config.h ; \
848		 }
849	@$(MKCONFIG) -a IVMS8 ppc mpc8xx ivm
850
851KUP4K_config	:	unconfig
852	@$(MKCONFIG) $(@:_config=) ppc mpc8xx kup4k kup
853
854KUP4X_config    :       unconfig
855	@$(MKCONFIG) $(@:_config=) ppc mpc8xx kup4x kup
856
857LANTEC_config	:	unconfig
858	@$(MKCONFIG) $(@:_config=) ppc mpc8xx lantec
859
860lwmon_config:		unconfig
861	@$(MKCONFIG) $(@:_config=) ppc mpc8xx lwmon
862
863MBX_config	\
864MBX860T_config:	unconfig
865	@$(MKCONFIG) $(@:_config=) ppc mpc8xx mbx8xx
866
867mgsuvd_config:		unconfig
868	@$(MKCONFIG) $(@:_config=) ppc mpc8xx mgsuvd
869
870MHPC_config:		unconfig
871	@$(MKCONFIG) $(@:_config=) ppc mpc8xx mhpc eltec
872
873MVS1_config :		unconfig
874	@$(MKCONFIG) $(@:_config=) ppc mpc8xx mvs1
875
876xtract_NETVIA = $(subst _V2,,$(subst _config,,$1))
877
878NETVIA_V2_config \
879NETVIA_config:		unconfig
880	@mkdir -p $(obj)include
881	@ >$(obj)include/config.h
882	@[ -z "$(findstring NETVIA_config,$@)" ] || \
883		 { echo "#define CONFIG_NETVIA_VERSION 1" >>$(obj)include/config.h ; \
884		  $(XECHO) "... Version 1" ; \
885		 }
886	@[ -z "$(findstring NETVIA_V2_config,$@)" ] || \
887		 { echo "#define CONFIG_NETVIA_VERSION 2" >>$(obj)include/config.h ; \
888		  $(XECHO) "... Version 2" ; \
889		 }
890	@$(MKCONFIG) -a $(call xtract_NETVIA,$@) ppc mpc8xx netvia
891
892xtract_NETPHONE = $(subst _V2,,$(subst _config,,$1))
893
894NETPHONE_V2_config \
895NETPHONE_config:	unconfig
896	@mkdir -p $(obj)include
897	@ >$(obj)include/config.h
898	@[ -z "$(findstring NETPHONE_config,$@)" ] || \
899		 { echo "#define CONFIG_NETPHONE_VERSION 1" >>$(obj)include/config.h ; \
900		 }
901	@[ -z "$(findstring NETPHONE_V2_config,$@)" ] || \
902		 { echo "#define CONFIG_NETPHONE_VERSION 2" >>$(obj)include/config.h ; \
903		 }
904	@$(MKCONFIG) -a $(call xtract_NETPHONE,$@) ppc mpc8xx netphone
905
906xtract_NETTA = $(subst _SWAPHOOK,,$(subst _6412,,$(subst _ISDN,,$(subst _config,,$1))))
907
908NETTA_ISDN_6412_SWAPHOOK_config \
909NETTA_ISDN_SWAPHOOK_config \
910NETTA_6412_SWAPHOOK_config \
911NETTA_SWAPHOOK_config \
912NETTA_ISDN_6412_config \
913NETTA_ISDN_config \
914NETTA_6412_config \
915NETTA_config:		unconfig
916	@mkdir -p $(obj)include
917	@ >$(obj)include/config.h
918	@[ -z "$(findstring ISDN_,$@)" ] || \
919		 { echo "#define CONFIG_NETTA_ISDN 1" >>$(obj)include/config.h ; \
920		 }
921	@[ -n "$(findstring ISDN_,$@)" ] || \
922		 { echo "#undef CONFIG_NETTA_ISDN" >>$(obj)include/config.h ; \
923		 }
924	@[ -z "$(findstring 6412_,$@)" ] || \
925		 { echo "#define CONFIG_NETTA_6412 1" >>$(obj)include/config.h ; \
926		 }
927	@[ -n "$(findstring 6412_,$@)" ] || \
928		 { echo "#undef CONFIG_NETTA_6412" >>$(obj)include/config.h ; \
929		 }
930	@[ -z "$(findstring SWAPHOOK_,$@)" ] || \
931		 { echo "#define CONFIG_NETTA_SWAPHOOK 1" >>$(obj)include/config.h ; \
932		 }
933	@[ -n "$(findstring SWAPHOOK_,$@)" ] || \
934		 { echo "#undef CONFIG_NETTA_SWAPHOOK" >>$(obj)include/config.h ; \
935		 }
936	@$(MKCONFIG) -a $(call xtract_NETTA,$@) ppc mpc8xx netta
937
938xtract_NETTA2 = $(subst _V2,,$(subst _config,,$1))
939
940NETTA2_V2_config \
941NETTA2_config:		unconfig
942	@mkdir -p $(obj)include
943	@ >$(obj)include/config.h
944	@[ -z "$(findstring NETTA2_config,$@)" ] || \
945		 { echo "#define CONFIG_NETTA2_VERSION 1" >>$(obj)include/config.h ; \
946		 }
947	@[ -z "$(findstring NETTA2_V2_config,$@)" ] || \
948		 { echo "#define CONFIG_NETTA2_VERSION 2" >>$(obj)include/config.h ; \
949		 }
950	@$(MKCONFIG) -a $(call xtract_NETTA2,$@) ppc mpc8xx netta2
951
952NC650_Rev1_config \
953NC650_Rev2_config \
954CP850_config:	unconfig
955	@mkdir -p $(obj)include
956	@ >$(obj)include/config.h
957	@[ -z "$(findstring CP850,$@)" ] || \
958		 { echo "#define CONFIG_CP850 1" >>$(obj)include/config.h ; \
959		   echo "#define CONFIG_IDS852_REV2 1" >>$(obj)include/config.h ; \
960		 }
961	@[ -z "$(findstring Rev1,$@)" ] || \
962		 { echo "#define CONFIG_IDS852_REV1 1" >>$(obj)include/config.h ; \
963		 }
964	@[ -z "$(findstring Rev2,$@)" ] || \
965		 { echo "#define CONFIG_IDS852_REV2 1" >>$(obj)include/config.h ; \
966		 }
967	@$(MKCONFIG) -a NC650 ppc mpc8xx nc650
968
969NX823_config:		unconfig
970	@$(MKCONFIG) $(@:_config=) ppc mpc8xx nx823
971
972pcu_e_config:		unconfig
973	@$(MKCONFIG) $(@:_config=) ppc mpc8xx pcu_e siemens
974
975QS850_config:	unconfig
976	@$(MKCONFIG) $(@:_config=) ppc mpc8xx qs850 snmc
977
978QS823_config:	unconfig
979	@$(MKCONFIG) $(@:_config=) ppc mpc8xx qs850 snmc
980
981QS860T_config:	unconfig
982	@$(MKCONFIG) $(@:_config=) ppc mpc8xx qs860t snmc
983
984quantum_config:	unconfig
985	@$(MKCONFIG) $(@:_config=) ppc mpc8xx quantum
986
987R360MPI_config:	unconfig
988	@$(MKCONFIG) $(@:_config=) ppc mpc8xx r360mpi
989
990RBC823_config:	unconfig
991	@$(MKCONFIG) $(@:_config=) ppc mpc8xx rbc823
992
993RPXClassic_config:	unconfig
994	@$(MKCONFIG) $(@:_config=) ppc mpc8xx RPXClassic
995
996RPXlite_config:		unconfig
997	@$(MKCONFIG) $(@:_config=) ppc mpc8xx RPXlite
998
999RPXlite_DW_64_config		\
1000RPXlite_DW_LCD_config		\
1001RPXlite_DW_64_LCD_config	\
1002RPXlite_DW_NVRAM_config		\
1003RPXlite_DW_NVRAM_64_config      \
1004RPXlite_DW_NVRAM_LCD_config	\
1005RPXlite_DW_NVRAM_64_LCD_config  \
1006RPXlite_DW_config:	unconfig
1007	@mkdir -p $(obj)include
1008	@ >$(obj)include/config.h
1009	@[ -z "$(findstring _64,$@)" ] || \
1010		{ echo "#define RPXlite_64MHz"		>>$(obj)include/config.h ; \
1011		  $(XECHO) "... with 64MHz system clock ..."; \
1012		}
1013	@[ -z "$(findstring _LCD,$@)" ] || \
1014		{ echo "#define CONFIG_LCD"		>>$(obj)include/config.h ; \
1015		  echo "#define CONFIG_NEC_NL6448BC20"	>>$(obj)include/config.h ; \
1016		  $(XECHO) "... with LCD display ..."; \
1017		}
1018	@[ -z "$(findstring _NVRAM,$@)" ] || \
1019		{ echo "#define  CFG_ENV_IS_IN_NVRAM"	>>$(obj)include/config.h ; \
1020		  $(XECHO) "... with ENV in NVRAM ..."; \
1021		}
1022	@$(MKCONFIG) -a RPXlite_DW ppc mpc8xx RPXlite_dw
1023
1024rmu_config:	unconfig
1025	@$(MKCONFIG) $(@:_config=) ppc mpc8xx rmu
1026
1027RRvision_config:	unconfig
1028	@$(MKCONFIG) $(@:_config=) ppc mpc8xx RRvision
1029
1030RRvision_LCD_config:	unconfig
1031	@mkdir -p $(obj)include
1032	@echo "#define CONFIG_LCD" >$(obj)include/config.h
1033	@echo "#define CONFIG_SHARP_LQ104V7DS01" >>$(obj)include/config.h
1034	@$(MKCONFIG) -a RRvision ppc mpc8xx RRvision
1035
1036SM850_config	:	unconfig
1037	@$(MKCONFIG) $(@:_config=) ppc mpc8xx tqm8xx
1038
1039spc1920_config:
1040	@$(MKCONFIG) $(@:_config=) ppc mpc8xx spc1920
1041
1042SPD823TS_config:	unconfig
1043	@$(MKCONFIG) $(@:_config=) ppc mpc8xx spd8xx
1044
1045stxxtc_config:	unconfig
1046	@$(MKCONFIG) $(@:_config=) ppc mpc8xx stxxtc
1047
1048svm_sc8xx_config:	unconfig
1049	@$(MKCONFIG) $(@:_config=) ppc mpc8xx svm_sc8xx
1050
1051SXNI855T_config:	unconfig
1052	@$(MKCONFIG) $(@:_config=) ppc mpc8xx sixnet
1053
1054# EMK MPC8xx based modules
1055TOP860_config:		unconfig
1056	@$(MKCONFIG) $(@:_config=) ppc mpc8xx top860 emk
1057
1058# Play some tricks for configuration selection
1059# Only 855 and 860 boards may come with FEC
1060# and only 823 boards may have LCD support
1061xtract_8xx = $(subst _LCD,,$(subst _config,,$1))
1062
1063FPS850L_config		\
1064FPS860L_config		\
1065NSCU_config		\
1066TQM823L_config		\
1067TQM823L_LCD_config	\
1068TQM850L_config		\
1069TQM855L_config		\
1070TQM860L_config		\
1071TQM862L_config		\
1072TQM823M_config		\
1073TQM850M_config		\
1074TQM855M_config		\
1075TQM860M_config		\
1076TQM862M_config		\
1077TQM866M_config		\
1078TQM885D_config		\
1079TK885D_config		\
1080virtlab2_config:	unconfig
1081	@mkdir -p $(obj)include
1082	@ >$(obj)include/config.h
1083	@[ -z "$(findstring _LCD,$@)" ] || \
1084		{ echo "#define CONFIG_LCD"		>>$(obj)include/config.h ; \
1085		  echo "#define CONFIG_NEC_NL6448BC20"	>>$(obj)include/config.h ; \
1086		  $(XECHO) "... with LCD display" ; \
1087		}
1088	@$(MKCONFIG) -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
1089
1090TTTech_config:	unconfig
1091	@mkdir -p $(obj)include
1092	@echo "#define CONFIG_LCD" >$(obj)include/config.h
1093	@echo "#define CONFIG_SHARP_LQ104V7DS01" >>$(obj)include/config.h
1094	@$(MKCONFIG) -a TQM823L ppc mpc8xx tqm8xx
1095
1096uc100_config	:	unconfig
1097	@$(MKCONFIG) $(@:_config=) ppc mpc8xx uc100
1098
1099v37_config:	unconfig
1100	@mkdir -p $(obj)include
1101	@echo "#define CONFIG_LCD" >$(obj)include/config.h
1102	@echo "#define CONFIG_SHARP_LQ084V1DG21" >>$(obj)include/config.h
1103	@$(MKCONFIG) $(@:_config=) ppc mpc8xx v37
1104
1105wtk_config:	unconfig
1106	@mkdir -p $(obj)include
1107	@echo "#define CONFIG_LCD" >$(obj)include/config.h
1108	@echo "#define CONFIG_SHARP_LQ065T9DR51U" >>$(obj)include/config.h
1109	@$(MKCONFIG) -a TQM823L ppc mpc8xx tqm8xx
1110
1111#########################################################################
1112## PPC4xx Systems
1113#########################################################################
1114xtract_4xx = $(subst _25,,$(subst _33,,$(subst _BA,,$(subst _ME,,$(subst _HI,,$(subst _config,,$1))))))
1115
1116acadia_config:	unconfig
1117	@$(MKCONFIG) $(@:_config=) ppc ppc4xx acadia amcc
1118
1119acadia_nand_config:	unconfig
1120	@mkdir -p $(obj)include $(obj)board/amcc/acadia
1121	@mkdir -p $(obj)nand_spl/board/amcc/acadia
1122	@echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h
1123	@$(MKCONFIG) -n $@ -a acadia ppc ppc4xx acadia amcc
1124	@echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/acadia/config.tmp
1125	@echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
1126
1127ADCIOP_config:	unconfig
1128	@$(MKCONFIG) $(@:_config=) ppc ppc4xx adciop esd
1129
1130alpr_config:	unconfig
1131	@$(MKCONFIG) $(@:_config=) ppc ppc4xx alpr prodrive
1132
1133AP1000_config:unconfig
1134	@$(MKCONFIG) $(@:_config=) ppc ppc4xx ap1000 amirix
1135
1136APC405_config:	unconfig
1137	@$(MKCONFIG) $(@:_config=) ppc ppc4xx apc405 esd
1138
1139AR405_config:	unconfig
1140	@$(MKCONFIG) $(@:_config=) ppc ppc4xx ar405 esd
1141
1142ASH405_config:	unconfig
1143	@$(MKCONFIG) $(@:_config=) ppc ppc4xx ash405 esd
1144
1145bamboo_config:	unconfig
1146	@$(MKCONFIG) $(@:_config=) ppc ppc4xx bamboo amcc
1147
1148bamboo_nand_config:	unconfig
1149	@mkdir -p $(obj)include $(obj)board/amcc/bamboo
1150	@mkdir -p $(obj)nand_spl/board/amcc/bamboo
1151	@echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h
1152	@$(MKCONFIG) -n $@ -a bamboo ppc ppc4xx bamboo amcc
1153	@echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/bamboo/config.tmp
1154	@echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
1155
1156bubinga_config:	unconfig
1157	@$(MKCONFIG) $(@:_config=) ppc ppc4xx bubinga amcc
1158
1159CANBT_config:	unconfig
1160	@$(MKCONFIG) $(@:_config=) ppc ppc4xx canbt esd
1161
1162CATcenter_config	\
1163CATcenter_25_config	\
1164CATcenter_33_config:	unconfig
1165	@mkdir -p $(obj)include
1166	@ echo "/* CATcenter uses PPChameleon Model ME */"  > $(obj)include/config.h
1167	@ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >> $(obj)include/config.h
1168	@[ -z "$(findstring _25,$@)" ] || \
1169		{ echo "#define CONFIG_PPCHAMELEON_CLK_25" >> $(obj)include/config.h ; \
1170		  $(XECHO) "SysClk = 25MHz" ; \
1171		}
1172	@[ -z "$(findstring _33,$@)" ] || \
1173		{ echo "#define CONFIG_PPCHAMELEON_CLK_33" >> $(obj)include/config.h ; \
1174		  $(XECHO) "SysClk = 33MHz" ; \
1175		}
1176	@$(MKCONFIG) -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave
1177
1178CPCI2DP_config:	unconfig
1179	@$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci2dp esd
1180
1181CPCI405_config	\
1182CPCI4052_config	\
1183CPCI405DT_config	\
1184CPCI405AB_config:	unconfig
1185	@$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci405 esd
1186	@echo "BOARD_REVISION = $(@:_config=)"	>> $(obj)include/config.mk
1187
1188CPCIISER4_config:	unconfig
1189	@$(MKCONFIG) $(@:_config=) ppc ppc4xx cpciiser4 esd
1190
1191CRAYL1_config:	unconfig
1192	@$(MKCONFIG) $(@:_config=) ppc ppc4xx L1 cray
1193
1194csb272_config:	unconfig
1195	@$(MKCONFIG) $(@:_config=) ppc ppc4xx csb272
1196
1197csb472_config:	unconfig
1198	@$(MKCONFIG) $(@:_config=) ppc ppc4xx csb472
1199
1200DASA_SIM_config: unconfig
1201	@$(MKCONFIG) $(@:_config=) ppc ppc4xx dasa_sim esd
1202
1203DP405_config:	unconfig
1204	@$(MKCONFIG) $(@:_config=) ppc ppc4xx dp405 esd
1205
1206DU405_config:	unconfig
1207	@$(MKCONFIG) $(@:_config=) ppc ppc4xx du405 esd
1208
1209ebony_config:	unconfig
1210	@$(MKCONFIG) $(@:_config=) ppc ppc4xx ebony amcc
1211
1212ERIC_config:	unconfig
1213	@$(MKCONFIG) $(@:_config=) ppc ppc4xx eric
1214
1215EXBITGEN_config:	unconfig
1216	@$(MKCONFIG) $(@:_config=) ppc ppc4xx exbitgen
1217
1218G2000_config:	unconfig
1219	@$(MKCONFIG) $(@:_config=) ppc ppc4xx g2000
1220
1221hcu4_config:	unconfig
1222	@$(MKCONFIG) $(@:_config=) ppc ppc4xx hcu4 netstal
1223
1224hcu5_config:	unconfig
1225	@$(MKCONFIG) $(@:_config=) ppc ppc4xx hcu5 netstal
1226
1227HH405_config:	unconfig
1228	@$(MKCONFIG) $(@:_config=) ppc ppc4xx hh405 esd
1229
1230HUB405_config:	unconfig
1231	@$(MKCONFIG) $(@:_config=) ppc ppc4xx hub405 esd
1232
1233JSE_config:	unconfig
1234	@$(MKCONFIG) $(@:_config=) ppc ppc4xx jse
1235
1236KAREF_config: unconfig
1237	@$(MKCONFIG) $(@:_config=) ppc ppc4xx karef sandburst
1238
1239katmai_config:	unconfig
1240	@$(MKCONFIG) $(@:_config=) ppc ppc4xx katmai amcc
1241
1242# Kilauea & Haleakala images are identical (recognized via PVR)
1243kilauea_config \
1244haleakala_config: unconfig
1245	@$(MKCONFIG) -n $@ -a kilauea ppc ppc4xx kilauea amcc
1246
1247kilauea_nand_config \
1248haleakala_nand_config: unconfig
1249	@mkdir -p $(obj)include $(obj)board/amcc/kilauea
1250	@mkdir -p $(obj)nand_spl/board/amcc/kilauea
1251	@echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h
1252	@$(MKCONFIG) -n $@ -a kilauea ppc ppc4xx kilauea amcc
1253	@echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/kilauea/config.tmp
1254	@echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
1255
1256korat_config:	unconfig
1257	@$(MKCONFIG) $(@:_config=) ppc ppc4xx korat
1258
1259luan_config:	unconfig
1260	@$(MKCONFIG) $(@:_config=) ppc ppc4xx luan amcc
1261
1262lwmon5_config:	unconfig
1263	@$(MKCONFIG) $(@:_config=) ppc ppc4xx lwmon5
1264
1265makalu_config:	unconfig
1266	@$(MKCONFIG) $(@:_config=) ppc ppc4xx makalu amcc
1267
1268METROBOX_config: unconfig
1269	@$(MKCONFIG) $(@:_config=) ppc ppc4xx metrobox sandburst
1270
1271MIP405_config:	unconfig
1272	@$(MKCONFIG) $(@:_config=) ppc ppc4xx mip405 mpl
1273
1274MIP405T_config:	unconfig
1275	@mkdir -p $(obj)include
1276	@echo "#define CONFIG_MIP405T" >$(obj)include/config.h
1277	@$(XECHO) "Enable subset config for MIP405T"
1278	@$(MKCONFIG) -a MIP405 ppc ppc4xx mip405 mpl
1279
1280ML2_config:	unconfig
1281	@$(MKCONFIG) $(@:_config=) ppc ppc4xx ml2
1282
1283ml300_config:	unconfig
1284	@$(MKCONFIG) $(@:_config=) ppc ppc4xx ml300 xilinx
1285
1286ocotea_config:	unconfig
1287	@$(MKCONFIG) $(@:_config=) ppc ppc4xx ocotea amcc
1288
1289OCRTC_config		\
1290ORSG_config:	unconfig
1291	@$(MKCONFIG) $(@:_config=) ppc ppc4xx ocrtc esd
1292
1293p3p440_config:	unconfig
1294	@$(MKCONFIG) $(@:_config=) ppc ppc4xx p3p440 prodrive
1295
1296PCI405_config:	unconfig
1297	@$(MKCONFIG) $(@:_config=) ppc ppc4xx pci405 esd
1298
1299pcs440ep_config:	unconfig
1300	@$(MKCONFIG) $(@:_config=) ppc ppc4xx pcs440ep
1301
1302PIP405_config:	unconfig
1303	@$(MKCONFIG) $(@:_config=) ppc ppc4xx pip405 mpl
1304
1305PLU405_config:	unconfig
1306	@$(MKCONFIG) $(@:_config=) ppc ppc4xx plu405 esd
1307
1308PMC405_config:	unconfig
1309	@$(MKCONFIG) $(@:_config=) ppc ppc4xx pmc405 esd
1310
1311PMC440_config:	unconfig
1312	@$(MKCONFIG) $(@:_config=) ppc ppc4xx pmc440 esd
1313
1314PPChameleonEVB_config		\
1315PPChameleonEVB_BA_25_config	\
1316PPChameleonEVB_ME_25_config	\
1317PPChameleonEVB_HI_25_config	\
1318PPChameleonEVB_BA_33_config	\
1319PPChameleonEVB_ME_33_config	\
1320PPChameleonEVB_HI_33_config:	unconfig
1321	@mkdir -p $(obj)include
1322	@ >$(obj)include/config.h
1323	@[ -z "$(findstring EVB_BA,$@)" ] || \
1324		{ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 0" >>$(obj)include/config.h ; \
1325		  $(XECHO) "... BASIC model" ; \
1326		}
1327	@[ -z "$(findstring EVB_ME,$@)" ] || \
1328		{ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >>$(obj)include/config.h ; \
1329		  $(XECHO) "... MEDIUM model" ; \
1330		}
1331	@[ -z "$(findstring EVB_HI,$@)" ] || \
1332		{ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 2" >>$(obj)include/config.h ; \
1333		  $(XECHO) "... HIGH-END model" ; \
1334		}
1335	@[ -z "$(findstring _25,$@)" ] || \
1336		{ echo "#define CONFIG_PPCHAMELEON_CLK_25" >>$(obj)include/config.h ; \
1337		  $(XECHO) "SysClk = 25MHz" ; \
1338		}
1339	@[ -z "$(findstring _33,$@)" ] || \
1340		{ echo "#define CONFIG_PPCHAMELEON_CLK_33" >>$(obj)include/config.h ; \
1341		  $(XECHO) "SysClk = 33MHz" ; \
1342		}
1343	@$(MKCONFIG) -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave
1344
1345sbc405_config:	unconfig
1346	@$(MKCONFIG) $(@:_config=) ppc ppc4xx sbc405
1347
1348sequoia_config \
1349rainier_config: unconfig
1350	@mkdir -p $(obj)include
1351	@echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \
1352		tr '[:lower:]' '[:upper:]')" >$(obj)include/config.h
1353	@$(MKCONFIG) -n $@ -a sequoia ppc ppc4xx sequoia amcc
1354
1355sequoia_nand_config \
1356rainier_nand_config: unconfig
1357	@mkdir -p $(obj)include $(obj)board/amcc/sequoia
1358	@mkdir -p $(obj)nand_spl/board/amcc/sequoia
1359	@echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h
1360	@echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \
1361		tr '[:lower:]' '[:upper:]')" >> $(obj)include/config.h
1362	@$(MKCONFIG) -n $@ -a sequoia ppc ppc4xx sequoia amcc
1363	@echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/sequoia/config.tmp
1364	@echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
1365
1366sc3_config:unconfig
1367	@$(MKCONFIG) $(@:_config=) ppc ppc4xx sc3
1368
1369taihu_config:	unconfig
1370	@$(MKCONFIG) $(@:_config=) ppc ppc4xx taihu amcc
1371
1372taishan_config:	unconfig
1373	@$(MKCONFIG) $(@:_config=) ppc ppc4xx taishan amcc
1374
1375VOH405_config:	unconfig
1376	@$(MKCONFIG) $(@:_config=) ppc ppc4xx voh405 esd
1377
1378VOM405_config:	unconfig
1379	@$(MKCONFIG) $(@:_config=) ppc ppc4xx vom405 esd
1380
1381CMS700_config:	unconfig
1382	@$(MKCONFIG) $(@:_config=) ppc ppc4xx cms700 esd
1383
1384W7OLMC_config	\
1385W7OLMG_config: unconfig
1386	@$(MKCONFIG) $(@:_config=) ppc ppc4xx w7o
1387
1388# Walnut & Sycamore images are identical (recognized via PVR)
1389walnut_config \
1390sycamore_config: unconfig
1391	@$(MKCONFIG) -n $@ -a walnut ppc ppc4xx walnut amcc
1392
1393WUH405_config:	unconfig
1394	@$(MKCONFIG) $(@:_config=) ppc ppc4xx wuh405 esd
1395
1396XPEDITE1K_config:	unconfig
1397	@$(MKCONFIG) $(@:_config=) ppc ppc4xx xpedite1k
1398
1399yosemite_config \
1400yellowstone_config: unconfig
1401	@mkdir -p $(obj)include
1402	@echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \
1403		tr '[:lower:]' '[:upper:]')" >$(obj)include/config.h
1404	@$(MKCONFIG) -n $@ -a yosemite ppc ppc4xx yosemite amcc
1405
1406yucca_config:	unconfig
1407	@$(MKCONFIG) $(@:_config=) ppc ppc4xx yucca amcc
1408
1409zeus_config:	unconfig
1410	@$(MKCONFIG) $(@:_config=) ppc ppc4xx zeus
1411
1412#########################################################################
1413## MPC8220 Systems
1414#########################################################################
1415
1416Alaska8220_config	\
1417Yukon8220_config:	unconfig
1418	@$(MKCONFIG) $(@:_config=) ppc mpc8220 alaska
1419
1420sorcery_config:		unconfig
1421	@$(MKCONFIG) $(@:_config=) ppc mpc8220 sorcery
1422
1423#########################################################################
1424## MPC824x Systems
1425#########################################################################
1426xtract_82xx = $(subst _BIGFLASH,,$(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1))))))
1427
1428A3000_config: unconfig
1429	@$(MKCONFIG) $(@:_config=) ppc mpc824x a3000
1430
1431barco_config: unconfig
1432	@$(MKCONFIG) $(@:_config=) ppc mpc824x barco
1433
1434BMW_config: unconfig
1435	@$(MKCONFIG) $(@:_config=) ppc mpc824x bmw
1436
1437CPC45_config	\
1438CPC45_ROMBOOT_config:	unconfig
1439	@$(MKCONFIG) $(call xtract_82xx,$@) ppc mpc824x cpc45
1440	@cd $(obj)include ;				\
1441	if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
1442		echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
1443		$(XECHO) "... booting from 8-bit flash" ; \
1444	else \
1445		echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
1446		$(XECHO) "... booting from 64-bit flash" ; \
1447	fi; \
1448	echo "export CONFIG_BOOT_ROM" >> config.mk;
1449
1450CU824_config: unconfig
1451	@$(MKCONFIG) $(@:_config=) ppc mpc824x cu824
1452
1453debris_config: unconfig
1454	@$(MKCONFIG) $(@:_config=) ppc mpc824x debris etin
1455
1456eXalion_config: unconfig
1457	@$(MKCONFIG) $(@:_config=) ppc mpc824x eXalion
1458
1459HIDDEN_DRAGON_config: unconfig
1460	@$(MKCONFIG) $(@:_config=) ppc mpc824x hidden_dragon
1461
1462kvme080_config: unconfig
1463	@$(MKCONFIG) $(@:_config=) ppc mpc824x kvme080 etin
1464
1465MOUSSE_config: unconfig
1466	@$(MKCONFIG) $(@:_config=) ppc mpc824x mousse
1467
1468MUSENKI_config: unconfig
1469	@$(MKCONFIG) $(@:_config=) ppc mpc824x musenki
1470
1471MVBLUE_config:	unconfig
1472	@$(MKCONFIG) $(@:_config=) ppc mpc824x mvblue
1473
1474OXC_config: unconfig
1475	@$(MKCONFIG) $(@:_config=) ppc mpc824x oxc
1476
1477PN62_config: unconfig
1478	@$(MKCONFIG) $(@:_config=) ppc mpc824x pn62
1479
1480Sandpoint8240_config: unconfig
1481	@$(MKCONFIG) $(@:_config=) ppc mpc824x sandpoint
1482
1483Sandpoint8245_config: unconfig
1484	@$(MKCONFIG) $(@:_config=) ppc mpc824x sandpoint
1485
1486sbc8240_config: unconfig
1487	@$(MKCONFIG) $(@:_config=) ppc mpc824x sbc8240
1488
1489SL8245_config: unconfig
1490	@$(MKCONFIG) $(@:_config=) ppc mpc824x sl8245
1491
1492utx8245_config: unconfig
1493	@$(MKCONFIG) $(@:_config=) ppc mpc824x utx8245
1494
1495#########################################################################
1496## MPC8260 Systems
1497#########################################################################
1498
1499atc_config:	unconfig
1500	@$(MKCONFIG) $(@:_config=) ppc mpc8260 atc
1501
1502cogent_mpc8260_config:	unconfig
1503	@$(MKCONFIG) $(@:_config=) ppc mpc8260 cogent
1504
1505CPU86_config	\
1506CPU86_ROMBOOT_config: unconfig
1507	@$(MKCONFIG) $(call xtract_82xx,$@) ppc mpc8260 cpu86
1508	@cd $(obj)include ;				\
1509	if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
1510		echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
1511		$(XECHO) "... booting from 8-bit flash" ; \
1512	else \
1513		echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
1514		$(XECHO) "... booting from 64-bit flash" ; \
1515	fi; \
1516	echo "export CONFIG_BOOT_ROM" >> config.mk;
1517
1518CPU87_config	\
1519CPU87_ROMBOOT_config: unconfig
1520	@$(MKCONFIG) $(call xtract_82xx,$@) ppc mpc8260 cpu87
1521	@cd $(obj)include ;				\
1522	if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
1523		echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
1524		$(XECHO) "... booting from 8-bit flash" ; \
1525	else \
1526		echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
1527		$(XECHO) "... booting from 64-bit flash" ; \
1528	fi; \
1529	echo "export CONFIG_BOOT_ROM" >> config.mk;
1530
1531ep8248_config	\
1532ep8248E_config	:	unconfig
1533	@$(MKCONFIG) ep8248 ppc mpc8260 ep8248
1534
1535ep8260_config:	unconfig
1536	@$(MKCONFIG) $(@:_config=) ppc mpc8260 ep8260
1537
1538ep82xxm_config:	unconfig
1539	@$(MKCONFIG) $(@:_config=) ppc mpc8260 ep82xxm
1540
1541gw8260_config:	unconfig
1542	@$(MKCONFIG) $(@:_config=) ppc mpc8260 gw8260
1543
1544hymod_config:	unconfig
1545	@$(MKCONFIG) $(@:_config=) ppc mpc8260 hymod
1546
1547IDS8247_config:	unconfig
1548	@$(MKCONFIG) $(@:_config=) ppc mpc8260 ids8247
1549
1550IPHASE4539_config:	unconfig
1551	@$(MKCONFIG) $(@:_config=) ppc mpc8260 iphase4539
1552
1553ISPAN_config		\
1554ISPAN_REVB_config:	unconfig
1555	@mkdir -p $(obj)include
1556	@if [ "$(findstring _REVB_,$@)" ] ; then \
1557		echo "#define CFG_REV_B" > $(obj)include/config.h ; \
1558	fi
1559	@$(MKCONFIG) -a ISPAN ppc mpc8260 ispan
1560
1561mgcoge_config	:	unconfig
1562	@$(MKCONFIG) mgcoge ppc mpc8260 mgcoge
1563
1564MPC8260ADS_config	\
1565MPC8260ADS_lowboot_config	\
1566MPC8260ADS_33MHz_config	\
1567MPC8260ADS_33MHz_lowboot_config	\
1568MPC8260ADS_40MHz_config	\
1569MPC8260ADS_40MHz_lowboot_config	\
1570MPC8272ADS_config	\
1571MPC8272ADS_lowboot_config	\
1572PQ2FADS_config		\
1573PQ2FADS_lowboot_config		\
1574PQ2FADS-VR_config	\
1575PQ2FADS-VR_lowboot_config	\
1576PQ2FADS-ZU_config	\
1577PQ2FADS-ZU_lowboot_config	\
1578PQ2FADS-ZU_66MHz_config	\
1579PQ2FADS-ZU_66MHz_lowboot_config	\
1580	:		unconfig
1581	@mkdir -p $(obj)include
1582	@mkdir -p $(obj)board/mpc8260ads
1583	$(if $(findstring PQ2FADS,$@), \
1584	@echo "#define CONFIG_ADSTYPE CFG_PQ2FADS" > $(obj)include/config.h, \
1585	@echo "#define CONFIG_ADSTYPE CFG_"$(subst MPC,,$(word 1,$(subst _, ,$@))) > $(obj)include/config.h)
1586	$(if $(findstring MHz,$@), \
1587	@echo "#define CONFIG_8260_CLKIN" $(subst MHz,,$(word 2,$(subst _, ,$@)))"000000" >> $(obj)include/config.h, \
1588	$(if $(findstring VR,$@), \
1589	@echo "#define CONFIG_8260_CLKIN 66000000" >> $(obj)include/config.h))
1590	@[ -z "$(findstring lowboot_,$@)" ] || \
1591		{ echo "TEXT_BASE = 0xFF800000" >$(obj)board/mpc8260ads/config.tmp ; \
1592		  $(XECHO) "... with lowboot configuration" ; \
1593		}
1594	@$(MKCONFIG) -a MPC8260ADS ppc mpc8260 mpc8260ads
1595
1596MPC8266ADS_config:	unconfig
1597	@$(MKCONFIG) $(@:_config=) ppc mpc8260 mpc8266ads
1598
1599# PM825/PM826 default configuration:  small (= 8 MB) Flash / boot from 64-bit flash
1600PM825_config	\
1601PM825_ROMBOOT_config	\
1602PM825_BIGFLASH_config	\
1603PM825_ROMBOOT_BIGFLASH_config	\
1604PM826_config	\
1605PM826_ROMBOOT_config	\
1606PM826_BIGFLASH_config	\
1607PM826_ROMBOOT_BIGFLASH_config:	unconfig
1608	@mkdir -p $(obj)include
1609	@mkdir -p $(obj)board/pm826
1610	@if [ "$(findstring PM825_,$@)" ] ; then \
1611		echo "#define CONFIG_PCI"	>$(obj)include/config.h ; \
1612	else \
1613		>$(obj)include/config.h ; \
1614	fi
1615	@if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
1616		$(XECHO) "... booting from 8-bit flash" ; \
1617		echo "#define CONFIG_BOOT_ROM" >>$(obj)include/config.h ; \
1618		echo "TEXT_BASE = 0xFF800000" >$(obj)board/pm826/config.tmp ; \
1619		if [ "$(findstring _BIGFLASH_,$@)" ] ; then \
1620			$(XECHO) "... with 32 MB Flash" ; \
1621			echo "#define CONFIG_FLASH_32MB" >>$(obj)include/config.h ; \
1622		fi; \
1623	else \
1624		$(XECHO) "... booting from 64-bit flash" ; \
1625		if [ "$(findstring _BIGFLASH_,$@)" ] ; then \
1626			$(XECHO) "... with 32 MB Flash" ; \
1627			echo "#define CONFIG_FLASH_32MB" >>$(obj)include/config.h ; \
1628			echo "TEXT_BASE = 0x40000000" >$(obj)board/pm826/config.tmp ; \
1629		else \
1630			echo "TEXT_BASE = 0xFF000000" >$(obj)board/pm826/config.tmp ; \
1631		fi; \
1632	fi
1633	@$(MKCONFIG) -a PM826 ppc mpc8260 pm826
1634
1635PM828_config	\
1636PM828_PCI_config	\
1637PM828_ROMBOOT_config	\
1638PM828_ROMBOOT_PCI_config:	unconfig
1639	@mkdir -p $(obj)include
1640	@mkdir -p $(obj)board/pm826
1641	@if [ "$(findstring _PCI_,$@)" ] ; then \
1642		echo "#define CONFIG_PCI"  >>$(obj)include/config.h ; \
1643		$(XECHO) "... with PCI enabled" ; \
1644	else \
1645		>$(obj)include/config.h ; \
1646	fi
1647	@if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
1648		$(XECHO) "... booting from 8-bit flash" ; \
1649		echo "#define CONFIG_BOOT_ROM" >>$(obj)include/config.h ; \
1650		echo "TEXT_BASE = 0xFF800000" >$(obj)board/pm826/config.tmp ; \
1651	fi
1652	@$(MKCONFIG) -a PM828 ppc mpc8260 pm828
1653
1654ppmc8260_config:	unconfig
1655	@$(MKCONFIG) $(@:_config=) ppc mpc8260 ppmc8260
1656
1657Rattler8248_config	\
1658Rattler_config:		unconfig
1659	@mkdir -p $(obj)include
1660	$(if $(findstring 8248,$@), \
1661	@echo "#define CONFIG_MPC8248" > $(obj)include/config.h)
1662	@$(MKCONFIG) -a Rattler ppc mpc8260 rattler
1663
1664RPXsuper_config:	unconfig
1665	@$(MKCONFIG) $(@:_config=) ppc mpc8260 rpxsuper
1666
1667rsdproto_config:	unconfig
1668	@$(MKCONFIG) $(@:_config=) ppc mpc8260 rsdproto
1669
1670sacsng_config:	unconfig
1671	@$(MKCONFIG) $(@:_config=) ppc mpc8260 sacsng
1672
1673sbc8260_config:	unconfig
1674	@$(MKCONFIG) $(@:_config=) ppc mpc8260 sbc8260
1675
1676SCM_config:		unconfig
1677	@$(MKCONFIG) $(@:_config=) ppc mpc8260 SCM siemens
1678
1679TQM8255_AA_config \
1680TQM8260_AA_config \
1681TQM8260_AB_config \
1682TQM8260_AC_config \
1683TQM8260_AD_config \
1684TQM8260_AE_config \
1685TQM8260_AF_config \
1686TQM8260_AG_config \
1687TQM8260_AH_config \
1688TQM8260_AI_config \
1689TQM8265_AA_config:  unconfig
1690	@mkdir -p $(obj)include
1691	@case "$@" in \
1692	TQM8255_AA_config) CTYPE=MPC8255; CFREQ=300; CACHE=no;	BMODE=8260;;  \
1693	TQM8260_AA_config) CTYPE=MPC8260; CFREQ=200; CACHE=no;	BMODE=8260;; \
1694	TQM8260_AB_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes;	BMODE=60x;;  \
1695	TQM8260_AC_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes;	BMODE=60x;;  \
1696	TQM8260_AD_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;	BMODE=60x;;  \
1697	TQM8260_AE_config) CTYPE=MPC8260; CFREQ=266; CACHE=no;	BMODE=8260;; \
1698	TQM8260_AF_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;	BMODE=60x;;  \
1699	TQM8260_AG_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;	BMODE=8260;; \
1700	TQM8260_AH_config) CTYPE=MPC8260; CFREQ=300; CACHE=yes;	BMODE=60x;;  \
1701	TQM8260_AI_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;	BMODE=60x;;  \
1702	TQM8265_AA_config) CTYPE=MPC8265; CFREQ=300; CACHE=no;	BMODE=60x;;  \
1703	esac; \
1704	>$(obj)include/config.h ; \
1705	if [ "$${CTYPE}" != "MPC8260" ] ; then \
1706		echo "#define CONFIG_$${CTYPE}"	>>$(obj)include/config.h ; \
1707	fi; \
1708	echo "#define CONFIG_$${CFREQ}MHz"	>>$(obj)include/config.h ; \
1709	echo "... with $${CFREQ}MHz system clock" ; \
1710	if [ "$${CACHE}" = "yes" ] ; then \
1711		echo "#define CONFIG_L2_CACHE"	>>$(obj)include/config.h ; \
1712		$(XECHO) "... with L2 Cache support" ; \
1713	else \
1714		echo "#undef CONFIG_L2_CACHE"	>>$(obj)include/config.h ; \
1715		$(XECHO) "... without L2 Cache support" ; \
1716	fi; \
1717	if [ "$${BMODE}" = "60x" ] ; then \
1718		echo "#define CONFIG_BUSMODE_60x" >>$(obj)include/config.h ; \
1719		$(XECHO) "... with 60x Bus Mode" ; \
1720	else \
1721		echo "#undef CONFIG_BUSMODE_60x"  >>$(obj)include/config.h ; \
1722		$(XECHO) "... without 60x Bus Mode" ; \
1723	fi
1724	@$(MKCONFIG) -a TQM8260 ppc mpc8260 tqm8260
1725
1726TQM8272_config: unconfig
1727	@$(MKCONFIG) -a TQM8272 ppc mpc8260 tqm8272
1728
1729VoVPN-GW_66MHz_config	\
1730VoVPN-GW_100MHz_config:		unconfig
1731	@mkdir -p $(obj)include
1732	@echo "#define CONFIG_CLKIN_$(word 2,$(subst _, ,$@))" > $(obj)include/config.h
1733	@$(MKCONFIG) -a VoVPN-GW ppc mpc8260 vovpn-gw funkwerk
1734
1735ZPC1900_config: unconfig
1736	@$(MKCONFIG) $(@:_config=) ppc mpc8260 zpc1900
1737
1738#########################################################################
1739## Coldfire
1740#########################################################################
1741
1742M5235EVB_config \
1743M5235EVB_Flash16_config \
1744M5235EVB_Flash32_config:	unconfig
1745	@case "$@" in \
1746	M5235EVB_config)		FLASH=16;; \
1747	M5235EVB_Flash16_config)	FLASH=16;; \
1748	M5235EVB_Flash32_config)	FLASH=32;; \
1749	esac; \
1750	>$(obj)include/config.h ; \
1751	if [ "$${FLASH}" != "16" ] ; then \
1752		echo "#define NORFLASH_PS32BIT	1" >> $(obj)include/config.h ; \
1753		echo "TEXT_BASE = 0xFFC00000" > $(obj)board/freescale/m5235evb/config.tmp ; \
1754		cp $(obj)board/freescale/m5235evb/u-boot.32 $(obj)board/freescale/m5235evb/u-boot.lds ; \
1755	else \
1756		echo "TEXT_BASE = 0xFFE00000" > $(obj)board/freescale/m5235evb/config.tmp ; \
1757		cp $(obj)board/freescale/m5235evb/u-boot.16 $(obj)board/freescale/m5235evb/u-boot.lds ; \
1758	fi
1759	@$(MKCONFIG) -a M5235EVB m68k mcf523x m5235evb freescale
1760
1761M5249EVB_config :		unconfig
1762	@$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5249evb freescale
1763
1764M5253EVBE_config :		unconfig
1765	@$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5253evbe freescale
1766
1767cobra5272_config :		unconfig
1768	@$(MKCONFIG) $(@:_config=) m68k mcf52x2 cobra5272
1769
1770EB+MCF-EV123_config :		unconfig
1771	@mkdir -p $(obj)include
1772	@mkdir -p $(obj)board/BuS/EB+MCF-EV123
1773	@ >$(obj)include/config.h
1774	@echo "TEXT_BASE = 0xFFE00000"|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk
1775	@$(MKCONFIG) EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS
1776
1777EB+MCF-EV123_internal_config :	unconfig
1778	@mkdir -p $(obj)include
1779	@mkdir -p $(obj)board/BuS/EB+MCF-EV123
1780	@ >$(obj)include/config.h
1781	@echo "TEXT_BASE = 0xF0000000"|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk
1782	@$(MKCONFIG) EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS
1783
1784idmr_config :			unconfig
1785	@$(MKCONFIG) $(@:_config=) m68k mcf52x2 idmr
1786
1787M5271EVB_config :		unconfig
1788	@$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5271evb
1789
1790M5272C3_config :		unconfig
1791	@$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5272c3
1792
1793M5282EVB_config :		unconfig
1794	@$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5282evb
1795
1796TASREG_config :		unconfig
1797	@$(MKCONFIG) $(@:_config=) m68k mcf52x2 tasreg esd
1798
1799r5200_config :		unconfig
1800	@$(MKCONFIG) $(@:_config=) m68k mcf52x2 r5200
1801
1802M5329AFEE_config \
1803M5329BFEE_config :	unconfig
1804	@case "$@" in \
1805	M5329AFEE_config)	NAND=0;; \
1806	M5329BFEE_config)	NAND=16;; \
1807	esac; \
1808	>$(obj)include/config.h ; \
1809	if [ "$${NAND}" != "0" ] ; then \
1810		echo "#define NANDFLASH_SIZE	$${NAND}" > $(obj)include/config.h ; \
1811	fi
1812	@$(MKCONFIG) -a M5329EVB m68k mcf532x m5329evb freescale
1813
1814M54455EVB_config \
1815M54455EVB_atmel_config \
1816M54455EVB_intel_config \
1817M54455EVB_a33_config \
1818M54455EVB_a66_config \
1819M54455EVB_i33_config \
1820M54455EVB_i66_config :	unconfig
1821	@case "$@" in \
1822	M54455EVB_config)		FLASH=ATMEL; FREQ=33333333;; \
1823	M54455EVB_atmel_config)		FLASH=ATMEL; FREQ=33333333;; \
1824	M54455EVB_intel_config)		FLASH=INTEL; FREQ=33333333;; \
1825	M54455EVB_a33_config)		FLASH=ATMEL; FREQ=33333333;; \
1826	M54455EVB_a66_config)		FLASH=ATMEL; FREQ=66666666;; \
1827	M54455EVB_i33_config)		FLASH=INTEL; FREQ=33333333;; \
1828	M54455EVB_i66_config)		FLASH=INTEL; FREQ=66666666;; \
1829	esac; \
1830	>$(obj)include/config.h ; \
1831	if [ "$${FLASH}" = "INTEL" ] ; then \
1832		echo "#undef CFG_ATMEL_BOOT" >> $(obj)include/config.h ; \
1833		echo "TEXT_BASE = 0x00000000" > $(obj)board/freescale/m54455evb/config.tmp ; \
1834		cp $(obj)board/freescale/m54455evb/u-boot.int $(obj)board/freescale/m54455evb/u-boot.lds ; \
1835		$(XECHO) "... with INTEL boot..." ; \
1836	else \
1837		echo "#define CFG_ATMEL_BOOT"	>> $(obj)include/config.h ; \
1838		echo "TEXT_BASE = 0x04000000" > $(obj)board/freescale/m54455evb/config.tmp ; \
1839		cp $(obj)board/freescale/m54455evb/u-boot.atm $(obj)board/freescale/m54455evb/u-boot.lds ; \
1840		$(XECHO) "... with ATMEL boot..." ; \
1841	fi; \
1842	echo "#define CFG_INPUT_CLKSRC $${FREQ}" >> $(obj)include/config.h ; \
1843	$(XECHO) "... with $${FREQ}Hz input clock"
1844	@$(MKCONFIG) -a M54455EVB m68k mcf5445x m54455evb freescale
1845
1846#########################################################################
1847## MPC83xx Systems
1848#########################################################################
1849
1850MPC8313ERDB_33_config \
1851MPC8313ERDB_66_config: unconfig
1852	@mkdir -p $(obj)include
1853	@echo "" >$(obj)include/config.h ; \
1854	if [ "$(findstring _33_,$@)" ] ; then \
1855		$(XECHO) -n "...33M ..." ; \
1856		echo "#define CFG_33MHZ" >>$(obj)include/config.h ; \
1857	fi ; \
1858	if [ "$(findstring _66_,$@)" ] ; then \
1859		$(XECHO) -n "...66M..." ; \
1860		echo "#define CFG_66MHZ" >>$(obj)include/config.h ; \
1861	fi ;
1862	@$(MKCONFIG) -a MPC8313ERDB ppc mpc83xx mpc8313erdb freescale
1863
1864MPC8315ERDB_config: unconfig
1865	@$(MKCONFIG) -a MPC8315ERDB ppc mpc83xx mpc8315erdb freescale
1866
1867MPC8323ERDB_config:	unconfig
1868	@$(MKCONFIG) -a MPC8323ERDB ppc mpc83xx mpc8323erdb freescale
1869
1870MPC832XEMDS_config \
1871MPC832XEMDS_HOST_33_config \
1872MPC832XEMDS_HOST_66_config \
1873MPC832XEMDS_SLAVE_config \
1874MPC832XEMDS_ATM_config:	unconfig
1875	@mkdir -p $(obj)include
1876	@echo "" >$(obj)include/config.h ; \
1877	if [ "$(findstring _HOST_,$@)" ] ; then \
1878		$(XECHO) -n "... PCI HOST " ; \
1879		echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
1880	fi ; \
1881	if [ "$(findstring _SLAVE_,$@)" ] ; then \
1882		$(XECHO) "...PCI SLAVE 66M"  ; \
1883		echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
1884		echo "#define CONFIG_PCISLAVE" >>$(obj)include/config.h ; \
1885	fi ; \
1886	if [ "$(findstring _33_,$@)" ] ; then \
1887		$(XECHO) -n "...33M ..." ; \
1888		echo "#define PCI_33M" >>$(obj)include/config.h ; \
1889		echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \
1890	fi ; \
1891	if [ "$(findstring _66_,$@)" ] ; then \
1892		$(XECHO) -n "...66M..." ; \
1893		echo "#define PCI_66M" >>$(obj)include/config.h ; \
1894		echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \
1895	fi ; \
1896	if [ "$(findstring _ATM_,$@)" ] ; then \
1897		$(XECHO) -n "...ATM..." ; \
1898		echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \
1899		echo "#define CONFIG_PQ_MDS_PIB_ATM     1" >>$(obj)include/config.h ; \
1900	fi ;
1901	@$(MKCONFIG) -a MPC832XEMDS ppc mpc83xx mpc832xemds freescale
1902
1903MPC8349EMDS_config:	unconfig
1904	@$(MKCONFIG) $(@:_config=) ppc mpc83xx mpc8349emds freescale
1905
1906MPC8349ITX_config \
1907MPC8349ITX_LOWBOOT_config \
1908MPC8349ITXGP_config:	unconfig
1909	@mkdir -p $(obj)include
1910	@mkdir -p $(obj)board/freescale/mpc8349itx
1911	@echo "#define CONFIG_$(subst _LOWBOOT,,$(@:_config=))" >> $(obj)include/config.h
1912	@if [ "$(findstring GP,$@)" ] ; then \
1913		echo "TEXT_BASE = 0xFE000000" >$(obj)board/freescale/mpc8349itx/config.tmp ; \
1914	fi
1915	@if [ "$(findstring LOWBOOT,$@)" ] ; then \
1916		echo "TEXT_BASE = 0xFE000000" >$(obj)board/freescale/mpc8349itx/config.tmp ; \
1917	fi
1918	@$(MKCONFIG) -a -n $(@:_config=) MPC8349ITX ppc mpc83xx mpc8349itx freescale
1919
1920MPC8360EMDS_config \
1921MPC8360EMDS_HOST_33_config \
1922MPC8360EMDS_HOST_66_config \
1923MPC8360EMDS_SLAVE_config \
1924MPC8360EMDS_ATM_config: unconfig
1925	@mkdir -p $(obj)include
1926	@echo "" >$(obj)include/config.h ; \
1927	if [ "$(findstring _HOST_,$@)" ] ; then \
1928		$(XECHO) -n "... PCI HOST " ; \
1929		echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
1930	fi ; \
1931	if [ "$(findstring _SLAVE_,$@)" ] ; then \
1932		$(XECHO) "...PCI SLAVE 66M"  ; \
1933		echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
1934		echo "#define CONFIG_PCISLAVE" >>$(obj)include/config.h ; \
1935	fi ; \
1936	if [ "$(findstring _33_,$@)" ] ; then \
1937		$(XECHO) -n "...33M ..." ; \
1938		echo "#define PCI_33M" >>$(obj)include/config.h ; \
1939		echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \
1940	fi ; \
1941	if [ "$(findstring _66_,$@)" ] ; then \
1942		$(XECHO) -n "...66M..." ; \
1943		echo "#define PCI_66M" >>$(obj)include/config.h ; \
1944		echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \
1945	fi ; \
1946	if [ "$(findstring _ATM_,$@)" ] ; then \
1947		$(XECHO) -n "...ATM..." ; \
1948		echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \
1949		echo "#define CONFIG_PQ_MDS_PIB_ATM     1" >>$(obj)include/config.h ; \
1950	fi ;
1951	@$(MKCONFIG) -a MPC8360EMDS ppc mpc83xx mpc8360emds freescale
1952
1953MPC8360ERDK_33_config \
1954MPC8360ERDK_66_config \
1955MPC8360ERDK_config:
1956	@mkdir -p $(obj)include
1957	@echo "" >$(obj)include/config.h ; \
1958	if [ "$(findstring _33_,$@)" ] ; then \
1959		$(XECHO) -n "... CLKIN 33MHz " ; \
1960		echo "#define CONFIG_CLKIN_33MHZ" >>$(obj)include/config.h ;\
1961	fi ;
1962	@$(MKCONFIG) -a MPC8360ERDK ppc mpc83xx mpc8360erdk freescale
1963
1964MPC837XEMDS_config \
1965MPC837XEMDS_HOST_config:	unconfig
1966	@mkdir -p $(obj)include
1967	@echo "" >$(obj)include/config.h ; \
1968	if [ "$(findstring _HOST_,$@)" ] ; then \
1969		$(XECHO) -n "... PCI HOST " ; \
1970		echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
1971	fi ;
1972	@$(MKCONFIG) -a MPC837XEMDS ppc mpc83xx mpc837xemds freescale
1973
1974MPC837XERDB_config:	unconfig
1975	@$(MKCONFIG) -a MPC837XERDB ppc mpc83xx mpc837xerdb freescale
1976
1977sbc8349_config:		unconfig
1978	@$(MKCONFIG) $(@:_config=) ppc mpc83xx sbc8349
1979
1980TQM834x_config:	unconfig
1981	@$(MKCONFIG) $(@:_config=) ppc mpc83xx tqm834x
1982
1983
1984#########################################################################
1985## MPC85xx Systems
1986#########################################################################
1987
1988ATUM8548_config:	unconfig
1989	@$(MKCONFIG) $(@:_config=) ppc mpc85xx atum8548
1990
1991MPC8540ADS_config:	unconfig
1992	@$(MKCONFIG) $(@:_config=) ppc mpc85xx mpc8540ads freescale
1993
1994MPC8540EVAL_config \
1995MPC8540EVAL_33_config \
1996MPC8540EVAL_66_config \
1997MPC8540EVAL_33_slave_config \
1998MPC8540EVAL_66_slave_config:      unconfig
1999	@mkdir -p $(obj)include
2000	@echo "" >$(obj)include/config.h ; \
2001	if [ "$(findstring _33_,$@)" ] ; then \
2002		$(XECHO) "... 33 MHz PCI" ; \
2003	else \
2004		echo "#define CONFIG_SYSCLK_66M" >>$(obj)include/config.h ; \
2005		$(XECHO) "... 66 MHz PCI" ; \
2006	fi ; \
2007	if [ "$(findstring _slave_,$@)" ] ; then \
2008		echo "#define CONFIG_PCI_SLAVE" >>$(obj)include/config.h ; \
2009		$(XECHO) " slave" ; \
2010	else \
2011		$(XECHO) " host" ; \
2012	fi
2013	@$(MKCONFIG) -a MPC8540EVAL ppc mpc85xx mpc8540eval
2014
2015MPC8560ADS_config:	unconfig
2016	@$(MKCONFIG) $(@:_config=) ppc mpc85xx mpc8560ads freescale
2017
2018MPC8541CDS_legacy_config \
2019MPC8541CDS_config:	unconfig
2020	@mkdir -p $(obj)include
2021	@echo "" >$(obj)include/config.h ; \
2022	if [ "$(findstring _legacy_,$@)" ] ; then \
2023		echo "#define CONFIG_LEGACY" >>$(obj)include/config.h ; \
2024		$(XECHO) "... legacy" ; \
2025	fi
2026	@$(MKCONFIG) -a MPC8541CDS ppc mpc85xx mpc8541cds freescale
2027
2028MPC8544DS_config:	unconfig
2029	@$(MKCONFIG) $(@:_config=) ppc mpc85xx mpc8544ds freescale
2030
2031MPC8548CDS_legacy_config \
2032MPC8548CDS_config:	unconfig
2033	@mkdir -p $(obj)include
2034	@echo "" >$(obj)include/config.h ; \
2035	if [ "$(findstring _legacy_,$@)" ] ; then \
2036		echo "#define CONFIG_LEGACY" >>$(obj)include/config.h ; \
2037		$(XECHO) "... legacy" ; \
2038	fi
2039	@$(MKCONFIG) -a MPC8548CDS ppc mpc85xx mpc8548cds freescale
2040
2041MPC8555CDS_legacy_config \
2042MPC8555CDS_config:	unconfig
2043	@mkdir -p $(obj)include
2044	@echo "" >$(obj)include/config.h ; \
2045	if [ "$(findstring _legacy_,$@)" ] ; then \
2046		echo "#define CONFIG_LEGACY" >>$(obj)include/config.h ; \
2047		$(XECHO) "... legacy" ; \
2048	fi
2049	@$(MKCONFIG) -a MPC8555CDS ppc mpc85xx mpc8555cds freescale
2050
2051MPC8568MDS_config:	unconfig
2052	@$(MKCONFIG) $(@:_config=) ppc mpc85xx mpc8568mds freescale
2053
2054PM854_config:	unconfig
2055	@$(MKCONFIG) $(@:_config=) ppc mpc85xx pm854
2056
2057PM856_config:	unconfig
2058	@$(MKCONFIG) $(@:_config=) ppc mpc85xx pm856
2059
2060sbc8540_config \
2061sbc8540_33_config \
2062sbc8540_66_config:	unconfig
2063	@mkdir -p $(obj)include
2064	@if [ "$(findstring _66_,$@)" ] ; then \
2065		echo "#define CONFIG_PCI_66"	>>$(obj)include/config.h ; \
2066		$(XECHO) "... 66 MHz PCI" ; \
2067	else \
2068		>$(obj)include/config.h ; \
2069		$(XECHO) "... 33 MHz PCI" ; \
2070	fi
2071	@$(MKCONFIG) -a SBC8540 ppc mpc85xx sbc8560
2072
2073sbc8548_config:		unconfig
2074	@$(MKCONFIG) $(@:_config=) ppc mpc85xx sbc8548
2075
2076sbc8560_config \
2077sbc8560_33_config \
2078sbc8560_66_config:      unconfig
2079	@mkdir -p $(obj)include
2080	@if [ "$(findstring _66_,$@)" ] ; then \
2081		echo "#define CONFIG_PCI_66"	>>$(obj)include/config.h ; \
2082		$(XECHO) "... 66 MHz PCI" ; \
2083	else \
2084		>$(obj)include/config.h ; \
2085		$(XECHO) "... 33 MHz PCI" ; \
2086	fi
2087	@$(MKCONFIG) -a sbc8560 ppc mpc85xx sbc8560
2088
2089stxgp3_config:		unconfig
2090	@$(MKCONFIG) $(@:_config=) ppc mpc85xx stxgp3
2091
2092stxssa_config		\
2093stxssa_4M_config:	unconfig
2094	@mkdir -p $(obj)include
2095	@if [ "$(findstring _4M_,$@)" ] ; then \
2096		echo "#define CONFIG_STXSSA_4M" >>$(obj)include/config.h ; \
2097		$(XECHO) "... with 4 MiB flash memory" ; \
2098	else \
2099		>$(obj)include/config.h ; \
2100	fi
2101	@$(MKCONFIG) -a stxssa ppc mpc85xx stxssa
2102
2103TQM8540_config		\
2104TQM8541_config		\
2105TQM8555_config		\
2106TQM8560_config:		unconfig
2107	@mkdir -p $(obj)include
2108	@CTYPE=$(subst TQM,,$(@:_config=)); \
2109	>$(obj)include/config.h ; \
2110	$(XECHO) "... TQM"$${CTYPE}; \
2111	echo "#define CONFIG_MPC$${CTYPE}">>$(obj)include/config.h; \
2112	echo "#define CONFIG_TQM$${CTYPE}">>$(obj)include/config.h; \
2113	echo "#define CONFIG_HOSTNAME tqm$${CTYPE}">>$(obj)include/config.h; \
2114	echo "#define CONFIG_BOARDNAME \"TQM$${CTYPE}\"">>$(obj)include/config.h; \
2115	echo "#define CFG_BOOTFILE_PATH \"/tftpboot/tqm$${CTYPE}/uImage\"">>$(obj)include/config.h
2116	@$(MKCONFIG) -a TQM85xx ppc mpc85xx tqm85xx
2117
2118#########################################################################
2119## MPC86xx Systems
2120#########################################################################
2121
2122MPC8610HPCD_config:	unconfig
2123	@$(MKCONFIG) $(@:_config=) ppc mpc86xx mpc8610hpcd freescale
2124
2125MPC8641HPCN_config:    unconfig
2126	@$(MKCONFIG) $(@:_config=) ppc mpc86xx mpc8641hpcn freescale
2127
2128sbc8641d_config:	unconfig
2129	@./mkconfig $(@:_config=) ppc mpc86xx sbc8641d
2130
2131#########################################################################
2132## 74xx/7xx Systems
2133#########################################################################
2134
2135AmigaOneG3SE_config:	unconfig
2136	@$(MKCONFIG) $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
2137
2138BAB7xx_config: unconfig
2139	@$(MKCONFIG) $(@:_config=) ppc 74xx_7xx bab7xx eltec
2140
2141CPCI750_config:	unconfig
2142	@$(MKCONFIG) CPCI750 ppc 74xx_7xx cpci750 esd
2143
2144DB64360_config:	unconfig
2145	@$(MKCONFIG) DB64360 ppc 74xx_7xx db64360 Marvell
2146
2147DB64460_config:	unconfig
2148	@$(MKCONFIG) DB64460 ppc 74xx_7xx db64460 Marvell
2149
2150ELPPC_config: unconfig
2151	@$(MKCONFIG) $(@:_config=) ppc 74xx_7xx elppc eltec
2152
2153EVB64260_config	\
2154EVB64260_750CX_config:	unconfig
2155	@$(MKCONFIG) EVB64260 ppc 74xx_7xx evb64260
2156
2157mpc7448hpc2_config:  unconfig
2158	@$(MKCONFIG) $(@:_config=) ppc 74xx_7xx mpc7448hpc2
2159
2160P3G4_config: unconfig
2161	@$(MKCONFIG) $(@:_config=) ppc 74xx_7xx evb64260
2162
2163p3m750_config	\
2164p3m7448_config:		unconfig
2165	@mkdir -p $(obj)include
2166	@if [ "$(findstring 750_,$@)" ] ; then \
2167		echo "#define CONFIG_P3M750" >>$(obj)include/config.h ; \
2168	else \
2169		echo "#define CONFIG_P3M7448" >>$(obj)include/config.h ; \
2170	fi
2171	@$(MKCONFIG) -a p3mx ppc 74xx_7xx p3mx prodrive
2172
2173PCIPPC2_config \
2174PCIPPC6_config: unconfig
2175	@$(MKCONFIG) $(@:_config=) ppc 74xx_7xx pcippc2
2176
2177ZUMA_config:	unconfig
2178	@$(MKCONFIG) $(@:_config=) ppc 74xx_7xx evb64260
2179
2180ppmc7xx_config: unconfig
2181	@$(MKCONFIG) $(@:_config=) ppc 74xx_7xx ppmc7xx
2182
2183#========================================================================
2184# ARM
2185#========================================================================
2186#########################################################################
2187## StrongARM Systems
2188#########################################################################
2189
2190assabet_config	:	unconfig
2191	@$(MKCONFIG) $(@:_config=) arm sa1100 assabet
2192
2193dnp1110_config	:	unconfig
2194	@$(MKCONFIG) $(@:_config=) arm sa1100 dnp1110
2195
2196gcplus_config	:	unconfig
2197	@$(MKCONFIG) $(@:_config=) arm sa1100 gcplus
2198
2199lart_config	:	unconfig
2200	@$(MKCONFIG) $(@:_config=) arm sa1100 lart
2201
2202shannon_config	:	unconfig
2203	@$(MKCONFIG) $(@:_config=) arm sa1100 shannon
2204
2205#########################################################################
2206## ARM92xT Systems
2207#########################################################################
2208
2209xtract_trab = $(subst _bigram,,$(subst _bigflash,,$(subst _old,,$(subst _config,,$1))))
2210
2211xtract_omap1610xxx = $(subst _cs0boot,,$(subst _cs3boot,,$(subst _cs_autoboot,,$(subst _config,,$1))))
2212
2213xtract_omap730p2 = $(subst _cs0boot,,$(subst _cs3boot,, $(subst _config,,$1)))
2214
2215at91rm9200dk_config	:	unconfig
2216	@$(MKCONFIG) $(@:_config=) arm arm920t at91rm9200dk NULL at91rm9200
2217
2218cmc_pu2_config	:	unconfig
2219	@$(MKCONFIG) $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200
2220
2221csb637_config	:	unconfig
2222	@$(MKCONFIG) $(@:_config=) arm arm920t csb637 NULL at91rm9200
2223
2224mp2usb_config	:	unconfig
2225	@$(MKCONFIG) $(@:_config=) arm arm920t mp2usb NULL at91rm9200
2226
2227
2228########################################################################
2229## ARM Integrator boards - see doc/README-integrator for more info.
2230integratorap_config	\
2231ap_config		\
2232ap966_config		\
2233ap922_config		\
2234ap922_XA10_config	\
2235ap7_config		\
2236ap720t_config		\
2237ap920t_config		\
2238ap926ejs_config		\
2239ap946es_config: unconfig
2240	@board/integratorap/split_by_variant.sh $@
2241
2242integratorcp_config	\
2243cp_config		\
2244cp920t_config		\
2245cp926ejs_config		\
2246cp946es_config		\
2247cp1136_config		\
2248cp966_config		\
2249cp922_config		\
2250cp922_XA10_config	\
2251cp1026_config: unconfig
2252	@board/integratorcp/split_by_variant.sh $@
2253
2254kb9202_config	:	unconfig
2255	@$(MKCONFIG) $(@:_config=) arm arm920t kb9202 NULL at91rm9200
2256
2257lpd7a400_config \
2258lpd7a404_config:	unconfig
2259	@$(MKCONFIG) $(@:_config=) arm lh7a40x lpd7a40x
2260
2261mx1ads_config	:	unconfig
2262	@$(MKCONFIG) $(@:_config=) arm arm920t mx1ads NULL imx
2263
2264mx1fs2_config	:	unconfig
2265	@$(MKCONFIG) $(@:_config=) arm arm920t mx1fs2 NULL imx
2266
2267netstar_32_config	\
2268netstar_config:		unconfig
2269	@mkdir -p $(obj)include
2270	@if [ "$(findstring _32_,$@)" ] ; then \
2271		$(XECHO) "... 32MB SDRAM" ; \
2272		echo "#define PHYS_SDRAM_1_SIZE SZ_32M" >>$(obj)include/config.h ; \
2273	else \
2274		$(XECHO) "... 64MB SDRAM" ; \
2275		echo "#define PHYS_SDRAM_1_SIZE SZ_64M" >>$(obj)include/config.h ; \
2276	fi
2277	@$(MKCONFIG) -a netstar arm arm925t netstar
2278
2279omap1510inn_config :	unconfig
2280	@$(MKCONFIG) $(@:_config=) arm arm925t omap1510inn
2281
2282omap5912osk_config :	unconfig
2283	@$(MKCONFIG) $(@:_config=) arm arm926ejs omap5912osk NULL omap
2284
2285davinci_dvevm_config :	unconfig
2286	@$(MKCONFIG) $(@:_config=) arm arm926ejs dv-evm davinci davinci
2287
2288davinci_schmoogie_config :	unconfig
2289	@$(MKCONFIG) $(@:_config=) arm arm926ejs schmoogie davinci davinci
2290
2291davinci_sonata_config :	unconfig
2292	@$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci
2293
2294omap1610inn_config \
2295omap1610inn_cs0boot_config \
2296omap1610inn_cs3boot_config \
2297omap1610inn_cs_autoboot_config \
2298omap1610h2_config \
2299omap1610h2_cs0boot_config \
2300omap1610h2_cs3boot_config \
2301omap1610h2_cs_autoboot_config:	unconfig
2302	@mkdir -p $(obj)include
2303	@if [ "$(findstring _cs0boot_, $@)" ] ; then \
2304		echo "#define CONFIG_CS0_BOOT" >> .$(obj)include/config.h ; \
2305		$(XECHO) "... configured for CS0 boot"; \
2306	elif [ "$(findstring _cs_autoboot_, $@)" ] ; then \
2307		echo "#define CONFIG_CS_AUTOBOOT" >> $(obj)include/config.h ; \
2308		$(XECHO) "... configured for CS_AUTO boot"; \
2309	else \
2310		echo "#define CONFIG_CS3_BOOT" >> $(obj)include/config.h ; \
2311		$(XECHO) "... configured for CS3 boot"; \
2312	fi;
2313	@$(MKCONFIG) -a $(call xtract_omap1610xxx,$@) arm arm926ejs omap1610inn NULL omap
2314
2315omap730p2_config \
2316omap730p2_cs0boot_config \
2317omap730p2_cs3boot_config :	unconfig
2318	@mkdir -p $(obj)include
2319	@if [ "$(findstring _cs0boot_, $@)" ] ; then \
2320		echo "#define CONFIG_CS0_BOOT" >> $(obj)include/config.h ; \
2321		$(XECHO) "... configured for CS0 boot"; \
2322	else \
2323		echo "#define CONFIG_CS3_BOOT" >> $(obj)include/config.h ; \
2324		$(XECHO) "... configured for CS3 boot"; \
2325	fi;
2326	@$(MKCONFIG) -a $(call xtract_omap730p2,$@) arm arm926ejs omap730p2 NULL omap
2327
2328sbc2410x_config: unconfig
2329	@$(MKCONFIG) $(@:_config=) arm arm920t sbc2410x NULL s3c24x0
2330
2331scb9328_config	:	unconfig
2332	@$(MKCONFIG) $(@:_config=) arm arm920t scb9328 NULL imx
2333
2334smdk2400_config	:	unconfig
2335	@$(MKCONFIG) $(@:_config=) arm arm920t smdk2400 NULL s3c24x0
2336
2337smdk2410_config	:	unconfig
2338	@$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 NULL s3c24x0
2339
2340SX1_config :		unconfig
2341	@$(MKCONFIG) $(@:_config=) arm arm925t sx1
2342
2343# TRAB default configuration:	8 MB Flash, 32 MB RAM
2344trab_config \
2345trab_bigram_config \
2346trab_bigflash_config \
2347trab_old_config:	unconfig
2348	@mkdir -p $(obj)include
2349	@mkdir -p $(obj)board/trab
2350	@ >$(obj)include/config.h
2351	@[ -z "$(findstring _bigram,$@)" ] || \
2352		{ echo "#define CONFIG_FLASH_8MB"  >>$(obj)include/config.h ; \
2353		  echo "#define CONFIG_RAM_32MB"   >>$(obj)include/config.h ; \
2354		  $(XECHO) "... with 8 MB Flash, 32 MB RAM" ; \
2355		}
2356	@[ -z "$(findstring _bigflash,$@)" ] || \
2357		{ echo "#define CONFIG_FLASH_16MB" >>$(obj)include/config.h ; \
2358		  echo "#define CONFIG_RAM_16MB"   >>$(obj)include/config.h ; \
2359		  $(XECHO) "... with 16 MB Flash, 16 MB RAM" ; \
2360		  echo "TEXT_BASE = 0x0CF40000" >$(obj)board/trab/config.tmp ; \
2361		}
2362	@[ -z "$(findstring _old,$@)" ] || \
2363		{ echo "#define CONFIG_FLASH_8MB"  >>$(obj)include/config.h ; \
2364		  echo "#define CONFIG_RAM_16MB"   >>$(obj)include/config.h ; \
2365		  $(XECHO) "... with 8 MB Flash, 16 MB RAM" ; \
2366		  echo "TEXT_BASE = 0x0CF40000" >$(obj)board/trab/config.tmp ; \
2367		}
2368	@$(MKCONFIG) -a $(call xtract_trab,$@) arm arm920t trab NULL s3c24x0
2369
2370VCMA9_config	:	unconfig
2371	@$(MKCONFIG) $(@:_config=) arm arm920t vcma9 mpl s3c24x0
2372
2373#========================================================================
2374# ARM supplied Versatile development boards
2375#========================================================================
2376versatile_config	\
2377versatileab_config	\
2378versatilepb_config :	unconfig
2379	@board/versatile/split_by_variant.sh $@
2380
2381voiceblue_smallflash_config	\
2382voiceblue_config:	unconfig
2383	@mkdir -p $(obj)include
2384	@mkdir -p $(obj)board/voiceblue
2385	@if [ "$(findstring _smallflash_,$@)" ] ; then \
2386		$(XECHO) "... boot from lower flash bank" ; \
2387		echo "#define VOICEBLUE_SMALL_FLASH" >>$(obj)include/config.h ; \
2388		echo "VOICEBLUE_SMALL_FLASH=y" >$(obj)board/voiceblue/config.tmp ; \
2389	else \
2390		$(XECHO) "... boot from upper flash bank" ; \
2391		>$(obj)include/config.h ; \
2392		echo "VOICEBLUE_SMALL_FLASH=n" >$(obj)board/voiceblue/config.tmp ; \
2393	fi
2394	@$(MKCONFIG) -a voiceblue arm arm925t voiceblue
2395
2396cm4008_config	:	unconfig
2397	@$(MKCONFIG) $(@:_config=) arm arm920t cm4008 NULL ks8695
2398
2399cm41xx_config	:	unconfig
2400	@$(MKCONFIG) $(@:_config=) arm arm920t cm41xx NULL ks8695
2401
2402gth2_config		:	unconfig
2403	@mkdir -p $(obj)include
2404	@ >$(obj)include/config.h
2405	@echo "#define CONFIG_GTH2 1" >>$(obj)include/config.h
2406	@$(MKCONFIG) -a gth2 mips mips gth2
2407
2408#########################################################################
2409## S3C44B0 Systems
2410#########################################################################
2411
2412B2_config	:	unconfig
2413	@$(MKCONFIG) $(@:_config=) arm s3c44b0 B2 dave
2414
2415#########################################################################
2416## ARM720T Systems
2417#########################################################################
2418
2419armadillo_config:	unconfig
2420	@$(MKCONFIG) $(@:_config=) arm arm720t armadillo
2421
2422ep7312_config	:	unconfig
2423	@$(MKCONFIG) $(@:_config=) arm arm720t ep7312
2424
2425impa7_config	:	unconfig
2426	@$(MKCONFIG) $(@:_config=) arm arm720t impa7
2427
2428modnet50_config :	unconfig
2429	@$(MKCONFIG) $(@:_config=) arm arm720t modnet50
2430
2431evb4510_config :	unconfig
2432	@$(MKCONFIG) $(@:_config=) arm arm720t evb4510
2433
2434lpc2292sodimm_config:	unconfig
2435	@$(MKCONFIG) $(@:_config=) arm arm720t lpc2292sodimm NULL lpc2292
2436
2437SMN42_config	:	unconfig
2438	@$(MKCONFIG) $(@:_config=) arm arm720t SMN42 siemens lpc2292
2439
2440#########################################################################
2441## XScale Systems
2442#########################################################################
2443
2444adsvix_config	:	unconfig
2445	@$(MKCONFIG) $(@:_config=) arm pxa adsvix
2446
2447cerf250_config :	unconfig
2448	@$(MKCONFIG) $(@:_config=) arm pxa cerf250
2449
2450cradle_config	:	unconfig
2451	@$(MKCONFIG) $(@:_config=) arm pxa cradle
2452
2453csb226_config	:	unconfig
2454	@$(MKCONFIG) $(@:_config=) arm pxa csb226
2455
2456delta_config :
2457	@$(MKCONFIG) $(@:_config=) arm pxa delta
2458
2459innokom_config	:	unconfig
2460	@$(MKCONFIG) $(@:_config=) arm pxa innokom
2461
2462ixdp425_config	:	unconfig
2463	@$(MKCONFIG) $(@:_config=) arm ixp ixdp425
2464
2465ixdpg425_config	:	unconfig
2466	@$(MKCONFIG) $(@:_config=) arm ixp ixdp425
2467
2468lubbock_config	:	unconfig
2469	@$(MKCONFIG) $(@:_config=) arm pxa lubbock
2470
2471pleb2_config	:	unconfig
2472	@$(MKCONFIG) $(@:_config=) arm pxa pleb2
2473
2474logodl_config	:	unconfig
2475	@$(MKCONFIG) $(@:_config=) arm pxa logodl
2476
2477pdnb3_config \
2478scpu_config:    unconfig
2479	@mkdir -p $(obj)include
2480	@if [ "$(findstring scpu_,$@)" ] ; then \
2481		echo "#define CONFIG_SCPU"      >>$(obj)include/config.h ; \
2482		$(XECHO) "... on SCPU board variant" ; \
2483	else \
2484		>$(obj)include/config.h ; \
2485	fi
2486	@$(MKCONFIG) -a pdnb3 arm ixp pdnb3 prodrive
2487
2488pxa255_idp_config:	unconfig
2489	@$(MKCONFIG) $(@:_config=) arm pxa pxa255_idp
2490
2491trizepsiv_config	:	unconfig
2492	@$(MKCONFIG) $(@:_config=) arm pxa trizepsiv
2493
2494wepep250_config	:	unconfig
2495	@$(MKCONFIG) $(@:_config=) arm pxa wepep250
2496
2497xaeniax_config	:	unconfig
2498	@$(MKCONFIG) $(@:_config=) arm pxa xaeniax
2499
2500xm250_config	:	unconfig
2501	@$(MKCONFIG) $(@:_config=) arm pxa xm250
2502
2503xsengine_config :	unconfig
2504	@$(MKCONFIG) $(@:_config=) arm pxa xsengine
2505
2506zylonite_config :
2507	@$(MKCONFIG) $(@:_config=) arm pxa zylonite
2508
2509#########################################################################
2510## ARM1136 Systems
2511#########################################################################
2512omap2420h4_config	: unconfig
2513	@$(MKCONFIG) $(@:_config=) arm arm1136 omap2420h4
2514
2515apollon_config		: unconfig
2516	@$(MKCONFIG) $(@:_config=) arm arm1136 apollon
2517
2518#========================================================================
2519# i386
2520#========================================================================
2521#########################################################################
2522## AMD SC520 CDP
2523#########################################################################
2524sc520_cdp_config	:	unconfig
2525	@$(MKCONFIG) $(@:_config=) i386 i386 sc520_cdp
2526
2527sc520_spunk_config	:	unconfig
2528	@$(MKCONFIG) $(@:_config=) i386 i386 sc520_spunk
2529
2530sc520_spunk_rel_config	:	unconfig
2531	@$(MKCONFIG) $(@:_config=) i386 i386 sc520_spunk
2532
2533#========================================================================
2534# MIPS
2535#========================================================================
2536#########################################################################
2537## MIPS32 4Kc
2538#########################################################################
2539
2540xtract_incaip = $(subst _100MHz,,$(subst _133MHz,,$(subst _150MHz,,$(subst _config,,$1))))
2541
2542incaip_100MHz_config	\
2543incaip_133MHz_config	\
2544incaip_150MHz_config	\
2545incaip_config: unconfig
2546	@mkdir -p $(obj)include
2547	@ >$(obj)include/config.h
2548	@[ -z "$(findstring _100MHz,$@)" ] || \
2549		{ echo "#define CPU_CLOCK_RATE 100000000" >>$(obj)include/config.h ; \
2550		  $(XECHO) "... with 100MHz system clock" ; \
2551		}
2552	@[ -z "$(findstring _133MHz,$@)" ] || \
2553		{ echo "#define CPU_CLOCK_RATE 133000000" >>$(obj)include/config.h ; \
2554		  $(XECHO) "... with 133MHz system clock" ; \
2555		}
2556	@[ -z "$(findstring _150MHz,$@)" ] || \
2557		{ echo "#define CPU_CLOCK_RATE 150000000" >>$(obj)include/config.h ; \
2558		  $(XECHO) "... with 150MHz system clock" ; \
2559		}
2560	@$(MKCONFIG) -a $(call xtract_incaip,$@) mips mips incaip
2561
2562tb0229_config: unconfig
2563	@$(MKCONFIG) $(@:_config=) mips mips tb0229
2564
2565#########################################################################
2566## MIPS32 AU1X00
2567#########################################################################
2568dbau1000_config		:	unconfig
2569	@mkdir -p $(obj)include
2570	@ >$(obj)include/config.h
2571	@echo "#define CONFIG_DBAU1000 1" >>$(obj)include/config.h
2572	@$(MKCONFIG) -a dbau1x00 mips mips dbau1x00
2573
2574dbau1100_config		:	unconfig
2575	@mkdir -p $(obj)include
2576	@ >$(obj)include/config.h
2577	@echo "#define CONFIG_DBAU1100 1" >>$(obj)include/config.h
2578	@$(MKCONFIG) -a dbau1x00 mips mips dbau1x00
2579
2580dbau1500_config		:	unconfig
2581	@mkdir -p $(obj)include
2582	@ >$(obj)include/config.h
2583	@echo "#define CONFIG_DBAU1500 1" >>$(obj)include/config.h
2584	@$(MKCONFIG) -a dbau1x00 mips mips dbau1x00
2585
2586dbau1550_config		:	unconfig
2587	@mkdir -p $(obj)include
2588	@ >$(obj)include/config.h
2589	@echo "#define CONFIG_DBAU1550 1" >>$(obj)include/config.h
2590	@$(MKCONFIG) -a dbau1x00 mips mips dbau1x00
2591
2592dbau1550_el_config	:	unconfig
2593	@mkdir -p $(obj)include
2594	@ >$(obj)include/config.h
2595	@echo "#define CONFIG_DBAU1550 1" >>$(obj)include/config.h
2596	@$(MKCONFIG) -a dbau1x00 mips mips dbau1x00
2597
2598pb1000_config		:	unconfig
2599	@mkdir -p $(obj)include
2600	@ >$(obj)include/config.h
2601	@echo "#define CONFIG_PB1000 1" >>$(obj)include/config.h
2602	@$(MKCONFIG) -a pb1x00 mips mips pb1x00
2603
2604#########################################################################
2605## MIPS64 5Kc
2606#########################################################################
2607
2608purple_config :		unconfig
2609	@$(MKCONFIG) $(@:_config=) mips mips purple
2610
2611#========================================================================
2612# Nios
2613#========================================================================
2614#########################################################################
2615## Nios32
2616#########################################################################
2617
2618DK1C20_safe_32_config		\
2619DK1C20_standard_32_config	\
2620DK1C20_config:	unconfig
2621	@mkdir -p $(obj)include
2622	@ >$(obj)include/config.h
2623	@[ -z "$(findstring _safe_32,$@)" ] || \
2624		{ echo "#define CONFIG_NIOS_SAFE_32 1" >>$(obj)include/config.h ; \
2625		  $(XECHO) "... NIOS 'safe_32' configuration" ; \
2626		}
2627	@[ -z "$(findstring _standard_32,$@)" ] || \
2628		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>$(obj)include/config.h ; \
2629		  $(XECHO) "... NIOS 'standard_32' configuration" ; \
2630		}
2631	@[ -z "$(findstring DK1C20_config,$@)" ] || \
2632		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>$(obj)include/config.h ; \
2633		  $(XECHO) "... NIOS 'standard_32' configuration (DEFAULT)" ; \
2634		}
2635	@$(MKCONFIG) -a DK1C20 nios nios dk1c20 altera
2636
2637DK1S10_safe_32_config		\
2638DK1S10_standard_32_config	\
2639DK1S10_mtx_ldk_20_config	\
2640DK1S10_config:	unconfig
2641	@mkdir -p $(obj)include
2642	@ >$(obj)include/config.h
2643	@[ -z "$(findstring _safe_32,$@)" ] || \
2644		{ echo "#define CONFIG_NIOS_SAFE_32 1" >>$(obj)include/config.h ; \
2645		  $(XECHO) "... NIOS 'safe_32' configuration" ; \
2646		}
2647	@[ -z "$(findstring _standard_32,$@)" ] || \
2648		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>$(obj)include/config.h ; \
2649		  $(XECHO) "... NIOS 'standard_32' configuration" ; \
2650		}
2651	@[ -z "$(findstring _mtx_ldk_20,$@)" ] || \
2652		{ echo "#define CONFIG_NIOS_MTX_LDK_20 1" >>$(obj)include/config.h ; \
2653		  $(XECHO) "... NIOS 'mtx_ldk_20' configuration" ; \
2654		}
2655	@[ -z "$(findstring DK1S10_config,$@)" ] || \
2656		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>$(obj)include/config.h ; \
2657		  $(XECHO) "... NIOS 'standard_32' configuration (DEFAULT)" ; \
2658		}
2659	@$(MKCONFIG) -a DK1S10 nios nios dk1s10 altera
2660
2661ADNPESC1_DNPEVA2_base_32_config	\
2662ADNPESC1_base_32_config		\
2663ADNPESC1_config: unconfig
2664	@mkdir -p $(obj)include
2665	@ >$(obj)include/config.h
2666	@[ -z "$(findstring _DNPEVA2,$@)" ] || \
2667		{ echo "#define CONFIG_DNPEVA2 1" >>$(obj)include/config.h ; \
2668		  $(XECHO) "... DNP/EVA2 configuration" ; \
2669		}
2670	@[ -z "$(findstring _base_32,$@)" ] || \
2671		{ echo "#define CONFIG_NIOS_BASE_32 1" >>$(obj)include/config.h ; \
2672		  $(XECHO) "... NIOS 'base_32' configuration" ; \
2673		}
2674	@[ -z "$(findstring ADNPESC1_config,$@)" ] || \
2675		{ echo "#define CONFIG_NIOS_BASE_32 1" >>$(obj)include/config.h ; \
2676		  $(XECHO) "... NIOS 'base_32' configuration (DEFAULT)" ; \
2677		}
2678	@$(MKCONFIG) -a ADNPESC1 nios nios adnpesc1 ssv
2679
2680#########################################################################
2681## Nios-II
2682#########################################################################
2683
2684EP1C20_config : unconfig
2685	@$(MKCONFIG)  EP1C20 nios2 nios2 ep1c20 altera
2686
2687EP1S10_config : unconfig
2688	@$(MKCONFIG)  EP1S10 nios2 nios2 ep1s10 altera
2689
2690EP1S40_config : unconfig
2691	@$(MKCONFIG)  EP1S40 nios2 nios2 ep1s40 altera
2692
2693PK1C20_config : unconfig
2694	@$(MKCONFIG)  PK1C20 nios2 nios2 pk1c20 psyent
2695
2696PCI5441_config : unconfig
2697	@$(MKCONFIG)  PCI5441 nios2 nios2 pci5441 psyent
2698
2699#========================================================================
2700# MicroBlaze
2701#========================================================================
2702#########################################################################
2703## Microblaze
2704#########################################################################
2705suzaku_config:	unconfig
2706	@mkdir -p $(obj)include
2707	@ >$(obj)include/config.h
2708	@echo "#define CONFIG_SUZAKU 1" >> $(obj)include/config.h
2709	@$(MKCONFIG) -a $(@:_config=) microblaze microblaze suzaku AtmarkTechno
2710
2711ml401_config:	unconfig
2712	@mkdir -p $(obj)include
2713	@ >$(obj)include/config.h
2714	@echo "#define CONFIG_ML401 1" >> $(obj)include/config.h
2715	@$(MKCONFIG) -a $(@:_config=) microblaze microblaze ml401 xilinx
2716
2717xupv2p_config:	unconfig
2718	@mkdir -p $(obj)include
2719	@ >$(obj)include/config.h
2720	@echo "#define CONFIG_XUPV2P 1" >> $(obj)include/config.h
2721	@$(MKCONFIG) -a $(@:_config=) microblaze microblaze xupv2p xilinx
2722
2723#########################################################################
2724## Blackfin
2725#########################################################################
2726bf533-ezkit_config:	unconfig
2727	@$(MKCONFIG) $(@:_config=) blackfin bf533 bf533-ezkit
2728
2729bf533-stamp_config:	unconfig
2730	@$(MKCONFIG) $(@:_config=) blackfin bf533 bf533-stamp
2731
2732bf537-stamp_config:	unconfig
2733	@$(MKCONFIG) $(@:_config=) blackfin bf537 bf537-stamp
2734
2735bf561-ezkit_config:	unconfig
2736	@$(MKCONFIG) $(@:_config=) blackfin bf561 bf561-ezkit
2737
2738#========================================================================
2739# AVR32
2740#========================================================================
2741#########################################################################
2742## AT32AP7xxx
2743#########################################################################
2744
2745atstk1002_config	:	unconfig
2746	@$(MKCONFIG) $(@:_config=) avr32 at32ap atstk1000 atmel at32ap700x
2747
2748atstk1003_config	:	unconfig
2749	@$(MKCONFIG) $(@:_config=) avr32 at32ap atstk1000 atmel at32ap700x
2750
2751atstk1004_config	:	unconfig
2752	@$(MKCONFIG) $(@:_config=) avr32 at32ap atstk1000 atmel at32ap700x
2753
2754#########################################################################
2755#########################################################################
2756#########################################################################
2757
2758#########################################################################
2759## sh4 (Renesas SuperH)
2760#########################################################################
2761ms7750se_config: unconfig
2762	@ >$(obj)include/config.h
2763	@echo "#define CONFIG_MS7750SE 1" >> $(obj)include/config.h
2764	@./mkconfig -a $(@:_config=) sh sh4 ms7750se
2765
2766ms7722se_config :       unconfig
2767	@ >$(obj)include/config.h
2768	@echo "#define CONFIG_MS7722SE 1" >> $(obj)include/config.h
2769	@./mkconfig -a $(@:_config=) sh sh4 ms7722se
2770
2771#########################################################################
2772#########################################################################
2773#########################################################################
2774
2775clean:
2776	@find $(OBJTREE) -type f \
2777		\( -name 'core' -o -name '*.bak' -o -name '*~' \
2778		-o -name '*.o'  -o -name '*.a'  \) -print \
2779		| xargs rm -f
2780	@rm -f $(obj)examples/hello_world $(obj)examples/timer \
2781	      $(obj)examples/eepro100_eeprom $(obj)examples/sched \
2782	      $(obj)examples/mem_to_mem_idma2intr $(obj)examples/82559_eeprom \
2783	      $(obj)examples/smc91111_eeprom $(obj)examples/interrupt \
2784	      $(obj)examples/test_burst
2785	@rm -f $(obj)tools/img2srec $(obj)tools/mkimage $(obj)tools/envcrc \
2786		$(obj)tools/gen_eth_addr $(obj)tools/ubsha1
2787	@rm -f $(obj)tools/mpc86x_clk $(obj)tools/ncb
2788	@rm -f $(obj)tools/easylogo/easylogo $(obj)tools/bmp_logo
2789	@rm -f $(obj)tools/gdb/astest $(obj)tools/gdb/gdbcont $(obj)tools/gdb/gdbsend
2790	@rm -f $(obj)tools/env/fw_printenv $(obj)tools/env/fw_setenv
2791	@rm -f $(obj)board/cray/L1/bootscript.c $(obj)board/cray/L1/bootscript.image
2792	@rm -f $(obj)board/netstar/eeprom $(obj)board/netstar/crcek $(obj)board/netstar/crcit
2793	@rm -f $(obj)board/netstar/*.srec $(obj)board/netstar/*.bin
2794	@rm -f $(obj)board/trab/trab_fkt $(obj)board/voiceblue/eeprom
2795	@rm -f $(obj)board/integratorap/u-boot.lds $(obj)board/integratorcp/u-boot.lds
2796	@rm -f $(obj)board/bf533-ezkit/u-boot.lds $(obj)board/bf533-stamp/u-boot.lds
2797	@rm -f $(obj)board/bf537-stamp/u-boot.lds $(obj)board/bf561-ezkit/u-boot.lds
2798	@rm -f $(obj)include/bmp_logo.h
2799	@rm -f $(obj)nand_spl/u-boot-spl $(obj)nand_spl/u-boot-spl.map
2800	@rm -f $(obj)api_examples/demo $(VERSION_FILE)
2801
2802clobber:	clean
2803	@find $(OBJTREE) -type f \( -name .depend \
2804		-o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \
2805		-print0 \
2806		| xargs -0 rm -f
2807	@rm -f $(OBJS) $(obj)*.bak $(obj)ctags $(obj)etags $(obj)TAGS
2808	@rm -fr $(obj)*.*~
2809	@rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL)
2810	@rm -f $(obj)tools/crc32.c $(obj)tools/environment.c $(obj)tools/env/crc32.c $(obj)tools/sha1.c
2811	@rm -f $(obj)tools/inca-swap-bytes $(obj)cpu/mpc824x/bedbug_603e.c
2812	@rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
2813	@[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -lname "*" -print | xargs rm -f
2814	@[ ! -d $(obj)api_examples ] || find $(obj)api_examples -lname "*" -print | xargs rm -f
2815
2816ifeq ($(OBJTREE),$(SRCTREE))
2817mrproper \
2818distclean:	clobber unconfig
2819else
2820mrproper \
2821distclean:	clobber unconfig
2822	rm -rf $(obj)*
2823endif
2824
2825backup:
2826	F=`basename $(TOPDIR)` ; cd .. ; \
2827	gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
2828
2829#########################################################################
2830