blob: 57d7a5d59037b0ccb84da722927b096d1540140a [file] [log] [blame]
wdenk7ebf7442002-11-02 23:17:16 +00001#
2# (C) Copyright 2000, 2001, 2002
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
24HOSTARCH := $(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
32HOSTOS := $(shell uname -s | tr A-Z a-z | \
33 sed -e 's/\(cygwin\).*/cygwin/')
34
35export HOSTARCH
36
37# Deal with colliding definitions from tcsh etc.
38VENDOR=
39
40#########################################################################
41
42TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
43export TOPDIR
44
45ifeq (include/config.mk,$(wildcard include/config.mk))
46# load ARCH, BOARD, and CPU configuration
47include include/config.mk
48export ARCH CPU BOARD VENDOR
49# load other configuration
50include $(TOPDIR)/config.mk
51
52ifndef CROSS_COMPILE
53ifeq ($(HOSTARCH),ppc)
54CROSS_COMPILE =
55else
wdenk7ebf7442002-11-02 23:17:16 +000056ifeq ($(ARCH),ppc)
57CROSS_COMPILE = ppc_8xx-
58endif
59ifeq ($(ARCH),arm)
wdenkdc7c9a12003-03-26 06:55:25 +000060CROSS_COMPILE = arm-linux-
wdenk7ebf7442002-11-02 23:17:16 +000061endif
wdenk2262cfe2002-11-18 00:14:45 +000062ifeq ($(ARCH),i386)
63#CROSS_COMPILE = i386-elf-
64endif
wdenk43d96162003-03-06 00:02:04 +000065ifeq ($(ARCH),mips)
66CROSS_COMPILE = mips_4KC-
67endif
wdenk7ebf7442002-11-02 23:17:16 +000068endif
69endif
70
71export CROSS_COMPILE
72
73# The "tools" are needed early, so put this first
74SUBDIRS = tools \
75 lib_generic \
76 lib_$(ARCH) \
77 cpu/$(CPU) \
78 board/$(BOARDDIR) \
79 common \
80 disk \
81 fs \
82 net \
83 rtc \
84 dtt \
85 drivers \
86 post \
87 post/cpu \
88 examples
89
90#########################################################################
91# U-Boot objects....order is important (i.e. start must be first)
92
93OBJS = cpu/$(CPU)/start.o
wdenk2262cfe2002-11-18 00:14:45 +000094ifeq ($(CPU),i386)
95OBJS += cpu/$(CPU)/start16.o
96OBJS += cpu/$(CPU)/reset.o
97endif
wdenk7ebf7442002-11-02 23:17:16 +000098ifeq ($(CPU),ppc4xx)
99OBJS += cpu/$(CPU)/resetvec.o
100endif
101
102LIBS = board/$(BOARDDIR)/lib$(BOARD).a
103LIBS += cpu/$(CPU)/lib$(CPU).a
104LIBS += lib_$(ARCH)/lib$(ARCH).a
wdenk2262cfe2002-11-18 00:14:45 +0000105LIBS += fs/jffs2/libjffs2.a fs/fdos/libfdos.a
wdenk7ebf7442002-11-02 23:17:16 +0000106LIBS += net/libnet.a
107LIBS += disk/libdisk.a
108LIBS += rtc/librtc.a
109LIBS += dtt/libdtt.a
110LIBS += drivers/libdrivers.a
111LIBS += post/libpost.a post/cpu/libcpu.a
112LIBS += common/libcommon.a
113LIBS += lib_generic/libgeneric.a
114
115#########################################################################
116
117all: u-boot.srec u-boot.bin System.map
118
119install: all
wdenk43d96162003-03-06 00:02:04 +0000120 -cp u-boot.bin /tftpboot/u-boot.bin
121 -cp u-boot.bin /net/denx/tftpboot/u-boot.bin
wdenk7ebf7442002-11-02 23:17:16 +0000122
123u-boot.srec: u-boot
124 $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
125
126u-boot.bin: u-boot
127 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
128
129u-boot.dis: u-boot
130 $(OBJDUMP) -d $< > $@
131
132u-boot: depend subdirs $(OBJS) $(LIBS) $(LDSCRIPT)
wdenkb2184c32002-11-19 23:01:07 +0000133 $(LD) $(LDFLAGS) $(OBJS) \
134 --start-group $(LIBS) --end-group \
135 -Map u-boot.map -o u-boot
wdenk7ebf7442002-11-02 23:17:16 +0000136
137subdirs:
138 @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir || exit 1 ; done
139
140depend dep:
141 @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
142
143tags:
144 ctags -w `find $(SUBDIRS) include \
145 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
146
147etags:
148 etags -a `find $(SUBDIRS) include \
149 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
150
151System.map: u-boot
152 @$(NM) $< | \
153 grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
154 sort > System.map
155
156#########################################################################
157else
158all install u-boot u-boot.srec depend dep:
159 @echo "System not configured - see README" >&2
160 @ exit 1
161endif
162
163#########################################################################
164
165unconfig:
166 rm -f include/config.h include/config.mk
167
168#========================================================================
169# PowerPC
170#========================================================================
wdenk0db5bca2003-03-31 17:27:09 +0000171
172#########################################################################
173## MPC5xx Systems
174#########################################################################
175
176cmi_mpc5xx_config: unconfig
177 @./mkconfig $(@:_config=) ppc mpc5xx cmi
178
wdenk7ebf7442002-11-02 23:17:16 +0000179#########################################################################
180## MPC8xx Systems
181#########################################################################
182
183ADS860_config: unconfig
184 @./mkconfig $(@:_config=) ppc mpc8xx fads
185
186AMX860_config : unconfig
187 @./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
188
189c2mon_config: unconfig
190 @./mkconfig $(@:_config=) ppc mpc8xx c2mon
191
192CCM_config: unconfig
193 @./mkconfig $(@:_config=) ppc mpc8xx CCM siemens
194
195cogent_mpc8xx_config: unconfig
196 @./mkconfig $(@:_config=) ppc mpc8xx cogent
197
wdenk3bac3512003-03-12 10:41:04 +0000198ELPT860_config: unconfig
199 @./mkconfig $(@:_config=) ppc mpc8xx elpt860 LEOX
200
wdenk7ebf7442002-11-02 23:17:16 +0000201ESTEEM192E_config: unconfig
202 @./mkconfig $(@:_config=) ppc mpc8xx esteem192e
203
204ETX094_config : unconfig
205 @./mkconfig $(@:_config=) ppc mpc8xx etx094
206
207FADS823_config \
208FADS850SAR_config \
209FADS860T_config: unconfig
210 @./mkconfig $(@:_config=) ppc mpc8xx fads
211
212FLAGADM_config: unconfig
213 @./mkconfig $(@:_config=) ppc mpc8xx flagadm
214
215GEN860T_config: unconfig
216 @./mkconfig $(@:_config=) ppc mpc8xx gen860t
217
218GENIETV_config: unconfig
219 @./mkconfig $(@:_config=) ppc mpc8xx genietv
220
221GTH_config: unconfig
222 @./mkconfig $(@:_config=) ppc mpc8xx gth
223
224hermes_config : unconfig
225 @./mkconfig $(@:_config=) ppc mpc8xx hermes
226
227IAD210_config: unconfig
228 @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
229
230xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
231
232ICU862_100MHz_config \
233ICU862_config: unconfig
234 @ >include/config.h
235 @[ -z "$(findstring _100MHz,$@)" ] || \
236 { echo "#define CONFIG_100MHz" >>include/config.h ; \
237 echo "... with 100MHz system clock" ; \
238 }
239 @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
240
241IP860_config : unconfig
242 @./mkconfig $(@:_config=) ppc mpc8xx ip860
243
244IVML24_256_config \
245IVML24_128_config \
246IVML24_config: unconfig
247 @ >include/config.h
248 @[ -z "$(findstring IVML24_config,$@)" ] || \
249 { echo "#define CONFIG_IVML24_16M" >>include/config.h ; \
250 }
251 @[ -z "$(findstring IVML24_128_config,$@)" ] || \
252 { echo "#define CONFIG_IVML24_32M" >>include/config.h ; \
253 }
254 @[ -z "$(findstring IVML24_256_config,$@)" ] || \
255 { echo "#define CONFIG_IVML24_64M" >>include/config.h ; \
256 }
257 @./mkconfig -a IVML24 ppc mpc8xx ivm
258
259IVMS8_256_config \
260IVMS8_128_config \
261IVMS8_config: unconfig
262 @ >include/config.h
263 @[ -z "$(findstring IVMS8_config,$@)" ] || \
264 { echo "#define CONFIG_IVMS8_16M" >>include/config.h ; \
265 }
266 @[ -z "$(findstring IVMS8_128_config,$@)" ] || \
267 { echo "#define CONFIG_IVMS8_32M" >>include/config.h ; \
268 }
269 @[ -z "$(findstring IVMS8_256_config,$@)" ] || \
270 { echo "#define CONFIG_IVMS8_64M" >>include/config.h ; \
271 }
272 @./mkconfig -a IVMS8 ppc mpc8xx ivm
273
wdenk56f94be2002-11-05 16:35:14 +0000274KUP4K_config : unconfig
275 @./mkconfig $(@:_config=) ppc mpc8xx kup4k
276
wdenk7ebf7442002-11-02 23:17:16 +0000277LANTEC_config : unconfig
278 @./mkconfig $(@:_config=) ppc mpc8xx lantec
279
280lwmon_config: unconfig
281 @./mkconfig $(@:_config=) ppc mpc8xx lwmon
282
283MBX_config \
284MBX860T_config: unconfig
285 @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
286
287MHPC_config: unconfig
288 @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
289
290MVS1_config : unconfig
291 @./mkconfig $(@:_config=) ppc mpc8xx mvs1
292
293NETVIA_config: unconfig
294 @./mkconfig $(@:_config=) ppc mpc8xx netvia
295
296NX823_config: unconfig
297 @./mkconfig $(@:_config=) ppc mpc8xx nx823
298
299pcu_e_config: unconfig
300 @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
301
302R360MPI_config: unconfig
303 @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
304
305RPXClassic_config: unconfig
306 @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
307
308RPXlite_config: unconfig
309 @./mkconfig $(@:_config=) ppc mpc8xx RPXlite
310
311RRvision_config: unconfig
312 @./mkconfig $(@:_config=) ppc mpc8xx RRvision
313
314RRvision_LCD_config: unconfig
315 @echo "#define CONFIG_LCD" >include/config.h
316 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
317 @./mkconfig -a RRvision ppc mpc8xx RRvision
318
319SM850_config : unconfig
320 @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
321
322SPD823TS_config: unconfig
323 @./mkconfig $(@:_config=) ppc mpc8xx spd8xx
324
wdenkdc7c9a12003-03-26 06:55:25 +0000325svm_sc8xx_config: unconfig
326 @ >include/config.h
327 @./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
328
wdenk7ebf7442002-11-02 23:17:16 +0000329SXNI855T_config: unconfig
330 @./mkconfig $(@:_config=) ppc mpc8xx sixnet
331
wdenkdb2f721f2003-03-06 00:58:30 +0000332# EMK MPC8xx based modules
333TOP860_config: unconfig
334 @./mkconfig $(@:_config=) ppc mpc8xx top860 emk
335
wdenk7ebf7442002-11-02 23:17:16 +0000336# Play some tricks for configuration selection
337# All boards can come with 50 MHz (default), 66MHz or 80MHz clock,
338# but only 855 and 860 boards may come with FEC
339# and 823 boards may have LCD support
340xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _LCD,,$(subst _FEC,,$(subst _config,,$1)))))
341
342FPS850L_config \
wdenk384ae022002-11-05 00:17:55 +0000343FPS860L_config \
wdenk7ebf7442002-11-02 23:17:16 +0000344TQM823L_config \
345TQM823L_66MHz_config \
346TQM823L_80MHz_config \
347TQM823L_LCD_config \
348TQM823L_LCD_66MHz_config \
349TQM823L_LCD_80MHz_config \
350TQM850L_config \
351TQM850L_66MHz_config \
352TQM850L_80MHz_config \
353TQM855L_config \
354TQM855L_66MHz_config \
355TQM855L_80MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000356TQM860L_config \
357TQM860L_66MHz_config \
358TQM860L_80MHz_config \
wdenkd126bfb2003-04-10 11:18:18 +0000359TQM862L_config \
360TQM862L_66MHz_config \
361TQM862L_80MHz_config: unconfig
wdenk7ebf7442002-11-02 23:17:16 +0000362 @ >include/config.h
363 @[ -z "$(findstring _FEC,$@)" ] || \
364 { echo "#define CONFIG_FEC_ENET" >>include/config.h ; \
365 echo "... with FEC support" ; \
366 }
367 @[ -z "$(findstring _66MHz,$@)" ] || \
368 { echo "#define CONFIG_66MHz" >>include/config.h ; \
369 echo "... with 66MHz system clock" ; \
370 }
371 @[ -z "$(findstring _80MHz,$@)" ] || \
372 { echo "#define CONFIG_80MHz" >>include/config.h ; \
373 echo "... with 80MHz system clock" ; \
374 }
375 @[ -z "$(findstring _LCD,$@)" ] || \
376 { echo "#define CONFIG_LCD" >>include/config.h ; \
377 echo "#define CONFIG_NEC_NL6648BC20" >>include/config.h ; \
378 echo "... with LCD display" ; \
379 }
380 @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
381
382TTTech_config: unconfig
383 @echo "#define CONFIG_LCD" >include/config.h
384 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
385 @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
386
wdenk608c9142003-01-13 23:54:46 +0000387v37_config: unconfig
388 @echo "#define CONFIG_LCD" >include/config.h
389 @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
390 @./mkconfig $(@:_config=) ppc mpc8xx v37
391
wdenk7ebf7442002-11-02 23:17:16 +0000392#########################################################################
393## PPC4xx Systems
394#########################################################################
395
396ADCIOP_config: unconfig
397 @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
398
399AR405_config: unconfig
400 @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
401
402CANBT_config: unconfig
403 @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
404
405CPCI405_config \
406CPCI4052_config: unconfig
407 @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
408 @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk
409
410CPCI440_config: unconfig
411 @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
412
413CPCIISER4_config: unconfig
414 @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
415
416CRAYL1_config:unconfig
417 @./mkconfig $(@:_config=) ppc ppc4xx L1 cray
418
419DASA_SIM_config: unconfig
420 @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
421
422DU405_config: unconfig
423 @./mkconfig $(@:_config=) ppc ppc4xx du405 esd
424
425EBONY_config:unconfig
426 @./mkconfig $(@:_config=) ppc ppc4xx ebony
427
428ERIC_config:unconfig
429 @./mkconfig $(@:_config=) ppc ppc4xx eric
430
431MIP405_config:unconfig
432 @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
433
434ML2_config:unconfig
435 @./mkconfig $(@:_config=) ppc ppc4xx ml2
436
437OCRTC_config \
438ORSG_config: unconfig
439 @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
440
441PCI405_config: unconfig
442 @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
443
444PIP405_config:unconfig
445 @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
446
447W7OLMC_config \
448W7OLMG_config: unconfig
449 @./mkconfig $(@:_config=) ppc ppc4xx w7o
450
451WALNUT405_config:unconfig
452 @./mkconfig $(@:_config=) ppc ppc4xx walnut405
453
454#########################################################################
455## MPC824x Systems
456#########################################################################
wdenk3bac3512003-03-12 10:41:04 +0000457xtract_82xx = $(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1)))))
458
wdenk7ebf7442002-11-02 23:17:16 +0000459BMW_config: unconfig
460 @./mkconfig $(@:_config=) ppc mpc824x bmw
461
wdenk3bac3512003-03-12 10:41:04 +0000462CPC45_config \
463CPC45_ROMBOOT_config: unconfig
464 @./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
465 @cd ./include ; \
466 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
467 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
468 echo "... booting from 8-bit flash" ; \
469 else \
470 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
471 echo "... booting from 64-bit flash" ; \
472 fi; \
473 echo "export CONFIG_BOOT_ROM" >> config.mk;
474
wdenk7ebf7442002-11-02 23:17:16 +0000475CU824_config: unconfig
476 @./mkconfig $(@:_config=) ppc mpc824x cu824
477
478MOUSSE_config: unconfig
479 @./mkconfig $(@:_config=) ppc mpc824x mousse
480
481MUSENKI_config: unconfig
482 @./mkconfig $(@:_config=) ppc mpc824x musenki
483
484OXC_config: unconfig
485 @./mkconfig $(@:_config=) ppc mpc824x oxc
486
487PN62_config: unconfig
488 @./mkconfig $(@:_config=) ppc mpc824x pn62
489
490Sandpoint8240_config: unconfig
491 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
492
493Sandpoint8245_config: unconfig
494 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
495
496utx8245_config: unconfig
497 @./mkconfig $(@:_config=) ppc mpc824x utx8245
498
499#########################################################################
500## MPC8260 Systems
501#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000502
503cogent_mpc8260_config: unconfig
504 @./mkconfig $(@:_config=) ppc mpc8260 cogent
505
506CPU86_config \
507CPU86_ROMBOOT_config: unconfig
508 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
509 @cd ./include ; \
510 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
511 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
512 echo "... booting from 8-bit flash" ; \
513 else \
514 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
515 echo "... booting from 64-bit flash" ; \
516 fi; \
517 echo "export CONFIG_BOOT_ROM" >> config.mk;
518
519ep8260_config: unconfig
520 @./mkconfig $(@:_config=) ppc mpc8260 ep8260
521
522gw8260_config: unconfig
523 @./mkconfig $(@:_config=) ppc mpc8260 gw8260
524
525hymod_config: unconfig
526 @./mkconfig $(@:_config=) ppc mpc8260 hymod
527
528IPHASE4539_config: unconfig
529 @./mkconfig $(@:_config=) ppc mpc8260 iphase4539
530
531MPC8260ADS_config: unconfig
532 @./mkconfig $(@:_config=) ppc mpc8260 mpc8260ads
533
wdenkdb2f721f2003-03-06 00:58:30 +0000534MPC8266ADS_config: unconfig
535 @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
536
wdenk10f67012003-03-25 18:06:06 +0000537PM825_config \
538PM825_ROMBOOT_config: unconfig
539 @echo "#define CONFIG_PCI" >include/config.h
540 @./mkconfig -a PM826 ppc mpc8260 pm826
541 @cd ./include ; \
542 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
543 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
544 echo "... booting from 8-bit flash" ; \
545 else \
546 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
547 echo "... booting from 64-bit flash" ; \
548 fi; \
549 echo "export CONFIG_BOOT_ROM" >> config.mk; \
550
wdenk7ebf7442002-11-02 23:17:16 +0000551PM826_config \
552PM826_ROMBOOT_config: unconfig
553 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 pm826
554 @cd ./include ; \
555 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
556 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
557 echo "... booting from 8-bit flash" ; \
558 else \
559 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
560 echo "... booting from 64-bit flash" ; \
561 fi; \
562 echo "export CONFIG_BOOT_ROM" >> config.mk; \
563
564ppmc8260_config: unconfig
565 @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
566
567RPXsuper_config: unconfig
568 @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
569
570rsdproto_config: unconfig
571 @./mkconfig $(@:_config=) ppc mpc8260 rsdproto
572
573sacsng_config: unconfig
574 @./mkconfig $(@:_config=) ppc mpc8260 sacsng
575
576sbc8260_config: unconfig
577 @./mkconfig $(@:_config=) ppc mpc8260 sbc8260
578
579SCM_config: unconfig
580 @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
581
582TQM8260_config \
583TQM8260_L2_config \
584TQM8260_266MHz_config \
585TQM8260_L2_266MHz_config \
586TQM8260_300MHz_config: unconfig
587 @ >include/config.h
588 @if [ "$(findstring _L2_,$@)" ] ; then \
589 echo "#define CONFIG_L2_CACHE" >>include/config.h ; \
590 echo "... with L2 Cache support (60x Bus Mode)" ; \
591 else \
592 echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \
593 echo "... without L2 Cache support" ; \
594 fi
595 @[ -z "$(findstring _266MHz,$@)" ] || \
596 { echo "#define CONFIG_266MHz" >>include/config.h ; \
597 echo "... with 266MHz system clock" ; \
598 }
599 @[ -z "$(findstring _300MHz,$@)" ] || \
600 { echo "#define CONFIG_300MHz" >>include/config.h ; \
601 echo "... with 300MHz system clock" ; \
602 }
603 @./mkconfig -a $(call xtract_82xx,$@) ppc mpc8260 tqm8260
604
605#########################################################################
606## 74xx/7xx Systems
607#########################################################################
608
wdenkc7de8292002-11-19 11:04:11 +0000609AmigaOneG3SE_config: unconfig
610 @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
611
wdenk7ebf7442002-11-02 23:17:16 +0000612EVB64260_config \
613EVB64260_750CX_config: unconfig
614 @./mkconfig EVB64260 ppc 74xx_7xx evb64260
615
616ZUMA_config: unconfig
617 @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
618
619PCIPPC2_config \
620PCIPPC6_config: unconfig
621 @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
622
623BAB7xx_config: unconfig
624 @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
625
626ELPPC_config: unconfig
627 @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
628
629#========================================================================
630# ARM
631#========================================================================
632#########################################################################
633## StrongARM Systems
634#########################################################################
635
wdenkdc7c9a12003-03-26 06:55:25 +0000636at91rm9200dk_config : unconfig
637 @./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
638
wdenk7ebf7442002-11-02 23:17:16 +0000639lart_config : unconfig
640 @./mkconfig $(@:_config=) arm sa1100 lart
641
642dnp1110_config : unconfig
643 @./mkconfig $(@:_config=) arm sa1100 dnp1110
644
645shannon_config : unconfig
646 @./mkconfig $(@:_config=) arm sa1100 shannon
647
648#########################################################################
649## ARM920T Systems
650#########################################################################
651
wdenk43d96162003-03-06 00:02:04 +0000652xtract_trab = $(subst _big_flash,,$(subst _config,,$1))
653
wdenk7ebf7442002-11-02 23:17:16 +0000654smdk2400_config : unconfig
655 @./mkconfig $(@:_config=) arm arm920t smdk2400
656
657smdk2410_config : unconfig
658 @./mkconfig $(@:_config=) arm arm920t smdk2410
659
wdenk43d96162003-03-06 00:02:04 +0000660trab_config \
661trab_big_flash_config: unconfig
662 @ >include/config.h
663 @[ -z "$(findstring _big_flash,$@)" ] || \
664 { echo "#define CONFIG_BIG_FLASH" >>include/config.h ; \
665 echo "... with big flash support" ; \
666 }
667 @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
wdenk7ebf7442002-11-02 23:17:16 +0000668
wdenk1cb8e982003-03-06 21:55:29 +0000669VCMA9_config : unconfig
670 @./mkconfig $(@:_config=) arm arm920t vcma9 mpl
671
wdenk7ebf7442002-11-02 23:17:16 +0000672#########################################################################
673## ARM720T Systems
674#########################################################################
675
676impa7_config : unconfig
677 @./mkconfig $(@:_config=) arm arm720t impa7
678
679ep7312_config : unconfig
680 @./mkconfig $(@:_config=) arm arm720t ep7312
681
682#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000683## XScale Systems
wdenk7ebf7442002-11-02 23:17:16 +0000684#########################################################################
685
wdenk7ebf7442002-11-02 23:17:16 +0000686cradle_config : unconfig
687 @./mkconfig $(@:_config=) arm xscale cradle
688
689csb226_config : unconfig
690 @./mkconfig $(@:_config=) arm xscale csb226
691
wdenk43d96162003-03-06 00:02:04 +0000692innokom_config : unconfig
693 @./mkconfig $(@:_config=) arm xscale innokom
694
695lubbock_config : unconfig
696 @./mkconfig $(@:_config=) arm xscale lubbock
697
wdenk3e386912003-04-05 00:53:31 +0000698wepep250_config : unconfig
699 @./mkconfig $(@:_config=) arm xscale wepep250
700
wdenk2262cfe2002-11-18 00:14:45 +0000701#========================================================================
702# i386
703#========================================================================
704#########################################################################
wdenk1cb8e982003-03-06 21:55:29 +0000705## AMD SC520 CDP
wdenk2262cfe2002-11-18 00:14:45 +0000706#########################################################################
707sc520_cdp_config : unconfig
708 @./mkconfig $(@:_config=) i386 i386 sc520_cdp
709
wdenk43d96162003-03-06 00:02:04 +0000710#========================================================================
711# MIPS
712#========================================================================
wdenk7ebf7442002-11-02 23:17:16 +0000713#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000714## MIPS32 4Kc
715#########################################################################
716
717incaip_config : unconfig
718 @./mkconfig $(@:_config=) mips mips incaip
719
wdenk3e386912003-04-05 00:53:31 +0000720purple_config : unconfig
721 @./mkconfig $(@:_config=) mips mips purple
wdenk43d96162003-03-06 00:02:04 +0000722
wdenk3e386912003-04-05 00:53:31 +0000723#########################################################################
724#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000725
726clean:
727 find . -type f \
728 \( -name 'core' -o -name '*.bak' -o -name '*~' \
729 -o -name '*.o' -o -name '*.a' \) -print \
730 | xargs rm -f
wdenk85ec0bc2003-03-31 16:34:49 +0000731 rm -f examples/hello_world examples/timer \
wdenk3e386912003-04-05 00:53:31 +0000732 examples/eepro100_eeprom examples/sched \
733 examples/mem_to_mem_idma2intr
wdenk7ebf7442002-11-02 23:17:16 +0000734 rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
735 rm -f tools/easylogo/easylogo tools/bmp_logo
736 rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
wdenk228f29a2002-12-08 09:53:23 +0000737 rm -f tools/env/fw_printenv tools/env/fw_setenv
wdenk7ebf7442002-11-02 23:17:16 +0000738
739clobber: clean
740 find . -type f \
741 \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
742 -print \
743 | xargs rm -f
744 rm -f $(OBJS) *.bak tags TAGS
745 rm -fr *.*~
wdenkd126bfb2003-04-10 11:18:18 +0000746 rm -f u-boot u-boot.bin u-boot.srec u-boot.map System.map
wdenk228f29a2002-12-08 09:53:23 +0000747 rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
wdenk3e386912003-04-05 00:53:31 +0000748 rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
wdenk7ebf7442002-11-02 23:17:16 +0000749 rm -f include/asm/arch include/asm
750
751mrproper \
752distclean: clobber unconfig
753
754backup:
755 F=`basename $(TOPDIR)` ; cd .. ; \
756 gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
757
758#########################################################################