Makefile 116 KB
Newer Older
wdenk's avatar
wdenk committed
1
#
2
# (C) Copyright 2000-2009
wdenk's avatar
wdenk committed
3 4 5 6 7 8 9
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
# project.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
10
# published by the Free Software Foundatio; either version 2 of
wdenk's avatar
wdenk committed
11 12 13 14
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
wdenk's avatar
wdenk committed
16 17 18 19 20 21 22 23
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#

Wolfgang Denk's avatar
Wolfgang Denk committed
24
VERSION = 2009
Wolfgang Denk's avatar
Wolfgang Denk committed
25
PATCHLEVEL = 06
26
SUBLEVEL =
Wolfgang Denk's avatar
Wolfgang Denk committed
27
EXTRAVERSION =
28
ifneq "$(SUBLEVEL)" ""
29
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
30 31 32
else
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION)
endif
33
TIMESTAMP_FILE = $(obj)include/timestamp_autogenerated.h
34
VERSION_FILE = $(obj)include/version_autogenerated.h
35

wdenk's avatar
wdenk committed
36 37 38 39 40 41
HOSTARCH := $(shell uname -m | \
	sed -e s/i.86/i386/ \
	    -e s/sun4u/sparc64/ \
	    -e s/arm.*/arm/ \
	    -e s/sa110/arm/ \
	    -e s/powerpc/ppc/ \
Kumar Gala's avatar
Kumar Gala committed
42
	    -e s/ppc64/ppc/ \
wdenk's avatar
wdenk committed
43 44
	    -e s/macppc/ppc/)

45
HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \
wdenk's avatar
wdenk committed
46 47
	    sed -e 's/\(cygwin\).*/cygwin/')

48 49 50 51 52 53
# Set shell to bash if possible, otherwise fall back to sh
SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
	else if [ -x /bin/bash ]; then echo /bin/bash; \
	else echo sh; fi; fi)

export	HOSTARCH HOSTOS SHELL
wdenk's avatar
wdenk committed
54 55 56 57

# Deal with colliding definitions from tcsh etc.
VENDOR=

58 59 60 61 62 63 64 65
#########################################################################
# Allow for silent builds
ifeq (,$(findstring s,$(MAKEFLAGS)))
XECHO = echo
else
XECHO = :
endif

wdenk's avatar
wdenk committed
66
#########################################################################
67 68 69
#
# U-boot build supports producing a object files to the separate external
# directory. Two use cases are supported:
70
#
71 72 73 74 75 76 77 78 79 80
# 1) Add O= to the make command line
# 'make O=/tmp/build all'
#
# 2) Set environement variable BUILD_DIR to point to the desired location
# 'export BUILD_DIR=/tmp/build'
# 'make'
#
# The second approach can also be used with a MAKEALL script
# 'export BUILD_DIR=/tmp/build'
# './MAKEALL'
81
#
82
# Command line 'O=' setting overrides BUILD_DIR environent variable.
83
#
84 85
# When none of the above methods is used the local build is performed and
# the object files are placed in the source directory.
86
#
87 88 89 90 91 92 93 94 95

ifdef O
ifeq ("$(origin O)", "command line")
BUILD_DIR := $(O)
endif
endif

ifneq ($(BUILD_DIR),)
saved-output := $(BUILD_DIR)
96 97 98 99

# Attempt to create a output directory.
$(shell [ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR})

100
# Verify if it was successful.
101 102 103 104 105 106 107 108 109 110 111 112
BUILD_DIR := $(shell cd $(BUILD_DIR) && /bin/pwd)
$(if $(BUILD_DIR),,$(error output directory "$(saved-output)" does not exist))
endif # ifneq ($(BUILD_DIR),)

OBJTREE		:= $(if $(BUILD_DIR),$(BUILD_DIR),$(CURDIR))
SRCTREE		:= $(CURDIR)
TOPDIR		:= $(SRCTREE)
LNDIR		:= $(OBJTREE)
export	TOPDIR SRCTREE OBJTREE

MKCONFIG	:= $(SRCTREE)/mkconfig
export MKCONFIG
wdenk's avatar
wdenk committed
113

114
ifneq ($(OBJTREE),$(SRCTREE))
Wolfgang Denk's avatar
Wolfgang Denk committed
115
REMOTE_BUILD	:= 1
116 117 118 119 120 121 122 123 124 125 126 127
export REMOTE_BUILD
endif

# $(obj) and (src) are defined in config.mk but here in main Makefile
# we also need them before config.mk is included which is the case for
# some targets like unconfig, clean, clobber, distclean, etc.
ifneq ($(OBJTREE),$(SRCTREE))
obj := $(OBJTREE)/
src := $(SRCTREE)/
else
obj :=
src :=
128
endif
129 130
export obj src

131 132 133
# Make sure CDPATH settings don't interfere
unexport CDPATH

wdenk's avatar
wdenk committed
134 135
#########################################################################

136 137 138 139
ifeq ($(ARCH),powerpc)
ARCH = ppc
endif

140 141 142 143 144 145 146 147
# The "tools" are needed early, so put this first
# Don't include stuff already done in $(LIBS)
SUBDIRS	= tools \
	  examples \
	  api_examples

.PHONY : $(SUBDIRS)

148
ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk))
wdenk's avatar
wdenk committed
149 150

# load ARCH, BOARD, and CPU configuration
151
include $(obj)include/config.mk
152
export	ARCH CPU BOARD VENDOR SOC
153

wdenk's avatar
wdenk committed
154
ifndef CROSS_COMPILE
Wolfgang Denk's avatar
Wolfgang Denk committed
155
ifeq ($(HOSTARCH),$(ARCH))
wdenk's avatar
wdenk committed
156 157 158
CROSS_COMPILE =
else
ifeq ($(ARCH),ppc)
159
CROSS_COMPILE = ppc_8xx-
wdenk's avatar
wdenk committed
160 161
endif
ifeq ($(ARCH),arm)
162
CROSS_COMPILE = arm-linux-
wdenk's avatar
wdenk committed
163
endif
164
ifeq ($(ARCH),i386)
165 166
CROSS_COMPILE = i386-linux-
endif
167 168 169
ifeq ($(ARCH),mips)
CROSS_COMPILE = mips_4KC-
endif
170 171 172
ifeq ($(ARCH),nios)
CROSS_COMPILE = nios-elf-
endif
173 174 175
ifeq ($(ARCH),nios2)
CROSS_COMPILE = nios2-elf-
endif
176 177 178
ifeq ($(ARCH),m68k)
CROSS_COMPILE = m68k-elf-
endif
179 180 181
ifeq ($(ARCH),microblaze)
CROSS_COMPILE = mb-
endif
Wolfgang Denk's avatar
Wolfgang Denk committed
182
ifeq ($(ARCH),blackfin)
183
CROSS_COMPILE = bfin-uclinux-
Wolfgang Denk's avatar
Wolfgang Denk committed
184
endif
185
ifeq ($(ARCH),avr32)
186
CROSS_COMPILE = avr32-linux-
187
endif
188 189
ifeq ($(ARCH),sh)
CROSS_COMPILE = sh4-linux-
190 191 192 193
endif
ifeq ($(ARCH),sparc)
CROSS_COMPILE = sparc-elf-
endif	# sparc
194 195
endif	# HOSTARCH,ARCH
endif	# CROSS_COMPILE
wdenk's avatar
wdenk committed
196 197 198

export	CROSS_COMPILE

199 200 201
# load other configuration
include $(TOPDIR)/config.mk

wdenk's avatar
wdenk committed
202 203 204
#########################################################################
# U-Boot objects....order is important (i.e. start must be first)

205
OBJS  = cpu/$(CPU)/start.o
206
ifeq ($(CPU),i386)
207
OBJS += cpu/$(CPU)/start16.o
208
OBJS += cpu/$(CPU)/resetvec.o
209
endif
wdenk's avatar
wdenk committed
210
ifeq ($(CPU),ppc4xx)
211
OBJS += cpu/$(CPU)/resetvec.o
wdenk's avatar
wdenk committed
212
endif
213 214 215
ifeq ($(CPU),mpc85xx)
OBJS += cpu/$(CPU)/resetvec.o
endif
wdenk's avatar
wdenk committed
216

217 218
OBJS := $(addprefix $(obj),$(OBJS))

219
LIBS  = lib_generic/libgeneric.a
220
LIBS += lib_generic/lzma/liblzma.a
221
LIBS += lib_generic/lzo/liblzo.a
222 223
LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \
	"board/$(VENDOR)/common/lib$(VENDOR).a"; fi)
wdenk's avatar
wdenk committed
224
LIBS += cpu/$(CPU)/lib$(CPU).a
225 226 227
ifdef SOC
LIBS += cpu/$(CPU)/$(SOC)/lib$(SOC).a
endif
228 229 230
ifeq ($(CPU),ixp)
LIBS += cpu/ixp/npe/libnpe.a
endif
wdenk's avatar
wdenk committed
231
LIBS += lib_$(ARCH)/lib$(ARCH).a
232
LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \
233 234
	fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a fs/yaffs2/libyaffs2.a \
	fs/ubifs/libubifs.a
wdenk's avatar
wdenk committed
235 236
LIBS += net/libnet.a
LIBS += disk/libdisk.a
237
LIBS += drivers/bios_emulator/libatibiosemu.a
238
LIBS += drivers/block/libblock.a
239
LIBS += drivers/dma/libdma.a
240
LIBS += drivers/fpga/libfpga.a
241
LIBS += drivers/gpio/libgpio.a
242
LIBS += drivers/hwmon/libhwmon.a
243
LIBS += drivers/i2c/libi2c.a
244
LIBS += drivers/input/libinput.a
245
LIBS += drivers/misc/libmisc.a
246
LIBS += drivers/mmc/libmmc.a
247 248 249 250
LIBS += drivers/mtd/libmtd.a
LIBS += drivers/mtd/nand/libnand.a
LIBS += drivers/mtd/nand_legacy/libnand_legacy.a
LIBS += drivers/mtd/onenand/libonenand.a
251
LIBS += drivers/mtd/ubi/libubi.a
Haavard Skinnemoen's avatar
Haavard Skinnemoen committed
252
LIBS += drivers/mtd/spi/libspi_flash.a
253
LIBS += drivers/net/libnet.a
254
LIBS += drivers/net/phy/libphy.a
255 256 257
LIBS += drivers/net/sk98lin/libsk98lin.a
LIBS += drivers/pci/libpci.a
LIBS += drivers/pcmcia/libpcmcia.a
258
LIBS += drivers/spi/libspi.a
259 260 261
ifeq ($(CPU),mpc83xx)
LIBS += drivers/qe/qe.a
endif
262 263
ifeq ($(CPU),mpc85xx)
LIBS += drivers/qe/qe.a
264
LIBS += cpu/mpc8xxx/ddr/libddr.a
265
TAG_SUBDIRS += cpu/mpc8xxx
266 267 268
endif
ifeq ($(CPU),mpc86xx)
LIBS += cpu/mpc8xxx/ddr/libddr.a
269
TAG_SUBDIRS += cpu/mpc8xxx
270
endif
271
LIBS += drivers/rtc/librtc.a
272
LIBS += drivers/serial/libserial.a
273
LIBS += drivers/twserial/libtws.a
274 275 276
LIBS += drivers/usb/gadget/libusb_gadget.a
LIBS += drivers/usb/host/libusb_host.a
LIBS += drivers/usb/musb/libusb_musb.a
277
LIBS += drivers/video/libvideo.a
278
LIBS += drivers/watchdog/libwatchdog.a
wdenk's avatar
wdenk committed
279
LIBS += common/libcommon.a
280
LIBS += libfdt/libfdt.a
281
LIBS += api/libapi.a
282
LIBS += post/libpost.a
283 284

LIBS := $(addprefix $(obj),$(LIBS))
285
.PHONY : $(LIBS) $(TIMESTAMP_FILE) $(VERSION_FILE)
286

287 288 289
LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).a
LIBBOARD := $(addprefix $(obj),$(LIBBOARD))

290
# Add GCC lib
291
PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
292

293 294 295 296 297
ifeq ($(CONFIG_NAND_U_BOOT),y)
NAND_SPL = nand_spl
U_BOOT_NAND = $(obj)u-boot-nand.bin
endif

298 299 300 301 302
ifeq ($(CONFIG_ONENAND_U_BOOT),y)
ONENAND_IPL = onenand_ipl
U_BOOT_ONENAND = $(obj)u-boot-onenand.bin
endif

303
__OBJS := $(subst $(obj),,$(OBJS))
304
__LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
305

306
#########################################################################
wdenk's avatar
wdenk committed
307 308
#########################################################################

309
ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND)
310 311 312
ifeq ($(ARCH),blackfin)
ALL += $(obj)u-boot.ldr
endif
wdenk's avatar
wdenk committed
313

314
all:		$(ALL)
wdenk's avatar
wdenk committed
315

316
$(obj)u-boot.hex:	$(obj)u-boot
317 318
		$(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@

319
$(obj)u-boot.srec:	$(obj)u-boot
320
		$(OBJCOPY) -O srec $< $@
wdenk's avatar
wdenk committed
321

322
$(obj)u-boot.bin:	$(obj)u-boot
wdenk's avatar
wdenk committed
323 324
		$(OBJCOPY) ${OBJCFLAGS} -O binary $< $@

325
$(obj)u-boot.ldr:	$(obj)u-boot
326
		$(obj)tools/envcrc --binary > $(obj)env-ldr.o
327
		$(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS)
328 329 330 331 332 333 334

$(obj)u-boot.ldr.hex:	$(obj)u-boot.ldr
		$(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary

$(obj)u-boot.ldr.srec:	$(obj)u-boot.ldr
		$(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary

335
$(obj)u-boot.img:	$(obj)u-boot.bin
336 337
		./tools/mkimage -A $(ARCH) -T firmware -C none \
		-a $(TEXT_BASE) -e 0 \
338
		-n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
339 340 341
			sed -e 's/"[	 ]*$$/ for $(BOARD) board"/') \
		-d $< $@

342
$(obj)u-boot.sha1:	$(obj)u-boot.bin
343
		$(obj)tools/ubsha1 $(obj)u-boot.bin
344

345
$(obj)u-boot.dis:	$(obj)u-boot
wdenk's avatar
wdenk committed
346 347
		$(OBJDUMP) -d $< > $@

348
GEN_UBOOT = \
349 350
		UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
		sed  -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
351 352
		cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
			--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
353
			-Map u-boot.map -o u-boot
354 355 356 357 358 359 360
$(obj)u-boot:		depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT)
		$(GEN_UBOOT)
ifeq ($(CONFIG_KALLSYMS),y)
		smap=`$(call SYSTEM_MAP,u-boot) | awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\0"}'` ; \
		$(CC) $(CFLAGS) -DSYSTEM_MAP="\"$${smap}\"" -c common/system_map.c -o $(obj)common/system_map.o
		$(GEN_UBOOT) $(obj)common/system_map.o
endif
wdenk's avatar
wdenk committed
361

362
$(OBJS):	depend
363 364
		$(MAKE) -C cpu/$(CPU) $(if $(REMOTE_BUILD),$@,$(notdir $@))

365
$(LIBS):	depend $(SUBDIRS)
366
		$(MAKE) -C $(dir $(subst $(obj),,$@))
367

368
$(LIBBOARD):	depend $(LIBS)
369 370
		$(MAKE) -C $(dir $(subst $(obj),,$@))

371
$(SUBDIRS):	depend
372
		$(MAKE) -C $@ all
wdenk's avatar
wdenk committed
373

374
$(LDSCRIPT):	depend
375 376
		$(MAKE) -C $(dir $@) $(notdir $@)

377
$(NAND_SPL):	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
378
		$(MAKE) -C nand_spl/board/$(BOARDDIR) all
379

380
$(U_BOOT_NAND):	$(NAND_SPL) $(obj)u-boot.bin
381
		cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
382

383
$(ONENAND_IPL):	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
Stefan Roese's avatar
Stefan Roese committed
384
		$(MAKE) -C onenand_ipl/board/$(BOARDDIR) all
385

386
$(U_BOOT_ONENAND):	$(ONENAND_IPL) $(obj)u-boot.bin
387
		cat $(obj)onenand_ipl/onenand-ipl-2k.bin $(obj)u-boot.bin > $(obj)u-boot-onenand.bin
388
		cat $(obj)onenand_ipl/onenand-ipl-4k.bin $(obj)u-boot.bin > $(obj)u-boot-flexonenand.bin
389

390
$(VERSION_FILE):
391
		@( printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' "$(U_BOOT_VERSION)" \
392
		 '$(shell $(TOPDIR)/tools/setlocalversion $(TOPDIR))' ) > $@.tmp
393
		@cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
394

395 396 397 398
$(TIMESTAMP_FILE):
		@date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
		@date +'#define U_BOOT_TIME "%T"' >> $@

399
gdbtools:
400 401 402 403 404 405
		$(MAKE) -C tools/gdb all || exit 1

updater:
		$(MAKE) -C tools/updater all || exit 1

env:
406
		$(MAKE) -C tools/env all MTD_VERSION=${MTD_VERSION} || exit 1
407

408
depend dep:	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
409
		for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir _depend ; done
wdenk's avatar
wdenk committed
410

411 412 413 414 415 416 417 418
TAG_SUBDIRS += include
TAG_SUBDIRS += lib_generic board/$(BOARDDIR)
TAG_SUBDIRS += cpu/$(CPU)
TAG_SUBDIRS += lib_$(ARCH)
TAG_SUBDIRS += fs/cramfs
TAG_SUBDIRS += fs/fat
TAG_SUBDIRS += fs/fdos
TAG_SUBDIRS += fs/jffs2
419
TAG_SUBDIRS += fs/yaffs2
420 421 422 423 424
TAG_SUBDIRS += net
TAG_SUBDIRS += disk
TAG_SUBDIRS += common
TAG_SUBDIRS += drivers/bios_emulator
TAG_SUBDIRS += drivers/block
425
TAG_SUBDIRS += drivers/gpio
426 427 428 429
TAG_SUBDIRS += drivers/hwmon
TAG_SUBDIRS += drivers/i2c
TAG_SUBDIRS += drivers/input
TAG_SUBDIRS += drivers/misc
430
TAG_SUBDIRS += drivers/mmc
431 432 433 434
TAG_SUBDIRS += drivers/mtd
TAG_SUBDIRS += drivers/mtd/nand
TAG_SUBDIRS += drivers/mtd/nand_legacy
TAG_SUBDIRS += drivers/mtd/onenand
Haavard Skinnemoen's avatar
Haavard Skinnemoen committed
435
TAG_SUBDIRS += drivers/mtd/spi
436 437 438 439 440 441 442
TAG_SUBDIRS += drivers/net
TAG_SUBDIRS += drivers/net/sk98lin
TAG_SUBDIRS += drivers/pci
TAG_SUBDIRS += drivers/pcmcia
TAG_SUBDIRS += drivers/qe
TAG_SUBDIRS += drivers/rtc
TAG_SUBDIRS += drivers/serial
443
TAG_SUBDIRS += drivers/spi
444 445 446
TAG_SUBDIRS += drivers/usb
TAG_SUBDIRS += drivers/video

447
tags ctags:
448
		ctags -w -o $(obj)ctags `find $(SUBDIRS) $(TAG_SUBDIRS) \
Wolfgang Denk's avatar
Wolfgang Denk committed
449
						-name '*.[ch]' -print`
wdenk's avatar
wdenk committed
450 451

etags:
452
		etags -a -o $(obj)etags `find $(SUBDIRS) $(TAG_SUBDIRS) \
Wolfgang Denk's avatar
Wolfgang Denk committed
453
						-name '*.[ch]' -print`
Li Yang's avatar
Li Yang committed
454 455 456 457
cscope:
		find $(SUBDIRS) $(TAG_SUBDIRS) -name '*.[ch]' -print \
						> cscope.files
		cscope -b -q -k
wdenk's avatar
wdenk committed
458

459 460
SYSTEM_MAP = \
		$(NM) $1 | \
wdenk's avatar
wdenk committed
461
		grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
462 463 464
		LC_ALL=C sort
$(obj)System.map:	$(obj)u-boot
		@$(call SYSTEM_MAP,$<) > $(obj)System.map
wdenk's avatar
wdenk committed
465

466 467 468 469 470 471
#
# Auto-generate the autoconf.mk file (which is included by all makefiles)
#
# This target actually generates 2 files; autoconf.mk and autoconf.mk.dep.
# the dep file is only include in this top level makefile to determine when
# to regenerate the autoconf.mk file.
472 473
$(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h
	@$(XECHO) Generating $@ ; \
474
	set -e ; \
475
	: Generate the dependancies ; \
476 477 478 479 480 481
	$(CC) -x c -DDO_DEPS_ONLY -M $(HOST_CFLAGS) $(CPPFLAGS) \
		-MQ $(obj)include/autoconf.mk include/common.h > $@

$(obj)include/autoconf.mk: $(obj)include/config.h
	@$(XECHO) Generating $@ ; \
	set -e ; \
482
	: Extract the config macros ; \
483
	$(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM include/common.h | \
484 485
		sed -n -f tools/scripts/define2mk.sed > $@.tmp && \
	mv $@.tmp $@
486

487
sinclude $(obj)include/autoconf.mk.dep
488

wdenk's avatar
wdenk committed
489
#########################################################################
490
else	# !config.mk
491 492
all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \
$(obj)u-boot.img $(obj)u-boot.dis $(obj)u-boot \
493
$(SUBDIRS) $(TIMESTAMP_FILE) $(VERSION_FILE) gdbtools updater env depend \
Li Yang's avatar
Li Yang committed
494
dep tags ctags etags cscope $(obj)System.map:
wdenk's avatar
wdenk committed
495 496
	@echo "System not configured - see README" >&2
	@ exit 1
497
endif	# config.mk
wdenk's avatar
wdenk committed
498

499 500
.PHONY : CHANGELOG
CHANGELOG:
501 502
	git log --no-merges U-Boot-1_1_5.. | \
	unexpand -a | sed -e 's/\s\s*$$//' > $@
503

504 505
include/license.h: tools/bin2header COPYING
	 cat COPYING | gzip -9 -c | ./tools/bin2header license_gzip > include/license.h
wdenk's avatar
wdenk committed
506 507 508
#########################################################################

unconfig:
509
	@rm -f $(obj)include/config.h $(obj)include/config.mk \
510 511
		$(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \
		$(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep
wdenk's avatar
wdenk committed
512 513 514 515

#========================================================================
# PowerPC
#========================================================================
516 517 518 519 520

#########################################################################
## MPC5xx Systems
#########################################################################

wdenk's avatar
wdenk committed
521
canmb_config:	unconfig
522
	@$(MKCONFIG) -a canmb ppc mpc5xxx canmb
wdenk's avatar
wdenk committed
523

524
cmi_mpc5xx_config:	unconfig
525
	@$(MKCONFIG) $(@:_config=) ppc mpc5xx cmi
526

527
PATI_config:		unconfig
528
	@$(MKCONFIG) $(@:_config=) ppc mpc5xx pati mpl
529

530 531 532
#########################################################################
## MPC5xxx Systems
#########################################################################
wdenk's avatar
wdenk committed
533

534
aev_config: unconfig
535
	@$(MKCONFIG) -a aev ppc mpc5xxx tqm5200 tqc
536

537
BC3450_config:	unconfig
538
	@$(MKCONFIG) -a BC3450 ppc mpc5xxx bc3450
539

540 541 542
cm5200_config:	unconfig
	@$(MKCONFIG) -a cm5200 ppc mpc5xxx cm5200

543
cpci5200_config:  unconfig
544
	@$(MKCONFIG) -a cpci5200  ppc mpc5xxx cpci5200 esd
545

546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561
digsy_mtc_config \
digsy_mtc_LOWBOOT_config	\
digsy_mtc_RAMBOOT_config:	unconfig
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/digsy_mtc
	@ >$(obj)include/config.h
	@[ -z "$(findstring LOWBOOT_,$@)" ] || \
		{ echo "TEXT_BASE = 0xFF000000" >$(obj)board/digsy_mtc/config.tmp ; \
		  echo "... with LOWBOOT configuration" ; \
		}
	@[ -z "$(findstring RAMBOOT_,$@)" ] || \
		{ echo "TEXT_BASE = 0x00100000" >$(obj)board/digsy_mtc/config.tmp ; \
		  echo "... with RAMBOOT configuration" ; \
		}
	@$(MKCONFIG) -a digsy_mtc  ppc mpc5xxx digsy_mtc

562
hmi1001_config:	unconfig
563
	@$(MKCONFIG) hmi1001 ppc mpc5xxx hmi1001
wdenk's avatar
wdenk committed
564

565 566 567 568 569 570
Lite5200_config				\
Lite5200_LOWBOOT_config			\
Lite5200_LOWBOOT08_config		\
icecube_5200_config			\
icecube_5200_LOWBOOT_config		\
icecube_5200_LOWBOOT08_config		\
Wolfgang Denk's avatar
Wolfgang Denk committed
571 572
icecube_5200_DDR_config			\
icecube_5200_DDR_LOWBOOT_config		\
573 574
icecube_5200_DDR_LOWBOOT08_config	\
icecube_5100_config:			unconfig
575 576
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/icecube
wdenk's avatar
wdenk committed
577 578
	@[ -z "$(findstring LOWBOOT_,$@)" ] || \
		{ if [ "$(findstring DDR,$@)" ] ; \
579 580
			then echo "TEXT_BASE = 0xFF800000" >$(obj)board/icecube/config.tmp ; \
			else echo "TEXT_BASE = 0xFF000000" >$(obj)board/icecube/config.tmp ; \
wdenk's avatar
wdenk committed
581
		  fi ; \
582
		  $(XECHO) "... with LOWBOOT configuration" ; \
583 584
		}
	@[ -z "$(findstring LOWBOOT08,$@)" ] || \
585
		{ echo "TEXT_BASE = 0xFF800000" >$(obj)board/icecube/config.tmp ; \
586
		  echo "... with 8 MB flash only" ; \
587
		  $(XECHO) "... with LOWBOOT configuration" ; \
588
		}
589
	@[ -z "$(findstring DDR,$@)" ] || \
590
		{ echo "#define CONFIG_MPC5200_DDR"	>>$(obj)include/config.h ; \
591
		  $(XECHO) "... DDR memory revision" ; \
592
		}
593
	@[ -z "$(findstring 5200,$@)" ] || \
594
		{ echo "#define CONFIG_MPC5200"		>>$(obj)include/config.h ; \
595
		  $(XECHO) "... with MPC5200 processor" ; \
596
		}
597
	@[ -z "$(findstring 5100,$@)" ] || \
598
		{ echo "#define CONFIG_MGT5100"		>>$(obj)include/config.h ; \
599
		  $(XECHO) "... with MGT5100 processor" ; \
600
		}
601
	@$(MKCONFIG) -a IceCube ppc mpc5xxx icecube
602

603
jupiter_config:	unconfig
604 605
	@$(MKCONFIG) jupiter ppc mpc5xxx jupiter

606
inka4x0_config:	unconfig
607
	@$(MKCONFIG) inka4x0 ppc mpc5xxx inka4x0
wdenk's avatar
wdenk committed
608

609
lite5200b_config	\
610
lite5200b_PM_config	\
611
lite5200b_LOWBOOT_config:	unconfig
612 613 614
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/icecube
	@ echo "#define CONFIG_MPC5200_DDR"	>>$(obj)include/config.h
615
	@ $(XECHO) "... DDR memory revision"
616 617
	@ echo "#define CONFIG_MPC5200"		>>$(obj)include/config.h
	@ echo "#define CONFIG_LITE5200B"	>>$(obj)include/config.h
618 619
	@[ -z "$(findstring _PM_,$@)" ] || \
		{ echo "#define CONFIG_LITE5200B_PM"	>>$(obj)include/config.h ; \
620
		  $(XECHO) "... with power management (low-power mode) support" ; \
621
		}
622
	@[ -z "$(findstring LOWBOOT_,$@)" ] || \
623
		{ echo "TEXT_BASE = 0xFF000000" >$(obj)board/icecube/config.tmp ; \
624
		  $(XECHO) "... with LOWBOOT configuration" ; \
625
		}
626
	@ $(XECHO) "... with MPC5200B processor"
627
	@$(MKCONFIG) -a IceCube  ppc mpc5xxx icecube
628

629
mcc200_config	\
630 631 632 633
mcc200_SDRAM_config	\
mcc200_highboot_config	\
mcc200_COM12_config	\
mcc200_COM12_SDRAM_config	\
634 635
mcc200_COM12_highboot_config	\
mcc200_COM12_highboot_SDRAM_config	\
636 637 638 639 640
mcc200_highboot_SDRAM_config	\
prs200_config	\
prs200_DDR_config	\
prs200_highboot_config	\
prs200_highboot_DDR_config:	unconfig
641 642
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/mcc200
643
	@[ -n "$(findstring highboot,$@)" ] || \
644
		{ $(XECHO) "... with lowboot configuration" ; \
645
		}
646
	@[ -z "$(findstring highboot,$@)" ] || \
647
		{ echo "TEXT_BASE = 0xFFF00000" >$(obj)board/mcc200/config.tmp ; \
648
		  $(XECHO) "... with highboot configuration" ; \
649 650
		}
	@[ -n "$(findstring _SDRAM,$@)" ] || \
651 652
		{ if [ -n "$(findstring mcc200,$@)" ]; \
		  then \
653
			$(XECHO) "... with DDR" ; \
654 655 656
		  else \
			if [ -n "$(findstring _DDR,$@)" ];\
			then \
657
				$(XECHO) "... with DDR" ; \
658
			else \
659
				echo "#define CONFIG_MCC200_SDRAM" >>$(obj)include/config.h ;\
660
				$(XECHO) "... with SDRAM" ; \
661 662
			fi; \
		  fi; \
663 664
		}
	@[ -z "$(findstring _SDRAM,$@)" ] || \
665
		{ echo "#define CONFIG_MCC200_SDRAM"	>>$(obj)include/config.h ; \
666
		  $(XECHO) "... with SDRAM" ; \
667
		}
668
	@[ -z "$(findstring COM12,$@)" ] || \
669
		{ echo "#define CONFIG_CONSOLE_COM12"	>>$(obj)include/config.h ; \
670
		  $(XECHO) "... with console on COM12" ; \
671
		}
672
	@[ -z "$(findstring prs200,$@)" ] || \
673
		{ echo "#define CONFIG_PRS200"	>>$(obj)include/config.h ;\
674
		}
675
	@$(MKCONFIG) -n $@ -a mcc200 ppc mpc5xxx mcc200
676

677
mecp5200_config:  unconfig
678
	@$(MKCONFIG) mecp5200  ppc mpc5xxx mecp5200 esd
679

680 681 682
motionpro_config:	unconfig
	@$(MKCONFIG) motionpro ppc mpc5xxx motionpro

683 684 685
mucmc52_config:		unconfig
	@$(MKCONFIG) mucmc52 ppc mpc5xxx mucmc52

686
munices_config:	unconfig
687
	@$(MKCONFIG) munices ppc mpc5xxx munices
688

689 690 691 692 693 694 695 696
MVBC_P_config: unconfig
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/mvbc_p
	@ >$(obj)include/config.h
	@[ -z "$(findstring MVBC_P,$@)" ] || \
	{   	echo "#define CONFIG_MVBC_P" 	>>$(obj)include/config.h; }
	@$(MKCONFIG) -n $@ -a MVBC_P ppc mpc5xxx mvbc_p matrix_vision

697
o2dnt_config:	unconfig
698
	@$(MKCONFIG) o2dnt ppc mpc5xxx o2dnt
699

700
pf5200_config:	unconfig
701
	@$(MKCONFIG) pf5200  ppc mpc5xxx pf5200 esd
702

703 704 705 706
PM520_config \
PM520_DDR_config \
PM520_ROMBOOT_config \
PM520_ROMBOOT_DDR_config:	unconfig
707
	@mkdir -p $(obj)include
708
	@[ -z "$(findstring DDR,$@)" ] || \
709
		{ echo "#define CONFIG_MPC5200_DDR"	>>$(obj)include/config.h ; \
710
		  $(XECHO) "... DDR memory revision" ; \
711 712
		}
	@[ -z "$(findstring ROMBOOT,$@)" ] || \
713
		{ echo "#define CONFIG_BOOT_ROM" >>$(obj)include/config.h ; \
714
		  $(XECHO) "... booting from 8-bit flash" ; \
715
		}
716
	@$(MKCONFIG) -a PM520 ppc mpc5xxx pm520
717

718
smmaco4_config: unconfig
719
	@$(MKCONFIG) -a smmaco4 ppc mpc5xxx tqm5200 tqc
720 721

spieval_config:	unconfig
722
	@$(MKCONFIG) -a spieval ppc mpc5xxx tqm5200 tqc
723

724
TB5200_B_config \
725
TB5200_config:	unconfig
726
	@mkdir -p $(obj)include
727
	@[ -z "$(findstring _B,$@)" ] || \
728
		{ echo "#define CONFIG_TQM5200_B"	>>$(obj)include/config.h ; \
729
		  $(XECHO) "... with MPC5200B processor" ; \
730
		}
731
	@$(MKCONFIG) -n $@ -a TB5200 ppc mpc5xxx tqm5200 tqc
732

733 734 735
MINI5200_config	\
EVAL5200_config	\
TOP5200_config:	unconfig
736 737 738
	@mkdir -p $(obj)include
	@ echo "#define CONFIG_$(@:_config=) 1"	>$(obj)include/config.h
	@$(MKCONFIG) -n $@ -a TOP5200 ppc mpc5xxx top5200 emk
739

740 741 742 743 744
Total5100_config		\
Total5200_config		\
Total5200_lowboot_config	\
Total5200_Rev2_config		\
Total5200_Rev2_lowboot_config:	unconfig
745 746
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/total5200
747
	@[ -z "$(findstring 5100,$@)" ] || \
748
		{ echo "#define CONFIG_MGT5100"		>>$(obj)include/config.h ; \
749
		  $(XECHO) "... with MGT5100 processor" ; \
750 751
		}
	@[ -z "$(findstring 5200,$@)" ] || \
752
		{ echo "#define CONFIG_MPC5200"		>>$(obj)include/config.h ; \
753
		  $(XECHO) "... with MPC5200 processor" ; \
754 755
		}
	@[ -n "$(findstring Rev,$@)" ] || \
756
		{ echo "#define CONFIG_TOTAL5200_REV 1"	>>$(obj)include/config.h ; \
757
		  $(XECHO) "... revision 1 board" ; \
758 759
		}
	@[ -z "$(findstring Rev2_,$@)" ] || \
760
		{ echo "#define CONFIG_TOTAL5200_REV 2"	>>$(obj)include/config.h ; \
761
		  $(XECHO) "... revision 2 board" ; \
762 763
		}
	@[ -z "$(findstring lowboot_,$@)" ] || \
764
		{ echo "TEXT_BASE = 0xFE000000" >$(obj)board/total5200/config.tmp ; \
765
		  $(XECHO) "... with lowboot configuration" ; \
766
		}
767
	@$(MKCONFIG) -a Total5200 ppc mpc5xxx total5200
768

769
cam5200_config \
770
cam5200_niosflash_config \
Wolfgang Denk's avatar
Wolfgang Denk committed
771
fo300_config \
772
MiniFAP_config \
773 774
TQM5200S_config \
TQM5200S_HIGHBOOT_config \
Wolfgang Denk's avatar
Wolfgang Denk committed
775 776 777 778
TQM5200_B_config \
TQM5200_B_HIGHBOOT_config \
TQM5200_config	\
TQM5200_STK100_config:	unconfig
779
	@mkdir -p $(obj)include
780
	@mkdir -p $(obj)board/tqc/tqm5200
781
	@[ -z "$(findstring cam5200,$@)" ] || \
782 783 784
		{ echo "#define CONFIG_CAM5200"	>>$(obj)include/config.h ; \
		  echo "#define CONFIG_TQM5200S"	>>$(obj)include/config.h ; \
		  echo "#define CONFIG_TQM5200_B"	>>$(obj)include/config.h ; \
785
		  $(XECHO) "... TQM5200S on Cam5200" ; \
786
		}
787 788
	@[ -z "$(findstring niosflash,$@)" ] || \
		{ echo "#define CONFIG_CAM5200_NIOSFLASH"	>>$(obj)include/config.h ; \
789
		  $(XECHO) "... with NIOS flash driver" ; \
790
		}
791
	@[ -z "$(findstring fo300,$@)" ] || \
792
		{ echo "#define CONFIG_FO300"	>>$(obj)include/config.h ; \
793
		  $(XECHO) "... TQM5200 on FO300" ; \
794
		}
795
	@[ -z "$(findstring MiniFAP,$@)" ] || \
796
		{ echo "#define CONFIG_MINIFAP"	>>$(obj)include/config.h ; \
797
		  $(XECHO) "... TQM5200_AC on MiniFAP" ; \
798
		}
799
	@[ -z "$(findstring STK100,$@)" ] || \
800
		{ echo "#define CONFIG_STK52XX_REV100"	>>$(obj)include/config.h ; \
801
		  $(XECHO) "... on a STK52XX.100 base board" ; \
802
		}
803
	@[ -z "$(findstring TQM5200_B,$@)" ] || \
804
		{ echo "#define CONFIG_TQM5200_B"	>>$(obj)include/config.h ; \
805 806
		}
	@[ -z "$(findstring TQM5200S,$@)" ] || \
807 808
		{ echo "#define CONFIG_TQM5200S"	>>$(obj)include/config.h ; \
		  echo "#define CONFIG_TQM5200_B"	>>$(obj)include/config.h ; \
809
		}
810
	@[ -z "$(findstring HIGHBOOT,$@)" ] || \
811
		{ echo "TEXT_BASE = 0xFFF00000" >$(obj)board/tqm5200/config.tmp ; \
812
		}
813
	@$(MKCONFIG) -n $@ -a TQM5200 ppc mpc5xxx tqm5200 tqc
814

815
uc101_config:		unconfig
816
	@$(MKCONFIG) uc101 ppc mpc5xxx uc101
817

818 819
v38b_config: unconfig
	@$(MKCONFIG) -a v38b ppc mpc5xxx v38b
820

821 822 823
#########################################################################
## MPC512x Systems
#########################################################################
824

825 826 827
aria_config:	unconfig
	@$(MKCONFIG) -a aria ppc mpc512x aria davedenx

828 829 830
mecp5123_config:	unconfig
	@$(MKCONFIG) -a mecp5123 ppc mpc512x mecp5123 esd

831 832
mpc5121ads_config \
mpc5121ads_rev2_config	\
833
	: unconfig
834
	@mkdir -p $(obj)include
835 836
	@if [ "$(findstring rev2,$@)" ] ; then \
		echo "#define CONFIG_ADS5121_REV2 1" > $(obj)include/config.h; \
837
	fi
838
	@$(MKCONFIG) -a mpc5121ads ppc mpc512x mpc5121ads freescale
839

wdenk's avatar
wdenk committed
840 841 842 843
#########################################################################
## MPC8xx Systems
#########################################################################

844
Adder_config	\
845
Adder87x_config \
846
AdderII_config	\
847
	:		unconfig
848
	@mkdir -p $(obj)include
849
	$(if $(findstring AdderII,$@), \
850 851
	@echo "#define CONFIG_MPC852T" > $(obj)include/config.h)
	@$(MKCONFIG) -a Adder ppc mpc8xx adder
852

853
AdderUSB_config:	unconfig
854
	@$(MKCONFIG) -a AdderUSB ppc mpc8xx adder
855

856 857
ADS860_config	  \
FADS823_config	  \
858 859
FADS850SAR_config \
MPC86xADS_config  \
860
MPC885ADS_config  \
861
FADS860T_config:	unconfig
862
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx fads
wdenk's avatar
wdenk committed
863 864

AMX860_config	:	unconfig
865
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx amx860 westel
wdenk's avatar
wdenk committed
866 867

c2mon_config:		unconfig
868
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx c2mon
wdenk's avatar
wdenk committed
869 870

CCM_config:		unconfig
871
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx CCM siemens
wdenk's avatar
wdenk committed
872 873

cogent_mpc8xx_config:	unconfig
874
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx cogent
wdenk's avatar
wdenk committed
875

876
ELPT860_config:		unconfig
877
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx elpt860 LEOX
878

879
EP88x_config:		unconfig
880
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx ep88x
881

wdenk's avatar
wdenk committed
882
ESTEEM192E_config:	unconfig
883
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx esteem192e
wdenk's avatar
wdenk committed
884 885

ETX094_config	:	unconfig
886
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx etx094
wdenk's avatar
wdenk committed
887 888

FLAGADM_config:	unconfig
889
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx flagadm
wdenk's avatar
wdenk committed
890

891 892 893
xtract_GEN860T = $(subst _SC,,$(subst _config,,$1))

GEN860T_SC_config	\
wdenk's avatar
wdenk committed
894
GEN860T_config: unconfig
895
	@mkdir -p $(obj)include
896
	@[ -z "$(findstring _SC,$@)" ] || \
897
		{ echo "#define CONFIG_SC" >>$(obj)include/config.h ; \
898
		  $(XECHO) "With reduced H/W feature set (SC)..." ; \
899
		}
900
	@$(MKCONFIG) -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t
wdenk's avatar
wdenk committed
901 902

GENIETV_config:	unconfig
903
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx genietv
wdenk's avatar
wdenk committed
904 905

GTH_config:	unconfig
906
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx gth
wdenk's avatar
wdenk committed
907 908

hermes_config	:	unconfig
909
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx hermes
wdenk's avatar
wdenk committed
910

911
HMI10_config	:	unconfig
912
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx tqm8xx tqc
913

wdenk's avatar
wdenk committed
914
IAD210_config: unconfig
915
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx IAD210 siemens
wdenk's avatar
wdenk committed
916 917 918 919 920

xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))

ICU862_100MHz_config	\
ICU862_config: unconfig
921
	@mkdir -p $(obj)include
wdenk's avatar
wdenk committed
922
	@[ -z "$(findstring _100MHz,$@)" ] || \
923
		{ echo "#define CONFIG_100MHz"	>>$(obj)include/config.h ; \
924
		  $(XECHO) "... with 100MHz system clock" ; \
wdenk's avatar
wdenk committed
925
		}
926
	@$(MKCONFIG) -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
wdenk's avatar
wdenk committed
927 928

IP860_config	:	unconfig
929
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx ip860
wdenk's avatar
wdenk committed
930 931 932 933

IVML24_256_config \
IVML24_128_config \
IVML24_config:	unconfig
934
	@mkdir -p $(obj)include
wdenk's avatar
wdenk committed
935
	@[ -z "$(findstring IVML24_config,$@)" ] || \
936
		 { echo "#define CONFIG_IVML24_16M"	>>$(obj)include/config.h ; \
wdenk's avatar
wdenk committed
937 938
		 }
	@[ -z "$(findstring IVML24_128_config,$@)" ] || \
939
		 { echo "#define CONFIG_IVML24_32M"	>>$(obj)include/config.h ; \
wdenk's avatar
wdenk committed
940 941
		 }
	@[ -z "$(findstring IVML24_256_config,$@)" ] || \
942
		 { echo "#define CONFIG_IVML24_64M"	>>$(obj)include/config.h ; \
wdenk's avatar
wdenk committed
943
		 }
944
	@$(MKCONFIG) -a IVML24 ppc mpc8xx ivm
wdenk's avatar
wdenk committed
945 946 947 948

IVMS8_256_config \
IVMS8_128_config \
IVMS8_config:	unconfig
949
	@mkdir -p $(obj)include
wdenk's avatar
wdenk committed
950
	@[ -z "$(findstring IVMS8_config,$@)" ] || \
951
		 { echo "#define CONFIG_IVMS8_16M"	>>$(obj)include/config.h ; \
wdenk's avatar
wdenk committed
952 953
		 }
	@[ -z "$(findstring IVMS8_128_config,$@)" ] || \
954
		 { echo "#define CONFIG_IVMS8_32M"	>>$(obj)include/config.h ; \
wdenk's avatar
wdenk committed
955 956
		 }
	@[ -z "$(findstring IVMS8_256_config,$@)" ] || \
957
		 { echo "#define CONFIG_IVMS8_64M"	>>$(obj)include/config.h ; \
wdenk's avatar
wdenk committed
958
		 }
959
	@$(MKCONFIG) -a IVMS8 ppc mpc8xx ivm
wdenk's avatar
wdenk committed
960

961 962 963
kmsupx4_config:		unconfig
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx km8xx keymile

964
KUP4K_config	:	unconfig
965
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx kup4k kup
966

967
KUP4X_config	:	unconfig
968
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx kup4x kup
969

wdenk's avatar
wdenk committed
970
LANTEC_config	:	unconfig
971
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx lantec
wdenk's avatar
wdenk committed
972 973

lwmon_config:		unconfig
974
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx lwmon
wdenk's avatar
wdenk committed
975 976 977

MBX_config	\
MBX860T_config:	unconfig
978
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx mbx8xx
wdenk's avatar
wdenk committed
979

980
mgsuvd_config:		unconfig
981
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx km8xx keymile
982

wdenk's avatar
wdenk committed
983
MHPC_config:		unconfig
984
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx mhpc eltec
wdenk's avatar
wdenk committed
985

986 987 988
xtract_NETVIA = $(subst _V2,,$(subst _config,,$1))

NETVIA_V2_config \
wdenk's avatar
wdenk committed
989
NETVIA_config:		unconfig
990
	@mkdir -p $(obj)include
991
	@[ -z "$(findstring NETVIA_config,$@)" ] || \
992
		 { echo "#define CONFIG_NETVIA_VERSION 1" >>$(obj)include/config.h ; \
993
		  $(XECHO) "... Version 1" ; \
994 995
		 }
	@[ -z "$(findstring NETVIA_V2_config,$@)" ] || \
996
		 { echo "#define CONFIG_NETVIA_VERSION 2" >>$(obj)include/config.h ; \
997
		  $(XECHO) "... Version 2" ; \
998
		 }
999
	@$(MKCONFIG) -a $(call xtract_NETVIA,$@) ppc mpc8xx netvia
wdenk's avatar
wdenk committed
1000

1001 1002 1003
xtract_NETPHONE = $(subst _V2,,$(subst _config,,$1))

NETPHONE_V2_config \
1004
NETPHONE_config:	unconfig
1005
	@mkdir -p $(obj)include
1006
	@[ -z "$(findstring NETPHONE_config,$@)" ] || \
1007
		 { echo "#define CONFIG_NETPHONE_VERSION 1" >>$(obj)include/config.h ; \
1008 1009
		 }
	@[ -z "$(findstring NETPHONE_V2_config,$@)" ] || \
1010
		 { echo "#define CONFIG_NETPHONE_VERSION 2" >>$(obj)include/config.h ; \
1011
		 }
1012
	@$(MKCONFIG) -a $(call xtract_NETPHONE,$@) ppc mpc8xx netphone
1013

1014
xtract_NETTA = $(subst _SWAPHOOK,,$(subst _6412,,$(subst _ISDN,,$(subst _config,,$1))))
1015

1016 1017 1018 1019 1020
NETTA_ISDN_6412_SWAPHOOK_config \
NETTA_ISDN_SWAPHOOK_config \
NETTA_6412_SWAPHOOK_config \
NETTA_SWAPHOOK_config