Makefile: restore support for board shortcut targets
[kernel/u-boot.git] / Makefile
1 #
2 # (C) Copyright 2000-2010
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
24 VERSION = 2010
25 PATCHLEVEL = 09
26 SUBLEVEL =
27 EXTRAVERSION = -rc2
28 ifneq "$(SUBLEVEL)" ""
29 U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
30 else
31 U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION)
32 endif
33 TIMESTAMP_FILE = $(obj)include/timestamp_autogenerated.h
34 VERSION_FILE = $(obj)include/version_autogenerated.h
35
36 HOSTARCH := $(shell uname -m | \
37         sed -e s/i.86/i386/ \
38             -e s/sun4u/sparc64/ \
39             -e s/arm.*/arm/ \
40             -e s/sa110/arm/ \
41             -e s/ppc64/powerpc/ \
42             -e s/ppc/powerpc/ \
43             -e s/macppc/powerpc/\
44             -e s/sh.*/sh/)
45
46 HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \
47             sed -e 's/\(cygwin\).*/cygwin/')
48
49 # Set shell to bash if possible, otherwise fall back to sh
50 SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
51         else if [ -x /bin/bash ]; then echo /bin/bash; \
52         else echo sh; fi; fi)
53
54 export  HOSTARCH HOSTOS SHELL
55
56 # Deal with colliding definitions from tcsh etc.
57 VENDOR=
58
59 #########################################################################
60 # Allow for silent builds
61 ifeq (,$(findstring s,$(MAKEFLAGS)))
62 XECHO = echo
63 else
64 XECHO = :
65 endif
66
67 #########################################################################
68 #
69 # U-boot build supports producing a object files to the separate external
70 # directory. Two use cases are supported:
71 #
72 # 1) Add O= to the make command line
73 # 'make O=/tmp/build all'
74 #
75 # 2) Set environement variable BUILD_DIR to point to the desired location
76 # 'export BUILD_DIR=/tmp/build'
77 # 'make'
78 #
79 # The second approach can also be used with a MAKEALL script
80 # 'export BUILD_DIR=/tmp/build'
81 # './MAKEALL'
82 #
83 # Command line 'O=' setting overrides BUILD_DIR environent variable.
84 #
85 # When none of the above methods is used the local build is performed and
86 # the object files are placed in the source directory.
87 #
88
89 ifdef O
90 ifeq ("$(origin O)", "command line")
91 BUILD_DIR := $(O)
92 endif
93 endif
94
95 ifneq ($(BUILD_DIR),)
96 saved-output := $(BUILD_DIR)
97
98 # Attempt to create a output directory.
99 $(shell [ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR})
100
101 # Verify if it was successful.
102 BUILD_DIR := $(shell cd $(BUILD_DIR) && /bin/pwd)
103 $(if $(BUILD_DIR),,$(error output directory "$(saved-output)" does not exist))
104 endif # ifneq ($(BUILD_DIR),)
105
106 OBJTREE         := $(if $(BUILD_DIR),$(BUILD_DIR),$(CURDIR))
107 SRCTREE         := $(CURDIR)
108 TOPDIR          := $(SRCTREE)
109 LNDIR           := $(OBJTREE)
110 export  TOPDIR SRCTREE OBJTREE
111
112 MKCONFIG        := $(SRCTREE)/mkconfig
113 export MKCONFIG
114
115 ifneq ($(OBJTREE),$(SRCTREE))
116 REMOTE_BUILD    := 1
117 export REMOTE_BUILD
118 endif
119
120 # $(obj) and (src) are defined in config.mk but here in main Makefile
121 # we also need them before config.mk is included which is the case for
122 # some targets like unconfig, clean, clobber, distclean, etc.
123 ifneq ($(OBJTREE),$(SRCTREE))
124 obj := $(OBJTREE)/
125 src := $(SRCTREE)/
126 else
127 obj :=
128 src :=
129 endif
130 export obj src
131
132 # Make sure CDPATH settings don't interfere
133 unexport CDPATH
134
135 #########################################################################
136
137 # The "tools" are needed early, so put this first
138 # Don't include stuff already done in $(LIBS)
139 SUBDIRS = tools \
140           examples/standalone \
141           examples/api
142
143 .PHONY : $(SUBDIRS)
144
145 ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk))
146
147 # Include autoconf.mk before config.mk so that the config options are available
148 # to all top level build files.  We need the dummy all: target to prevent the
149 # dependency target in autoconf.mk.dep from being the default.
150 all:
151 sinclude $(obj)include/autoconf.mk.dep
152 sinclude $(obj)include/autoconf.mk
153
154 # load ARCH, BOARD, and CPU configuration
155 include $(obj)include/config.mk
156 export  ARCH CPU BOARD VENDOR SOC
157
158 # set default to nothing for native builds
159 ifeq ($(HOSTARCH),$(ARCH))
160 CROSS_COMPILE ?=
161 endif
162
163 # load other configuration
164 include $(TOPDIR)/config.mk
165
166 #########################################################################
167 # U-Boot objects....order is important (i.e. start must be first)
168
169 OBJS  = $(CPUDIR)/start.o
170 ifeq ($(CPU),i386)
171 OBJS += $(CPUDIR)/start16.o
172 OBJS += $(CPUDIR)/resetvec.o
173 endif
174 ifeq ($(CPU),ppc4xx)
175 OBJS += $(CPUDIR)/resetvec.o
176 endif
177 ifeq ($(CPU),mpc85xx)
178 OBJS += $(CPUDIR)/resetvec.o
179 endif
180
181 OBJS := $(addprefix $(obj),$(OBJS))
182
183 LIBS  = lib/libgeneric.a
184 LIBS += lib/lzma/liblzma.a
185 LIBS += lib/lzo/liblzo.a
186 LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \
187         "board/$(VENDOR)/common/lib$(VENDOR).a"; fi)
188 LIBS += $(CPUDIR)/lib$(CPU).a
189 ifdef SOC
190 LIBS += $(CPUDIR)/$(SOC)/lib$(SOC).a
191 endif
192 ifeq ($(CPU),ixp)
193 LIBS += arch/arm/cpu/ixp/npe/libnpe.a
194 endif
195 LIBS += arch/$(ARCH)/lib/lib$(ARCH).a
196 LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \
197         fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a fs/yaffs2/libyaffs2.a \
198         fs/ubifs/libubifs.a
199 LIBS += net/libnet.a
200 LIBS += disk/libdisk.a
201 LIBS += drivers/bios_emulator/libatibiosemu.a
202 LIBS += drivers/block/libblock.a
203 LIBS += drivers/dma/libdma.a
204 LIBS += drivers/fpga/libfpga.a
205 LIBS += drivers/gpio/libgpio.a
206 LIBS += drivers/hwmon/libhwmon.a
207 LIBS += drivers/i2c/libi2c.a
208 LIBS += drivers/input/libinput.a
209 LIBS += drivers/misc/libmisc.a
210 LIBS += drivers/mmc/libmmc.a
211 LIBS += drivers/mtd/libmtd.a
212 LIBS += drivers/mtd/nand/libnand.a
213 LIBS += drivers/mtd/onenand/libonenand.a
214 LIBS += drivers/mtd/ubi/libubi.a
215 LIBS += drivers/mtd/spi/libspi_flash.a
216 LIBS += drivers/net/libnet.a
217 LIBS += drivers/net/phy/libphy.a
218 LIBS += drivers/pci/libpci.a
219 LIBS += drivers/pcmcia/libpcmcia.a
220 LIBS += drivers/power/libpower.a
221 LIBS += drivers/spi/libspi.a
222 ifeq ($(CPU),mpc83xx)
223 LIBS += drivers/qe/qe.a
224 LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.a
225 endif
226 ifeq ($(CPU),mpc85xx)
227 LIBS += drivers/qe/qe.a
228 LIBS += arch/powerpc/cpu/mpc8xxx/ddr/libddr.a
229 LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.a
230 endif
231 ifeq ($(CPU),mpc86xx)
232 LIBS += arch/powerpc/cpu/mpc8xxx/ddr/libddr.a
233 LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.a
234 endif
235 LIBS += drivers/rtc/librtc.a
236 LIBS += drivers/serial/libserial.a
237 LIBS += drivers/twserial/libtws.a
238 LIBS += drivers/usb/gadget/libusb_gadget.a
239 LIBS += drivers/usb/host/libusb_host.a
240 LIBS += drivers/usb/musb/libusb_musb.a
241 LIBS += drivers/usb/phy/libusb_phy.a
242 LIBS += drivers/video/libvideo.a
243 LIBS += drivers/watchdog/libwatchdog.a
244 LIBS += common/libcommon.a
245 LIBS += lib/libfdt/libfdt.a
246 LIBS += api/libapi.a
247 LIBS += post/libpost.a
248
249 ifeq ($(SOC),omap3)
250 LIBS += $(CPUDIR)/omap-common/libomap-common.a
251 endif
252 ifeq ($(SOC),omap4)
253 LIBS += $(CPUDIR)/omap-common/libomap-common.a
254 endif
255
256 ifeq ($(SOC),s5pc1xx)
257 LIBS += $(CPUDIR)/s5p-common/libs5p-common.a
258 endif
259 ifeq ($(SOC),s5pc2xx)
260 LIBS += $(CPUDIR)/s5p-common/libs5p-common.a
261 endif
262
263 LIBS := $(addprefix $(obj),$(LIBS))
264 .PHONY : $(LIBS) $(TIMESTAMP_FILE) $(VERSION_FILE)
265
266 LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).a
267 LIBBOARD := $(addprefix $(obj),$(LIBBOARD))
268
269 # Add GCC lib
270 ifdef USE_PRIVATE_LIBGCC
271 ifeq ("$(USE_PRIVATE_LIBGCC)", "yes")
272 PLATFORM_LIBGCC = -L $(OBJTREE)/arch/$(ARCH)/lib -lgcc
273 else
274 PLATFORM_LIBGCC = -L $(USE_PRIVATE_LIBGCC) -lgcc
275 endif
276 else
277 PLATFORM_LIBGCC = -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
278 endif
279 PLATFORM_LIBS += $(PLATFORM_LIBGCC)
280 export PLATFORM_LIBS
281
282 # Special flags for CPP when processing the linker script.
283 # Pass the version down so we can handle backwards compatibility
284 # on the fly.
285 LDPPFLAGS += \
286         -include $(TOPDIR)/include/u-boot/u-boot.lds.h \
287         $(shell $(LD) --version | \
288           sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
289
290 ifeq ($(CONFIG_NAND_U_BOOT),y)
291 NAND_SPL = nand_spl
292 U_BOOT_NAND = $(obj)u-boot-nand.bin
293 endif
294
295 ifeq ($(CONFIG_ONENAND_U_BOOT),y)
296 ONENAND_IPL = onenand_ipl
297 U_BOOT_ONENAND = $(obj)u-boot-onenand.bin
298 ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin
299 endif
300
301 __OBJS := $(subst $(obj),,$(OBJS))
302 __LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
303
304 #########################################################################
305 #########################################################################
306
307 # Always append ALL so that arch config.mk's can add custom ones
308 ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND)
309
310 all:            $(ALL)
311
312 $(obj)u-boot.hex:       $(obj)u-boot
313                 $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@
314
315 $(obj)u-boot.srec:      $(obj)u-boot
316                 $(OBJCOPY) -O srec $< $@
317
318 $(obj)u-boot.bin:       $(obj)u-boot
319                 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
320
321 $(obj)u-boot.ldr:       $(obj)u-boot
322                 $(CREATE_LDR_ENV)
323                 $(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS)
324
325 $(obj)u-boot.ldr.hex:   $(obj)u-boot.ldr
326                 $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary
327
328 $(obj)u-boot.ldr.srec:  $(obj)u-boot.ldr
329                 $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary
330
331 $(obj)u-boot.img:       $(obj)u-boot.bin
332                 $(obj)tools/mkimage -A $(ARCH) -T firmware -C none \
333                 -a $(TEXT_BASE) -e 0 \
334                 -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
335                         sed -e 's/"[     ]*$$/ for $(BOARD) board"/') \
336                 -d $< $@
337
338 $(obj)u-boot.imx:       $(obj)u-boot.bin
339                 $(obj)tools/mkimage -n $(IMX_CONFIG) -T imximage \
340                 -e $(TEXT_BASE) -d $< $@
341
342 $(obj)u-boot.kwb:       $(obj)u-boot.bin
343                 $(obj)tools/mkimage -n $(KWD_CONFIG) -T kwbimage \
344                 -a $(TEXT_BASE) -e $(TEXT_BASE) -d $< $@
345
346 $(obj)u-boot.sha1:      $(obj)u-boot.bin
347                 $(obj)tools/ubsha1 $(obj)u-boot.bin
348
349 $(obj)u-boot.dis:       $(obj)u-boot
350                 $(OBJDUMP) -d $< > $@
351
352 GEN_UBOOT = \
353                 UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
354                 sed  -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
355                 cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
356                         --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
357                         -Map u-boot.map -o u-boot
358 $(obj)u-boot:   depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT) $(obj)u-boot.lds
359                 $(GEN_UBOOT)
360 ifeq ($(CONFIG_KALLSYMS),y)
361                 smap=`$(call SYSTEM_MAP,u-boot) | \
362                         awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \
363                 $(CC) $(CFLAGS) -DSYSTEM_MAP="\"$${smap}\"" \
364                         -c common/system_map.c -o $(obj)common/system_map.o
365                 $(GEN_UBOOT) $(obj)common/system_map.o
366 endif
367
368 $(OBJS):        depend
369                 $(MAKE) -C $(CPUDIR) $(if $(REMOTE_BUILD),$@,$(notdir $@))
370
371 $(LIBS):        depend $(SUBDIRS)
372                 $(MAKE) -C $(dir $(subst $(obj),,$@))
373
374 $(LIBBOARD):    depend $(LIBS)
375                 $(MAKE) -C $(dir $(subst $(obj),,$@))
376
377 $(SUBDIRS):     depend
378                 $(MAKE) -C $@ all
379
380 $(LDSCRIPT):    depend
381                 $(MAKE) -C $(dir $@) $(notdir $@)
382
383 $(obj)u-boot.lds: $(LDSCRIPT)
384                 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
385
386 $(NAND_SPL):    $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
387                 $(MAKE) -C nand_spl/board/$(BOARDDIR) all
388
389 $(U_BOOT_NAND): $(NAND_SPL) $(obj)u-boot.bin
390                 cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
391
392 $(ONENAND_IPL): $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
393                 $(MAKE) -C onenand_ipl/board/$(BOARDDIR) all
394
395 $(U_BOOT_ONENAND):      $(ONENAND_IPL) $(obj)u-boot.bin
396                 cat $(ONENAND_BIN) $(obj)u-boot.bin > $(obj)u-boot-onenand.bin
397
398 $(VERSION_FILE):
399                 @( printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' "$(U_BOOT_VERSION)" \
400                  '$(shell $(TOPDIR)/tools/setlocalversion $(TOPDIR))' ) > $@.tmp
401                 @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
402
403 $(TIMESTAMP_FILE):
404                 @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
405                 @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@
406
407 gdbtools:
408                 $(MAKE) -C tools/gdb all || exit 1
409
410 updater:
411                 $(MAKE) -C tools/updater all || exit 1
412
413 env:
414                 $(MAKE) -C tools/env all MTD_VERSION=${MTD_VERSION} || exit 1
415
416 # Explicitly make _depend in subdirs containing multiple targets to prevent
417 # parallel sub-makes creating .depend files simultaneously.
418 depend dep:     $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
419                 for dir in $(SUBDIRS) $(CPUDIR) $(dir $(LDSCRIPT)) ; do \
420                         $(MAKE) -C $$dir _depend ; done
421
422 TAG_SUBDIRS = $(SUBDIRS)
423 TAG_SUBDIRS += $(dir $(__LIBS))
424 TAG_SUBDIRS += include
425
426 tags ctags:
427                 ctags -w -o $(obj)ctags `find $(TAG_SUBDIRS) \
428                                                 -name '*.[chS]' -print`
429
430 etags:
431                 etags -a -o $(obj)etags `find $(TAG_SUBDIRS) \
432                                                 -name '*.[chS]' -print`
433 cscope:
434                 find $(TAG_SUBDIRS) -name '*.[chS]' -print > cscope.files
435                 cscope -b -q -k
436
437 SYSTEM_MAP = \
438                 $(NM) $1 | \
439                 grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
440                 LC_ALL=C sort
441 $(obj)System.map:       $(obj)u-boot
442                 @$(call SYSTEM_MAP,$<) > $(obj)System.map
443
444 #
445 # Auto-generate the autoconf.mk file (which is included by all makefiles)
446 #
447 # This target actually generates 2 files; autoconf.mk and autoconf.mk.dep.
448 # the dep file is only include in this top level makefile to determine when
449 # to regenerate the autoconf.mk file.
450 $(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h
451         @$(XECHO) Generating $@ ; \
452         set -e ; \
453         : Generate the dependancies ; \
454         $(CC) -x c -DDO_DEPS_ONLY -M $(HOSTCFLAGS) $(CPPFLAGS) \
455                 -MQ $(obj)include/autoconf.mk include/common.h > $@
456
457 $(obj)include/autoconf.mk: $(obj)include/config.h
458         @$(XECHO) Generating $@ ; \
459         set -e ; \
460         : Extract the config macros ; \
461         $(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM include/common.h | \
462                 sed -n -f tools/scripts/define2mk.sed > $@.tmp && \
463         mv $@.tmp $@
464
465 #########################################################################
466 else    # !config.mk
467 all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \
468 $(obj)u-boot.img $(obj)u-boot.dis $(obj)u-boot \
469 $(filter-out tools,$(SUBDIRS)) $(TIMESTAMP_FILE) $(VERSION_FILE) gdbtools \
470 updater env depend dep tags ctags etags cscope $(obj)System.map:
471         @echo "System not configured - see README" >&2
472         @ exit 1
473
474 tools:
475         $(MAKE) -C tools
476 tools-all:
477         $(MAKE) -C tools HOST_TOOLS_ALL=y
478 endif   # config.mk
479
480 .PHONY : CHANGELOG
481 CHANGELOG:
482         git log --no-merges U-Boot-1_1_5.. | \
483         unexpand -a | sed -e 's/\s\s*$$//' > $@
484
485 include/license.h: tools/bin2header COPYING
486         cat COPYING | gzip -9 -c | ./tools/bin2header license_gzip > include/license.h
487 #########################################################################
488
489 unconfig:
490         @rm -f $(obj)include/config.h $(obj)include/config.mk \
491                 $(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \
492                 $(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep
493
494 %_config::      unconfig
495         @$(MKCONFIG) -A $(@:_config=)
496
497 sinclude .boards.depend
498 .boards.depend: boards.cfg
499         awk '(NF && $$1 !~ /^#/) { print $$1 ": " $$1 "_config; $$(MAKE)" }' $< > $@
500
501 #
502 # Functions to generate common board directory names
503 #
504 lcname  = $(shell echo $(1) | sed -e 's/\(.*\)_config/\L\1/')
505 ucname  = $(shell echo $(1) | sed -e 's/\(.*\)_config/\U\1/')
506
507 #========================================================================
508 # PowerPC
509 #========================================================================
510
511 #########################################################################
512 ## MPC5xxx Systems
513 #########################################################################
514
515 digsy_mtc_config \
516 digsy_mtc_LOWBOOT_config        \
517 digsy_mtc_RAMBOOT_config:       unconfig
518         @mkdir -p $(obj)include
519         @mkdir -p $(obj)board/digsy_mtc
520         @ >$(obj)include/config.h
521         @[ -z "$(findstring LOWBOOT_,$@)" ] || \
522                 echo "TEXT_BASE = 0xFF000000" >$(obj)board/digsy_mtc/config.tmp
523         @[ -z "$(findstring RAMBOOT_,$@)" ] || \
524                 echo "TEXT_BASE = 0x00100000" >$(obj)board/digsy_mtc/config.tmp
525         @$(MKCONFIG) -n $@ -a digsy_mtc powerpc mpc5xxx digsy_mtc
526
527 galaxy5200_LOWBOOT_config \
528 galaxy5200_config:      unconfig
529         @mkdir -p $(obj)include
530         @echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
531         @$(MKCONFIG) -n $@ -a galaxy5200 powerpc mpc5xxx galaxy5200
532
533 Lite5200_config                         \
534 Lite5200_LOWBOOT_config                 \
535 Lite5200_LOWBOOT08_config               \
536 icecube_5200_config                     \
537 icecube_5200_LOWBOOT_config             \
538 icecube_5200_LOWBOOT08_config           \
539 icecube_5200_DDR_config                 \
540 icecube_5200_DDR_LOWBOOT_config         \
541 icecube_5200_DDR_LOWBOOT08_config:      unconfig
542         @mkdir -p $(obj)include
543         @mkdir -p $(obj)board/icecube
544         @[ -z "$(findstring LOWBOOT_,$@)" ] || \
545                 if [ "$(findstring DDR,$@)" ] ; \
546                         then echo "TEXT_BASE = 0xFF800000" >$(obj)board/icecube/config.tmp ; \
547                         else echo "TEXT_BASE = 0xFF000000" >$(obj)board/icecube/config.tmp ; \
548                 fi
549         @[ -z "$(findstring LOWBOOT08,$@)" ] || \
550                 echo "TEXT_BASE = 0xFF800000" >$(obj)board/icecube/config.tmp
551         @[ -z "$(findstring DDR,$@)" ] || \
552                 echo "#define CONFIG_MPC5200_DDR" >>$(obj)include/config.h
553         @$(MKCONFIG) -n $@ -a IceCube powerpc mpc5xxx icecube
554
555 lite5200b_config        \
556 lite5200b_PM_config     \
557 lite5200b_LOWBOOT_config:       unconfig
558         @mkdir -p $(obj)include
559         @mkdir -p $(obj)board/icecube
560         @ echo "#define CONFIG_MPC5200_DDR"     >>$(obj)include/config.h
561         @ echo "#define CONFIG_LITE5200B"       >>$(obj)include/config.h
562         @[ -z "$(findstring _PM_,$@)" ] || \
563                 echo "#define CONFIG_LITE5200B_PM" >>$(obj)include/config.h
564         @[ -z "$(findstring LOWBOOT_,$@)" ] || \
565                 echo "TEXT_BASE = 0xFF000000" >$(obj)board/icecube/config.tmp
566         @$(MKCONFIG) -n $@ -a IceCube  powerpc mpc5xxx icecube
567
568 mcc200_config   \
569 mcc200_SDRAM_config     \
570 mcc200_highboot_config  \
571 mcc200_COM12_config     \
572 mcc200_COM12_SDRAM_config       \
573 mcc200_COM12_highboot_config    \
574 mcc200_COM12_highboot_SDRAM_config      \
575 mcc200_highboot_SDRAM_config    \
576 prs200_config   \
577 prs200_DDR_config       \
578 prs200_highboot_config  \
579 prs200_highboot_DDR_config:     unconfig
580         @mkdir -p $(obj)include
581         @mkdir -p $(obj)board/mcc200
582         @[ -z "$(findstring highboot,$@)" ] || \
583                 echo "TEXT_BASE = 0xFFF00000" >$(obj)board/mcc200/config.tmp
584         @[ -n "$(findstring _SDRAM,$@)" ] || \
585                 if [ -n "$(findstring prs200,$@)" ]; \
586                 then \
587                         if [ -z "$(findstring _DDR,$@)" ];\
588                         then \
589                                 echo "#define CONFIG_MCC200_SDRAM" >>$(obj)include/config.h ;\
590                         fi; \
591                 fi
592         @[ -z "$(findstring _SDRAM,$@)" ] || \
593                 echo "#define CONFIG_MCC200_SDRAM" >>$(obj)include/config.h
594         @[ -z "$(findstring COM12,$@)" ] || \
595                 echo "#define CONFIG_CONSOLE_COM12" >>$(obj)include/config.h
596         @[ -z "$(findstring prs200,$@)" ] || \
597                 echo "#define CONFIG_PRS200" >>$(obj)include/config.h
598         @$(MKCONFIG) -n $@ -a mcc200 powerpc mpc5xxx mcc200
599
600 MVBC_P_config: unconfig
601         @mkdir -p $(obj)include
602         @mkdir -p $(obj)board/mvbc_p
603         @ >$(obj)include/config.h
604         @[ -z "$(findstring MVBC_P,$@)" ] || \
605                 echo "#define CONFIG_MVBC_P" >>$(obj)include/config.h
606         @$(MKCONFIG) -n $@ -a $@ powerpc mpc5xxx mvbc_p matrix_vision
607
608 MVSMR_config: unconfig
609         @mkdir -p $(obj)include
610         @mkdir -p $(obj)board/matrix_vision/mvsmr
611         @$(MKCONFIG) $@ powerpc mpc5xxx mvsmr matrix_vision
612
613 pcm030_config \
614 pcm030_LOWBOOT_config:  unconfig
615         @mkdir -p $(obj)include $(obj)board/phytec/pcm030
616         @ >$(obj)include/config.h
617         @[ -z "$(findstring LOWBOOT_,$@)" ] || \
618                 echo "TEXT_BASE = 0xFF000000" >$(obj)board/phytec/pcm030/config.tmp
619         @$(MKCONFIG) -n $@ -a pcm030 powerpc mpc5xxx pcm030 phytec
620
621 PM520_config \
622 PM520_DDR_config \
623 PM520_ROMBOOT_config \
624 PM520_ROMBOOT_DDR_config:       unconfig
625         @mkdir -p $(obj)include
626         @[ -z "$(findstring DDR,$@)" ] || \
627                 echo "#define CONFIG_MPC5200_DDR" >>$(obj)include/config.h
628         @[ -z "$(findstring ROMBOOT,$@)" ] || \
629                 echo "#define CONFIG_BOOT_ROM" >>$(obj)include/config.h
630         @$(MKCONFIG) -n $@ -a PM520 powerpc mpc5xxx pm520
631
632 TB5200_B_config \
633 TB5200_config:  unconfig
634         @mkdir -p $(obj)include
635         @[ -z "$(findstring _B,$@)" ] || \
636                 echo "#define CONFIG_TQM5200_B" >>$(obj)include/config.h
637         @$(MKCONFIG) -n $@ -a TB5200 powerpc mpc5xxx tqm5200 tqc
638
639 MINI5200_config \
640 EVAL5200_config \
641 TOP5200_config: unconfig
642         @mkdir -p $(obj)include
643         @ echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
644         @$(MKCONFIG) -n $@ -a TOP5200 powerpc mpc5xxx top5200 emk
645
646 Total5200_config                \
647 Total5200_lowboot_config        \
648 Total5200_Rev2_config           \
649 Total5200_Rev2_lowboot_config:  unconfig
650         @mkdir -p $(obj)include
651         @mkdir -p $(obj)board/total5200
652         @[ -n "$(findstring Rev,$@)" ] || \
653                 echo "#define CONFIG_TOTAL5200_REV 1" >>$(obj)include/config.h
654         @[ -z "$(findstring Rev2_,$@)" ] || \
655                 echo "#define CONFIG_TOTAL5200_REV 2" >>$(obj)include/config.h
656         @[ -z "$(findstring lowboot_,$@)" ] || \
657                 echo "TEXT_BASE = 0xFE000000" >$(obj)board/total5200/config.tmp
658         @$(MKCONFIG) -n $@ -a Total5200 powerpc mpc5xxx total5200
659
660 cam5200_config \
661 cam5200_niosflash_config \
662 fo300_config \
663 MiniFAP_config \
664 TQM5200S_config \
665 TQM5200S_HIGHBOOT_config \
666 TQM5200_B_config \
667 TQM5200_B_HIGHBOOT_config \
668 TQM5200_config  \
669 TQM5200_STK100_config:  unconfig
670         @mkdir -p $(obj)include
671         @mkdir -p $(obj)board/tqc/tqm5200
672         @[ -z "$(findstring cam5200,$@)" ] || \
673                 { echo "#define CONFIG_CAM5200"   >>$(obj)include/config.h ; \
674                   echo "#define CONFIG_TQM5200S"  >>$(obj)include/config.h ; \
675                   echo "#define CONFIG_TQM5200_B" >>$(obj)include/config.h ; \
676                 }
677         @[ -z "$(findstring niosflash,$@)" ] || \
678                 echo "#define CONFIG_CAM5200_NIOSFLASH" >>$(obj)include/config.h
679         @[ -z "$(findstring fo300,$@)" ] || \
680                 echo "#define CONFIG_FO300" >>$(obj)include/config.h
681         @[ -z "$(findstring MiniFAP,$@)" ] || \
682                 echo "#define CONFIG_MINIFAP" >>$(obj)include/config.h
683         @[ -z "$(findstring STK100,$@)" ] || \
684                 echo "#define CONFIG_STK52XX_REV100" >>$(obj)include/config.h
685         @[ -z "$(findstring TQM5200_B,$@)" ] || \
686                 echo "#define CONFIG_TQM5200_B" >>$(obj)include/config.h
687         @[ -z "$(findstring TQM5200S,$@)" ] || \
688                 { echo "#define CONFIG_TQM5200S"  >>$(obj)include/config.h ; \
689                   echo "#define CONFIG_TQM5200_B" >>$(obj)include/config.h ; \
690                 }
691         @[ -z "$(findstring HIGHBOOT,$@)" ] || \
692                 echo "TEXT_BASE = 0xFFF00000" >$(obj)board/tqm5200/config.tmp
693         @$(MKCONFIG) -n $@ -a TQM5200 powerpc mpc5xxx tqm5200 tqc
694
695 #########################################################################
696 ## MPC512x Systems
697 #########################################################################
698
699 mpc5121ads_config \
700 mpc5121ads_rev2_config  \
701         : unconfig
702         @mkdir -p $(obj)include
703         @if [ "$(findstring rev2,$@)" ] ; then \
704                 echo "#define CONFIG_ADS5121_REV2 1" > $(obj)include/config.h; \
705         fi
706         @$(MKCONFIG) -n $@ -a mpc5121ads powerpc mpc512x mpc5121ads freescale
707
708 #########################################################################
709 ## MPC8xx Systems
710 #########################################################################
711
712 Adder87x_config \
713 AdderII_config  \
714 AdderUSB_config \
715 Adder_config    \
716         :               unconfig
717         @mkdir -p $(obj)include
718         $(if $(findstring AdderII,$@), \
719                 @echo "#define CONFIG_MPC852T" > $(obj)include/config.h)
720         @$(MKCONFIG) -n $@ -a Adder powerpc mpc8xx adder
721
722 ADS860_config     \
723 FADS823_config    \
724 FADS850SAR_config \
725 MPC86xADS_config  \
726 MPC885ADS_config  \
727 FADS860T_config:        unconfig
728         @$(MKCONFIG) -n $@ $@ powerpc mpc8xx fads
729
730 GEN860T_SC_config       \
731 GEN860T_config: unconfig
732         @mkdir -p $(obj)include
733         @[ -z "$(findstring _SC,$@)" ] || \
734                 echo "#define CONFIG_SC" >>$(obj)include/config.h
735         @$(MKCONFIG) -n $@ -a GEN860T powerpc mpc8xx gen860t
736
737 ICU862_100MHz_config    \
738 ICU862_config: unconfig
739         @mkdir -p $(obj)include
740         @[ -z "$(findstring _100MHz,$@)" ] || \
741                 echo "#define CONFIG_100MHz" >>$(obj)include/config.h
742         @$(MKCONFIG) -n $@ -a ICU862 powerpc mpc8xx icu862
743
744 IVML24_256_config \
745 IVML24_128_config \
746 IVML24_config:  unconfig
747         @mkdir -p $(obj)include
748         @[ -z "$(findstring IVML24_config,$@)" ] || \
749                 echo "#define CONFIG_IVML24_16M" >>$(obj)include/config.h
750         @[ -z "$(findstring IVML24_128_config,$@)" ] || \
751                 echo "#define CONFIG_IVML24_32M" >>$(obj)include/config.h
752         @[ -z "$(findstring IVML24_256_config,$@)" ] || \
753                 echo "#define CONFIG_IVML24_64M" >>$(obj)include/config.h
754         @$(MKCONFIG) -n $@ -a IVML24 powerpc mpc8xx ivm
755
756 IVMS8_256_config \
757 IVMS8_128_config \
758 IVMS8_config:   unconfig
759         @mkdir -p $(obj)include
760         @[ -z "$(findstring IVMS8_config,$@)" ] || \
761                 echo "#define CONFIG_IVMS8_16M" >>$(obj)include/config.h
762         @[ -z "$(findstring IVMS8_128_config,$@)" ] || \
763                 echo "#define CONFIG_IVMS8_32M" >>$(obj)include/config.h
764         @[ -z "$(findstring IVMS8_256_config,$@)" ] || \
765                 echo "#define CONFIG_IVMS8_64M" >>$(obj)include/config.h
766         @$(MKCONFIG) -n $@ -a IVMS8 powerpc mpc8xx ivm
767
768 MBX_config      \
769 MBX860T_config: unconfig
770         @$(MKCONFIG) -n $@ $@ powerpc mpc8xx mbx8xx
771
772 NETVIA_V2_config \
773 NETVIA_config:          unconfig
774         @mkdir -p $(obj)include
775         @[ -z "$(findstring NETVIA_config,$@)" ] || \
776                 echo "#define CONFIG_NETVIA_VERSION 1" >>$(obj)include/config.h
777         @[ -z "$(findstring NETVIA_V2_config,$@)" ] || \
778                 echo "#define CONFIG_NETVIA_VERSION 2" >>$(obj)include/config.h
779         @$(MKCONFIG) -n $@ -a NETVIA powerpc mpc8xx netvia
780
781 NETPHONE_V2_config \
782 NETPHONE_config:        unconfig
783         @mkdir -p $(obj)include
784         @[ -z "$(findstring NETPHONE_config,$@)" ] || \
785                 echo "#define CONFIG_NETPHONE_VERSION 1" >>$(obj)include/config.h
786         @[ -z "$(findstring NETPHONE_V2_config,$@)" ] || \
787                 echo "#define CONFIG_NETPHONE_VERSION 2" >>$(obj)include/config.h
788         @$(MKCONFIG) -n $@ -a NETPHONE powerpc mpc8xx netphone
789
790 NETTA_ISDN_6412_SWAPHOOK_config \
791 NETTA_ISDN_SWAPHOOK_config \
792 NETTA_6412_SWAPHOOK_config \
793 NETTA_SWAPHOOK_config \
794 NETTA_ISDN_6412_config \
795 NETTA_ISDN_config \
796 NETTA_6412_config \
797 NETTA_config:           unconfig
798         @mkdir -p $(obj)include
799         @[ -z "$(findstring ISDN_,$@)" ] || \
800                 echo "#define CONFIG_NETTA_ISDN 1" >>$(obj)include/config.h
801         @[ -n "$(findstring ISDN_,$@)" ] || \
802                 echo "#undef CONFIG_NETTA_ISDN" >>$(obj)include/config.h
803         @[ -z "$(findstring 6412_,$@)" ] || \
804                 echo "#define CONFIG_NETTA_6412 1" >>$(obj)include/config.h
805         @[ -n "$(findstring 6412_,$@)" ] || \
806                 echo "#undef CONFIG_NETTA_6412" >>$(obj)include/config.h
807         @[ -z "$(findstring SWAPHOOK_,$@)" ] || \
808                 echo "#define CONFIG_NETTA_SWAPHOOK 1" >>$(obj)include/config.h
809         @[ -n "$(findstring SWAPHOOK_,$@)" ] || \
810                 echo "#undef CONFIG_NETTA_SWAPHOOK" >>$(obj)include/config.h
811         @$(MKCONFIG) -n $@ -a NETTA powerpc mpc8xx netta
812
813 NETTA2_V2_config \
814 NETTA2_config:          unconfig
815         @mkdir -p $(obj)include
816         @[ -z "$(findstring NETTA2_config,$@)" ] || \
817                 echo "#define CONFIG_NETTA2_VERSION 1" >>$(obj)include/config.h
818         @[ -z "$(findstring NETTA2_V2_config,$@)" ] || \
819                 echo "#define CONFIG_NETTA2_VERSION 2" >>$(obj)include/config.h
820         @$(MKCONFIG) -n $@ -a NETTA2 powerpc mpc8xx netta2
821
822 NC650_Rev1_config \
823 NC650_Rev2_config \
824 CP850_config:   unconfig
825         @mkdir -p $(obj)include
826         @[ -z "$(findstring CP850,$@)" ] || \
827                 { echo "#define CONFIG_CP850 1" >>$(obj)include/config.h ; \
828                   echo "#define CONFIG_IDS852_REV2 1" >>$(obj)include/config.h ; \
829                 }
830         @[ -z "$(findstring Rev1,$@)" ] || \
831                 { echo "#define CONFIG_IDS852_REV1 1" >>$(obj)include/config.h ; \
832                 }
833         @[ -z "$(findstring Rev2,$@)" ] || \
834                 { echo "#define CONFIG_IDS852_REV2 1" >>$(obj)include/config.h ; \
835                 }
836         @$(MKCONFIG) -n $@ -a NC650 powerpc mpc8xx nc650
837
838 RPXlite_DW_64_config            \
839 RPXlite_DW_LCD_config           \
840 RPXlite_DW_64_LCD_config        \
841 RPXlite_DW_NVRAM_config         \
842 RPXlite_DW_NVRAM_64_config      \
843 RPXlite_DW_NVRAM_LCD_config     \
844 RPXlite_DW_NVRAM_64_LCD_config  \
845 RPXlite_DW_config:      unconfig
846         @mkdir -p $(obj)include
847         @[ -z "$(findstring _64,$@)" ] || \
848                 echo "#define RPXlite_64MHz"            >>$(obj)include/config.h
849         @[ -z "$(findstring _LCD,$@)" ] || \
850                 { echo "#define CONFIG_LCD"             >>$(obj)include/config.h ; \
851                   echo "#define CONFIG_NEC_NL6448BC20"  >>$(obj)include/config.h ; \
852                 }
853         @[ -z "$(findstring _NVRAM,$@)" ] || \
854                 echo "#define  CONFIG_ENV_IS_IN_NVRAM"  >>$(obj)include/config.h
855         @$(MKCONFIG) -n $@ -a RPXlite_DW powerpc mpc8xx RPXlite_dw
856
857 RRvision_LCD_config:    unconfig
858         @mkdir -p $(obj)include
859         @echo "#define CONFIG_LCD" >$(obj)include/config.h
860         @echo "#define CONFIG_SHARP_LQ104V7DS01" >>$(obj)include/config.h
861         @$(MKCONFIG) -a RRvision powerpc mpc8xx RRvision
862
863 SPD823TS_config:        unconfig
864         @$(MKCONFIG) $@ powerpc mpc8xx spd8xx
865
866 SXNI855T_config:        unconfig
867         @$(MKCONFIG) $@ powerpc mpc8xx sixnet
868
869 # Play some tricks for configuration selection
870 # Only 855 and 860 boards may come with FEC
871 # and only 823 boards may have LCD support
872 xtract_8xx = $(subst _LCD,,$1)
873
874 FPS850L_config          \
875 FPS860L_config          \
876 NSCU_config             \
877 TQM823L_config          \
878 TQM823L_LCD_config      \
879 TQM850L_config          \
880 TQM855L_config          \
881 TQM860L_config          \
882 TQM862L_config          \
883 TQM823M_config          \
884 TQM850M_config          \
885 TQM855M_config          \
886 TQM860M_config          \
887 TQM862M_config          \
888 TQM866M_config          \
889 TQM885D_config          \
890 TK885D_config           \
891 virtlab2_config:        unconfig
892         @mkdir -p $(obj)include
893         @[ -z "$(findstring _LCD,$@)" ] || \
894                 { echo "#define CONFIG_LCD"             >>$(obj)include/config.h ; \
895                   echo "#define CONFIG_NEC_NL6448BC20"  >>$(obj)include/config.h ; \
896                 }
897         @$(MKCONFIG) -n $@ -a $(call xtract_8xx,$@) powerpc mpc8xx tqm8xx tqc
898
899 TTTech_config:  unconfig
900         @mkdir -p $(obj)include
901         @echo "#define CONFIG_LCD" >$(obj)include/config.h
902         @echo "#define CONFIG_SHARP_LQ104V7DS01" >>$(obj)include/config.h
903         @$(MKCONFIG) -a TQM823L powerpc mpc8xx tqm8xx tqc
904
905 v37_config:     unconfig
906         @mkdir -p $(obj)include
907         @echo "#define CONFIG_LCD" >$(obj)include/config.h
908         @echo "#define CONFIG_SHARP_LQ084V1DG21" >>$(obj)include/config.h
909         @$(MKCONFIG) $@ powerpc mpc8xx v37
910
911 wtk_config:     unconfig
912         @mkdir -p $(obj)include
913         @echo "#define CONFIG_LCD" >$(obj)include/config.h
914         @echo "#define CONFIG_SHARP_LQ065T9DR51U" >>$(obj)include/config.h
915         @$(MKCONFIG) -a TQM823L powerpc mpc8xx tqm8xx tqc
916
917 #########################################################################
918 ## PPC4xx Systems
919 #########################################################################
920
921 acadia_nand_config:     unconfig
922         @mkdir -p $(obj)include $(obj)board/amcc/acadia
923         @mkdir -p $(obj)nand_spl/board/amcc/acadia
924         @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h
925         @echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/acadia/config.tmp
926         @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
927         @$(MKCONFIG) -n $@ -a acadia powerpc ppc4xx acadia amcc
928
929 bamboo_nand_config:     unconfig
930         @mkdir -p $(obj)include $(obj)board/amcc/bamboo
931         @mkdir -p $(obj)nand_spl/board/amcc/bamboo
932         @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h
933         @echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/bamboo/config.tmp
934         @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
935         @$(MKCONFIG) -n $@ -a bamboo powerpc ppc4xx bamboo amcc
936
937 # Arches, Canyonlands & Glacier use different U-Boot images
938 arches_config \
939 canyonlands_config \
940 glacier_config: unconfig
941         @mkdir -p $(obj)include
942         @echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \
943                 tr '[:lower:]' '[:upper:]')" >$(obj)include/config.h
944         @$(MKCONFIG) -n $@ -a canyonlands powerpc ppc4xx canyonlands amcc
945
946 canyonlands_nand_config \
947 glacier_nand_config:    unconfig
948         @mkdir -p $(obj)include $(obj)board/amcc/canyonlands
949         @mkdir -p $(obj)nand_spl/board/amcc/canyonlands
950         @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h
951         @echo "#define CONFIG_$$(echo $(subst ,,$(@:_nand_config=)) | \
952                 tr '[:lower:]' '[:upper:]')" >> $(obj)include/config.h
953         @echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/canyonlands/config.tmp
954         @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
955         @$(MKCONFIG) -n $@ -a canyonlands powerpc ppc4xx canyonlands amcc
956
957 CATcenter_config        \
958 CATcenter_25_config     \
959 CATcenter_33_config:    unconfig
960         @mkdir -p $(obj)include
961         @echo "/* CATcenter uses PPChameleon Model ME */"  > $(obj)include/config.h
962         @echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >> $(obj)include/config.h
963         @[ -z "$(findstring _25,$@)" ] || \
964                 echo "#define CONFIG_PPCHAMELEON_CLK_25" >> $(obj)include/config.h
965         @[ -z "$(findstring _33,$@)" ] || \
966                 echo "#define CONFIG_PPCHAMELEON_CLK_33" >> $(obj)include/config.h
967         @$(MKCONFIG) -n $@ -a CATcenter powerpc ppc4xx PPChameleonEVB dave
968
969 CPCI405_config          \
970 CPCI4052_config         \
971 CPCI405DT_config        \
972 CPCI405AB_config:       unconfig
973         @mkdir -p $(obj)board/esd/cpci405
974         @$(MKCONFIG) -n $@ $@ powerpc ppc4xx cpci405 esd
975
976 fx12mm_flash_config: unconfig
977         @mkdir -p $(obj)include $(obj)board/xilinx/ppc405-generic
978         @mkdir -p $(obj)include $(obj)board/avnet/fx12mm
979         @echo "LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc405-generic/u-boot-rom.lds"\
980                 > $(obj)board/avnet/fx12mm/config.tmp
981         @echo "TEXT_BASE := 0xFFCB0000" \
982                 >> $(obj)board/avnet/fx12mm/config.tmp
983         @$(MKCONFIG) fx12mm powerpc ppc4xx fx12mm avnet
984
985 fx12mm_config: unconfig
986         @mkdir -p $(obj)include $(obj)board/xilinx/ppc405-generic
987         @mkdir -p $(obj)include $(obj)board/avnet/fx12mm
988         @echo "LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc405-generic/u-boot-ram.lds"\
989                 > $(obj)board/avnet/fx12mm/config.tmp
990         @echo "TEXT_BASE := 0x03000000" \
991                 >> $(obj)board/avnet/fx12mm/config.tmp
992         @$(MKCONFIG) fx12mm powerpc ppc4xx fx12mm avnet
993
994 # Compact-Center(codename intip) & DevCon-Center use different U-Boot images
995 intip_config \
996 devconcenter_config:    unconfig
997         @mkdir -p $(obj)include
998         @echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \
999                 tr '[:lower:]' '[:upper:]')" >$(obj)include/config.h
1000         @$(MKCONFIG) -n $@ -a intip powerpc ppc4xx intip gdsys
1001
1002 hcu4_config    \
1003 hcu5_config    \
1004 mcu25_config:  unconfig
1005         @mkdir -p $(obj)board/netstal/common
1006         @$(MKCONFIG) $@ powerpc ppc4xx $(call lcname,$@) netstal
1007
1008 # Kilauea & Haleakala images are identical (recognized via PVR)
1009 kilauea_config \
1010 haleakala_config: unconfig
1011         @$(MKCONFIG) -n $@ kilauea powerpc ppc4xx kilauea amcc
1012
1013 kilauea_nand_config \
1014 haleakala_nand_config: unconfig
1015         @mkdir -p $(obj)include $(obj)board/amcc/kilauea
1016         @mkdir -p $(obj)nand_spl/board/amcc/kilauea
1017         @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h
1018         @echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/kilauea/config.tmp
1019         @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
1020         @$(MKCONFIG) -n $@ -a kilauea powerpc ppc4xx kilauea amcc
1021
1022 MIP405T_config: unconfig
1023         @mkdir -p $(obj)include
1024         @echo "#define CONFIG_MIP405T" >$(obj)include/config.h
1025         @$(XECHO) "Enable subset config for MIP405T"
1026         @$(MKCONFIG) -a MIP405 powerpc ppc4xx mip405 mpl
1027
1028 ml507_flash_config: unconfig
1029         @mkdir -p $(obj)include $(obj)board/xilinx/ppc440-generic
1030         @mkdir -p $(obj)include $(obj)board/xilinx/ml507
1031         @echo "LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc440-generic/u-boot-rom.lds"\
1032                 > $(obj)board/xilinx/ml507/config.tmp
1033         @echo "TEXT_BASE := 0xFE360000" \
1034                 >> $(obj)board/xilinx/ml507/config.tmp
1035         @$(MKCONFIG) ml507 powerpc ppc4xx ml507 xilinx
1036
1037 ml507_config: unconfig
1038         @mkdir -p $(obj)include $(obj)board/xilinx/ppc440-generic
1039         @mkdir -p $(obj)include $(obj)board/xilinx/ml507
1040         @echo "LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc440-generic/u-boot-ram.lds"\
1041                 > $(obj)board/xilinx/ml507/config.tmp
1042         @echo "TEXT_BASE := 0x04000000"  \
1043                 >> $(obj)board/xilinx/ml507/config.tmp
1044         @$(MKCONFIG) $@ powerpc ppc4xx ml507 xilinx
1045
1046 OCRTC_config            \
1047 ORSG_config:    unconfig
1048         @$(MKCONFIG) -n $@ $@ powerpc ppc4xx ocrtc esd
1049
1050 PPChameleonEVB_config           \
1051 PPChameleonEVB_BA_25_config     \
1052 PPChameleonEVB_ME_25_config     \
1053 PPChameleonEVB_HI_25_config     \
1054 PPChameleonEVB_BA_33_config     \
1055 PPChameleonEVB_ME_33_config     \
1056 PPChameleonEVB_HI_33_config:    unconfig
1057         @mkdir -p $(obj)include
1058         @[ -z "$(findstring EVB_BA,$@)" ] || \
1059                 echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 0" >>$(obj)include/config.h
1060         @[ -z "$(findstring EVB_ME,$@)" ] || \
1061                 echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >>$(obj)include/config.h
1062         @[ -z "$(findstring EVB_HI,$@)" ] || \
1063                 echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 2" >>$(obj)include/config.h
1064         @[ -z "$(findstring _25,$@)" ] || \
1065                 echo "#define CONFIG_PPCHAMELEON_CLK_25" >>$(obj)include/config.h
1066         @[ -z "$(findstring _33,$@)" ] || \
1067                 echo "#define CONFIG_PPCHAMELEON_CLK_33" >>$(obj)include/config.h
1068         @$(MKCONFIG) -n $@ -a PPChameleonEVB powerpc ppc4xx PPChameleonEVB dave
1069
1070 sequoia_config \
1071 rainier_config: unconfig
1072         @mkdir -p $(obj)include
1073         @echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \
1074                 tr '[:lower:]' '[:upper:]')" >$(obj)include/config.h
1075         @$(MKCONFIG) -n $@ -a sequoia powerpc ppc4xx sequoia amcc
1076
1077 sequoia_nand_config \
1078 rainier_nand_config: unconfig
1079         @mkdir -p $(obj)include $(obj)board/amcc/sequoia
1080         @mkdir -p $(obj)nand_spl/board/amcc/sequoia
1081         @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h
1082         @echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \
1083                 tr '[:lower:]' '[:upper:]')" >> $(obj)include/config.h
1084         @echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/sequoia/config.tmp
1085         @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
1086         @$(MKCONFIG) -n $@ -a sequoia powerpc ppc4xx sequoia amcc
1087
1088 sequoia_ramboot_config \
1089 rainier_ramboot_config: unconfig
1090         @mkdir -p $(obj)include $(obj)board/amcc/sequoia
1091         @echo "#define CONFIG_SYS_RAMBOOT" > $(obj)include/config.h
1092         @echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \
1093                 tr '[:lower:]' '[:upper:]')" >> $(obj)include/config.h
1094         @echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/sequoia/config.tmp
1095         @echo "LDSCRIPT = board/amcc/sequoia/u-boot-ram.lds" >> \
1096                 $(obj)board/amcc/sequoia/config.tmp
1097         @$(MKCONFIG) -n $@ -a sequoia powerpc ppc4xx sequoia amcc
1098
1099 v5fx30teval_config: unconfig
1100         @mkdir -p $(obj)include $(obj)board/xilinx/ppc440-generic
1101         @mkdir -p $(obj)include $(obj)board/avnet/v5fx30teval
1102         @echo "LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc440-generic/u-boot-ram.lds"\
1103                 > $(obj)board/avnet/v5fx30teval/config.tmp
1104         @echo "TEXT_BASE := 0x03000000" \
1105                 >> $(obj)board/avnet/v5fx30teval/config.tmp
1106         @$(MKCONFIG) $@ powerpc ppc4xx v5fx30teval avnet
1107
1108 v5fx30teval_flash_config: unconfig
1109         @mkdir -p $(obj)include $(obj)board/xilinx/ppc440-generic
1110         @mkdir -p $(obj)include $(obj)board/avnet/v5fx30teval
1111         @echo "LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc440-generic/u-boot-rom.lds"\
1112                 > $(obj)board/avnet/v5fx30teval/config.tmp
1113         @echo "TEXT_BASE := 0xFF1C0000" \
1114                 >> $(obj)board/avnet/v5fx30teval/config.tmp
1115         @$(MKCONFIG) v5fx30teval powerpc ppc4xx v5fx30teval avnet
1116
1117 W7OLMC_config   \
1118 W7OLMG_config: unconfig
1119         @$(MKCONFIG) $@ powerpc ppc4xx w7o
1120
1121 # Walnut & Sycamore images are identical (recognized via PVR)
1122 walnut_config \
1123 sycamore_config: unconfig
1124         @$(MKCONFIG) -n $@ walnut powerpc ppc4xx walnut amcc
1125
1126 xilinx-ppc405-generic_flash_config: unconfig
1127         @mkdir -p $(obj)include $(obj)board/xilinx/ppc405-generic
1128         @echo "LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc405-generic/u-boot-rom.lds"\
1129                 > $(obj)board/xilinx/ppc405-generic/config.tmp
1130         @echo "TEXT_BASE := 0xFE360000" \
1131                 >> $(obj)board/xilinx/ppc405-generic/config.tmp
1132         @$(MKCONFIG) xilinx-ppc405-generic powerpc ppc4xx ppc405-generic xilinx
1133
1134 xilinx-ppc405-generic_config: unconfig
1135         @mkdir -p $(obj)include $(obj)board/xilinx/ppc405-generic
1136         @echo "LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc405-generic/u-boot-ram.lds"\
1137                 > $(obj)board/xilinx/ppc405-generic/config.tmp
1138         @echo "TEXT_BASE := 0x04000000" \
1139                 >> $(obj)board/xilinx/ppc405-generic/config.tmp
1140         @$(MKCONFIG) xilinx-ppc405-generic powerpc ppc4xx ppc405-generic xilinx
1141
1142 xilinx-ppc440-generic_flash_config: unconfig
1143         @mkdir -p $(obj)include $(obj)board/xilinx/ppc440-generic
1144         @echo "LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc440-generic/u-boot-rom.lds"\
1145                 > $(obj)board/xilinx/ppc440-generic/config.tmp
1146         @echo "TEXT_BASE := 0xFE360000" \
1147                 >> $(obj)board/xilinx/ppc440-generic/config.tmp
1148         @$(MKCONFIG) xilinx-ppc440-generic powerpc ppc4xx ppc440-generic xilinx
1149
1150 xilinx-ppc440-generic_config: unconfig
1151         @mkdir -p $(obj)include $(obj)board/xilinx/ppc440-generic
1152         @echo "LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc440-generic/u-boot-ram.lds"\
1153                 > $(obj)board/xilinx/ppc440-generic/config.tmp
1154         @echo "TEXT_BASE := 0x04000000" \
1155                 >> $(obj)board/xilinx/ppc440-generic/config.tmp
1156         @$(MKCONFIG) xilinx-ppc440-generic powerpc ppc4xx ppc440-generic xilinx
1157
1158 yosemite_config \
1159 yellowstone_config: unconfig
1160         @mkdir -p $(obj)include
1161         @echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \
1162                 tr '[:lower:]' '[:upper:]')" >$(obj)include/config.h
1163         @$(MKCONFIG) -n $@ -a yosemite powerpc ppc4xx yosemite amcc
1164
1165 #########################################################################
1166 ## MPC824x Systems
1167 #########################################################################
1168
1169 eXalion_config: unconfig
1170         @$(MKCONFIG) $(@:_config=) powerpc mpc824x eXalion
1171
1172 CPC45_config    \
1173 CPC45_ROMBOOT_config:   unconfig
1174         @mkdir -p $(obj)include ;                               \
1175         if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
1176                 echo "CONFIG_BOOT_ROM = y" >> $(obj)include/config.mk ; \
1177         else \
1178                 echo "CONFIG_BOOT_ROM = n" >> $(obj)include/config.mk ; \
1179         fi; \
1180         echo "export CONFIG_BOOT_ROM" >> $(obj)include/config.mk;
1181         @$(MKCONFIG) -n $@ CPC45 powerpc mpc824x cpc45
1182
1183 # HDLAN is broken ATM. Should be fixed as soon as hardware is available and as
1184 # time permits.
1185 #linkstation_HDLAN_config \
1186 # Remove this line when HDLAN is fixed
1187 linkstation_HGLAN_config: unconfig
1188         @mkdir -p $(obj)include
1189         @case $@ in \
1190                 *HGLAN*) echo "#define CONFIG_HGLAN 1" >$(obj)include/config.h; ;; \
1191                 *HDLAN*) echo "#define CONFIG_HLAN 1" >$(obj)include/config.h; ;; \
1192         esac
1193         @$(MKCONFIG) -n $@ -a linkstation powerpc mpc824x linkstation
1194
1195 Sandpoint8240_config: unconfig
1196         @$(MKCONFIG) $@ powerpc mpc824x sandpoint
1197
1198 Sandpoint8245_config: unconfig
1199         @$(MKCONFIG) $@ powerpc mpc824x sandpoint
1200
1201 #########################################################################
1202 ## MPC8260 Systems
1203 #########################################################################
1204
1205 cogent_mpc8260_config:  unconfig
1206         @$(MKCONFIG) $(@:_config=) powerpc mpc8260 cogent
1207
1208 CPU86_config    \
1209 CPU86_ROMBOOT_config: unconfig
1210         @mkdir -p  $(obj)include ;                              \
1211         if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
1212                 echo "CONFIG_BOOT_ROM = y" >> $(obj)include/config.mk ; \
1213         else \
1214                 echo "CONFIG_BOOT_ROM = n" >> $(obj)include/config.mk ; \
1215         fi; \
1216         echo "export CONFIG_BOOT_ROM" >> $(obj)include/config.mk;
1217         @$(MKCONFIG) -n $@ CPU86 powerpc mpc8260 cpu86
1218
1219 CPU87_config    \
1220 CPU87_ROMBOOT_config: unconfig
1221         @mkdir -p $(obj)include ;                               \
1222         if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
1223                 echo "CONFIG_BOOT_ROM = y" >> $(obj)include/config.mk ; \
1224         else \
1225                 echo "CONFIG_BOOT_ROM = n" >> $(obj)include/config.mk ; \
1226         fi; \
1227         echo "export CONFIG_BOOT_ROM" >> $(obj)include/config.mk;
1228         @$(MKCONFIG) -n $@ CPU87 powerpc mpc8260 cpu87
1229
1230 ep8248_config   \
1231 ep8248E_config  :       unconfig
1232         @$(MKCONFIG) -n $@ ep8248 powerpc mpc8260 ep8248
1233
1234 ISPAN_config            \
1235 ISPAN_REVB_config:      unconfig
1236         @mkdir -p $(obj)include
1237         @if [ "$(findstring _REVB_,$@)" ] ; then \
1238                 echo "#define CONFIG_SYS_REV_B" > $(obj)include/config.h ; \
1239         fi
1240         @$(MKCONFIG) -n $@ -a ISPAN powerpc mpc8260 ispan
1241
1242 MPC8260ADS_config       \
1243 MPC8260ADS_lowboot_config       \
1244 MPC8260ADS_33MHz_config \
1245 MPC8260ADS_33MHz_lowboot_config \
1246 MPC8260ADS_40MHz_config \
1247 MPC8260ADS_40MHz_lowboot_config \
1248 MPC8272ADS_config       \
1249 MPC8272ADS_lowboot_config       \
1250 PQ2FADS_config          \
1251 PQ2FADS_lowboot_config          \
1252 PQ2FADS-VR_config       \
1253 PQ2FADS-VR_lowboot_config       \
1254 PQ2FADS-ZU_config       \
1255 PQ2FADS-ZU_lowboot_config       \
1256 PQ2FADS-ZU_66MHz_config \
1257 PQ2FADS-ZU_66MHz_lowboot_config \
1258         :               unconfig
1259         @mkdir -p $(obj)include
1260         @mkdir -p $(obj)board/freescale/mpc8260ads
1261         $(if $(findstring PQ2FADS,$@), \
1262         @echo "#define CONFIG_ADSTYPE CONFIG_SYS_PQ2FADS" > $(obj)include/config.h, \
1263         @echo "#define CONFIG_ADSTYPE CONFIG_SYS_"$(subst MPC,,$(word 1,$(subst _, ,$@))) > $(obj)include/config.h)
1264         $(if $(findstring MHz,$@), \
1265         @echo "#define CONFIG_8260_CLKIN" $(subst MHz,,$(word 2,$(subst _, ,$@)))"000000" >> $(obj)include/config.h, \
1266         $(if $(findstring VR,$@), \
1267         @echo "#define CONFIG_8260_CLKIN 66000000" >> $(obj)include/config.h))
1268         @[ -z "$(findstring lowboot_,$@)" ] || \
1269                 echo "TEXT_BASE = 0xFF800000" >$(obj)board/freescale/mpc8260ads/config.tmp
1270         @$(MKCONFIG) -n $@ -a MPC8260ADS powerpc mpc8260 mpc8260ads freescale
1271
1272 muas3001_dev_config \
1273 muas3001_config :       unconfig
1274         @mkdir -p $(obj)include
1275         @mkdir -p $(obj)board/muas3001
1276         @if [ "$(findstring dev,$@)" ] ; then \
1277                 echo "#define CONFIG_MUAS_DEV_BOARD" > $(obj)include/config.h ; \
1278         fi
1279         @$(MKCONFIG) -n $@ -a muas3001 powerpc mpc8260 muas3001
1280
1281 # PM825/PM826 default configuration:  small (= 8 MB) Flash / boot from 64-bit flash
1282 PM825_config    \
1283 PM825_ROMBOOT_config    \
1284 PM825_BIGFLASH_config   \
1285 PM825_ROMBOOT_BIGFLASH_config   \
1286 PM826_config    \
1287 PM826_ROMBOOT_config    \
1288 PM826_BIGFLASH_config   \
1289 PM826_ROMBOOT_BIGFLASH_config:  unconfig
1290         @mkdir -p $(obj)include
1291         @mkdir -p $(obj)board/pm826
1292         @if [ "$(findstring PM825_,$@)" ] ; then \
1293                 echo "#define CONFIG_PCI"       >$(obj)include/config.h ; \
1294         else \
1295                 >$(obj)include/config.h ; \
1296         fi
1297         @if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
1298                 echo "#define CONFIG_BOOT_ROM" >>$(obj)include/config.h ; \
1299                 echo "TEXT_BASE = 0xFF800000" >$(obj)board/pm826/config.tmp ; \
1300                 if [ "$(findstring _BIGFLASH_,$@)" ] ; then \
1301                         echo "#define CONFIG_FLASH_32MB" >>$(obj)include/config.h ; \
1302                 fi; \
1303         else \
1304                 if [ "$(findstring _BIGFLASH_,$@)" ] ; then \
1305                         $(XECHO) "... with 32 MB Flash" ; \
1306                         echo "#define CONFIG_FLASH_32MB" >>$(obj)include/config.h ; \
1307                         echo "TEXT_BASE = 0x40000000" >$(obj)board/pm826/config.tmp ; \
1308                 else \
1309                         echo "TEXT_BASE = 0xFF000000" >$(obj)board/pm826/config.tmp ; \
1310                 fi; \
1311         fi
1312         @$(MKCONFIG) -n $@ -a PM826 powerpc mpc8260 pm826
1313
1314 PM828_config    \
1315 PM828_PCI_config        \
1316 PM828_ROMBOOT_config    \
1317 PM828_ROMBOOT_PCI_config:       unconfig
1318         @mkdir -p $(obj)include
1319         @mkdir -p $(obj)board/pm826
1320         @if [ "$(findstring _PCI_,$@)" ] ; then \
1321                 echo "#define CONFIG_PCI"  >>$(obj)include/config.h ; \
1322         fi
1323         @if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
1324                 echo "#define CONFIG_BOOT_ROM" >>$(obj)include/config.h ; \
1325                 echo "TEXT_BASE = 0xFF800000" >$(obj)board/pm826/config.tmp ; \
1326         fi
1327         @$(MKCONFIG) -n $@ -a PM828 powerpc mpc8260 pm828
1328
1329 Rattler8248_config      \
1330 Rattler_config:         unconfig
1331         @mkdir -p $(obj)include
1332         $(if $(findstring 8248,$@), \
1333                 @echo "#define CONFIG_MPC8248" > $(obj)include/config.h)
1334         @$(MKCONFIG) -n $@ -a Rattler powerpc mpc8260 rattler
1335
1336 TQM8255_AA_config \
1337 TQM8260_AA_config \
1338 TQM8260_AB_config \
1339 TQM8260_AC_config \
1340 TQM8260_AD_config \
1341 TQM8260_AE_config \
1342 TQM8260_AF_config \
1343 TQM8260_AG_config \
1344 TQM8260_AH_config \
1345 TQM8260_AI_config \
1346 TQM8265_AA_config:  unconfig
1347         @mkdir -p $(obj)include
1348         @case "$@" in \
1349         TQM8255_AA_config) CTYPE=MPC8255; CFREQ=300; CACHE=no;  BMODE=8260;;  \
1350         TQM8260_AA_config) CTYPE=MPC8260; CFREQ=200; CACHE=no;  BMODE=8260;; \
1351         TQM8260_AB_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;;  \
1352         TQM8260_AC_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;;  \
1353         TQM8260_AD_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;  BMODE=60x;;  \
1354         TQM8260_AE_config) CTYPE=MPC8260; CFREQ=266; CACHE=no;  BMODE=8260;; \
1355         TQM8260_AF_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;  BMODE=60x;;  \
1356         TQM8260_AG_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;  BMODE=8260;; \
1357         TQM8260_AH_config) CTYPE=MPC8260; CFREQ=300; CACHE=yes; BMODE=60x;;  \
1358         TQM8260_AI_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;  BMODE=60x;;  \
1359         TQM8265_AA_config) CTYPE=MPC8265; CFREQ=300; CACHE=no;  BMODE=60x;;  \
1360         esac; \
1361         if [ "$${CTYPE}" != "MPC8260" ] ; then \
1362                 echo "#define CONFIG_$${CTYPE}" >>$(obj)include/config.h ; \
1363         fi; \
1364         echo "#define CONFIG_$${CFREQ}MHz"      >>$(obj)include/config.h ; \
1365         if [ "$${CACHE}" = "yes" ] ; then \
1366                 echo "#define CONFIG_L2_CACHE"  >>$(obj)include/config.h ; \
1367         else \
1368                 echo "#undef CONFIG_L2_CACHE"   >>$(obj)include/config.h ; \
1369         fi; \
1370         if [ "$${BMODE}" = "60x" ] ; then \
1371                 echo "#define CONFIG_BUSMODE_60x" >>$(obj)include/config.h ; \
1372         else \
1373                 echo "#undef CONFIG_BUSMODE_60x"  >>$(obj)include/config.h ; \
1374         fi
1375         @$(MKCONFIG) -n $@ -a TQM8260 powerpc mpc8260 tqm8260 tqc
1376
1377 VoVPN-GW_66MHz_config   \
1378 VoVPN-GW_100MHz_config:         unconfig
1379         @mkdir -p $(obj)include
1380         @echo "#define CONFIG_CLKIN_$(word 2,$(subst _, ,$@))" > $(obj)include/config.h
1381         @$(MKCONFIG) -n $@ -a VoVPN-GW powerpc mpc8260 vovpn-gw funkwerk
1382
1383 #########################################################################
1384 ## Coldfire
1385 #########################################################################
1386
1387 astro_mcf5373l_config \
1388 astro_mcf5373l_RAM_config :     unconfig
1389         @$(MKCONFIG) -n $@ -t $@ astro_mcf5373l m68k mcf532x mcf5373l astro
1390
1391 M52277EVB_config \
1392 M52277EVB_spansion_config \
1393 M52277EVB_stmicro_config :      unconfig
1394         @case "$@" in \
1395         M52277EVB_config)               FLASH=SPANSION;; \
1396         M52277EVB_spansion_config)      FLASH=SPANSION;; \
1397         M52277EVB_stmicro_config)       FLASH=STMICRO;; \
1398         esac; \
1399         if [ "$${FLASH}" = "SPANSION" ] ; then \
1400                 echo "#define CONFIG_SYS_SPANSION_BOOT" >> $(obj)include/config.h ; \
1401                 echo "TEXT_BASE = 0x00000000" > $(obj)board/freescale/m52277evb/config.tmp ; \
1402                 cp $(obj)board/freescale/m52277evb/u-boot.spa $(obj)board/freescale/m52277evb/u-boot.lds ; \
1403         fi; \
1404         if [ "$${FLASH}" = "STMICRO" ] ; then \
1405                 echo "#define CONFIG_CF_SBF"    >> $(obj)include/config.h ; \
1406                 echo "#define CONFIG_SYS_STMICRO_BOOT"  >> $(obj)include/config.h ; \
1407                 echo "TEXT_BASE = 0x43E00000" > $(obj)board/freescale/m52277evb/config.tmp ; \
1408                 cp $(obj)board/freescale/m52277evb/u-boot.stm $(obj)board/freescale/m52277evb/u-boot.lds ; \
1409         fi
1410         @$(MKCONFIG) -n $@ -a M52277EVB m68k mcf5227x m52277evb freescale
1411
1412 M5235EVB_config \
1413 M5235EVB_Flash16_config \
1414 M5235EVB_Flash32_config:        unconfig
1415         @case "$@" in \
1416         M5235EVB_config)                FLASH=16;; \
1417         M5235EVB_Flash16_config)        FLASH=16;; \
1418         M5235EVB_Flash32_config)        FLASH=32;; \
1419         esac; \
1420         if [ "$${FLASH}" != "16" ] ; then \
1421                 echo "#define NORFLASH_PS32BIT  1" >> $(obj)include/config.h ; \
1422                 echo "TEXT_BASE = 0xFFC00000" > $(obj)board/freescale/m5235evb/config.tmp ; \
1423                 cp $(obj)board/freescale/m5235evb/u-boot.32 $(obj)board/freescale/m5235evb/u-boot.lds ; \
1424         else \
1425                 echo "TEXT_BASE = 0xFFE00000" > $(obj)board/freescale/m5235evb/config.tmp ; \
1426                 cp $(obj)board/freescale/m5235evb/u-boot.16 $(obj)board/freescale/m5235evb/u-boot.lds ; \
1427         fi
1428         @$(MKCONFIG) -n $@ -a M5235EVB m68k mcf523x m5235evb freescale
1429
1430 cobra5272_config :              unconfig
1431         @$(MKCONFIG) $@ m68k mcf52x2 cobra5272
1432
1433 EB+MCF-EV123_config :           unconfig
1434         @mkdir -p $(obj)include
1435         @mkdir -p $(obj)board/BuS/EB+MCF-EV123
1436         @echo "TEXT_BASE = 0xFFE00000"|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk
1437         @$(MKCONFIG) -n $@ EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS
1438
1439 EB+MCF-EV123_internal_config :  unconfig
1440         @mkdir -p $(obj)include
1441         @mkdir -p $(obj)board/BuS/EB+MCF-EV123
1442         @echo "TEXT_BASE = 0xF0000000"|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk
1443         @$(MKCONFIG) -n $@ EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS
1444
1445 M5329AFEE_config \
1446 M5329BFEE_config :      unconfig
1447         @case "$@" in \
1448         M5329AFEE_config)       NAND=0;; \
1449         M5329BFEE_config)       NAND=16;; \
1450         esac; \
1451         if [ "$${NAND}" != "0" ] ; then \
1452                 echo "#define NANDFLASH_SIZE    $${NAND}" > $(obj)include/config.h ; \
1453         fi
1454         @$(MKCONFIG) -n $@ -a M5329EVB m68k mcf532x m5329evb freescale
1455
1456 M5373EVB_config :       unconfig
1457         @case "$@" in \
1458         M5373EVB_config)        NAND=16;; \
1459         esac; \
1460         if [ "$${NAND}" != "0" ] ; then \
1461                 echo "#define NANDFLASH_SIZE    $${NAND}" > $(obj)include/config.h ; \
1462         fi
1463         @$(MKCONFIG) -a M5373EVB m68k mcf532x m5373evb freescale
1464
1465 M54451EVB_config \
1466 M54451EVB_stmicro_config :      unconfig
1467         @case "$@" in \
1468         M54451EVB_config)               FLASH=NOR;; \
1469         M54451EVB_stmicro_config)       FLASH=STMICRO;; \
1470         esac; \
1471         if [ "$${FLASH}" = "NOR" ] ; then \
1472                 echo "TEXT_BASE = 0x00000000" > $(obj)board/freescale/m54451evb/config.tmp ; \
1473                 cp $(obj)board/freescale/m54451evb/u-boot.spa $(obj)board/freescale/m54451evb/u-boot.lds ; \
1474         fi; \
1475         if [ "$${FLASH}" = "STMICRO" ] ; then \
1476                 echo "#define CONFIG_CF_SBF"    >> $(obj)include/config.h ; \
1477                 echo "#define CONFIG_SYS_STMICRO_BOOT"  >> $(obj)include/config.h ; \
1478                 echo "TEXT_BASE = 0x47E00000" > $(obj)board/freescale/m54451evb/config.tmp ; \
1479                 cp $(obj)board/freescale/m54451evb/u-boot.stm $(obj)board/freescale/m54451evb/u-boot.lds ; \
1480         fi; \
1481         echo "#define CONFIG_SYS_INPUT_CLKSRC 24000000" >> $(obj)include/config.h ;
1482         @$(MKCONFIG) -n $@ -a M54451EVB m68k mcf5445x m54451evb freescale
1483
1484 M54455EVB_config \
1485 M54455EVB_atmel_config \
1486 M54455EVB_intel_config \
1487 M54455EVB_a33_config \
1488 M54455EVB_a66_config \
1489 M54455EVB_i33_config \
1490 M54455EVB_i66_config \
1491 M54455EVB_stm33_config :        unconfig
1492         @case "$@" in \
1493         M54455EVB_config)               FLASH=ATMEL; FREQ=33333333;; \
1494         M54455EVB_atmel_config)         FLASH=ATMEL; FREQ=33333333;; \
1495         M54455EVB_intel_config)         FLASH=INTEL; FREQ=33333333;; \
1496         M54455EVB_a33_config)           FLASH=ATMEL; FREQ=33333333;; \
1497         M54455EVB_a66_config)           FLASH=ATMEL; FREQ=66666666;; \
1498         M54455EVB_i33_config)           FLASH=INTEL; FREQ=33333333;; \
1499         M54455EVB_i66_config)           FLASH=INTEL; FREQ=66666666;; \
1500         M54455EVB_stm33_config)         FLASH=STMICRO; FREQ=33333333;; \
1501         esac; \
1502         if [ "$${FLASH}" = "INTEL" ] ; then \
1503                 echo "#define CONFIG_SYS_INTEL_BOOT" >> $(obj)include/config.h ; \
1504                 echo "TEXT_BASE = 0x00000000" > $(obj)board/freescale/m54455evb/config.tmp ; \
1505                 cp $(obj)board/freescale/m54455evb/u-boot.int $(obj)board/freescale/m54455evb/u-boot.lds ; \
1506         fi; \
1507         if [ "$${FLASH}" = "ATMEL" ] ; then \
1508                 echo "#define CONFIG_SYS_ATMEL_BOOT"    >> $(obj)include/config.h ; \
1509                 echo "TEXT_BASE = 0x04000000" > $(obj)board/freescale/m54455evb/config.tmp ; \
1510                 cp $(obj)board/freescale/m54455evb/u-boot.atm $(obj)board/freescale/m54455evb/u-boot.lds ; \
1511         fi; \
1512         if [ "$${FLASH}" = "STMICRO" ] ; then \
1513                 echo "#define CONFIG_CF_SBF"    >> $(obj)include/config.h ; \
1514                 echo "#define CONFIG_SYS_STMICRO_BOOT"  >> $(obj)include/config.h ; \
1515                 echo "TEXT_BASE = 0x4FE00000" > $(obj)board/freescale/m54455evb/config.tmp ; \
1516                 cp $(obj)board/freescale/m54455evb/u-boot.stm $(obj)board/freescale/m54455evb/u-boot.lds ; \
1517         fi; \
1518         echo "#define CONFIG_SYS_INPUT_CLKSRC $${FREQ}" >> $(obj)include/config.h ; \
1519         @$(MKCONFIG) -n $@ -a M54455EVB m68k mcf5445x m54455evb freescale
1520
1521 M5475AFE_config \
1522 M5475BFE_config \
1523 M5475CFE_config \
1524 M5475DFE_config \
1525 M5475EFE_config \
1526 M5475FFE_config \
1527 M5475GFE_config :       unconfig
1528         @case "$@" in \
1529         M5475AFE_config)        BOOT=2;CODE=0;VID=0;USB=0;RAM=64;RAM1=0;; \
1530         M5475BFE_config)        BOOT=2;CODE=16;VID=0;USB=0;RAM=64;RAM1=0;; \
1531         M5475CFE_config)        BOOT=2;CODE=16;VID=1;USB=1;RAM=64;RAM1=0;; \
1532         M5475DFE_config)        BOOT=2;CODE=0;VID=0;USB=1;RAM=64;RAM1=0;; \
1533         M5475EFE_config)        BOOT=2;CODE=0;VID=1;USB=1;RAM=64;RAM1=0;; \
1534         M5475FFE_config)        BOOT=2;CODE=32;VID=1;USB=1;RAM=64;RAM1=64;; \
1535         M5475GFE_config)        BOOT=4;CODE=0;VID=0;USB=0;RAM=64;RAM1=0;; \
1536         esac; \
1537         echo "#define CONFIG_SYS_BUSCLK 133333333" > $(obj)include/config.h ; \
1538         echo "#define CONFIG_SYS_BOOTSZ $${BOOT}" >> $(obj)include/config.h ; \
1539         echo "#define CONFIG_SYS_DRAMSZ $${RAM}" >> $(obj)include/config.h ; \
1540         if [ "$${RAM1}" != "0" ] ; then \
1541                 echo "#define CONFIG_SYS_DRAMSZ1        $${RAM1}" >> $(obj)include/config.h ; \
1542         fi; \
1543         if [ "$${CODE}" != "0" ] ; then \
1544                 echo "#define CONFIG_SYS_NOR1SZ $${CODE}" >> $(obj)include/config.h ; \
1545         fi; \
1546         if [ "$${VID}" == "1" ] ; then \
1547                 echo "#define CONFIG_SYS_VIDEO" >> $(obj)include/config.h ; \
1548         fi; \
1549         if [ "$${USB}" == "1" ] ; then \
1550                 echo "#define CONFIG_SYS_USBCTRL" >> $(obj)include/config.h ; \
1551         fi
1552         @$(MKCONFIG) -n $@ -a M5475EVB m68k mcf547x_8x m547xevb freescale
1553
1554 M5485AFE_config \
1555 M5485BFE_config \
1556 M5485CFE_config \
1557 M5485DFE_config \
1558 M5485EFE_config \
1559 M5485FFE_config \
1560 M5485GFE_config \
1561 M5485HFE_config :       unconfig
1562         @case "$@" in \
1563         M5485AFE_config)        BOOT=2;CODE=0;VID=0;USB=0;RAM=64;RAM1=0;; \
1564         M5485BFE_config)        BOOT=2;CODE=16;VID=0;USB=0;RAM=64;RAM1=0;; \
1565         M5485CFE_config)        BOOT=2;CODE=16;VID=1;USB=1;RAM=64;RAM1=0;; \
1566         M5485DFE_config)        BOOT=2;CODE=0;VID=0;USB=1;RAM=64;RAM1=0;; \
1567         M5485EFE_config)        BOOT=2;CODE=0;VID=1;USB=1;RAM=64;RAM1=0;; \
1568         M5485FFE_config)        BOOT=2;CODE=32;VID=1;USB=1;RAM=64;RAM1=64;; \
1569         M5485GFE_config)        BOOT=4;CODE=0;VID=0;USB=0;RAM=64;RAM1=0;; \
1570         M5485HFE_config)        BOOT=2;CODE=16;VID=1;USB=0;RAM=64;RAM1=0;; \
1571         esac; \
1572         echo "#define CONFIG_SYS_BUSCLK 100000000" > $(obj)include/config.h ; \
1573         echo "#define CONFIG_SYS_BOOTSZ $${BOOT}" >> $(obj)include/config.h ; \
1574         echo "#define CONFIG_SYS_DRAMSZ $${RAM}" >> $(obj)include/config.h ; \
1575         if [ "$${RAM1}" != "0" ] ; then \
1576                 echo "#define CONFIG_SYS_DRAMSZ1        $${RAM1}" >> $(obj)include/config.h ; \
1577         fi; \
1578         if [ "$${CODE}" != "0" ] ; then \
1579                 echo "#define CONFIG_SYS_NOR1SZ $${CODE}" >> $(obj)include/config.h ; \
1580         fi; \
1581         if [ "$${VID}" == "1" ] ; then \
1582                 echo "#define CONFIG_SYS_VIDEO" >> $(obj)include/config.h ; \
1583         fi; \
1584         if [ "$${USB}" == "1" ] ; then \
1585                 echo "#define CONFIG_SYS_USBCTRL" >> $(obj)include/config.h ; \
1586         fi
1587         @$(MKCONFIG) -n $@ -a M5485EVB m68k mcf547x_8x m548xevb freescale
1588
1589 #########################################################################
1590 ## MPC83xx Systems
1591 #########################################################################
1592
1593 MPC8313ERDB_33_config \
1594 MPC8313ERDB_66_config \
1595 MPC8313ERDB_NAND_33_config \
1596 MPC8313ERDB_NAND_66_config: unconfig
1597         @mkdir -p $(obj)include
1598         @mkdir -p $(obj)board/freescale/mpc8313erdb
1599         @if [ "$(findstring _33_,$@)" ] ; then \
1600                 echo "#define CONFIG_SYS_33MHZ" >>$(obj)include/config.h ; \
1601         fi ; \
1602         if [ "$(findstring _66_,$@)" ] ; then \
1603                 echo "#define CONFIG_SYS_66MHZ" >>$(obj)include/config.h ; \
1604         fi ; \
1605         if [ "$(findstring _NAND_,$@)" ] ; then \
1606                 echo "TEXT_BASE = 0x00100000" > $(obj)board/freescale/mpc8313erdb/config.tmp ; \
1607                 echo "#define CONFIG_NAND_U_BOOT" >>$(obj)include/config.h ; \
1608         fi ;
1609         @if [ "$(findstring _NAND_,$@)" ] ; then \
1610                 echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk ; \
1611         fi ;
1612         @$(MKCONFIG) -n $@ -a MPC8313ERDB powerpc mpc83xx mpc8313erdb freescale
1613
1614 MPC8315ERDB_NAND_config \
1615 MPC8315ERDB_config: unconfig
1616         @$(MKCONFIG) -n $@ -t $@ MPC8315ERDB powerpc mpc83xx mpc8315erdb freescale
1617
1618 MPC832XEMDS_config \
1619 MPC832XEMDS_HOST_33_config \
1620 MPC832XEMDS_HOST_66_config \
1621 MPC832XEMDS_SLAVE_config \
1622 MPC832XEMDS_ATM_config: unconfig
1623         @mkdir -p $(obj)include
1624         @if [ "$(findstring _HOST_,$@)" ] ; then \
1625                 echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
1626         fi ; \
1627         if [ "$(findstring _SLAVE_,$@)" ] ; then \
1628                 echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
1629                 echo "#define CONFIG_PCISLAVE" >>$(obj)include/config.h ; \
1630         fi ; \
1631         if [ "$(findstring _33_,$@)" ] ; then \
1632                 echo "#define PCI_33M" >>$(obj)include/config.h ; \
1633                 echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \
1634         fi ; \
1635         if [ "$(findstring _66_,$@)" ] ; then \
1636                 echo "#define PCI_66M" >>$(obj)include/config.h ; \
1637                 echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \
1638         fi ; \
1639         if [ "$(findstring _ATM_,$@)" ] ; then \
1640                 echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \
1641                 echo "#define CONFIG_PQ_MDS_PIB_ATM     1" >>$(obj)include/config.h ; \
1642         fi ;
1643         @$(MKCONFIG) -n $@ -a MPC832XEMDS powerpc mpc83xx mpc832xemds freescale
1644
1645 MPC8349ITX_config \
1646 MPC8349ITX_LOWBOOT_config \
1647 MPC8349ITXGP_config:    unconfig
1648         @mkdir -p $(obj)include
1649         @mkdir -p $(obj)board/freescale/mpc8349itx
1650         @echo "#define CONFIG_$(subst _LOWBOOT,,$(@:_config=))" >> $(obj)include/config.h
1651         @if [ "$(findstring GP,$@)" ] ; then \
1652                 echo "TEXT_BASE = 0xFE000000" >$(obj)board/freescale/mpc8349itx/config.tmp ; \
1653         fi
1654         @if [ "$(findstring LOWBOOT,$@)" ] ; then \
1655                 echo "TEXT_BASE = 0xFE000000" >$(obj)board/freescale/mpc8349itx/config.tmp ; \
1656         fi
1657         @$(MKCONFIG) -n $@ -a MPC8349ITX powerpc mpc83xx mpc8349itx freescale
1658
1659 MPC8360EMDS_config \
1660 MPC8360EMDS_HOST_33_config \
1661 MPC8360EMDS_HOST_66_config \
1662 MPC8360EMDS_SLAVE_config \
1663 MPC8360EMDS_ATM_config: unconfig
1664         @mkdir -p $(obj)include
1665         @if [ "$(findstring _HOST_,$@)" ] ; then \
1666                 echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
1667         fi ; \
1668         if [ "$(findstring _SLAVE_,$@)" ] ; then \
1669                 echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
1670                 echo "#define CONFIG_PCISLAVE" >>$(obj)include/config.h ; \
1671         fi ; \
1672         if [ "$(findstring _33_,$@)" ] ; then \
1673                 echo "#define PCI_33M" >>$(obj)include/config.h ; \
1674                 echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \
1675         fi ; \
1676         if [ "$(findstring _66_,$@)" ] ; then \
1677                 echo "#define PCI_66M" >>$(obj)include/config.h ; \
1678                 echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \
1679         fi ; \
1680         if [ "$(findstring _ATM_,$@)" ] ; then \
1681                 echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \
1682                 echo "#define CONFIG_PQ_MDS_PIB_ATM     1" >>$(obj)include/config.h ; \
1683         fi ;
1684         @$(MKCONFIG) -n $@ -a MPC8360EMDS powerpc mpc83xx mpc8360emds freescale
1685
1686 MPC8360ERDK_33_config \
1687 MPC8360ERDK_66_config \
1688 MPC8360ERDK_config:     unconfig
1689         @mkdir -p $(obj)include
1690         @if [ "$(findstring _33_,$@)" ] ; then \
1691                 echo "#define CONFIG_CLKIN_33MHZ" >>$(obj)include/config.h ;\
1692         fi ;
1693         @$(MKCONFIG) -n $@ -a MPC8360ERDK powerpc mpc83xx mpc8360erdk freescale
1694
1695 MPC837XEMDS_config \
1696 MPC837XEMDS_HOST_config:        unconfig
1697         @mkdir -p $(obj)include
1698         @if [ "$(findstring _HOST_,$@)" ] ; then \
1699                 echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
1700         fi ;
1701         @$(MKCONFIG) -n $@ -a MPC837XEMDS powerpc mpc83xx mpc837xemds freescale
1702
1703 sbc8349_config \
1704 sbc8349_PCI_33_config \
1705 sbc8349_PCI_66_config: unconfig
1706         @$(MKCONFIG) -n $@ -t $@ sbc8349 powerpc mpc83xx sbc8349
1707
1708 SIMPC8313_LP_config \
1709 SIMPC8313_SP_config: unconfig
1710         @mkdir -p $(obj)include
1711         @mkdir -p $(obj)board/sheldon/simpc8313
1712         @if [ "$(findstring _LP_,$@)" ] ; then \
1713                 echo "#define CONFIG_NAND_LP" >> $(obj)include/config.h ; \
1714         fi ; \
1715         if [ "$(findstring _SP_,$@)" ] ; then \
1716                 echo "#define CONFIG_NAND_SP" >> $(obj)include/config.h ; \
1717         fi ;
1718         @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
1719         @$(MKCONFIG) -n $@ -a SIMPC8313 powerpc mpc83xx simpc8313 sheldon
1720
1721 caddy2_config \
1722 vme8349_config:         unconfig
1723         @$(MKCONFIG) -n $@ -t $@ vme8349 powerpc mpc83xx vme8349 esd
1724
1725 #########################################################################
1726 ## MPC85xx Systems
1727 #########################################################################
1728
1729 MPC8536DS_NAND_config \
1730 MPC8536DS_SDCARD_config \
1731 MPC8536DS_SPIFLASH_config \
1732 MPC8536DS_36BIT_config \
1733 MPC8536DS_config:       unconfig
1734         @$(MKCONFIG) -n $@ -t $@ MPC8536DS powerpc mpc85xx mpc8536ds freescale
1735
1736 MPC8540EVAL_config \
1737 MPC8540EVAL_33_config \
1738 MPC8540EVAL_66_config \
1739 MPC8540EVAL_33_slave_config \
1740 MPC8540EVAL_66_slave_config:    unconfig
1741         @mkdir -p $(obj)include
1742         @if [ -z "$(findstring _33_,$@)" ] ; then \
1743                 echo "#define CONFIG_SYSCLK_66M" >>$(obj)include/config.h ; \
1744         fi ; \
1745         if [ "$(findstring _slave_,$@)" ] ; then \
1746                 echo "#define CONFIG_PCI_SLAVE" >>$(obj)include/config.h ; \
1747         fi
1748         @$(MKCONFIG) -n $@ -a MPC8540EVAL powerpc mpc85xx mpc8540eval
1749
1750 MPC8541CDS_legacy_config \
1751 MPC8541CDS_config:      unconfig
1752         @mkdir -p $(obj)include
1753         @if [ "$(findstring _legacy_,$@)" ] ; then \
1754                 echo "#define CONFIG_LEGACY" >>$(obj)include/config.h ; \
1755         fi
1756         @$(MKCONFIG) -n $@ -a MPC8541CDS powerpc mpc85xx mpc8541cds freescale
1757
1758 MPC8548CDS_legacy_config \
1759 MPC8548CDS_config:      unconfig
1760         @mkdir -p $(obj)include
1761         @if [ "$(findstring _legacy_,$@)" ] ; then \
1762                 echo "#define CONFIG_LEGACY" >>$(obj)include/config.h ; \
1763         fi
1764         @$(MKCONFIG) -n $@ -a MPC8548CDS powerpc mpc85xx mpc8548cds freescale
1765
1766 MPC8555CDS_legacy_config \
1767 MPC8555CDS_config:      unconfig
1768         @mkdir -p $(obj)include
1769         @if [ "$(findstring _legacy_,$@)" ] ; then \
1770                 echo "#define CONFIG_LEGACY" >>$(obj)include/config.h ; \
1771         fi
1772         @$(MKCONFIG) -n $@ -a MPC8555CDS powerpc mpc85xx mpc8555cds freescale
1773
1774 MPC8569MDS_ATM_config \
1775 MPC8569MDS_NAND_config \
1776 MPC8569MDS_config:      unconfig
1777         @$(MKCONFIG) -n $@ -t $@ MPC8569MDS powerpc mpc85xx mpc8569mds freescale
1778
1779 MPC8572DS_36BIT_config \
1780 MPC8572DS_config:       unconfig
1781         @$(MKCONFIG) -n $@ -t $@ MPC8572DS powerpc mpc85xx mpc8572ds freescale
1782
1783 P2020DS_36BIT_config \
1784 P2020DS_config:         unconfig
1785         @$(MKCONFIG) -n $@ -t $@ P2020DS powerpc mpc85xx p2020ds freescale
1786
1787 P1011RDB_config \
1788 P1011RDB_NAND_config \
1789 P1011RDB_SDCARD_config \
1790 P1011RDB_SPIFLASH_config \
1791 P1020RDB_config \
1792 P1020RDB_NAND_config \
1793 P1020RDB_SDCARD_config \
1794 P1020RDB_SPIFLASH_config \
1795 P2010RDB_config \
1796 P2010RDB_NAND_config \
1797 P2010RDB_SDCARD_config \
1798 P2010RDB_SPIFLASH_config \
1799 P2020DS_DDR2_config \
1800 P2020RDB_config \
1801 P2020RDB_NAND_config \
1802 P2020RDB_SDCARD_config \
1803 P2020RDB_SPIFLASH_config:       unconfig
1804         @$(MKCONFIG) -n $@ -t $@ P1_P2_RDB powerpc mpc85xx p1_p2_rdb freescale
1805
1806 sbc8540_config \
1807 sbc8540_33_config \
1808 sbc8540_66_config:      unconfig
1809         @$(MKCONFIG) -n $@ -t $@ SBC8540 powerpc mpc85xx sbc8560
1810
1811 sbc8548_config \
1812 sbc8548_PCI_33_config \
1813 sbc8548_PCI_66_config \
1814 sbc8548_PCI_33_PCIE_config \
1815 sbc8548_PCI_66_PCIE_config: unconfig
1816         @$(MKCONFIG) -n $@ -t $@ sbc8548 powerpc mpc85xx sbc8548
1817
1818 sbc8560_config \
1819 sbc8560_33_config \
1820 sbc8560_66_config:      unconfig
1821         @$(MKCONFIG) -n $@ -t $@ sbc8560 powerpc mpc85xx sbc8560
1822
1823 stxssa_config           \
1824 stxssa_4M_config:       unconfig
1825         @mkdir -p $(obj)include
1826         @if [ "$(findstring _4M_,$@)" ] ; then \
1827                 echo "#define CONFIG_STXSSA_4M" >>$(obj)include/config.h ; \
1828         fi
1829         @$(MKCONFIG) -n $@ -a stxssa powerpc mpc85xx stxssa stx
1830
1831 TQM8540_config          \
1832 TQM8541_config          \
1833 TQM8548_config          \
1834 TQM8548_AG_config       \
1835 TQM8548_BE_config       \
1836 TQM8555_config          \
1837 TQM8560_config:         unconfig
1838         @mkdir -p $(obj)include
1839         @BTYPE=$(@:_config=); \
1840         CTYPE=$(subst TQM,,$(subst _AG,,$(subst _BE,,$(@:_config=)))); \
1841         echo "#define CONFIG_MPC$${CTYPE}">>$(obj)include/config.h; \
1842         echo "#define CONFIG_$${BTYPE}">>$(obj)include/config.h; \
1843         echo "#define CONFIG_HOSTNAME tqm$${CTYPE}">>$(obj)include/config.h; \
1844         echo "#define CONFIG_BOARDNAME \"$${BTYPE}\"">>$(obj)include/config.h;
1845         @echo "CONFIG_$(@:_config=) = y">>$(obj)include/config.mk;
1846         @$(MKCONFIG) -n $@ -a TQM85xx powerpc mpc85xx tqm85xx tqc
1847
1848 #########################################################################
1849 ## MPC86xx Systems
1850 #########################################################################
1851
1852 MPC8641HPCN_36BIT_config \
1853 MPC8641HPCN_config:    unconfig
1854         @mkdir -p $(obj)include
1855         @if [ "$(findstring _36BIT_,$@)" ] ; then \
1856                 echo "#define CONFIG_PHYS_64BIT" >>$(obj)include/config.h ; \
1857         fi
1858         @$(MKCONFIG) -n $@ -a MPC8641HPCN powerpc mpc86xx mpc8641hpcn freescale
1859
1860 #########################################################################
1861 ## 74xx/7xx Systems
1862 #########################################################################
1863
1864 EVB64260_config \
1865 EVB64260_750CX_config:  unconfig
1866         @$(MKCONFIG) -n $@ EVB64260 powerpc 74xx_7xx evb64260
1867
1868 p3m750_config   \
1869 p3m7448_config:         unconfig
1870         @mkdir -p $(obj)include
1871         @if [ "$(findstring 750_,$@)" ] ; then \
1872                 echo "#define CONFIG_P3M750" >>$(obj)include/config.h ; \
1873         else \
1874                 echo "#define CONFIG_P3M7448" >>$(obj)include/config.h ; \
1875         fi
1876         @$(MKCONFIG) -n $@ -a p3mx powerpc 74xx_7xx p3mx prodrive
1877
1878 PCIPPC2_config \
1879 PCIPPC6_config: unconfig
1880         @$(MKCONFIG) -n $@ $@ powerpc 74xx_7xx pcippc2
1881
1882 #========================================================================
1883 # ARM
1884 #========================================================================
1885
1886 #########################################################################
1887 ## Atmel AT91RM9200 Systems
1888 #########################################################################
1889
1890 CPUAT91_RAM_config \
1891 CPUAT91_config  :       unconfig
1892         @mkdir -p $(obj)include
1893         @echo "#define CONFIG_$(@:_config=) 1"  >$(obj)include/config.h
1894         @$(MKCONFIG) -n $@ -a cpuat91 arm arm920t cpuat91 eukrea at91
1895
1896 #########################################################################
1897 ## ARM926EJ-S Systems
1898 #########################################################################
1899
1900 at91sam9260ek_nandflash_config \
1901 at91sam9260ek_dataflash_cs0_config \
1902 at91sam9260ek_dataflash_cs1_config \
1903 at91sam9260ek_config \
1904 at91sam9g20ek_nandflash_config \
1905 at91sam9g20ek_dataflash_cs0_config \
1906 at91sam9g20ek_dataflash_cs1_config \
1907 at91sam9g20ek_config    :       unconfig
1908         @mkdir -p $(obj)include
1909         @if [ "$(findstring 9g20,$@)" ] ; then \
1910                 echo "#define CONFIG_AT91SAM9G20EK 1"   >>$(obj)include/config.h ; \
1911         else \
1912                 echo "#define CONFIG_AT91SAM9260EK 1"   >>$(obj)include/config.h ; \
1913         fi;
1914         @if [ "$(findstring _nandflash,$@)" ] ; then \
1915                 echo "#define CONFIG_SYS_USE_NANDFLASH 1"       >>$(obj)include/config.h ; \
1916         elif [ "$(findstring dataflash_cs0,$@)" ] ; then \
1917                 echo "#define CONFIG_SYS_USE_DATAFLASH_CS0 1"   >>$(obj)include/config.h ; \
1918         else \
1919                 echo "#define CONFIG_SYS_USE_DATAFLASH_CS1 1"   >>$(obj)include/config.h ; \
1920         fi;
1921         @$(MKCONFIG) -n $@ -a at91sam9260ek arm arm926ejs at91sam9260ek atmel at91
1922
1923 at91sam9xeek_nandflash_config \
1924 at91sam9xeek_dataflash_cs0_config \
1925 at91sam9xeek_dataflash_cs1_config \
1926 at91sam9xeek_config     :       unconfig
1927         @mkdir -p $(obj)include
1928         @if [ "$(findstring _nandflash,$@)" ] ; then \
1929                 echo "#define CONFIG_SYS_USE_NANDFLASH 1"       >>$(obj)include/config.h ; \
1930         elif [ "$(findstring dataflash_cs0,$@)" ] ; then \
1931                 echo "#define CONFIG_SYS_USE_DATAFLASH_CS0 1"   >>$(obj)include/config.h ; \
1932         else \
1933                 echo "#define CONFIG_SYS_USE_DATAFLASH_CS1 1"   >>$(obj)include/config.h ; \
1934         fi;
1935         @$(MKCONFIG) -n $@ -a at91sam9260ek arm arm926ejs at91sam9260ek atmel at91
1936
1937 at91sam9261ek_nandflash_config \
1938 at91sam9261ek_dataflash_cs0_config \
1939 at91sam9261ek_dataflash_cs3_config \
1940 at91sam9261ek_config \
1941 at91sam9g10ek_nandflash_config \
1942 at91sam9g10ek_dataflash_cs0_config \
1943 at91sam9g10ek_dataflash_cs3_config \
1944 at91sam9g10ek_config    :       unconfig
1945         @mkdir -p $(obj)include
1946         @if [ "$(findstring 9g10,$@)" ] ; then \
1947                 echo "#define CONFIG_AT91SAM9G10EK 1"   >>$(obj)include/config.h ; \
1948         else \
1949                 echo "#define CONFIG_AT91SAM9261EK 1"   >>$(obj)include/config.h ; \
1950         fi;
1951         @if [ "$(findstring _nandflash,$@)" ] ; then \
1952                 echo "#define CONFIG_SYS_USE_NANDFLASH 1"       >>$(obj)include/config.h ; \
1953         elif [ "$(findstring dataflash_cs0,$@)" ] ; then \
1954                 echo "#define CONFIG_SYS_USE_DATAFLASH_CS3 1"   >>$(obj)include/config.h ; \
1955         else \
1956                 echo "#define CONFIG_SYS_USE_DATAFLASH_CS0 1"   >>$(obj)include/config.h ; \
1957         fi;
1958         @$(MKCONFIG) -n $@ -a at91sam9261ek arm arm926ejs at91sam9261ek atmel at91
1959
1960 at91sam9263ek_norflash_config \
1961 at91sam9263ek_norflash_boot_config \
1962 at91sam9263ek_nandflash_config \
1963 at91sam9263ek_dataflash_config \
1964 at91sam9263ek_dataflash_cs0_config \
1965 at91sam9263ek_config    :       unconfig
1966         @mkdir -p $(obj)include
1967         @if [ "$(findstring _nandflash,$@)" ] ; then \
1968                 echo "#define CONFIG_SYS_USE_NANDFLASH 1"       >>$(obj)include/config.h ; \
1969         elif [ "$(findstring norflash,$@)" ] ; then \
1970                 echo "#define CONFIG_SYS_USE_NORFLASH 1"        >>$(obj)include/config.h ; \
1971         else \
1972                 echo "#define CONFIG_SYS_USE_DATAFLASH 1"       >>$(obj)include/config.h ; \
1973         fi;
1974         @if [ "$(findstring norflash_boot,$@)" ] ; then \
1975                 echo "#define CONFIG_SYS_USE_BOOT_NORFLASH 1"   >>$(obj)include/config.h ; \
1976         fi;
1977         @$(MKCONFIG) -n $@ -a at91sam9263ek arm arm926ejs at91sam9263ek atmel at91
1978
1979 at91sam9rlek_nandflash_config \
1980 at91sam9rlek_dataflash_config \
1981 at91sam9rlek_dataflash_cs0_config \
1982 at91sam9rlek_config     :       unconfig
1983         @mkdir -p $(obj)include
1984         @if [ "$(findstring _nandflash,$@)" ] ; then \
1985                 echo "#define CONFIG_SYS_USE_NANDFLASH 1"       >>$(obj)include/config.h ; \
1986         else \
1987                 echo "#define CONFIG_SYS_USE_DATAFLASH 1"       >>$(obj)include/config.h ; \
1988         fi;
1989         @$(MKCONFIG) -n $@ -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91
1990
1991 CPU9G20_128M_config \
1992 CPU9G20_config \
1993 CPU9260_128M_config \
1994 CPU9260_config  :       unconfig
1995         @mkdir -p $(obj)include
1996         @echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
1997         @$(MKCONFIG) -n $@ -a cpu9260 arm arm926ejs cpu9260 eukrea at91
1998
1999 at91sam9m10g45ek_nandflash_config \
2000 at91sam9m10g45ek_dataflash_config \
2001 at91sam9m10g45ek_dataflash_cs0_config \
2002 at91sam9m10g45ek_config \
2003 at91sam9g45ekes_nandflash_config \
2004 at91sam9g45ekes_dataflash_config \
2005 at91sam9g45ekes_dataflash_cs0_config \
2006 at91sam9g45ekes_config  :       unconfig
2007         @mkdir -p $(obj)include
2008                 @if [ "$(findstring 9m10,$@)" ] ; then \
2009                 echo "#define CONFIG_AT91SAM9M10G45EK 1"        >>$(obj)include/config.h ; \
2010         else \
2011                 echo "#define CONFIG_AT91SAM9G45EKES 1" >>$(obj)include/config.h ; \
2012         fi;
2013         @if [ "$(findstring _nandflash,$@)" ] ; then \
2014                 echo "#define CONFIG_SYS_USE_NANDFLASH 1"       >>$(obj)include/config.h ; \
2015         else \
2016                 echo "#define CONFIG_ATMEL_SPI 1"       >>$(obj)include/config.h ; \
2017         fi;
2018         @$(MKCONFIG) -n $@ -a at91sam9m10g45ek arm arm926ejs at91sam9m10g45ek atmel at91
2019
2020 pm9g45_config   :       unconfig
2021         @mkdir -p $(obj)include
2022         @$(MKCONFIG) -a pm9g45 arm arm926ejs pm9g45 ronetix at91
2023
2024 SBC35_A9G20_NANDFLASH_config \
2025 SBC35_A9G20_EEPROM_config \
2026 SBC35_A9G20_config      :       unconfig
2027         @mkdir -p $(obj)include
2028         @echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
2029         @$(MKCONFIG) -n $@ -a sbc35_a9g20 arm arm926ejs sbc35_a9g20 calao at91
2030
2031 TNY_A9G20_NANDFLASH_config \
2032 TNY_A9G20_EEPROM_config \
2033 TNY_A9G20_config \
2034 TNY_A9260_NANDFLASH_config \
2035 TNY_A9260_EEPROM_config \
2036 TNY_A9260_config        :       unconfig
2037         @mkdir -p $(obj)include
2038         @echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
2039         @$(MKCONFIG) -n $@ -a tny_a9260 arm arm926ejs tny_a9260 calao at91
2040
2041 ########################################################################
2042 ## ARM Integrator boards - see doc/README-integrator for more info.
2043 integratorap_config     \
2044 ap_config               \
2045 ap966_config            \
2046 ap922_config            \
2047 ap922_XA10_config       \
2048 ap7_config              \
2049 ap720t_config           \
2050 ap920t_config           \
2051 ap926ejs_config         \
2052 ap946es_config: unconfig
2053         @board/armltd/integrator/split_by_variant.sh ap $@
2054
2055 integratorcp_config     \
2056 cp_config               \
2057 cp920t_config           \
2058 cp926ejs_config         \
2059 cp946es_config          \
2060 cp1136_config           \
2061 cp966_config            \
2062 cp922_config            \
2063 cp922_XA10_config       \
2064 cp1026_config: unconfig
2065         @board/armltd/integrator/split_by_variant.sh cp $@
2066
2067 nhk8815_config \
2068 nhk8815_onenand_config: unconfig
2069         @mkdir -p $(obj)include
2070         @ > $(obj)include/config.h
2071         @if [ "$(findstring _onenand, $@)" ] ; then \
2072                 echo "#define CONFIG_BOOT_ONENAND" >> $(obj)include/config.h; \
2073         fi
2074         @$(MKCONFIG) -n $@ -a nhk8815 arm arm926ejs nhk8815 st nomadik
2075
2076 xtract_omap1610xxx = $(subst _cs0boot,,$(subst _cs3boot,,$(subst _cs_autoboot,,$(subst _config,,$1))))
2077
2078 omap1610inn_config \
2079 omap1610inn_cs0boot_config \
2080 omap1610inn_cs3boot_config \
2081 omap1610inn_cs_autoboot_config \
2082 omap1610h2_config \
2083 omap1610h2_cs0boot_config \
2084 omap1610h2_cs3boot_config \
2085 omap1610h2_cs_autoboot_config:  unconfig
2086         @mkdir -p $(obj)include
2087         @if [ "$(findstring _cs0boot_, $@)" ] ; then \
2088                 echo "#define CONFIG_CS0_BOOT" >> .$(obj)include/config.h ; \
2089         elif [ "$(findstring _cs_autoboot_, $@)" ] ; then \
2090                 echo "#define CONFIG_CS_AUTOBOOT" >> $(obj)include/config.h ; \
2091         else \
2092                 echo "#define CONFIG_CS3_BOOT" >> $(obj)include/config.h ; \
2093         fi;
2094         @$(MKCONFIG) -n $@ -a $(call xtract_omap1610xxx,$@) arm arm926ejs omap1610inn ti omap
2095
2096 omap730p2_config \
2097 omap730p2_cs0boot_config \
2098 omap730p2_cs3boot_config :      unconfig
2099         @mkdir -p $(obj)include
2100         @if [ "$(findstring _cs0boot_, $@)" ] ; then \
2101                 echo "#define CONFIG_CS0_BOOT" >> $(obj)include/config.h ; \
2102         else \
2103                 echo "#define CONFIG_CS3_BOOT" >> $(obj)include/config.h ; \
2104         fi;
2105         @$(MKCONFIG) -n $@ -a omap730p2 arm arm926ejs omap730p2 ti omap
2106
2107 spear300_config \
2108 spear310_config \
2109 spear320_config :       unconfig
2110         @$(MKCONFIG) -n $@ -t $@ spear3xx arm arm926ejs $(@:_config=) spear spear
2111
2112 spear600_config :       unconfig
2113         @$(MKCONFIG) -n $@ -t $@ spear6xx arm arm926ejs $(@:_config=) spear spear
2114
2115 SX1_stdout_serial_config \
2116 SX1_config:             unconfig
2117         @mkdir -p $(obj)include
2118         @if [ "$(findstring _stdout_serial_, $@)" ] ; then \
2119                 echo "#undef CONFIG_STDOUT_USBTTY" >> $(obj)include/config.h ; \
2120         else \
2121                 echo "#define CONFIG_STDOUT_USBTTY" >> $(obj)include/config.h ; \
2122         fi;
2123         @$(MKCONFIG) -n $@ SX1 arm arm925t sx1
2124
2125 # TRAB default configuration:   8 MB Flash, 32 MB RAM
2126 trab_config \
2127 trab_bigram_config \
2128 trab_bigflash_config \
2129 trab_old_config:        unconfig
2130         @mkdir -p $(obj)include
2131         @mkdir -p $(obj)board/trab
2132         @[ -z "$(findstring _bigram,$@)" ] || \
2133                 { echo "#define CONFIG_FLASH_8MB"  >>$(obj)include/config.h ; \
2134                   echo "#define CONFIG_RAM_32MB"   >>$(obj)include/config.h ; \
2135                 }
2136         @[ -z "$(findstring _bigflash,$@)" ] || \
2137                 { echo "#define CONFIG_FLASH_16MB" >>$(obj)include/config.h ; \
2138                   echo "#define CONFIG_RAM_16MB"   >>$(obj)include/config.h ; \
2139                   echo "TEXT_BASE = 0x0CF40000" >$(obj)board/trab/config.tmp ; \
2140                 }
2141         @[ -z "$(findstring _old,$@)" ] || \
2142                 { echo "#define CONFIG_FLASH_8MB"  >>$(obj)include/config.h ; \
2143                   echo "#define CONFIG_RAM_16MB"   >>$(obj)include/config.h ; \
2144                   echo "TEXT_BASE = 0x0CF40000" >$(obj)board/trab/config.tmp ; \
2145                 }
2146         @$(MKCONFIG) -n $@ -a trab arm arm920t trab - s3c24x0
2147
2148 tx25_config     : unconfig
2149         @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
2150         @$(MKCONFIG) $@ arm arm926ejs tx25 karo mx25
2151
2152 edb9301_config \
2153 edb9302_config \
2154 edb9302a_config \
2155 edb9307_config \
2156 edb9307a_config \
2157 edb9312_config \
2158 edb9315_config \
2159 edb9315a_config: unconfig
2160         @$(MKCONFIG) -n $@ -t $(@:_config=) edb93xx arm arm920t edb93xx - ep93xx
2161
2162 #########################################################################
2163 # ARM supplied Versatile development boards
2164 #########################################################################
2165
2166 versatile_config        \
2167 versatileab_config      \
2168 versatilepb_config :    unconfig
2169         @board/armltd/versatile/split_by_variant.sh $@
2170
2171 #########################################################################
2172 ## XScale Systems
2173 #########################################################################
2174
2175 pdnb3_config \
2176 scpu_config:    unconfig
2177         @mkdir -p $(obj)include
2178         @if [ "$(findstring scpu_,$@)" ] ; then \
2179                 echo "#define CONFIG_SCPU"      >>$(obj)include/config.h ; \
2180         fi
2181         @$(MKCONFIG) -n $@ -a pdnb3 arm ixp pdnb3 prodrive
2182
2183 polaris_config \
2184 trizepsiv_config        :       unconfig
2185         @mkdir -p $(obj)include
2186         @if [ "$(findstring polaris,$@)" ] ; then \
2187                 echo "#define CONFIG_POLARIS 1" >>$(obj)include/config.h ; \
2188         fi;
2189         @$(MKCONFIG) -n $@ -a trizepsiv arm pxa trizepsiv
2190
2191 vpac270_nor_config \
2192 vpac270_onenand_config  : unconfig
2193         @mkdir -p $(obj)include
2194         @if [ "$(findstring onenand,$@)" ] ; then \
2195                 echo "#define CONFIG_ONENAND_U_BOOT" \
2196                         >>$(obj)include/config.h ; \
2197         fi;
2198         @$(MKCONFIG) -n $@ -a vpac270 arm pxa vpac270
2199
2200 #########################################################################
2201 ## ARM1136 Systems
2202 #########################################################################
2203
2204 apollon_config          : unconfig
2205         @mkdir -p $(obj)include
2206         @echo "#define CONFIG_ONENAND_U_BOOT" > $(obj)include/config.h
2207         @echo "CONFIG_ONENAND_U_BOOT = y" >> $(obj)include/config.mk
2208         @$(MKCONFIG) $@ arm arm1136 apollon - omap24xx
2209
2210 imx31_phycore_eet_config \
2211 imx31_phycore_config    : unconfig
2212         @mkdir -p $(obj)include
2213         @if [ -n "$(findstring _eet_,$@)" ]; then                       \
2214                 echo "#define CONFIG_IMX31_PHYCORE_EET" >> $(obj)include/config.h;      \
2215         fi
2216         @$(MKCONFIG) -n $@ -a imx31_phycore arm arm1136 imx31_phycore - mx31
2217
2218 mx31pdk_config \
2219 mx31pdk_nand_config     : unconfig
2220         @mkdir -p $(obj)include
2221         @if [ -n "$(findstring _nand_,$@)" ]; then                                      \
2222                 echo "#define CONFIG_NAND_U_BOOT" >> $(obj)include/config.h;            \
2223         else                                                                            \
2224                 echo "#define CONFIG_SKIP_LOWLEVEL_INIT" >> $(obj)include/config.h;     \
2225                 echo "#define CONFIG_SKIP_RELOCATE_UBOOT" >> $(obj)include/config.h;    \
2226         fi
2227         @$(MKCONFIG) -n $@ -a mx31pdk arm arm1136 mx31pdk freescale mx31
2228
2229 #########################################################################
2230 ## ARM1176 Systems
2231 #########################################################################
2232 smdk6400_noUSB_config   \
2233 smdk6400_config :       unconfig
2234         @mkdir -p $(obj)include $(obj)board/samsung/smdk6400
2235         @mkdir -p $(obj)nand_spl/board/samsung/smdk6400
2236         @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h
2237         @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
2238         @if [ -z "$(findstring smdk6400_noUSB_config,$@)" ]; then                       \
2239                 echo "RAM_TEXT = 0x57e00000" >> $(obj)board/samsung/smdk6400/config.tmp;\
2240         else                                                                            \
2241                 echo "RAM_TEXT = 0xc7e00000" >> $(obj)board/samsung/smdk6400/config.tmp;\
2242         fi
2243         @$(MKCONFIG) smdk6400 arm arm1176 smdk6400 samsung s3c64xx
2244         @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
2245
2246 #========================================================================
2247 # MIPS
2248 #========================================================================
2249 #########################################################################
2250 ## MIPS32 4Kc
2251 #########################################################################
2252
2253 incaip_100MHz_config    \
2254 incaip_133MHz_config    \
2255 incaip_150MHz_config    \
2256 incaip_config: unconfig
2257         @mkdir -p $(obj)include
2258         @[ -z "$(findstring _100MHz,$@)" ] || \
2259                 echo "#define CPU_CLOCK_RATE 100000000" >>$(obj)include/config.h
2260         @[ -z "$(findstring _133MHz,$@)" ] || \
2261                 echo "#define CPU_CLOCK_RATE 133000000" >>$(obj)include/config.h
2262         @[ -z "$(findstring _150MHz,$@)" ] || \
2263                 echo "#define CPU_CLOCK_RATE 150000000" >>$(obj)include/config.h
2264         @$(MKCONFIG) -n $@ -a incaip mips mips incaip
2265
2266 vct_premium_config              \
2267 vct_premium_small_config        \
2268 vct_premium_onenand_config      \
2269 vct_premium_onenand_small_config \
2270 vct_platinum_config             \
2271 vct_platinum_small_config       \
2272 vct_platinum_onenand_config     \
2273 vct_platinum_onenand_small_config \
2274 vct_platinumavc_config          \
2275 vct_platinumavc_small_config    \
2276 vct_platinumavc_onenand_config  \
2277 vct_platinumavc_onenand_small_config: unconfig
2278         @mkdir -p $(obj)include
2279         @[ -z "$(findstring _premium,$@)" ] || \
2280                 echo "#define CONFIG_VCT_PREMIUM" > $(obj)include/config.h
2281         @[ -z "$(findstring _platinum_,$@)" ] || \
2282                 echo "#define CONFIG_VCT_PLATINUM" > $(obj)include/config.h
2283         @[ -z "$(findstring _platinumavc,$@)" ] || \
2284                 echo "#define CONFIG_VCT_PLATINUMAVC" > $(obj)include/config.h
2285         @[ -z "$(findstring _onenand,$@)" ] || \
2286                 echo "#define CONFIG_VCT_ONENAND" >> $(obj)include/config.h
2287         @[ -z "$(findstring _small,$@)" ] || \
2288                 echo "#define CONFIG_VCT_SMALL_IMAGE" >> $(obj)include/config.h
2289         @$(MKCONFIG)  -n $@ -a vct mips mips vct micronas
2290
2291 #########################################################################
2292 ## MIPS32 AU1X00
2293 #########################################################################
2294
2295 dbau1000_config         :       unconfig
2296         @mkdir -p $(obj)include
2297         @echo "#define CONFIG_DBAU1000 1" >$(obj)include/config.h
2298         @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00
2299
2300 dbau1100_config         :       unconfig
2301         @mkdir -p $(obj)include
2302         @echo "#define CONFIG_DBAU1100 1" >$(obj)include/config.h
2303         @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00
2304
2305 dbau1500_config         :       unconfig
2306         @mkdir -p $(obj)include
2307         @echo "#define CONFIG_DBAU1500 1" >$(obj)include/config.h
2308         @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00
2309
2310 dbau1550_config         :       unconfig
2311         @mkdir -p $(obj)include
2312         @echo "#define CONFIG_DBAU1550 1" >$(obj)include/config.h
2313         @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00
2314
2315 dbau1550_el_config      :       unconfig
2316         @mkdir -p $(obj)include
2317         @echo "#define CONFIG_DBAU1550 1" >$(obj)include/config.h
2318         @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00
2319
2320 gth2_config             :       unconfig
2321         @mkdir -p $(obj)include
2322         @echo "#define CONFIG_GTH2 1" >$(obj)include/config.h
2323         @$(MKCONFIG) -a $@ mips mips gth2
2324
2325 pb1000_config           :       unconfig
2326         @mkdir -p $(obj)include
2327         @echo "#define CONFIG_PB1000 1" >$(obj)include/config.h
2328         @$(MKCONFIG) -a pb1x00 mips mips pb1x00
2329
2330 qemu_mips_config        : unconfig
2331         @mkdir -p $(obj)include
2332         @echo "#define CONFIG_QEMU_MIPS 1" >$(obj)include/config.h
2333         @$(MKCONFIG) -a qemu-mips mips mips qemu-mips
2334
2335 #========================================================================
2336 # Nios
2337 #========================================================================
2338
2339 #########################################################################
2340 ## Nios-II
2341 #########################################################################
2342
2343 # nios2 generic boards
2344 NIOS2_GENERIC = nios2-generic
2345
2346 $(NIOS2_GENERIC:%=%_config) : unconfig
2347         @$(MKCONFIG) $@ nios2 nios2 nios2-generic altera
2348
2349 #========================================================================
2350 # Blackfin
2351 #========================================================================
2352
2353 bf527-ezkit-v2_config   : unconfig
2354         @$(MKCONFIG) -t BF527_EZKIT_REV_2_1 \
2355                 bf527-ezkit blackfin blackfin bf527-ezkit
2356
2357 #========================================================================
2358 # SH3 (SuperH)
2359 #========================================================================
2360
2361 #########################################################################
2362 ## sh2 (Renesas SuperH)
2363 #########################################################################
2364 rsk7203_config: unconfig
2365         @mkdir -p $(obj)include
2366         @echo "#define CONFIG_RSK7203 1" > $(obj)include/config.h
2367         @$(MKCONFIG) -a $@ sh sh2 rsk7203 renesas
2368
2369 #########################################################################
2370 ## sh3 (Renesas SuperH)
2371 #########################################################################
2372
2373 mpr2_config: unconfig
2374         @mkdir -p $(obj)include
2375         @echo "#define CONFIG_MPR2 1" > $(obj)include/config.h
2376         @$(MKCONFIG) -a $@ sh sh3 mpr2
2377
2378 ms7720se_config: unconfig
2379         @mkdir -p $(obj)include
2380         @echo "#define CONFIG_MS7720SE 1" > $(obj)include/config.h
2381         @$(MKCONFIG) -a $@ sh sh3 ms7720se
2382
2383 #########################################################################
2384 ## sh4 (Renesas SuperH)
2385 #########################################################################
2386
2387 MigoR_config :       unconfig
2388         @mkdir -p $(obj)include
2389         @echo "#define CONFIG_MIGO_R 1" > $(obj)include/config.h
2390         @$(MKCONFIG) -a $@ sh sh4 MigoR renesas
2391
2392 ms7750se_config: unconfig
2393         @mkdir -p $(obj)include
2394         @echo "#define CONFIG_MS7750SE 1" > $(obj)include/config.h
2395         @$(MKCONFIG) -a $@ sh sh4 ms7750se
2396
2397 ms7722se_config :       unconfig
2398         @mkdir -p $(obj)include
2399         @echo "#define CONFIG_MS7722SE 1" > $(obj)include/config.h
2400         @$(MKCONFIG) -a $@ sh sh4 ms7722se
2401
2402 r2dplus_config  :   unconfig
2403         @mkdir -p $(obj)include
2404         @echo "#define CONFIG_R2DPLUS 1" > $(obj)include/config.h
2405         @$(MKCONFIG) -a $@ sh sh4 r2dplus renesas
2406
2407 r7780mp_config: unconfig
2408         @mkdir -p $(obj)include
2409         @echo "#define CONFIG_R7780MP 1" > $(obj)include/config.h
2410         @$(MKCONFIG) -a $@ sh sh4 r7780mp renesas
2411
2412 sh7763rdp_config  :   unconfig
2413         @mkdir -p $(obj)include
2414         @echo "#define CONFIG_SH7763RDP 1" > $(obj)include/config.h
2415         @$(MKCONFIG) -a $@ sh sh4 sh7763rdp renesas
2416
2417 sh7785lcr_32bit_config \
2418 sh7785lcr_config  :   unconfig
2419         @mkdir -p $(obj)include
2420         @mkdir -p $(obj)board/renesas/sh7785lcr
2421         @echo "#define CONFIG_SH7785LCR 1" > $(obj)include/config.h
2422         @if [ "$(findstring 32bit, $@)" ] ; then \
2423                 echo "#define CONFIG_SH_32BIT 1" >> $(obj)include/config.h ; \
2424                 echo "TEXT_BASE = 0x8ff80000" > \
2425                         $(obj)board/renesas/sh7785lcr/config.tmp ; \
2426         fi
2427         @$(MKCONFIG) -n $@ -a sh7785lcr sh sh4 sh7785lcr renesas
2428
2429 ap325rxa_config  :   unconfig
2430         @mkdir -p $(obj)include
2431         @echo "#define CONFIG_AP325RXA 1" > $(obj)include/config.h
2432         @$(MKCONFIG) -a $@ sh sh4 ap325rxa renesas
2433
2434 espt_config  :   unconfig
2435         @mkdir -p $(obj)include
2436         @echo "#define CONFIG_ESPT 1" > $(obj)include/config.h
2437         @$(MKCONFIG) -a $@ sh sh4 espt
2438
2439 #########################################################################
2440 #########################################################################
2441
2442 clean:
2443         @rm -f $(obj)examples/standalone/82559_eeprom                     \
2444                $(obj)examples/standalone/atmel_df_pow2                    \
2445                $(obj)examples/standalone/eepro100_eeprom                  \
2446                $(obj)examples/standalone/hello_world                      \
2447                $(obj)examples/standalone/interrupt                        \
2448                $(obj)examples/standalone/mem_to_mem_idma2intr             \
2449                $(obj)examples/standalone/sched                            \
2450                $(obj)examples/standalone/smc91111_eeprom                  \
2451                $(obj)examples/standalone/test_burst                       \
2452                $(obj)examples/standalone/timer
2453         @rm -f $(obj)examples/api/demo{,.bin}
2454         @rm -f $(obj)tools/bmp_logo        $(obj)tools/easylogo/easylogo  \
2455                $(obj)tools/env/{fw_printenv,fw_setenv}                    \
2456                $(obj)tools/envcrc                                         \
2457                $(obj)tools/gdb/{astest,gdbcont,gdbsend}                   \
2458                $(obj)tools/gen_eth_addr    $(obj)tools/img2srec           \
2459                $(obj)tools/mkimage         $(obj)tools/mpc86x_clk         \
2460                $(obj)tools/ncb             $(obj)tools/ubsha1
2461         @rm -f $(obj)board/cray/L1/{bootscript.c,bootscript.image}        \
2462                $(obj)board/netstar/{eeprom,crcek,crcit,*.srec,*.bin}      \
2463                $(obj)board/trab/trab_fkt   $(obj)board/voiceblue/eeprom   \
2464                $(obj)board/armltd/{integratorap,integratorcp}/u-boot.lds  \
2465                $(obj)u-boot.lds                                           \
2466                $(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs]
2467         @rm -f $(obj)include/bmp_logo.h
2468         @rm -f $(obj)nand_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,System.map}
2469         @rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl.map}
2470         @rm -f $(ONENAND_BIN)
2471         @rm -f $(obj)onenand_ipl/u-boot.lds
2472         @rm -f $(TIMESTAMP_FILE) $(VERSION_FILE)
2473         @find $(OBJTREE) -type f \
2474                 \( -name 'core' -o -name '*.bak' -o -name '*~' \
2475                 -o -name '*.o'  -o -name '*.a' -o -name '*.exe' \) -print \
2476                 | xargs rm -f
2477
2478 clobber:        clean
2479         @find $(OBJTREE) -type f \( -name '*.depend' \
2480                 -o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \
2481                 -print0 \
2482                 | xargs -0 rm -f
2483         @rm -f $(OBJS) $(obj)*.bak $(obj)ctags $(obj)etags $(obj)TAGS \
2484                 $(obj)cscope.* $(obj)*.*~
2485         @rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL)
2486         @rm -f $(obj)u-boot.kwb
2487         @rm -f $(obj)u-boot.imx
2488         @rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes}
2489         @rm -f $(obj)arch/powerpc/cpu/mpc824x/bedbug_603e.c
2490         @rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
2491         @[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l -print | xargs rm -f
2492         @[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -name "*" -type l -print | xargs rm -f
2493
2494 ifeq ($(OBJTREE),$(SRCTREE))
2495 mrproper \
2496 distclean:      clobber unconfig
2497 else
2498 mrproper \
2499 distclean:      clobber unconfig
2500         rm -rf $(obj)*
2501 endif
2502
2503 backup:
2504         F=`basename $(TOPDIR)` ; cd .. ; \
2505         gtar --force-local -zcvf `LC_ALL=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
2506
2507 #########################################################################