blob: 4ba42016892d68f4fa2229d686908f469181379e [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)
wdenkc8434db2003-03-26 06:55:25 +000060CROSS_COMPILE = arm-linux-
wdenk7ebf7442002-11-02 23:17:16 +000061endif
wdenk591dda52002-11-18 00:14:45 +000062ifeq ($(ARCH),i386)
63#CROSS_COMPILE = i386-elf-
wdenk7ebf7442002-11-02 23:17:16 +000064endif
wdenk4a5c8a72003-03-06 00:02:04 +000065ifeq ($(ARCH),mips)
66CROSS_COMPILE = mips_4KC-
wdenk7ebf7442002-11-02 23:17:16 +000067endif
wdenk591dda52002-11-18 00:14:45 +000068endif
wdenk4a5c8a72003-03-06 00:02:04 +000069endif
wdenk7ebf7442002-11-02 23:17:16 +000070
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
wdenk591dda52002-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
wdenk591dda52002-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
wdenk4a5c8a72003-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)
wdenk67ff36c2002-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#========================================================================
171#########################################################################
172## MPC8xx Systems
173#########################################################################
174
175ADS860_config: unconfig
176 @./mkconfig $(@:_config=) ppc mpc8xx fads
177
178AMX860_config : unconfig
179 @./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
180
181c2mon_config: unconfig
182 @./mkconfig $(@:_config=) ppc mpc8xx c2mon
183
184CCM_config: unconfig
185 @./mkconfig $(@:_config=) ppc mpc8xx CCM siemens
186
187cogent_mpc8xx_config: unconfig
188 @./mkconfig $(@:_config=) ppc mpc8xx cogent
189
wdenkef5fe752003-03-12 10:41:04 +0000190ELPT860_config: unconfig
191 @./mkconfig $(@:_config=) ppc mpc8xx elpt860 LEOX
192
wdenk7ebf7442002-11-02 23:17:16 +0000193ESTEEM192E_config: unconfig
194 @./mkconfig $(@:_config=) ppc mpc8xx esteem192e
195
196ETX094_config : unconfig
197 @./mkconfig $(@:_config=) ppc mpc8xx etx094
198
199FADS823_config \
200FADS850SAR_config \
201FADS860T_config: unconfig
202 @./mkconfig $(@:_config=) ppc mpc8xx fads
203
204FLAGADM_config: unconfig
205 @./mkconfig $(@:_config=) ppc mpc8xx flagadm
206
207GEN860T_config: unconfig
208 @./mkconfig $(@:_config=) ppc mpc8xx gen860t
209
210GENIETV_config: unconfig
211 @./mkconfig $(@:_config=) ppc mpc8xx genietv
212
213GTH_config: unconfig
214 @./mkconfig $(@:_config=) ppc mpc8xx gth
215
216hermes_config : unconfig
217 @./mkconfig $(@:_config=) ppc mpc8xx hermes
218
219IAD210_config: unconfig
220 @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
221
222xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
223
224ICU862_100MHz_config \
225ICU862_config: unconfig
226 @ >include/config.h
227 @[ -z "$(findstring _100MHz,$@)" ] || \
228 { echo "#define CONFIG_100MHz" >>include/config.h ; \
229 echo "... with 100MHz system clock" ; \
230 }
231 @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
232
233IP860_config : unconfig
234 @./mkconfig $(@:_config=) ppc mpc8xx ip860
235
236IVML24_256_config \
237IVML24_128_config \
238IVML24_config: unconfig
239 @ >include/config.h
240 @[ -z "$(findstring IVML24_config,$@)" ] || \
241 { echo "#define CONFIG_IVML24_16M" >>include/config.h ; \
242 }
243 @[ -z "$(findstring IVML24_128_config,$@)" ] || \
244 { echo "#define CONFIG_IVML24_32M" >>include/config.h ; \
245 }
246 @[ -z "$(findstring IVML24_256_config,$@)" ] || \
247 { echo "#define CONFIG_IVML24_64M" >>include/config.h ; \
248 }
249 @./mkconfig -a IVML24 ppc mpc8xx ivm
250
251IVMS8_256_config \
252IVMS8_128_config \
253IVMS8_config: unconfig
254 @ >include/config.h
255 @[ -z "$(findstring IVMS8_config,$@)" ] || \
256 { echo "#define CONFIG_IVMS8_16M" >>include/config.h ; \
257 }
258 @[ -z "$(findstring IVMS8_128_config,$@)" ] || \
259 { echo "#define CONFIG_IVMS8_32M" >>include/config.h ; \
260 }
261 @[ -z "$(findstring IVMS8_256_config,$@)" ] || \
262 { echo "#define CONFIG_IVMS8_64M" >>include/config.h ; \
263 }
264 @./mkconfig -a IVMS8 ppc mpc8xx ivm
265
wdenk56f94be2002-11-05 16:35:14 +0000266KUP4K_config : unconfig
267 @./mkconfig $(@:_config=) ppc mpc8xx kup4k
268
wdenk7ebf7442002-11-02 23:17:16 +0000269LANTEC_config : unconfig
270 @./mkconfig $(@:_config=) ppc mpc8xx lantec
271
272lwmon_config: unconfig
273 @./mkconfig $(@:_config=) ppc mpc8xx lwmon
274
275MBX_config \
276MBX860T_config: unconfig
277 @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
278
279MHPC_config: unconfig
280 @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
281
282MVS1_config : unconfig
283 @./mkconfig $(@:_config=) ppc mpc8xx mvs1
284
285NETVIA_config: unconfig
286 @./mkconfig $(@:_config=) ppc mpc8xx netvia
287
288NX823_config: unconfig
289 @./mkconfig $(@:_config=) ppc mpc8xx nx823
290
291pcu_e_config: unconfig
292 @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
293
294R360MPI_config: unconfig
295 @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
296
297RPXClassic_config: unconfig
298 @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
299
300RPXlite_config: unconfig
301 @./mkconfig $(@:_config=) ppc mpc8xx RPXlite
302
303RRvision_config: unconfig
304 @./mkconfig $(@:_config=) ppc mpc8xx RRvision
305
306RRvision_LCD_config: unconfig
307 @echo "#define CONFIG_LCD" >include/config.h
308 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
309 @./mkconfig -a RRvision ppc mpc8xx RRvision
310
311SM850_config : unconfig
312 @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
313
314SPD823TS_config: unconfig
315 @./mkconfig $(@:_config=) ppc mpc8xx spd8xx
316
wdenkc8434db2003-03-26 06:55:25 +0000317svm_sc8xx_config: unconfig
318 @ >include/config.h
319 @./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
320
wdenk7ebf7442002-11-02 23:17:16 +0000321SXNI855T_config: unconfig
322 @./mkconfig $(@:_config=) ppc mpc8xx sixnet
323
wdenkb666c8f2003-03-06 00:58:30 +0000324# EMK MPC8xx based modules
325TOP860_config: unconfig
326 @./mkconfig $(@:_config=) ppc mpc8xx top860 emk
327
wdenk7ebf7442002-11-02 23:17:16 +0000328# Play some tricks for configuration selection
329# All boards can come with 50 MHz (default), 66MHz or 80MHz clock,
330# but only 855 and 860 boards may come with FEC
331# and 823 boards may have LCD support
332xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _LCD,,$(subst _FEC,,$(subst _config,,$1)))))
333
334FPS850L_config \
wdenk384ae022002-11-05 00:17:55 +0000335FPS860L_config \
wdenk7ebf7442002-11-02 23:17:16 +0000336TQM823L_config \
337TQM823L_66MHz_config \
338TQM823L_80MHz_config \
339TQM823L_LCD_config \
340TQM823L_LCD_66MHz_config \
341TQM823L_LCD_80MHz_config \
342TQM850L_config \
343TQM850L_66MHz_config \
344TQM850L_80MHz_config \
345TQM855L_config \
346TQM855L_66MHz_config \
347TQM855L_80MHz_config \
348TQM855L_FEC_config \
349TQM855L_FEC_66MHz_config \
350TQM855L_FEC_80MHz_config \
351TQM860L_config \
352TQM860L_66MHz_config \
353TQM860L_80MHz_config \
354TQM860L_FEC_config \
355TQM860L_FEC_66MHz_config \
356TQM860L_FEC_80MHz_config: unconfig
357 @ >include/config.h
358 @[ -z "$(findstring _FEC,$@)" ] || \
359 { echo "#define CONFIG_FEC_ENET" >>include/config.h ; \
360 echo "... with FEC support" ; \
361 }
362 @[ -z "$(findstring _66MHz,$@)" ] || \
363 { echo "#define CONFIG_66MHz" >>include/config.h ; \
364 echo "... with 66MHz system clock" ; \
365 }
366 @[ -z "$(findstring _80MHz,$@)" ] || \
367 { echo "#define CONFIG_80MHz" >>include/config.h ; \
368 echo "... with 80MHz system clock" ; \
369 }
370 @[ -z "$(findstring _LCD,$@)" ] || \
371 { echo "#define CONFIG_LCD" >>include/config.h ; \
372 echo "#define CONFIG_NEC_NL6648BC20" >>include/config.h ; \
373 echo "... with LCD display" ; \
374 }
375 @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
376
377TTTech_config: unconfig
378 @echo "#define CONFIG_LCD" >include/config.h
379 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
380 @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
381
wdenk2dad91b2003-01-13 23:54:46 +0000382v37_config: unconfig
383 @echo "#define CONFIG_LCD" >include/config.h
384 @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
385 @./mkconfig $(@:_config=) ppc mpc8xx v37
386
wdenk7ebf7442002-11-02 23:17:16 +0000387#########################################################################
388## PPC4xx Systems
389#########################################################################
390
391ADCIOP_config: unconfig
392 @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
393
394AR405_config: unconfig
395 @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
396
397CANBT_config: unconfig
398 @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
399
400CPCI405_config \
401CPCI4052_config: unconfig
402 @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
403 @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk
404
405CPCI440_config: unconfig
406 @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
407
408CPCIISER4_config: unconfig
409 @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
410
411CRAYL1_config:unconfig
412 @./mkconfig $(@:_config=) ppc ppc4xx L1 cray
413
414DASA_SIM_config: unconfig
415 @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
416
417DU405_config: unconfig
418 @./mkconfig $(@:_config=) ppc ppc4xx du405 esd
419
420EBONY_config:unconfig
421 @./mkconfig $(@:_config=) ppc ppc4xx ebony
422
423ERIC_config:unconfig
424 @./mkconfig $(@:_config=) ppc ppc4xx eric
425
426MIP405_config:unconfig
427 @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
428
429ML2_config:unconfig
430 @./mkconfig $(@:_config=) ppc ppc4xx ml2
431
432OCRTC_config \
433ORSG_config: unconfig
434 @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
435
436PCI405_config: unconfig
437 @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
438
439PIP405_config:unconfig
440 @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
441
442W7OLMC_config \
443W7OLMG_config: unconfig
444 @./mkconfig $(@:_config=) ppc ppc4xx w7o
445
446WALNUT405_config:unconfig
447 @./mkconfig $(@:_config=) ppc ppc4xx walnut405
448
449#########################################################################
450## MPC824x Systems
451#########################################################################
wdenkef5fe752003-03-12 10:41:04 +0000452xtract_82xx = $(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1)))))
453
wdenk7ebf7442002-11-02 23:17:16 +0000454BMW_config: unconfig
455 @./mkconfig $(@:_config=) ppc mpc824x bmw
456
wdenkef5fe752003-03-12 10:41:04 +0000457CPC45_config \
458CPC45_ROMBOOT_config: unconfig
459 @./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
460 @cd ./include ; \
461 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
462 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
463 echo "... booting from 8-bit flash" ; \
464 else \
465 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
466 echo "... booting from 64-bit flash" ; \
467 fi; \
468 echo "export CONFIG_BOOT_ROM" >> config.mk;
469
wdenk7ebf7442002-11-02 23:17:16 +0000470CU824_config: unconfig
471 @./mkconfig $(@:_config=) ppc mpc824x cu824
472
473MOUSSE_config: unconfig
474 @./mkconfig $(@:_config=) ppc mpc824x mousse
475
476MUSENKI_config: unconfig
477 @./mkconfig $(@:_config=) ppc mpc824x musenki
478
479OXC_config: unconfig
480 @./mkconfig $(@:_config=) ppc mpc824x oxc
481
482PN62_config: unconfig
483 @./mkconfig $(@:_config=) ppc mpc824x pn62
484
485Sandpoint8240_config: unconfig
486 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
487
488Sandpoint8245_config: unconfig
489 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
490
491utx8245_config: unconfig
492 @./mkconfig $(@:_config=) ppc mpc824x utx8245
493
494#########################################################################
495## MPC8260 Systems
496#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000497
498cogent_mpc8260_config: unconfig
499 @./mkconfig $(@:_config=) ppc mpc8260 cogent
500
501CPU86_config \
502CPU86_ROMBOOT_config: unconfig
503 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
504 @cd ./include ; \
505 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
506 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
507 echo "... booting from 8-bit flash" ; \
508 else \
509 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
510 echo "... booting from 64-bit flash" ; \
511 fi; \
512 echo "export CONFIG_BOOT_ROM" >> config.mk;
513
514ep8260_config: unconfig
515 @./mkconfig $(@:_config=) ppc mpc8260 ep8260
516
517gw8260_config: unconfig
518 @./mkconfig $(@:_config=) ppc mpc8260 gw8260
519
520hymod_config: unconfig
521 @./mkconfig $(@:_config=) ppc mpc8260 hymod
522
523IPHASE4539_config: unconfig
524 @./mkconfig $(@:_config=) ppc mpc8260 iphase4539
525
526MPC8260ADS_config: unconfig
527 @./mkconfig $(@:_config=) ppc mpc8260 mpc8260ads
528
wdenkb666c8f2003-03-06 00:58:30 +0000529MPC8266ADS_config: unconfig
530 @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
531
wdenk4b57dcc2003-03-25 18:06:06 +0000532PM825_config \
533PM825_ROMBOOT_config: unconfig
534 @echo "#define CONFIG_PCI" >include/config.h
535 @./mkconfig -a PM826 ppc mpc8260 pm826
536 @cd ./include ; \
537 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
538 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
539 echo "... booting from 8-bit flash" ; \
540 else \
541 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
542 echo "... booting from 64-bit flash" ; \
543 fi; \
544 echo "export CONFIG_BOOT_ROM" >> config.mk; \
545
wdenk7ebf7442002-11-02 23:17:16 +0000546PM826_config \
547PM826_ROMBOOT_config: unconfig
548 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 pm826
549 @cd ./include ; \
550 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
551 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
552 echo "... booting from 8-bit flash" ; \
553 else \
554 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
555 echo "... booting from 64-bit flash" ; \
556 fi; \
557 echo "export CONFIG_BOOT_ROM" >> config.mk; \
558
559ppmc8260_config: unconfig
560 @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
561
562RPXsuper_config: unconfig
563 @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
564
565rsdproto_config: unconfig
566 @./mkconfig $(@:_config=) ppc mpc8260 rsdproto
567
568sacsng_config: unconfig
569 @./mkconfig $(@:_config=) ppc mpc8260 sacsng
570
571sbc8260_config: unconfig
572 @./mkconfig $(@:_config=) ppc mpc8260 sbc8260
573
574SCM_config: unconfig
575 @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
576
577TQM8260_config \
578TQM8260_L2_config \
579TQM8260_266MHz_config \
580TQM8260_L2_266MHz_config \
581TQM8260_300MHz_config: unconfig
582 @ >include/config.h
583 @if [ "$(findstring _L2_,$@)" ] ; then \
584 echo "#define CONFIG_L2_CACHE" >>include/config.h ; \
585 echo "... with L2 Cache support (60x Bus Mode)" ; \
586 else \
587 echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \
588 echo "... without L2 Cache support" ; \
589 fi
590 @[ -z "$(findstring _266MHz,$@)" ] || \
591 { echo "#define CONFIG_266MHz" >>include/config.h ; \
592 echo "... with 266MHz system clock" ; \
593 }
594 @[ -z "$(findstring _300MHz,$@)" ] || \
595 { echo "#define CONFIG_300MHz" >>include/config.h ; \
596 echo "... with 300MHz system clock" ; \
597 }
598 @./mkconfig -a $(call xtract_82xx,$@) ppc mpc8260 tqm8260
599
600#########################################################################
601## 74xx/7xx Systems
602#########################################################################
603
wdenk452cfd62002-11-19 11:04:11 +0000604AmigaOneG3SE_config: unconfig
605 @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
606
wdenk7ebf7442002-11-02 23:17:16 +0000607EVB64260_config \
608EVB64260_750CX_config: unconfig
609 @./mkconfig EVB64260 ppc 74xx_7xx evb64260
610
611ZUMA_config: unconfig
612 @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
613
614PCIPPC2_config \
615PCIPPC6_config: unconfig
616 @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
617
618BAB7xx_config: unconfig
619 @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
620
621ELPPC_config: unconfig
622 @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
623
624#========================================================================
625# ARM
626#========================================================================
627#########################################################################
628## StrongARM Systems
629#########################################################################
630
wdenkc8434db2003-03-26 06:55:25 +0000631at91rm9200dk_config : unconfig
632 @./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
633
wdenk7ebf7442002-11-02 23:17:16 +0000634lart_config : unconfig
635 @./mkconfig $(@:_config=) arm sa1100 lart
636
637dnp1110_config : unconfig
638 @./mkconfig $(@:_config=) arm sa1100 dnp1110
639
640shannon_config : unconfig
641 @./mkconfig $(@:_config=) arm sa1100 shannon
642
643#########################################################################
644## ARM920T Systems
645#########################################################################
646
wdenk4a5c8a72003-03-06 00:02:04 +0000647xtract_trab = $(subst _big_flash,,$(subst _config,,$1))
648
wdenk7ebf7442002-11-02 23:17:16 +0000649smdk2400_config : unconfig
650 @./mkconfig $(@:_config=) arm arm920t smdk2400
651
652smdk2410_config : unconfig
653 @./mkconfig $(@:_config=) arm arm920t smdk2410
654
wdenk4a5c8a72003-03-06 00:02:04 +0000655trab_config \
656trab_big_flash_config: unconfig
657 @ >include/config.h
658 @[ -z "$(findstring _big_flash,$@)" ] || \
659 { echo "#define CONFIG_BIG_FLASH" >>include/config.h ; \
660 echo "... with big flash support" ; \
661 }
662 @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
wdenk7ebf7442002-11-02 23:17:16 +0000663
wdenk1fe2c702003-03-06 21:55:29 +0000664VCMA9_config : unconfig
665 @./mkconfig $(@:_config=) arm arm920t vcma9 mpl
666
wdenk7ebf7442002-11-02 23:17:16 +0000667#########################################################################
668## ARM720T Systems
669#########################################################################
670
671impa7_config : unconfig
672 @./mkconfig $(@:_config=) arm arm720t impa7
673
674ep7312_config : unconfig
675 @./mkconfig $(@:_config=) arm arm720t ep7312
676
677#########################################################################
wdenk4a5c8a72003-03-06 00:02:04 +0000678## XScale Systems
wdenk7ebf7442002-11-02 23:17:16 +0000679#########################################################################
680
wdenk7ebf7442002-11-02 23:17:16 +0000681cradle_config : unconfig
682 @./mkconfig $(@:_config=) arm xscale cradle
683
684csb226_config : unconfig
685 @./mkconfig $(@:_config=) arm xscale csb226
686
wdenk4a5c8a72003-03-06 00:02:04 +0000687innokom_config : unconfig
688 @./mkconfig $(@:_config=) arm xscale innokom
689
690lubbock_config : unconfig
691 @./mkconfig $(@:_config=) arm xscale lubbock
692
wdenk591dda52002-11-18 00:14:45 +0000693#========================================================================
694# i386
695#========================================================================
696#########################################################################
wdenk1fe2c702003-03-06 21:55:29 +0000697## AMD SC520 CDP
wdenk591dda52002-11-18 00:14:45 +0000698#########################################################################
699sc520_cdp_config : unconfig
700 @./mkconfig $(@:_config=) i386 i386 sc520_cdp
701
wdenk4a5c8a72003-03-06 00:02:04 +0000702#========================================================================
703# MIPS
704#========================================================================
wdenk7ebf7442002-11-02 23:17:16 +0000705#########################################################################
wdenk4a5c8a72003-03-06 00:02:04 +0000706## MIPS32 4Kc
707#########################################################################
708
709incaip_config : unconfig
710 @./mkconfig $(@:_config=) mips mips incaip
711
712
wdenk7ebf7442002-11-02 23:17:16 +0000713
714clean:
715 find . -type f \
716 \( -name 'core' -o -name '*.bak' -o -name '*~' \
717 -o -name '*.o' -o -name '*.a' \) -print \
718 | xargs rm -f
719 rm -f examples/hello_world examples/timer examples/eepro100_eeprom
720 rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
721 rm -f tools/easylogo/easylogo tools/bmp_logo
722 rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
wdenk9dfa8d12002-12-08 09:53:23 +0000723 rm -f tools/env/fw_printenv tools/env/fw_setenv
wdenk7ebf7442002-11-02 23:17:16 +0000724
725clobber: clean
726 find . -type f \
727 \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
728 -print \
729 | xargs rm -f
730 rm -f $(OBJS) *.bak tags TAGS
731 rm -fr *.*~
732 rm -f u-boot u-boot.bin u-boot.elf u-boot.srec u-boot.map System.map
wdenk9dfa8d12002-12-08 09:53:23 +0000733 rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
wdenk4a5c8a72003-03-06 00:02:04 +0000734 rm -f cpu/mpc824x/bedbug_603e.c
wdenk7ebf7442002-11-02 23:17:16 +0000735 rm -f include/asm/arch include/asm
736
737mrproper \
738distclean: clobber unconfig
739
740backup:
741 F=`basename $(TOPDIR)` ; cd .. ; \
742 gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
743
744#########################################################################