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