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