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