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