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