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