7470ff02949222dc684b16cd637be3f3dc79fb0d
[u-boot.git] / Makefile
1 #
2 # (C) Copyright 2000-2005
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 Foundation; 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 HOSTARCH := $(shell uname -m | \
25         sed -e s/i.86/i386/ \
26             -e s/sun4u/sparc64/ \
27             -e s/arm.*/arm/ \
28             -e s/sa110/arm/ \
29             -e s/powerpc/ppc/ \
30             -e s/macppc/ppc/)
31
32 HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \
33             sed -e 's/\(cygwin\).*/cygwin/')
34
35 export  HOSTARCH HOSTOS
36
37 # Deal with colliding definitions from tcsh etc.
38 VENDOR=
39
40 #########################################################################
41
42 TOPDIR  := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
43 export  TOPDIR
44
45 ifeq (include/config.mk,$(wildcard include/config.mk))
46 # load ARCH, BOARD, and CPU configuration
47 include include/config.mk
48 export  ARCH CPU BOARD VENDOR SOC
49 # load other configuration
50 include $(TOPDIR)/config.mk
51
52 ifndef CROSS_COMPILE
53 ifeq ($(HOSTARCH),ppc)
54 CROSS_COMPILE =
55 else
56 ifeq ($(ARCH),ppc)
57 CROSS_COMPILE = powerpc-linux-
58 endif
59 ifeq ($(ARCH),arm)
60 CROSS_COMPILE = arm-linux-
61 endif
62 ifeq ($(ARCH),i386)
63 ifeq ($(HOSTARCH),i386)
64 CROSS_COMPILE =
65 else
66 CROSS_COMPILE = i386-linux-
67 endif
68 endif
69 ifeq ($(ARCH),mips)
70 CROSS_COMPILE = mips_4KC-
71 endif
72 ifeq ($(ARCH),nios)
73 CROSS_COMPILE = nios-elf-
74 endif
75 ifeq ($(ARCH),nios2)
76 CROSS_COMPILE = nios2-elf-
77 endif
78 ifeq ($(ARCH),m68k)
79 CROSS_COMPILE = m68k-elf-
80 endif
81 ifeq ($(ARCH),microblaze)
82 CROSS_COMPILE = mb-
83 endif
84 endif
85 endif
86
87 export  CROSS_COMPILE
88
89 #########################################################################
90 # U-Boot objects....order is important (i.e. start must be first)
91
92 OBJS  = cpu/$(CPU)/start.o
93 ifeq ($(CPU),i386)
94 OBJS += cpu/$(CPU)/start16.o
95 OBJS += cpu/$(CPU)/reset.o
96 endif
97 ifeq ($(CPU),ppc4xx)
98 OBJS += cpu/$(CPU)/resetvec.o
99 endif
100 ifeq ($(CPU),mpc83xx)
101 OBJS += cpu/$(CPU)/resetvec.o
102 endif
103 ifeq ($(CPU),mpc85xx)
104 OBJS += cpu/$(CPU)/resetvec.o
105 endif
106
107 LIBS  = lib_generic/libgeneric.a
108 LIBS += board/$(BOARDDIR)/lib$(BOARD).a
109 LIBS += cpu/$(CPU)/lib$(CPU).a
110 ifdef SOC
111 LIBS += cpu/$(CPU)/$(SOC)/lib$(SOC).a
112 endif
113 LIBS += lib_$(ARCH)/lib$(ARCH).a
114 LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \
115         fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a
116 LIBS += net/libnet.a
117 LIBS += disk/libdisk.a
118 LIBS += rtc/librtc.a
119 LIBS += dtt/libdtt.a
120 LIBS += drivers/libdrivers.a
121 LIBS += drivers/sk98lin/libsk98lin.a
122 LIBS += post/libpost.a post/cpu/libcpu.a
123 LIBS += common/libcommon.a
124 .PHONY : $(LIBS)
125
126 # Add GCC lib
127 PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
128
129
130 # The "tools" are needed early, so put this first
131 # Don't include stuff already done in $(LIBS)
132 SUBDIRS = tools \
133           post \
134           post/cpu
135 .PHONY : $(SUBDIRS)
136
137 #########################################################################
138 #########################################################################
139
140 ALL = u-boot.srec u-boot.bin System.map
141
142 all:            $(ALL)
143
144 LSMODEL := $(shell head -n 1 include/config.h)
145
146 linkstation_HGLAN_RAM: include/config.h
147         @[ -n "$(findstring HGLAN_RAM, $(LSMODEL))" ] || \
148                 { echo "Bad configuration: $(LSMODEL)" ; \
149                   exit 1 ; \
150                 }
151         @make all
152         @mv u-boot.bin u-boot-hg.ram.bin
153
154 linkstation_HGLAN: include/config.h
155         @[ -n "$(findstring HGLAN_ROM, $(LSMODEL))" ] || \
156                 { echo "Bad configuration: $(LSMODEL)" ; \
157                   exit 1 ; \
158                 }
159         @make all
160         @mv u-boot.bin u-boot-hg.flash.bin
161
162 linkstation_HDLAN_RAM: include/config.h
163         @[ -n "$(findstring HDLAN_RAM, $(LSMODEL))" ] || \
164                 { echo "Bad configuration: $(LSMODEL)" ; \
165                   exit 1 ; \
166                 }
167         @make all
168         @mv u-boot.bin u-boot-hd.ram.bin
169
170 linkstation_HDLAN: include/config.h
171         @[ -n "$(findstring HDLAN_ROM, $(LSMODEL))" ] || \
172                 { echo "Bad configuration: $(LSMODEL)" ; \
173                   exit 1 ; \
174                 }
175         @make all
176         @mv u-boot.bin u-boot-hd.flash.bin
177
178 dsmg600: include/config.h
179         @make all
180
181 u-boot.hex:     u-boot
182                 $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@
183
184 u-boot.srec:    u-boot
185                 $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
186
187 u-boot.bin:     u-boot
188                 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
189
190 u-boot.img:     u-boot.bin
191                 ./tools/mkimage -A $(ARCH) -T firmware -C none \
192                 -a $(TEXT_BASE) -e 0 \
193                 -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' include/version.h | \
194                         sed -e 's/"[     ]*$$/ for $(BOARD) board"/') \
195                 -d $< $@
196
197 u-boot.dis:     u-boot
198                 $(OBJDUMP) -d $< > $@
199
200 u-boot:         depend $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)
201                 UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed  -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
202                 $(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \
203                         --start-group $(LIBS) --end-group $(PLATFORM_LIBS) \
204                         -o u-boot
205
206 $(LIBS):
207                 $(MAKE) -C `dirname $@`
208
209 $(SUBDIRS):
210                 $(MAKE) -C $@ all
211
212 gdbtools:
213                 $(MAKE) -C tools/gdb || exit 1
214
215 depend dep:
216                 @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
217
218 tags:
219                 ctags -w `find $(SUBDIRS) include \
220                                 lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \
221                                 fs/cramfs fs/fat fs/fdos fs/jffs2 \
222                                 net disk rtc dtt drivers drivers/sk98lin common \
223                         \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
224
225 etags:
226                 etags -a `find $(SUBDIRS) include \
227                                 lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \
228                                 fs/cramfs fs/fat fs/fdos fs/jffs2 \
229                                 net disk rtc dtt drivers drivers/sk98lin common \
230                         \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
231
232 System.map:     u-boot
233                 @$(NM) $< | \
234                 grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
235                 sort > System.map
236
237 #########################################################################
238 else
239 linkstation_HGLAN_RAM   \
240 linkstation_HGLAN       \
241 linkstation_HDLAN_RAM   \
242 linkstation_HDLAN       \
243 all install u-boot u-boot.srec depend dep:
244         @echo "System not configured - see README" >&2
245         @ exit 1
246 endif
247
248 #########################################################################
249
250 unconfig:
251         @rm -f include/config.h include/config.mk board/*/config.tmp
252
253 #========================================================================
254 # PowerPC
255 #========================================================================
256
257 #########################################################################
258 ## MPC5xx Systems
259 #########################################################################
260
261 canmb_config:   unconfig
262         @./mkconfig -a canmb ppc mpc5xxx canmb
263
264 cmi_mpc5xx_config:      unconfig
265         @./mkconfig $(@:_config=) ppc mpc5xx cmi
266
267 PATI_config:            unconfig
268         @./mkconfig $(@:_config=) ppc mpc5xx pati mpl
269
270 #########################################################################
271 ## MPC5xxx Systems
272 #########################################################################
273
274 aev_config: unconfig
275         @./mkconfig -a aev ppc mpc5xxx tqm5200
276
277 cpci5200_config:  unconfig
278         @./mkconfig -a cpci5200  ppc mpc5xxx cpci5200 esd
279
280 hmi1001_config:         unconfig
281         @./mkconfig hmi1001 ppc mpc5xxx hmi1001
282
283 Lite5200_config                         \
284 Lite5200_LOWBOOT_config                 \
285 Lite5200_LOWBOOT08_config               \
286 icecube_5200_config                     \
287 icecube_5200_LOWBOOT_config             \
288 icecube_5200_LOWBOOT08_config           \
289 icecube_5200_DDR_config                 \
290 icecube_5200_DDR_LOWBOOT_config         \
291 icecube_5200_DDR_LOWBOOT08_config       \
292 icecube_5100_config:                    unconfig
293         @ >include/config.h
294         @[ -z "$(findstring LOWBOOT_,$@)" ] || \
295                 { if [ "$(findstring DDR,$@)" ] ; \
296                         then echo "TEXT_BASE = 0xFF800000" >board/icecube/config.tmp ; \
297                         else echo "TEXT_BASE = 0xFF000000" >board/icecube/config.tmp ; \
298                   fi ; \
299                   echo "... with LOWBOOT configuration" ; \
300                 }
301         @[ -z "$(findstring LOWBOOT08,$@)" ] || \
302                 { echo "TEXT_BASE = 0xFF800000" >board/icecube/config.tmp ; \
303                   echo "... with 8 MB flash only" ; \
304                   echo "... with LOWBOOT configuration" ; \
305                 }
306         @[ -z "$(findstring DDR,$@)" ] || \
307                 { echo "#define CONFIG_MPC5200_DDR"     >>include/config.h ; \
308                   echo "... DDR memory revision" ; \
309                 }
310         @[ -z "$(findstring 5200,$@)" ] || \
311                 { echo "#define CONFIG_MPC5200"         >>include/config.h ; \
312                   echo "... with MPC5200 processor" ; \
313                 }
314         @[ -z "$(findstring 5100,$@)" ] || \
315                 { echo "#define CONFIG_MGT5100"         >>include/config.h ; \
316                   echo "... with MGT5100 processor" ; \
317                 }
318         @./mkconfig -a IceCube ppc mpc5xxx icecube
319
320 inka4x0_config:         unconfig
321         @./mkconfig inka4x0 ppc mpc5xxx inka4x0
322
323 o2dnt_config:
324         @./mkconfig -a o2dnt ppc mpc5xxx o2dnt
325
326 pf5200_config:  unconfig
327         @./mkconfig -a pf5200  ppc mpc5xxx pf5200 esd
328
329 PM520_config \
330 PM520_DDR_config \
331 PM520_ROMBOOT_config \
332 PM520_ROMBOOT_DDR_config:       unconfig
333         @ >include/config.h
334         @[ -z "$(findstring DDR,$@)" ] || \
335                 { echo "#define CONFIG_MPC5200_DDR"     >>include/config.h ; \
336                   echo "... DDR memory revision" ; \
337                 }
338         @[ -z "$(findstring ROMBOOT,$@)" ] || \
339                 { echo "#define CONFIG_BOOT_ROM" >>include/config.h ; \
340                   echo "... booting from 8-bit flash" ; \
341                 }
342         @./mkconfig -a PM520 ppc mpc5xxx pm520
343
344 MINI5200_config \
345 EVAL5200_config \
346 TOP5200_config: unconfig
347         @ echo "#define CONFIG_$(@:_config=) 1" >include/config.h
348         @./mkconfig -a TOP5200 ppc mpc5xxx top5200 emk
349
350 Total5100_config                \
351 Total5200_config                \
352 Total5200_lowboot_config        \
353 Total5200_Rev2_config           \
354 Total5200_Rev2_lowboot_config:  unconfig
355         @ >include/config.h
356         @[ -z "$(findstring 5100,$@)" ] || \
357                 { echo "#define CONFIG_MGT5100"         >>include/config.h ; \
358                   echo "... with MGT5100 processor" ; \
359                 }
360         @[ -z "$(findstring 5200,$@)" ] || \
361                 { echo "#define CONFIG_MPC5200"         >>include/config.h ; \
362                   echo "... with MPC5200 processor" ; \
363                 }
364         @[ -n "$(findstring Rev,$@)" ] || \
365                 { echo "#define CONFIG_TOTAL5200_REV 1" >>include/config.h ; \
366                   echo "... revision 1 board" ; \
367                 }
368         @[ -z "$(findstring Rev2_,$@)" ] || \
369                 { echo "#define CONFIG_TOTAL5200_REV 2" >>include/config.h ; \
370                   echo "... revision 2 board" ; \
371                 }
372         @[ -z "$(findstring lowboot_,$@)" ] || \
373                 { echo "TEXT_BASE = 0xFE000000" >board/total5200/config.tmp ; \
374                   echo "... with lowboot configuration" ; \
375                 }
376         @./mkconfig -a Total5200 ppc mpc5xxx total5200
377
378 TQM5200_auto_config     \
379 TQM5200_AA_config       \
380 TQM5200_AB_config       \
381 TQM5200_AC_config       \
382 MiniFAP_config: unconfig
383         @ >include/config.h
384         @[ -z "$(findstring MiniFAP,$@)" ] || \
385                 { echo "#define CONFIG_MINIFAP" >>include/config.h ; \
386                   echo "#define CONFIG_TQM5200_AC"      >>include/config.h ; \
387                   echo "... TQM5200_AC on MiniFAP" ; \
388                 }
389         @[ -z "$(findstring AA,$@)" ] || \
390                 { echo "#define CONFIG_TQM5200_AA"      >>include/config.h ; \
391                   echo "... with 4 MB Flash, 16 MB SDRAM, 32 kB EEPROM" ; \
392                 }
393         @[ -z "$(findstring AB,$@)" ] || \
394                 { echo "#define CONFIG_TQM5200_AB"      >>include/config.h ; \
395                   echo "... with 64 MB Flash, 64 MB SDRAM, 32 kB EEPROM, 512 kB SRAM" ; \
396                   echo "... with Graphics Controller"; \
397                 }
398         @[ -z "$(findstring AC,$@)" ] || \
399                 { echo "#define CONFIG_TQM5200_AC"      >>include/config.h ; \
400                   echo "... with 4 MB Flash, 128 MB SDRAM" ; \
401                   echo "... with Graphics Controller"; \
402                 }
403         @[ -z "$(findstring auto,$@)" ] || \
404                 { echo "#define CONFIG_CS_AUTOCONF"     >>include/config.h ; \
405                   echo "... with automatic CS configuration" ; \
406                 }
407         @./mkconfig -a TQM5200 ppc mpc5xxx tqm5200
408
409 spieval_config: unconfig
410         echo "#define CONFIG_CS_AUTOCONF">>include/config.h
411         echo "... with automatic CS configuration"
412         @./mkconfig -a spieval ppc mpc5xxx tqm5200
413
414 #########################################################################
415 ## MPC8xx Systems
416 #########################################################################
417
418 Adder_config    \
419 Adder87x_config \
420 AdderII_config  \
421         :               unconfig
422         $(if $(findstring AdderII,$@), \
423         @echo "#define CONFIG_MPC852T" > include/config.h)
424         @./mkconfig -a Adder ppc mpc8xx adder
425
426 ADS860_config     \
427 FADS823_config    \
428 FADS850SAR_config \
429 MPC86xADS_config  \
430 MPC885ADS_config  \
431 FADS860T_config:        unconfig
432         @./mkconfig $(@:_config=) ppc mpc8xx fads
433
434 AMX860_config   :       unconfig
435         @./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
436
437 c2mon_config:           unconfig
438         @./mkconfig $(@:_config=) ppc mpc8xx c2mon
439
440 CCM_config:             unconfig
441         @./mkconfig $(@:_config=) ppc mpc8xx CCM siemens
442
443 cogent_mpc8xx_config:   unconfig
444         @./mkconfig $(@:_config=) ppc mpc8xx cogent
445
446 ELPT860_config:         unconfig
447         @./mkconfig $(@:_config=) ppc mpc8xx elpt860 LEOX
448
449 ESTEEM192E_config:      unconfig
450         @./mkconfig $(@:_config=) ppc mpc8xx esteem192e
451
452 ETX094_config   :       unconfig
453         @./mkconfig $(@:_config=) ppc mpc8xx etx094
454
455 FLAGADM_config: unconfig
456         @./mkconfig $(@:_config=) ppc mpc8xx flagadm
457
458 xtract_GEN860T = $(subst _SC,,$(subst _config,,$1))
459
460 GEN860T_SC_config       \
461 GEN860T_config: unconfig
462         @ >include/config.h
463         @[ -z "$(findstring _SC,$@)" ] || \
464                 { echo "#define CONFIG_SC" >>include/config.h ; \
465                   echo "With reduced H/W feature set (SC)..." ; \
466                 }
467         @./mkconfig -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t
468
469 GENIETV_config: unconfig
470         @./mkconfig $(@:_config=) ppc mpc8xx genietv
471
472 GTH_config:     unconfig
473         @./mkconfig $(@:_config=) ppc mpc8xx gth
474
475 hermes_config   :       unconfig
476         @./mkconfig $(@:_config=) ppc mpc8xx hermes
477
478 HMI10_config    :       unconfig
479         @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
480
481 IAD210_config: unconfig
482         @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
483
484 xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
485
486 ICU862_100MHz_config    \
487 ICU862_config: unconfig
488         @ >include/config.h
489         @[ -z "$(findstring _100MHz,$@)" ] || \
490                 { echo "#define CONFIG_100MHz"  >>include/config.h ; \
491                   echo "... with 100MHz system clock" ; \
492                 }
493         @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
494
495 IP860_config    :       unconfig
496         @./mkconfig $(@:_config=) ppc mpc8xx ip860
497
498 IVML24_256_config \
499 IVML24_128_config \
500 IVML24_config:  unconfig
501         @ >include/config.h
502         @[ -z "$(findstring IVML24_config,$@)" ] || \
503                  { echo "#define CONFIG_IVML24_16M"     >>include/config.h ; \
504                  }
505         @[ -z "$(findstring IVML24_128_config,$@)" ] || \
506                  { echo "#define CONFIG_IVML24_32M"     >>include/config.h ; \
507                  }
508         @[ -z "$(findstring IVML24_256_config,$@)" ] || \
509                  { echo "#define CONFIG_IVML24_64M"     >>include/config.h ; \
510                  }
511         @./mkconfig -a IVML24 ppc mpc8xx ivm
512
513 IVMS8_256_config \
514 IVMS8_128_config \
515 IVMS8_config:   unconfig
516         @ >include/config.h
517         @[ -z "$(findstring IVMS8_config,$@)" ] || \
518                  { echo "#define CONFIG_IVMS8_16M"      >>include/config.h ; \
519                  }
520         @[ -z "$(findstring IVMS8_128_config,$@)" ] || \
521                  { echo "#define CONFIG_IVMS8_32M"      >>include/config.h ; \
522                  }
523         @[ -z "$(findstring IVMS8_256_config,$@)" ] || \
524                  { echo "#define CONFIG_IVMS8_64M"      >>include/config.h ; \
525                  }
526         @./mkconfig -a IVMS8 ppc mpc8xx ivm
527
528 KUP4K_config    :       unconfig
529         @./mkconfig $(@:_config=) ppc mpc8xx kup4k kup
530
531 KUP4X_config    :       unconfig
532         @./mkconfig $(@:_config=) ppc mpc8xx kup4x kup
533
534 LANTEC_config   :       unconfig
535         @./mkconfig $(@:_config=) ppc mpc8xx lantec
536
537 lwmon_config:           unconfig
538         @./mkconfig $(@:_config=) ppc mpc8xx lwmon
539
540 MBX_config      \
541 MBX860T_config: unconfig
542         @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
543
544 MHPC_config:            unconfig
545         @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
546
547 MVS1_config :           unconfig
548         @./mkconfig $(@:_config=) ppc mpc8xx mvs1
549
550 xtract_NETVIA = $(subst _V2,,$(subst _config,,$1))
551
552 NETVIA_V2_config \
553 NETVIA_config:          unconfig
554         @ >include/config.h
555         @[ -z "$(findstring NETVIA_config,$@)" ] || \
556                  { echo "#define CONFIG_NETVIA_VERSION 1" >>include/config.h ; \
557                   echo "... Version 1" ; \
558                  }
559         @[ -z "$(findstring NETVIA_V2_config,$@)" ] || \
560                  { echo "#define CONFIG_NETVIA_VERSION 2" >>include/config.h ; \
561                   echo "... Version 2" ; \
562                  }
563         @./mkconfig -a $(call xtract_NETVIA,$@) ppc mpc8xx netvia
564
565 xtract_NETPHONE = $(subst _V2,,$(subst _config,,$1))
566
567 NETPHONE_V2_config \
568 NETPHONE_config:        unconfig
569         @ >include/config.h
570         @[ -z "$(findstring NETPHONE_config,$@)" ] || \
571                  { echo "#define CONFIG_NETPHONE_VERSION 1" >>include/config.h ; \
572                  }
573         @[ -z "$(findstring NETPHONE_V2_config,$@)" ] || \
574                  { echo "#define CONFIG_NETPHONE_VERSION 2" >>include/config.h ; \
575                  }
576         @./mkconfig -a $(call xtract_NETPHONE,$@) ppc mpc8xx netphone
577
578 xtract_NETTA = $(subst _SWAPHOOK,,$(subst _6412,,$(subst _ISDN,,$(subst _config,,$1))))
579
580 NETTA_ISDN_6412_SWAPHOOK_config \
581 NETTA_ISDN_SWAPHOOK_config \
582 NETTA_6412_SWAPHOOK_config \
583 NETTA_SWAPHOOK_config \
584 NETTA_ISDN_6412_config \
585 NETTA_ISDN_config \
586 NETTA_6412_config \
587 NETTA_config:           unconfig
588         @ >include/config.h
589         @[ -z "$(findstring ISDN_,$@)" ] || \
590                  { echo "#define CONFIG_NETTA_ISDN 1" >>include/config.h ; \
591                  }
592         @[ -n "$(findstring ISDN_,$@)" ] || \
593                  { echo "#undef CONFIG_NETTA_ISDN" >>include/config.h ; \
594                  }
595         @[ -z "$(findstring 6412_,$@)" ] || \
596                  { echo "#define CONFIG_NETTA_6412 1" >>include/config.h ; \
597                  }
598         @[ -n "$(findstring 6412_,$@)" ] || \
599                  { echo "#undef CONFIG_NETTA_6412" >>include/config.h ; \
600                  }
601         @[ -z "$(findstring SWAPHOOK_,$@)" ] || \
602                  { echo "#define CONFIG_NETTA_SWAPHOOK 1" >>include/config.h ; \
603                  }
604         @[ -n "$(findstring SWAPHOOK_,$@)" ] || \
605                  { echo "#undef CONFIG_NETTA_SWAPHOOK" >>include/config.h ; \
606                  }
607         @./mkconfig -a $(call xtract_NETTA,$@) ppc mpc8xx netta
608
609 xtract_NETTA2 = $(subst _V2,,$(subst _config,,$1))
610
611 NETTA2_V2_config \
612 NETTA2_config:          unconfig
613         @ >include/config.h
614         @[ -z "$(findstring NETTA2_config,$@)" ] || \
615                  { echo "#define CONFIG_NETTA2_VERSION 1" >>include/config.h ; \
616                  }
617         @[ -z "$(findstring NETTA2_V2_config,$@)" ] || \
618                  { echo "#define CONFIG_NETTA2_VERSION 2" >>include/config.h ; \
619                  }
620         @./mkconfig -a $(call xtract_NETTA2,$@) ppc mpc8xx netta2
621
622 NC650_config:   unconfig
623         @./mkconfig $(@:_config=) ppc mpc8xx nc650
624
625 NX823_config:           unconfig
626         @./mkconfig $(@:_config=) ppc mpc8xx nx823
627
628 pcu_e_config:           unconfig
629         @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
630
631 QS850_config:   unconfig
632         @./mkconfig $(@:_config=) ppc mpc8xx qs850 snmc
633
634 QS823_config:   unconfig
635         @./mkconfig $(@:_config=) ppc mpc8xx qs850 snmc
636
637 QS860T_config:  unconfig
638         @./mkconfig $(@:_config=) ppc mpc8xx qs860t snmc
639
640 quantum_config: unconfig
641         @./mkconfig $(@:_config=) ppc mpc8xx quantum
642
643 R360MPI_config: unconfig
644         @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
645
646 RBC823_config:  unconfig
647         @./mkconfig $(@:_config=) ppc mpc8xx rbc823
648
649 RPXClassic_config:      unconfig
650         @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
651
652 RPXlite_config:         unconfig
653         @./mkconfig $(@:_config=) ppc mpc8xx RPXlite
654
655 RPXlite_DW_64_config            \
656 RPXlite_DW_LCD_config           \
657 RPXlite_DW_64_LCD_config        \
658 RPXlite_DW_NVRAM_config         \
659 RPXlite_DW_NVRAM_64_config      \
660 RPXlite_DW_NVRAM_LCD_config     \
661 RPXlite_DW_NVRAM_64_LCD_config  \
662 RPXlite_DW_config:         unconfig
663         @ >include/config.h
664         @[ -z "$(findstring _64,$@)" ] || \
665                 { echo "#define RPXlite_64MHz"          >>include/config.h ; \
666                   echo "... with 64MHz system clock ..."; \
667                 }
668         @[ -z "$(findstring _LCD,$@)" ] || \
669                 { echo "#define CONFIG_LCD"             >>include/config.h ; \
670                   echo "#define CONFIG_NEC_NL6448BC20"  >>include/config.h ; \
671                   echo "... with LCD display ..."; \
672                 }
673         @[ -z "$(findstring _NVRAM,$@)" ] || \
674                 { echo "#define  CFG_ENV_IS_IN_NVRAM"   >>include/config.h ; \
675                   echo "... with ENV in NVRAM ..."; \
676                 }
677         @./mkconfig -a RPXlite_DW ppc mpc8xx RPXlite_dw
678
679 rmu_config:     unconfig
680         @./mkconfig $(@:_config=) ppc mpc8xx rmu
681
682 RRvision_config:        unconfig
683         @./mkconfig $(@:_config=) ppc mpc8xx RRvision
684
685 RRvision_LCD_config:    unconfig
686         @echo "#define CONFIG_LCD" >include/config.h
687         @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
688         @./mkconfig -a RRvision ppc mpc8xx RRvision
689
690 SM850_config    :       unconfig
691         @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
692
693 SPD823TS_config:        unconfig
694         @./mkconfig $(@:_config=) ppc mpc8xx spd8xx
695
696 stxxtc_config:  unconfig
697         @./mkconfig $(@:_config=) ppc mpc8xx stxxtc
698
699 svm_sc8xx_config:       unconfig
700         @ >include/config.h
701         @./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
702
703 SXNI855T_config:        unconfig
704         @./mkconfig $(@:_config=) ppc mpc8xx sixnet
705
706 # EMK MPC8xx based modules
707 TOP860_config:          unconfig
708         @./mkconfig $(@:_config=) ppc mpc8xx top860 emk
709
710 # Play some tricks for configuration selection
711 # Only 855 and 860 boards may come with FEC
712 # and only 823 boards may have LCD support
713 xtract_8xx = $(subst _LCD,,$(subst _config,,$1))
714
715 FPS850L_config          \
716 FPS860L_config          \
717 NSCU_config             \
718 TQM823L_config          \
719 TQM823L_LCD_config      \
720 TQM850L_config          \
721 TQM855L_config          \
722 TQM860L_config          \
723 TQM862L_config          \
724 TQM823M_config          \
725 TQM850M_config          \
726 TQM855M_config          \
727 TQM860M_config          \
728 TQM862M_config          \
729 TQM866M_config:         unconfig
730         @ >include/config.h
731         @[ -z "$(findstring _LCD,$@)" ] || \
732                 { echo "#define CONFIG_LCD"             >>include/config.h ; \
733                   echo "#define CONFIG_NEC_NL6448BC20"  >>include/config.h ; \
734                   echo "... with LCD display" ; \
735                 }
736         @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
737
738 TTTech_config:  unconfig
739         @echo "#define CONFIG_LCD" >include/config.h
740         @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
741         @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
742
743 uc100_config    :       unconfig
744         @./mkconfig $(@:_config=) ppc mpc8xx uc100
745
746 v37_config:     unconfig
747         @echo "#define CONFIG_LCD" >include/config.h
748         @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
749         @./mkconfig $(@:_config=) ppc mpc8xx v37
750
751 wtk_config:     unconfig
752         @echo "#define CONFIG_LCD" >include/config.h
753         @echo "#define CONFIG_SHARP_LQ065T9DR51U" >>include/config.h
754         @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
755
756 #########################################################################
757 ## PPC4xx Systems
758 #########################################################################
759 xtract_4xx = $(subst _25,,$(subst _33,,$(subst _BA,,$(subst _ME,,$(subst _HI,,$(subst _config,,$1))))))
760
761 ADCIOP_config:  unconfig
762         @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
763
764 AP1000_config:unconfig
765         @./mkconfig $(@:_config=) ppc ppc4xx ap1000 amirix
766
767 APC405_config:  unconfig
768         @./mkconfig $(@:_config=) ppc ppc4xx apc405 esd
769
770 AR405_config:   unconfig
771         @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
772
773 ASH405_config:  unconfig
774         @./mkconfig $(@:_config=) ppc ppc4xx ash405 esd
775
776 bamboo_config:  unconfig
777         @./mkconfig $(@:_config=) ppc ppc4xx bamboo amcc
778
779 bubinga_config: unconfig
780         @./mkconfig $(@:_config=) ppc ppc4xx bubinga amcc
781
782 CANBT_config:   unconfig
783         @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
784
785 CATcenter_config        \
786 CATcenter_25_config     \
787 CATcenter_33_config:    unconfig
788         @ echo "/* CATcenter uses PPChameleon Model ME */"  > include/config.h
789         @ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >> include/config.h
790         @[ -z "$(findstring _25,$@)" ] || \
791                 { echo "#define CONFIG_PPCHAMELEON_CLK_25" >>include/config.h ; \
792                   echo "SysClk = 25MHz" ; \
793                 }
794         @[ -z "$(findstring _33,$@)" ] || \
795                 { echo "#define CONFIG_PPCHAMELEON_CLK_33" >>include/config.h ; \
796                   echo "SysClk = 33MHz" ; \
797                 }
798         @./mkconfig -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave
799
800 CPCI2DP_config: unconfig
801         @./mkconfig $(@:_config=) ppc ppc4xx cpci2dp esd
802
803 CPCI405_config  \
804 CPCI4052_config \
805 CPCI405DT_config        \
806 CPCI405AB_config:       unconfig
807         @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
808         @echo "BOARD_REVISION = $(@:_config=)"  >>include/config.mk
809
810 CPCI440_config: unconfig
811         @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
812
813 CPCIISER4_config:       unconfig
814         @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
815
816 CRAYL1_config:  unconfig
817         @./mkconfig $(@:_config=) ppc ppc4xx L1 cray
818
819 csb272_config:  unconfig
820         @./mkconfig $(@:_config=) ppc ppc4xx csb272
821
822 csb472_config:  unconfig
823         @./mkconfig $(@:_config=) ppc ppc4xx csb472
824
825 DASA_SIM_config: unconfig
826         @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
827
828 DP405_config:   unconfig
829         @./mkconfig $(@:_config=) ppc ppc4xx dp405 esd
830
831 DU405_config:   unconfig
832         @./mkconfig $(@:_config=) ppc ppc4xx du405 esd
833
834 ebony_config:   unconfig
835         @./mkconfig $(@:_config=) ppc ppc4xx ebony amcc
836
837 ERIC_config:    unconfig
838         @./mkconfig $(@:_config=) ppc ppc4xx eric
839
840 EXBITGEN_config:        unconfig
841         @./mkconfig $(@:_config=) ppc ppc4xx exbitgen
842
843 G2000_config:   unconfig
844         @./mkconfig $(@:_config=) ppc ppc4xx g2000
845
846 HH405_config:   unconfig
847         @./mkconfig $(@:_config=) ppc ppc4xx hh405 esd
848
849 HUB405_config:  unconfig
850         @./mkconfig $(@:_config=) ppc ppc4xx hub405 esd
851
852 JSE_config:     unconfig
853         @./mkconfig $(@:_config=) ppc ppc4xx jse
854
855 KAREF_config: unconfig
856         @./mkconfig $(@:_config=) ppc ppc4xx karef sandburst
857
858 luan_config:    unconfig
859         @./mkconfig $(@:_config=) ppc ppc4xx luan amcc
860
861 METROBOX_config: unconfig
862         @./mkconfig $(@:_config=) ppc ppc4xx metrobox sandburst
863
864 MIP405_config:  unconfig
865         @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
866
867 MIP405T_config: unconfig
868         @echo "#define CONFIG_MIP405T" >include/config.h
869         @echo "Enable subset config for MIP405T"
870         @./mkconfig -a MIP405 ppc ppc4xx mip405 mpl
871
872 ML2_config:     unconfig
873         @./mkconfig $(@:_config=) ppc ppc4xx ml2
874
875 ml300_config:   unconfig
876         @./mkconfig $(@:_config=) ppc ppc4xx ml300 xilinx
877
878 ocotea_config:  unconfig
879         @./mkconfig $(@:_config=) ppc ppc4xx ocotea amcc
880
881 OCRTC_config            \
882 ORSG_config:    unconfig
883         @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
884
885 p3p440_config:  unconfig
886         @./mkconfig $(@:_config=) ppc ppc4xx p3p440 prodrive
887
888 PCI405_config:  unconfig
889         @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
890
891 PIP405_config:  unconfig
892         @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
893
894 PLU405_config:  unconfig
895         @./mkconfig $(@:_config=) ppc ppc4xx plu405 esd
896
897 PMC405_config:  unconfig
898         @./mkconfig $(@:_config=) ppc ppc4xx pmc405 esd
899
900 PPChameleonEVB_config           \
901 PPChameleonEVB_BA_25_config     \
902 PPChameleonEVB_ME_25_config     \
903 PPChameleonEVB_HI_25_config     \
904 PPChameleonEVB_BA_33_config     \
905 PPChameleonEVB_ME_33_config     \
906 PPChameleonEVB_HI_33_config:    unconfig
907         @ >include/config.h
908         @[ -z "$(findstring EVB_BA,$@)" ] || \
909                 { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 0" >>include/config.h ; \
910                   echo "... BASIC model" ; \
911                 }
912         @[ -z "$(findstring EVB_ME,$@)" ] || \
913                 { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >>include/config.h ; \
914                   echo "... MEDIUM model" ; \
915                 }
916         @[ -z "$(findstring EVB_HI,$@)" ] || \
917                 { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 2" >>include/config.h ; \
918                   echo "... HIGH-END model" ; \
919                 }
920         @[ -z "$(findstring _25,$@)" ] || \
921                 { echo "#define CONFIG_PPCHAMELEON_CLK_25" >>include/config.h ; \
922                   echo "SysClk = 25MHz" ; \
923                 }
924         @[ -z "$(findstring _33,$@)" ] || \
925                 { echo "#define CONFIG_PPCHAMELEON_CLK_33" >>include/config.h ; \
926                   echo "SysClk = 33MHz" ; \
927                 }
928         @./mkconfig -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave
929
930 sbc405_config:  unconfig
931         @./mkconfig $(@:_config=) ppc ppc4xx sbc405
932
933 sycamore_config:        unconfig
934         @echo "Configuring for sycamore board as subset of walnut..."
935         @./mkconfig -a walnut ppc ppc4xx walnut amcc
936
937 VOH405_config:  unconfig
938         @./mkconfig $(@:_config=) ppc ppc4xx voh405 esd
939
940 VOM405_config:  unconfig
941         @./mkconfig $(@:_config=) ppc ppc4xx vom405 esd
942
943 CMS700_config:  unconfig
944         @./mkconfig $(@:_config=) ppc ppc4xx cms700 esd
945
946 W7OLMC_config   \
947 W7OLMG_config: unconfig
948         @./mkconfig $(@:_config=) ppc ppc4xx w7o
949
950 walnut_config: unconfig
951         @./mkconfig $(@:_config=) ppc ppc4xx walnut amcc
952
953 WUH405_config:  unconfig
954         @./mkconfig $(@:_config=) ppc ppc4xx wuh405 esd
955
956 XPEDITE1K_config:       unconfig
957         @./mkconfig $(@:_config=) ppc ppc4xx xpedite1k
958
959 yosemite_config:        unconfig
960         @./mkconfig $(@:_config=) ppc ppc4xx yosemite amcc
961
962 yellowstone_config:     unconfig
963         @./mkconfig $(@:_config=) ppc ppc4xx yellowstone amcc
964
965 #########################################################################
966 ## MPC8220 Systems
967 #########################################################################
968
969 Alaska8220_config       \
970 Yukon8220_config:       unconfig
971         @./mkconfig $(@:_config=) ppc mpc8220 alaska
972
973 sorcery_config:         unconfig
974         @./mkconfig $(@:_config=) ppc mpc8220 sorcery
975
976 #########################################################################
977 ## MPC824x Systems
978 #########################################################################
979 xtract_82xx = $(subst _BIGFLASH,,$(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1))))))
980
981 A3000_config: unconfig
982         @./mkconfig $(@:_config=) ppc mpc824x a3000
983
984 barco_config: unconfig
985         @./mkconfig $(@:_config=) ppc mpc824x barco
986
987 BMW_config: unconfig
988         @./mkconfig $(@:_config=) ppc mpc824x bmw
989
990 CPC45_config    \
991 CPC45_ROMBOOT_config:   unconfig
992         @./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
993         @cd ./include ;                         \
994         if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
995                 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
996                 echo "... booting from 8-bit flash" ; \
997         else \
998                 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
999                 echo "... booting from 64-bit flash" ; \
1000         fi; \
1001         echo "export CONFIG_BOOT_ROM" >> config.mk;
1002
1003 CU824_config: unconfig
1004         @./mkconfig $(@:_config=) ppc mpc824x cu824
1005
1006 debris_config: unconfig
1007         @./mkconfig $(@:_config=) ppc mpc824x debris etin
1008
1009 eXalion_config: unconfig
1010         @./mkconfig $(@:_config=) ppc mpc824x eXalion
1011
1012 HIDDEN_DRAGON_config: unconfig
1013         @./mkconfig $(@:_config=) ppc mpc824x hidden_dragon
1014
1015 linkstation_HGLAN_RAM_config: mrproper
1016         @>include/config.h ; \
1017         echo "/* HGLAN_RAM */" >>include/config.h ; \
1018         echo "#define CONFIG_HGLAN 1" >>include/config.h ; \
1019         echo "TEXT_BASE = 0x07F00000" >board/linkstation/config.tmp ; \
1020         ./mkconfig -a linkstation ppc mpc824x linkstation ; \
1021         echo "LinkStation HGLAN -- RAM BUILD ..."
1022
1023 linkstation_HGLAN_config: mrproper
1024         @>include/config.h ; \
1025         echo "/* HGLAN_ROM */" >>include/config.h ; \
1026         echo "#define CONFIG_HGLAN 1" >>include/config.h ; \
1027         echo "TEXT_BASE = 0xFFF00000" >board/linkstation/config.tmp ; \
1028         ./mkconfig -a linkstation ppc mpc824x linkstation ; \
1029         echo "LinkStation HGLAN -- ROM BUILD ..."
1030
1031 linkstation_HDLAN_RAM_config: mrproper
1032         @>include/config.h ; \
1033         echo "/* HDLAN_RAM */" >>include/config.h ; \
1034         echo "#define CONFIG_HLAN 1" >>include/config.h ; \
1035         echo "TEXT_BASE = 0x03F00000" >board/linkstation/config.tmp ; \
1036         ./mkconfig -a linkstation ppc mpc824x linkstation ; \
1037         echo "LinkStation HDLAN -- RAM BUILD ..."
1038
1039 linkstation_HDLAN_config: mrproper
1040         @>include/config.h ; \
1041         echo "/* HDLAN_ROM */" >>include/config.h ; \
1042         echo "#define CONFIG_HLAN 1" >>include/config.h ; \
1043         echo "TEXT_BASE = 0xFFF00000" >board/linkstation/config.tmp ; \
1044         ./mkconfig -a linkstation ppc mpc824x linkstation ; \
1045         echo "LinkStation HDLAN -- ROM BUILD ..."
1046
1047 dsmg600_ram_config: mrproper
1048         @>include/config.h ; \
1049         echo "/* DSM-G600 RAM */" >>include/config.h ; \
1050         echo "TEXT_BASE = 0x01F00000" >board/sandpoint/config.tmp ; \
1051         ./mkconfig -a Sandpoint8245 ppc mpc824x sandpoint ; \
1052         echo "DSM G-600 -- RAM BUILD ..."
1053
1054 MOUSSE_config: unconfig
1055         @./mkconfig $(@:_config=) ppc mpc824x mousse
1056
1057 MUSENKI_config: unconfig
1058         @./mkconfig $(@:_config=) ppc mpc824x musenki
1059
1060 MVBLUE_config:  unconfig
1061         @./mkconfig $(@:_config=) ppc mpc824x mvblue
1062
1063 OXC_config: unconfig
1064         @./mkconfig $(@:_config=) ppc mpc824x oxc
1065
1066 PN62_config: unconfig
1067         @./mkconfig $(@:_config=) ppc mpc824x pn62
1068
1069 Sandpoint8240_config: unconfig
1070         @./mkconfig $(@:_config=) ppc mpc824x sandpoint
1071
1072 Sandpoint8245_config: unconfig
1073         @./mkconfig $(@:_config=) ppc mpc824x sandpoint
1074
1075 sbc8240_config: unconfig
1076         @./mkconfig $(@:_config=) ppc mpc824x sbc8240
1077
1078 SL8245_config: unconfig
1079         @./mkconfig $(@:_config=) ppc mpc824x sl8245
1080
1081 utx8245_config: unconfig
1082         @./mkconfig $(@:_config=) ppc mpc824x utx8245
1083
1084 #########################################################################
1085 ## MPC8260 Systems
1086 #########################################################################
1087
1088 atc_config:     unconfig
1089         @./mkconfig $(@:_config=) ppc mpc8260 atc
1090
1091 cogent_mpc8260_config:  unconfig
1092         @./mkconfig $(@:_config=) ppc mpc8260 cogent
1093
1094 CPU86_config    \
1095 CPU86_ROMBOOT_config: unconfig
1096         @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
1097         @cd ./include ;                         \
1098         if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
1099                 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
1100                 echo "... booting from 8-bit flash" ; \
1101         else \
1102                 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
1103                 echo "... booting from 64-bit flash" ; \
1104         fi; \
1105         echo "export CONFIG_BOOT_ROM" >> config.mk;
1106
1107 CPU87_config    \
1108 CPU87_ROMBOOT_config: unconfig
1109         @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu87
1110         @cd ./include ;                         \
1111         if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
1112                 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
1113                 echo "... booting from 8-bit flash" ; \
1114         else \
1115                 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
1116                 echo "... booting from 64-bit flash" ; \
1117         fi; \
1118         echo "export CONFIG_BOOT_ROM" >> config.mk;
1119
1120 ep8248_config   \
1121 ep8248E_config  :       unconfig
1122         @./mkconfig ep8248 ppc mpc8260 ep8248
1123
1124 ep8260_config:  unconfig
1125         @./mkconfig $(@:_config=) ppc mpc8260 ep8260
1126
1127 gw8260_config:  unconfig
1128         @./mkconfig $(@:_config=) ppc mpc8260 gw8260
1129
1130 hymod_config:   unconfig
1131         @./mkconfig $(@:_config=) ppc mpc8260 hymod
1132
1133 IDS8247_config: unconfig
1134         @./mkconfig $(@:_config=) ppc mpc8260 ids8247
1135
1136 IPHASE4539_config:      unconfig
1137         @./mkconfig $(@:_config=) ppc mpc8260 iphase4539
1138
1139 ISPAN_config            \
1140 ISPAN_REVB_config:      unconfig
1141         @if [ "$(findstring _REVB_,$@)" ] ; then \
1142                 echo "#define CFG_REV_B" > include/config.h ; \
1143         fi
1144         @./mkconfig -a ISPAN ppc mpc8260 ispan
1145
1146 MPC8260ADS_config       \
1147 MPC8260ADS_lowboot_config       \
1148 MPC8260ADS_33MHz_config \
1149 MPC8260ADS_33MHz_lowboot_config \
1150 MPC8260ADS_40MHz_config \
1151 MPC8260ADS_40MHz_lowboot_config \
1152 MPC8272ADS_config       \
1153 MPC8272ADS_lowboot_config       \
1154 PQ2FADS_config          \
1155 PQ2FADS_lowboot_config          \
1156 PQ2FADS-VR_config       \
1157 PQ2FADS-VR_lowboot_config       \
1158 PQ2FADS-ZU_config       \
1159 PQ2FADS-ZU_lowboot_config       \
1160 PQ2FADS-ZU_66MHz_config \
1161 PQ2FADS-ZU_66MHz_lowboot_config \
1162         :               unconfig
1163         $(if $(findstring PQ2FADS,$@), \
1164         @echo "#define CONFIG_ADSTYPE CFG_PQ2FADS" > include/config.h, \
1165         @echo "#define CONFIG_ADSTYPE CFG_"$(subst MPC,,$(word 1,$(subst _, ,$@))) > include/config.h)
1166         $(if $(findstring MHz,$@), \
1167         @echo "#define CONFIG_8260_CLKIN" $(subst MHz,,$(word 2,$(subst _, ,$@)))"000000" >> include/config.h, \
1168         $(if $(findstring VR,$@), \
1169         @echo "#define CONFIG_8260_CLKIN 66000000" >> include/config.h))
1170         @[ -z "$(findstring lowboot_,$@)" ] || \
1171                 { echo "TEXT_BASE = 0xFF800000" >board/mpc8260ads/config.tmp ; \
1172                   echo "... with lowboot configuration" ; \
1173                 }
1174         @./mkconfig -a MPC8260ADS ppc mpc8260 mpc8260ads
1175
1176 MPC8266ADS_config:      unconfig
1177         @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
1178
1179 # PM825/PM826 default configuration:  small (= 8 MB) Flash / boot from 64-bit flash
1180 PM825_config    \
1181 PM825_ROMBOOT_config    \
1182 PM825_BIGFLASH_config   \
1183 PM825_ROMBOOT_BIGFLASH_config   \
1184 PM826_config    \
1185 PM826_ROMBOOT_config    \
1186 PM826_BIGFLASH_config   \
1187 PM826_ROMBOOT_BIGFLASH_config:  unconfig
1188         @if [ "$(findstring PM825_,$@)" ] ; then \
1189                 echo "#define CONFIG_PCI"       >include/config.h ; \
1190         else \
1191                 >include/config.h ; \
1192         fi
1193         @if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
1194                 echo "... booting from 8-bit flash" ; \
1195                 echo "#define CONFIG_BOOT_ROM" >>include/config.h ; \
1196                 echo "TEXT_BASE = 0xFF800000" >board/pm826/config.tmp ; \
1197                 if [ "$(findstring _BIGFLASH_,$@)" ] ; then \
1198                         echo "... with 32 MB Flash" ; \
1199                         echo "#define CONFIG_FLASH_32MB" >>include/config.h ; \
1200                 fi; \
1201         else \
1202                 echo "... booting from 64-bit flash" ; \
1203                 if [ "$(findstring _BIGFLASH_,$@)" ] ; then \
1204                         echo "... with 32 MB Flash" ; \
1205                         echo "#define CONFIG_FLASH_32MB" >>include/config.h ; \
1206                         echo "TEXT_BASE = 0x40000000" >board/pm826/config.tmp ; \
1207                 else \
1208                         echo "TEXT_BASE = 0xFF000000" >board/pm826/config.tmp ; \
1209                 fi; \
1210         fi
1211         @./mkconfig -a PM826 ppc mpc8260 pm826
1212
1213 PM828_config    \
1214 PM828_PCI_config        \
1215 PM828_ROMBOOT_config    \
1216 PM828_ROMBOOT_PCI_config:       unconfig
1217         @if [ -z "$(findstring _PCI_,$@)" ] ; then \
1218                 echo "#define CONFIG_PCI"  >>include/config.h ; \
1219                 echo "... with PCI enabled" ; \
1220         else \
1221                 >include/config.h ; \
1222         fi
1223         @if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
1224                 echo "... booting from 8-bit flash" ; \
1225                 echo "#define CONFIG_BOOT_ROM" >>include/config.h ; \
1226                 echo "TEXT_BASE = 0xFF800000" >board/pm826/config.tmp ; \
1227         fi
1228         @./mkconfig -a PM828 ppc mpc8260 pm828
1229
1230 ppmc8260_config:        unconfig
1231         @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
1232
1233 Rattler8248_config      \
1234 Rattler_config:         unconfig
1235         $(if $(findstring 8248,$@), \
1236         @echo "#define CONFIG_MPC8248" > include/config.h)
1237         @./mkconfig -a Rattler ppc mpc8260 rattler
1238
1239 RPXsuper_config:        unconfig
1240         @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
1241
1242 rsdproto_config:        unconfig
1243         @./mkconfig $(@:_config=) ppc mpc8260 rsdproto
1244
1245 sacsng_config:  unconfig
1246         @./mkconfig $(@:_config=) ppc mpc8260 sacsng
1247
1248 sbc8260_config: unconfig
1249         @./mkconfig $(@:_config=) ppc mpc8260 sbc8260
1250
1251 SCM_config:             unconfig
1252         @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
1253
1254 TQM8255_AA_config \
1255 TQM8260_AA_config \
1256 TQM8260_AB_config \
1257 TQM8260_AC_config \
1258 TQM8260_AD_config \
1259 TQM8260_AE_config \
1260 TQM8260_AF_config \
1261 TQM8260_AG_config \
1262 TQM8260_AH_config \
1263 TQM8265_AA_config:  unconfig
1264         @case "$@" in \
1265         TQM8255_AA_config) CTYPE=MPC8255; CFREQ=300; CACHE=no;  BMODE=8260;;  \
1266         TQM8260_AA_config) CTYPE=MPC8260; CFREQ=200; CACHE=no;  BMODE=8260;; \
1267         TQM8260_AB_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;;  \
1268         TQM8260_AC_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;;  \
1269         TQM8260_AD_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;  BMODE=60x;;  \
1270         TQM8260_AE_config) CTYPE=MPC8260; CFREQ=266; CACHE=no;  BMODE=8260;; \
1271         TQM8260_AF_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;  BMODE=60x;;  \
1272         TQM8260_AG_config) CTYPE=MPC8260; CFREQ=300; CACHE=no;  BMODE=8260;; \
1273         TQM8260_AH_config) CTYPE=MPC8260; CFREQ=300; CACHE=yes; BMODE=60x;;  \
1274         TQM8265_AA_config) CTYPE=MPC8265; CFREQ=300; CACHE=no;  BMODE=60x;;  \
1275         esac; \
1276         >include/config.h ; \
1277         if [ "$${CTYPE}" != "MPC8260" ] ; then \
1278                 echo "#define CONFIG_$${CTYPE}" >>include/config.h ; \
1279         fi; \
1280         echo "#define CONFIG_$${CFREQ}MHz"      >>include/config.h ; \
1281         echo "... with $${CFREQ}MHz system clock" ; \
1282         if [ "$${CACHE}" == "yes" ] ; then \
1283                 echo "#define CONFIG_L2_CACHE"  >>include/config.h ; \
1284                 echo "... with L2 Cache support" ; \
1285         else \
1286                 echo "#undef CONFIG_L2_CACHE"   >>include/config.h ; \
1287                 echo "... without L2 Cache support" ; \
1288         fi; \
1289         if [ "$${BMODE}" == "60x" ] ; then \
1290                 echo "#define CONFIG_BUSMODE_60x" >>include/config.h ; \
1291                 echo "... with 60x Bus Mode" ; \
1292         else \
1293                 echo "#undef CONFIG_BUSMODE_60x"  >>include/config.h ; \
1294                 echo "... without 60x Bus Mode" ; \
1295         fi
1296         @./mkconfig -a TQM8260 ppc mpc8260 tqm8260
1297
1298 VoVPN-GW_66MHz_config   \
1299 VoVPN-GW_100MHz_config:         unconfig
1300         @echo "#define CONFIG_CLKIN_$(word 2,$(subst _, ,$@))" > include/config.h
1301         @./mkconfig -a VoVPN-GW ppc mpc8260 vovpn-gw funkwerk
1302
1303 ZPC1900_config: unconfig
1304         @./mkconfig $(@:_config=) ppc mpc8260 zpc1900
1305
1306 #========================================================================
1307 # M68K
1308 #========================================================================
1309 #########################################################################
1310 ## Coldfire
1311 #########################################################################
1312
1313 cobra5272_config :              unconfig
1314         @./mkconfig $(@:_config=) m68k mcf52x2 cobra5272
1315
1316 M5272C3_config :                unconfig
1317         @./mkconfig $(@:_config=) m68k mcf52x2 m5272c3
1318
1319 M5282EVB_config :               unconfig
1320         @./mkconfig $(@:_config=) m68k mcf52x2 m5282evb
1321
1322 TASREG_config :         unconfig
1323         @./mkconfig $(@:_config=) m68k mcf52x2 tasreg esd
1324
1325 #########################################################################
1326 ## MPC83xx Systems
1327 #########################################################################
1328
1329 MPC8349ADS_config:      unconfig
1330         @./mkconfig $(@:_config=) ppc mpc83xx mpc8349ads
1331
1332 TQM834x_config: unconfig
1333         @./mkconfig $(@:_config=) ppc mpc83xx tqm834x
1334
1335 #########################################################################
1336 ## MPC85xx Systems
1337 #########################################################################
1338
1339 MPC8540ADS_config:      unconfig
1340         @./mkconfig $(@:_config=) ppc mpc85xx mpc8540ads
1341
1342 MPC8540EVAL_config \
1343 MPC8540EVAL_33_config \
1344 MPC8540EVAL_66_config \
1345 MPC8540EVAL_33_slave_config \
1346 MPC8540EVAL_66_slave_config:      unconfig
1347         @echo "" >include/config.h ; \
1348         if [ "$(findstring _33_,$@)" ] ; then \
1349                 echo -n "... 33 MHz PCI" ; \
1350         else \
1351                 echo "#define CONFIG_SYSCLK_66M" >>include/config.h ; \
1352                 echo -n "... 66 MHz PCI" ; \
1353         fi ; \
1354         if [ "$(findstring _slave_,$@)" ] ; then \
1355                 echo "#define CONFIG_PCI_SLAVE" >>include/config.h ; \
1356                 echo " slave" ; \
1357         else \
1358                 echo " host" ; \
1359         fi
1360         @./mkconfig -a MPC8540EVAL ppc mpc85xx mpc8540eval
1361
1362 MPC8560ADS_config:      unconfig
1363         @./mkconfig $(@:_config=) ppc mpc85xx mpc8560ads
1364
1365 MPC8541CDS_config:      unconfig
1366         @./mkconfig $(@:_config=) ppc mpc85xx mpc8541cds cds
1367
1368 MPC8548CDS_config:      unconfig
1369         @./mkconfig $(@:_config=) ppc mpc85xx mpc8548cds cds
1370
1371 MPC8555CDS_config:      unconfig
1372         @./mkconfig $(@:_config=) ppc mpc85xx mpc8555cds cds
1373
1374 PM854_config:   unconfig
1375         @./mkconfig $(@:_config=) ppc mpc85xx pm854
1376
1377 PM856_config:   unconfig
1378         @./mkconfig $(@:_config=) ppc mpc85xx pm856
1379
1380 sbc8540_config \
1381 sbc8540_33_config \
1382 sbc8540_66_config:      unconfig
1383         @if [ "$(findstring _66_,$@)" ] ; then \
1384                 echo "#define CONFIG_PCI_66"    >>include/config.h ; \
1385                 echo "... 66 MHz PCI" ; \
1386         else \
1387                 >include/config.h ; \
1388                 echo "... 33 MHz PCI" ; \
1389         fi
1390         @./mkconfig -a SBC8540 ppc mpc85xx sbc8560
1391
1392 sbc8560_config \
1393 sbc8560_33_config \
1394 sbc8560_66_config:      unconfig
1395         @if [ "$(findstring _66_,$@)" ] ; then \
1396                 echo "#define CONFIG_PCI_66"    >>include/config.h ; \
1397                 echo "... 66 MHz PCI" ; \
1398         else \
1399                 >include/config.h ; \
1400                 echo "... 33 MHz PCI" ; \
1401         fi
1402         @./mkconfig -a sbc8560 ppc mpc85xx sbc8560
1403
1404 stxgp3_config:          unconfig
1405         @./mkconfig $(@:_config=) ppc mpc85xx stxgp3
1406
1407 TQM8540_config          \
1408 TQM8541_config          \
1409 TQM8555_config          \
1410 TQM8560_config:         unconfig
1411         @CTYPE=$(subst TQM,,$(@:_config=)); \
1412         >include/config.h ; \
1413         echo "... TQM"$${CTYPE}; \
1414         echo "#define CONFIG_MPC$${CTYPE}">>include/config.h; \
1415         echo "#define CONFIG_TQM$${CTYPE}">>include/config.h; \
1416         echo "#define CONFIG_HOSTNAME tqm$${CTYPE}">>include/config.h; \
1417         echo "#define CONFIG_BOARDNAME \"TQM$${CTYPE}\"">>include/config.h; \
1418         echo "#define CFG_BOOTFILE \"bootfile=/tftpboot/tqm$${CTYPE}/uImage\0\"">>include/config.h
1419         @./mkconfig -a TQM85xx ppc mpc85xx tqm85xx
1420
1421 #########################################################################
1422 ## 74xx/7xx Systems
1423 #########################################################################
1424
1425 AmigaOneG3SE_config:    unconfig
1426         @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
1427
1428 BAB7xx_config: unconfig
1429         @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
1430
1431 CPCI750_config:        unconfig
1432         @./mkconfig CPCI750 ppc 74xx_7xx cpci750 esd
1433
1434 DB64360_config:  unconfig
1435         @./mkconfig DB64360 ppc 74xx_7xx db64360 Marvell
1436
1437 DB64460_config:  unconfig
1438         @./mkconfig DB64460 ppc 74xx_7xx db64460 Marvell
1439
1440 ELPPC_config: unconfig
1441         @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
1442
1443 EVB64260_config \
1444 EVB64260_750CX_config:  unconfig
1445         @./mkconfig EVB64260 ppc 74xx_7xx evb64260
1446
1447 P3G4_config: unconfig
1448         @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
1449
1450 PCIPPC2_config \
1451 PCIPPC6_config: unconfig
1452         @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
1453
1454 ZUMA_config:    unconfig
1455         @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
1456
1457 #========================================================================
1458 # ARM
1459 #========================================================================
1460 #########################################################################
1461 ## StrongARM Systems
1462 #########################################################################
1463
1464 assabet_config  :       unconfig
1465         @./mkconfig $(@:_config=) arm sa1100 assabet
1466
1467 dnp1110_config  :       unconfig
1468         @./mkconfig $(@:_config=) arm sa1100 dnp1110
1469
1470 gcplus_config   :       unconfig
1471         @./mkconfig $(@:_config=) arm sa1100 gcplus
1472
1473 lart_config     :       unconfig
1474         @./mkconfig $(@:_config=) arm sa1100 lart
1475
1476 shannon_config  :       unconfig
1477         @./mkconfig $(@:_config=) arm sa1100 shannon
1478
1479 #########################################################################
1480 ## ARM92xT Systems
1481 #########################################################################
1482
1483 xtract_trab = $(subst _bigram,,$(subst _bigflash,,$(subst _old,,$(subst _config,,$1))))
1484
1485 xtract_omap1610xxx = $(subst _cs0boot,,$(subst _cs3boot,,$(subst _cs_autoboot,,$(subst _config,,$1))))
1486
1487 xtract_omap730p2 = $(subst _cs0boot,,$(subst _cs3boot,, $(subst _config,,$1)))
1488
1489 at91rm9200dk_config     :       unconfig
1490         @./mkconfig $(@:_config=) arm arm920t at91rm9200dk NULL at91rm9200
1491
1492 cmc_pu2_config  :       unconfig
1493         @./mkconfig $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200
1494
1495 csb637_config   :       unconfig
1496         @./mkconfig $(@:_config=) arm arm920t csb637 NULL at91rm9200
1497
1498 mp2usb_config   :       unconfig
1499         @./mkconfig $(@:_config=) arm arm920t mp2usb NULL at91rm9200
1500
1501
1502 ########################################################################
1503 ## ARM Integrator boards - see doc/README-integrator for more info.
1504 integratorap_config     \
1505 ap_config               \
1506 ap966_config            \
1507 ap922_config            \
1508 ap922_XA10_config       \
1509 ap7_config              \
1510 ap720t_config           \
1511 ap920t_config           \
1512 ap926ejs_config         \
1513 ap946es_config: unconfig
1514         @board/integratorap/split_by_variant.sh $@
1515
1516 integratorcp_config     \
1517 cp_config               \
1518 cp920t_config           \
1519 cp926ejs_config         \
1520 cp946es_config          \
1521 cp1136_config           \
1522 cp966_config            \
1523 cp922_config            \
1524 cp922_XA10_config       \
1525 cp1026_config: unconfig
1526         @board/integratorcp/split_by_variant.sh $@
1527
1528 kb9202_config   :       unconfig
1529         @./mkconfig $(@:_config=) arm arm920t kb9202 NULL at91rm9200
1530
1531 lpd7a400_config \
1532 lpd7a404_config:        unconfig
1533         @./mkconfig $(@:_config=) arm lh7a40x lpd7a40x
1534
1535 mx1ads_config   :       unconfig
1536         @./mkconfig $(@:_config=) arm arm920t mx1ads NULL imx
1537
1538 mx1fs2_config   :       unconfig
1539         @./mkconfig $(@:_config=) arm arm920t mx1fs2 NULL imx
1540
1541 omap1510inn_config :    unconfig
1542         @./mkconfig $(@:_config=) arm arm925t omap1510inn
1543
1544 omap5912osk_config :    unconfig
1545         @./mkconfig $(@:_config=) arm arm926ejs omap5912osk
1546
1547 omap1610inn_config \
1548 omap1610inn_cs0boot_config \
1549 omap1610inn_cs3boot_config \
1550 omap1610inn_cs_autoboot_config \
1551 omap1610h2_config \
1552 omap1610h2_cs0boot_config \
1553 omap1610h2_cs3boot_config \
1554 omap1610h2_cs_autoboot_config:  unconfig
1555         @if [ "$(findstring _cs0boot_, $@)" ] ; then \
1556                 echo "#define CONFIG_CS0_BOOT" >> ./include/config.h ; \
1557                 echo "... configured for CS0 boot"; \
1558         elif [ "$(findstring _cs_autoboot_, $@)" ] ; then \
1559                 echo "#define CONFIG_CS_AUTOBOOT" >> ./include/config.h ; \
1560                 echo "... configured for CS_AUTO boot"; \
1561         else \
1562                 echo "#define CONFIG_CS3_BOOT" >> ./include/config.h ; \
1563                 echo "... configured for CS3 boot"; \
1564         fi;
1565         @./mkconfig -a $(call xtract_omap1610xxx,$@) arm arm926ejs omap1610inn
1566
1567 omap730p2_config \
1568 omap730p2_cs0boot_config \
1569 omap730p2_cs3boot_config :      unconfig
1570         @if [ "$(findstring _cs0boot_, $@)" ] ; then \
1571                 echo "#define CONFIG_CS0_BOOT" >> ./include/config.h ; \
1572                 echo "... configured for CS0 boot"; \
1573         else \
1574                 echo "#define CONFIG_CS3_BOOT" >> ./include/config.h ; \
1575                 echo "... configured for CS3 boot"; \
1576         fi;
1577         @./mkconfig -a $(call xtract_omap730p2,$@) arm arm926ejs omap730p2
1578
1579 scb9328_config  :       unconfig
1580         @./mkconfig $(@:_config=) arm arm920t scb9328 NULL imx
1581
1582 smdk2400_config :       unconfig
1583         @./mkconfig $(@:_config=) arm arm920t smdk2400 NULL s3c24x0
1584
1585 smdk2410_config :       unconfig
1586         @./mkconfig $(@:_config=) arm arm920t smdk2410 NULL s3c24x0
1587
1588 SX1_config :            unconfig
1589         @./mkconfig $(@:_config=) arm arm925t sx1
1590
1591 # TRAB default configuration:   8 MB Flash, 32 MB RAM
1592 trab_config \
1593 trab_bigram_config \
1594 trab_bigflash_config \
1595 trab_old_config:        unconfig
1596         @ >include/config.h
1597         @[ -z "$(findstring _bigram,$@)" ] || \
1598                 { echo "#define CONFIG_FLASH_8MB"  >>include/config.h ; \
1599                   echo "#define CONFIG_RAM_32MB"   >>include/config.h ; \
1600                   echo "... with 8 MB Flash, 32 MB RAM" ; \
1601                 }
1602         @[ -z "$(findstring _bigflash,$@)" ] || \
1603                 { echo "#define CONFIG_FLASH_16MB" >>include/config.h ; \
1604                   echo "#define CONFIG_RAM_16MB"   >>include/config.h ; \
1605                   echo "... with 16 MB Flash, 16 MB RAM" ; \
1606                   echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
1607                 }
1608         @[ -z "$(findstring _old,$@)" ] || \
1609                 { echo "#define CONFIG_FLASH_8MB"  >>include/config.h ; \
1610                   echo "#define CONFIG_RAM_16MB"   >>include/config.h ; \
1611                   echo "... with 8 MB Flash, 16 MB RAM" ; \
1612                   echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
1613                 }
1614         @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab NULL s3c24x0
1615
1616 VCMA9_config    :       unconfig
1617         @./mkconfig $(@:_config=) arm arm920t vcma9 mpl s3c24x0
1618
1619 #========================================================================
1620 # ARM supplied Versatile development boards
1621 #========================================================================
1622 versatile_config        \
1623 versatileab_config      \
1624 versatilepb_config :    unconfig
1625         @board/versatile/split_by_variant.sh $@
1626
1627 voiceblue_smallflash_config     \
1628 voiceblue_config:       unconfig
1629         @if [ "$(findstring _smallflash_,$@)" ] ; then \
1630                 echo "... boot from lower flash bank" ; \
1631                 echo "#define VOICEBLUE_SMALL_FLASH" >>include/config.h ; \
1632                 echo "VOICEBLUE_SMALL_FLASH=y" >board/voiceblue/config.tmp ; \
1633         else \
1634                 echo "... boot from upper flash bank" ; \
1635                 >include/config.h ; \
1636                 echo "VOICEBLUE_SMALL_FLASH=n" >board/voiceblue/config.tmp ; \
1637         fi
1638         @./mkconfig -a voiceblue arm arm925t voiceblue
1639
1640 cm4008_config   :       unconfig
1641         @./mkconfig $(@:_config=) arm arm920t cm4008 NULL ks8695
1642
1643 cm41xx_config   :       unconfig
1644         @./mkconfig $(@:_config=) arm arm920t cm41xx NULL ks8695
1645
1646 #########################################################################
1647 ## S3C44B0 Systems
1648 #########################################################################
1649
1650 B2_config       :       unconfig
1651         @./mkconfig $(@:_config=) arm s3c44b0 B2 dave
1652
1653 #########################################################################
1654 ## ARM720T Systems
1655 #########################################################################
1656
1657 armadillo_config:       unconfig
1658         @./mkconfig $(@:_config=) arm arm720t armadillo
1659
1660 ep7312_config   :       unconfig
1661         @./mkconfig $(@:_config=) arm arm720t ep7312
1662
1663 impa7_config    :       unconfig
1664         @./mkconfig $(@:_config=) arm arm720t impa7
1665
1666 modnet50_config :       unconfig
1667         @./mkconfig $(@:_config=) arm arm720t modnet50
1668
1669 evb4510_config :        unconfig
1670         @./mkconfig $(@:_config=) arm arm720t evb4510
1671
1672 #########################################################################
1673 ## XScale Systems
1674 #########################################################################
1675
1676 adsvix_config   :       unconfig
1677         @./mkconfig $(@:_config=) arm pxa adsvix
1678
1679 cerf250_config :        unconfig
1680         @./mkconfig $(@:_config=) arm pxa cerf250
1681
1682 cradle_config   :       unconfig
1683         @./mkconfig $(@:_config=) arm pxa cradle
1684
1685 csb226_config   :       unconfig
1686         @./mkconfig $(@:_config=) arm pxa csb226
1687
1688 innokom_config  :       unconfig
1689         @./mkconfig $(@:_config=) arm pxa innokom
1690
1691 ixdp425_config  :       unconfig
1692         @./mkconfig $(@:_config=) arm ixp ixdp425
1693
1694 lubbock_config  :       unconfig
1695         @./mkconfig $(@:_config=) arm pxa lubbock
1696
1697 logodl_config   :       unconfig
1698         @./mkconfig $(@:_config=) arm pxa logodl
1699
1700 pxa255_idp_config:      unconfig
1701         @./mkconfig $(@:_config=) arm pxa pxa255_idp
1702
1703 wepep250_config :       unconfig
1704         @./mkconfig $(@:_config=) arm pxa wepep250
1705
1706 xaeniax_config  :       unconfig
1707         @./mkconfig $(@:_config=) arm pxa xaeniax
1708
1709 xm250_config    :       unconfig
1710         @./mkconfig $(@:_config=) arm pxa xm250
1711
1712 xsengine_config :       unconfig
1713         @./mkconfig $(@:_config=) arm pxa xsengine
1714
1715 #########################################################################
1716 ## ARM1136 Systems
1717 #########################################################################
1718 omap2420h4_config :    unconfig
1719         @./mkconfig $(@:_config=) arm arm1136 omap2420h4
1720
1721 #========================================================================
1722 # i386
1723 #========================================================================
1724 #########################################################################
1725 ## AMD SC520 CDP
1726 #########################################################################
1727 sc520_cdp_config        :       unconfig
1728         @./mkconfig $(@:_config=) i386 i386 sc520_cdp
1729
1730 sc520_spunk_config      :       unconfig
1731         @./mkconfig $(@:_config=) i386 i386 sc520_spunk
1732
1733 sc520_spunk_rel_config  :       unconfig
1734         @./mkconfig $(@:_config=) i386 i386 sc520_spunk
1735
1736 #========================================================================
1737 # MIPS
1738 #========================================================================
1739 #########################################################################
1740 ## MIPS32 4Kc
1741 #########################################################################
1742
1743 xtract_incaip = $(subst _100MHz,,$(subst _133MHz,,$(subst _150MHz,,$(subst _config,,$1))))
1744
1745 incaip_100MHz_config    \
1746 incaip_133MHz_config    \
1747 incaip_150MHz_config    \
1748 incaip_config: unconfig
1749         @ >include/config.h
1750         @[ -z "$(findstring _100MHz,$@)" ] || \
1751                 { echo "#define CPU_CLOCK_RATE 100000000" >>include/config.h ; \
1752                   echo "... with 100MHz system clock" ; \
1753                 }
1754         @[ -z "$(findstring _133MHz,$@)" ] || \
1755                 { echo "#define CPU_CLOCK_RATE 133000000" >>include/config.h ; \
1756                   echo "... with 133MHz system clock" ; \
1757                 }
1758         @[ -z "$(findstring _150MHz,$@)" ] || \
1759                 { echo "#define CPU_CLOCK_RATE 150000000" >>include/config.h ; \
1760                   echo "... with 150MHz system clock" ; \
1761                 }
1762         @./mkconfig -a $(call xtract_incaip,$@) mips mips incaip
1763
1764 tb0229_config: unconfig
1765         @./mkconfig $(@:_config=) mips mips tb0229
1766
1767 #########################################################################
1768 ## MIPS32 AU1X00
1769 #########################################################################
1770 dbau1000_config         :       unconfig
1771         @ >include/config.h
1772         @echo "#define CONFIG_DBAU1000 1" >>include/config.h
1773         @./mkconfig -a dbau1x00 mips mips dbau1x00
1774
1775 dbau1100_config         :       unconfig
1776         @ >include/config.h
1777         @echo "#define CONFIG_DBAU1100 1" >>include/config.h
1778         @./mkconfig -a dbau1x00 mips mips dbau1x00
1779
1780 dbau1500_config         :       unconfig
1781         @ >include/config.h
1782         @echo "#define CONFIG_DBAU1500 1" >>include/config.h
1783         @./mkconfig -a dbau1x00 mips mips dbau1x00
1784
1785 dbau1550_config         :       unconfig
1786         @ >include/config.h
1787         @echo "#define CONFIG_DBAU1550 1" >>include/config.h
1788         @./mkconfig -a dbau1x00 mips mips dbau1x00
1789
1790 dbau1550_el_config      :       unconfig
1791         @ >include/config.h
1792         @echo "#define CONFIG_DBAU1550 1" >>include/config.h
1793         @./mkconfig -a dbau1x00 mips mips dbau1x00
1794
1795 pb1000_config           :       unconfig
1796         @ >include/config.h
1797         @echo "#define CONFIG_PB1000 1" >>include/config.h
1798         @./mkconfig -a pb1x00 mips mips pb1x00
1799
1800 #########################################################################
1801 ## MIPS64 5Kc
1802 #########################################################################
1803
1804 purple_config :         unconfig
1805         @./mkconfig $(@:_config=) mips mips purple
1806
1807 #========================================================================
1808 # Nios
1809 #========================================================================
1810 #########################################################################
1811 ## Nios32
1812 #########################################################################
1813
1814 DK1C20_safe_32_config           \
1815 DK1C20_standard_32_config       \
1816 DK1C20_config:  unconfig
1817         @ >include/config.h
1818         @[ -z "$(findstring _safe_32,$@)" ] || \
1819                 { echo "#define CONFIG_NIOS_SAFE_32 1" >>include/config.h ; \
1820                   echo "... NIOS 'safe_32' configuration" ; \
1821                 }
1822         @[ -z "$(findstring _standard_32,$@)" ] || \
1823                 { echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
1824                   echo "... NIOS 'standard_32' configuration" ; \
1825                 }
1826         @[ -z "$(findstring DK1C20_config,$@)" ] || \
1827                 { echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
1828                   echo "... NIOS 'standard_32' configuration (DEFAULT)" ; \
1829                 }
1830         @./mkconfig -a DK1C20 nios nios dk1c20 altera
1831
1832 DK1S10_safe_32_config           \
1833 DK1S10_standard_32_config       \
1834 DK1S10_mtx_ldk_20_config        \
1835 DK1S10_config:  unconfig
1836         @ >include/config.h
1837         @[ -z "$(findstring _safe_32,$@)" ] || \
1838                 { echo "#define CONFIG_NIOS_SAFE_32 1" >>include/config.h ; \
1839                   echo "... NIOS 'safe_32' configuration" ; \
1840                 }
1841         @[ -z "$(findstring _standard_32,$@)" ] || \
1842                 { echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
1843                   echo "... NIOS 'standard_32' configuration" ; \
1844                 }
1845         @[ -z "$(findstring _mtx_ldk_20,$@)" ] || \
1846                 { echo "#define CONFIG_NIOS_MTX_LDK_20 1" >>include/config.h ; \
1847                   echo "... NIOS 'mtx_ldk_20' configuration" ; \
1848                 }
1849         @[ -z "$(findstring DK1S10_config,$@)" ] || \
1850                 { echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
1851                   echo "... NIOS 'standard_32' configuration (DEFAULT)" ; \
1852                 }
1853         @./mkconfig -a DK1S10 nios nios dk1s10 altera
1854
1855 ADNPESC1_DNPEVA2_base_32_config \
1856 ADNPESC1_base_32_config         \
1857 ADNPESC1_config: unconfig
1858         @ >include/config.h
1859         @[ -z "$(findstring _DNPEVA2,$@)" ] || \
1860                 { echo "#define CONFIG_DNPEVA2 1" >>include/config.h ; \
1861                   echo "... DNP/EVA2 configuration" ; \
1862                 }
1863         @[ -z "$(findstring _base_32,$@)" ] || \
1864                 { echo "#define CONFIG_NIOS_BASE_32 1" >>include/config.h ; \
1865                   echo "... NIOS 'base_32' configuration" ; \
1866                 }
1867         @[ -z "$(findstring ADNPESC1_config,$@)" ] || \
1868                 { echo "#define CONFIG_NIOS_BASE_32 1" >>include/config.h ; \
1869                   echo "... NIOS 'base_32' configuration (DEFAULT)" ; \
1870                 }
1871         @./mkconfig -a ADNPESC1 nios nios adnpesc1 ssv
1872
1873 #########################################################################
1874 ## Nios-II
1875 #########################################################################
1876
1877 PK1C20_config : unconfig
1878         @./mkconfig  PK1C20 nios2 nios2 pk1c20 psyent
1879
1880 PCI5441_config : unconfig
1881         @./mkconfig  PCI5441 nios2 nios2 pci5441 psyent
1882
1883 #========================================================================
1884 # MicroBlaze
1885 #========================================================================
1886 #########################################################################
1887 ## Microblaze
1888 #########################################################################
1889 suzaku_config:  unconfig
1890         @ >include/config.h
1891         @echo "#define CONFIG_SUZAKU 1" >> include/config.h
1892         @./mkconfig -a $(@:_config=) microblaze microblaze suzaku AtmarkTechno
1893
1894 #########################################################################
1895 #########################################################################
1896
1897 clean:
1898         find . -type f \
1899                 \( -name 'core' -o -name '*.bak' -o -name '*~' \
1900                 -o -name '*.o'  -o -name '*.a'  \) -print \
1901                 | xargs rm -f
1902         rm -f examples/hello_world examples/timer \
1903               examples/eepro100_eeprom examples/sched \
1904               examples/mem_to_mem_idma2intr examples/82559_eeprom \
1905               examples/test_burst
1906         rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
1907         rm -f tools/mpc86x_clk tools/ncb
1908         rm -f tools/easylogo/easylogo tools/bmp_logo
1909         rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
1910         rm -f tools/env/fw_printenv tools/env/fw_setenv
1911         rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
1912         rm -f board/trab/trab_fkt board/voiceblue/eeprom
1913         rm -f board/integratorap/u-boot.lds board/integratorcp/u-boot.lds
1914
1915 clobber:        clean
1916         find . -type f \( -name .depend \
1917                 -o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \
1918                 -print0 \
1919                 | xargs -0 rm -f
1920         rm -f $(OBJS) *.bak tags TAGS
1921         rm -fr *.*~
1922         rm -f u-boot u-boot.map u-boot.hex $(ALL)
1923         rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
1924         rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
1925         rm -f include/asm/proc include/asm/arch include/asm
1926
1927 mrproper \
1928 distclean:      clobber unconfig
1929
1930 backup:
1931         F=`basename $(TOPDIR)` ; cd .. ; \
1932         gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
1933
1934 #########################################################################