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