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