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