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