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