blob: 3e66bf0b2af0abced768914666d96360d54c01bd [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
wdenk7aa78612003-05-03 15:50:43 +0000215xtract_GEN860T = $(subst _SC,,$(subst _config,,$1))
216
217GEN860T_SC_config \
wdenk7ebf7442002-11-02 23:17:16 +0000218GEN860T_config: unconfig
wdenk7aa78612003-05-03 15:50:43 +0000219 @ >include/config.h
220 @[ -z "$(findstring _SC,$@)" ] || \
221 { echo "#define CONFIG_SC" >>include/config.h ; \
222 echo "With reduced H/W feature set (SC)..." ; \
223 }
224 @./mkconfig -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t
wdenk7ebf7442002-11-02 23:17:16 +0000225
226GENIETV_config: unconfig
227 @./mkconfig $(@:_config=) ppc mpc8xx genietv
228
229GTH_config: unconfig
230 @./mkconfig $(@:_config=) ppc mpc8xx gth
231
232hermes_config : unconfig
233 @./mkconfig $(@:_config=) ppc mpc8xx hermes
234
235IAD210_config: unconfig
236 @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
237
238xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
239
240ICU862_100MHz_config \
241ICU862_config: unconfig
242 @ >include/config.h
243 @[ -z "$(findstring _100MHz,$@)" ] || \
244 { echo "#define CONFIG_100MHz" >>include/config.h ; \
245 echo "... with 100MHz system clock" ; \
246 }
247 @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
248
249IP860_config : unconfig
250 @./mkconfig $(@:_config=) ppc mpc8xx ip860
251
252IVML24_256_config \
253IVML24_128_config \
254IVML24_config: unconfig
255 @ >include/config.h
256 @[ -z "$(findstring IVML24_config,$@)" ] || \
257 { echo "#define CONFIG_IVML24_16M" >>include/config.h ; \
258 }
259 @[ -z "$(findstring IVML24_128_config,$@)" ] || \
260 { echo "#define CONFIG_IVML24_32M" >>include/config.h ; \
261 }
262 @[ -z "$(findstring IVML24_256_config,$@)" ] || \
263 { echo "#define CONFIG_IVML24_64M" >>include/config.h ; \
264 }
265 @./mkconfig -a IVML24 ppc mpc8xx ivm
266
267IVMS8_256_config \
268IVMS8_128_config \
269IVMS8_config: unconfig
270 @ >include/config.h
271 @[ -z "$(findstring IVMS8_config,$@)" ] || \
272 { echo "#define CONFIG_IVMS8_16M" >>include/config.h ; \
273 }
274 @[ -z "$(findstring IVMS8_128_config,$@)" ] || \
275 { echo "#define CONFIG_IVMS8_32M" >>include/config.h ; \
276 }
277 @[ -z "$(findstring IVMS8_256_config,$@)" ] || \
278 { echo "#define CONFIG_IVMS8_64M" >>include/config.h ; \
279 }
280 @./mkconfig -a IVMS8 ppc mpc8xx ivm
281
wdenk56f94be2002-11-05 16:35:14 +0000282KUP4K_config : unconfig
283 @./mkconfig $(@:_config=) ppc mpc8xx kup4k
284
wdenk7ebf7442002-11-02 23:17:16 +0000285LANTEC_config : unconfig
286 @./mkconfig $(@:_config=) ppc mpc8xx lantec
287
288lwmon_config: unconfig
289 @./mkconfig $(@:_config=) ppc mpc8xx lwmon
290
291MBX_config \
292MBX860T_config: unconfig
293 @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
294
295MHPC_config: unconfig
296 @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
297
298MVS1_config : unconfig
299 @./mkconfig $(@:_config=) ppc mpc8xx mvs1
300
301NETVIA_config: unconfig
302 @./mkconfig $(@:_config=) ppc mpc8xx netvia
303
304NX823_config: unconfig
305 @./mkconfig $(@:_config=) ppc mpc8xx nx823
306
307pcu_e_config: unconfig
308 @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
309
310R360MPI_config: unconfig
311 @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
312
313RPXClassic_config: unconfig
314 @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
315
316RPXlite_config: unconfig
317 @./mkconfig $(@:_config=) ppc mpc8xx RPXlite
318
319RRvision_config: unconfig
320 @./mkconfig $(@:_config=) ppc mpc8xx RRvision
321
322RRvision_LCD_config: unconfig
323 @echo "#define CONFIG_LCD" >include/config.h
324 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
325 @./mkconfig -a RRvision ppc mpc8xx RRvision
326
327SM850_config : unconfig
328 @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
329
330SPD823TS_config: unconfig
331 @./mkconfig $(@:_config=) ppc mpc8xx spd8xx
332
wdenkdc7c9a12003-03-26 06:55:25 +0000333svm_sc8xx_config: unconfig
334 @ >include/config.h
335 @./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
336
wdenk7ebf7442002-11-02 23:17:16 +0000337SXNI855T_config: unconfig
338 @./mkconfig $(@:_config=) ppc mpc8xx sixnet
339
wdenkdb2f721f2003-03-06 00:58:30 +0000340# EMK MPC8xx based modules
341TOP860_config: unconfig
342 @./mkconfig $(@:_config=) ppc mpc8xx top860 emk
343
wdenk7ebf7442002-11-02 23:17:16 +0000344# Play some tricks for configuration selection
345# All boards can come with 50 MHz (default), 66MHz or 80MHz clock,
346# but only 855 and 860 boards may come with FEC
347# and 823 boards may have LCD support
wdenk824a1eb2003-04-20 16:49:37 +0000348xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _LCD,,$(subst _config,,$1))))
wdenk7ebf7442002-11-02 23:17:16 +0000349
350FPS850L_config \
wdenk384ae022002-11-05 00:17:55 +0000351FPS860L_config \
wdenk7ebf7442002-11-02 23:17:16 +0000352TQM823L_config \
353TQM823L_66MHz_config \
354TQM823L_80MHz_config \
355TQM823L_LCD_config \
356TQM823L_LCD_66MHz_config \
357TQM823L_LCD_80MHz_config \
358TQM850L_config \
359TQM850L_66MHz_config \
360TQM850L_80MHz_config \
361TQM855L_config \
362TQM855L_66MHz_config \
363TQM855L_80MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000364TQM860L_config \
365TQM860L_66MHz_config \
366TQM860L_80MHz_config \
wdenkd126bfb2003-04-10 11:18:18 +0000367TQM862L_config \
368TQM862L_66MHz_config \
369TQM862L_80MHz_config: unconfig
wdenk7ebf7442002-11-02 23:17:16 +0000370 @ >include/config.h
wdenk7ebf7442002-11-02 23:17:16 +0000371 @[ -z "$(findstring _66MHz,$@)" ] || \
372 { echo "#define CONFIG_66MHz" >>include/config.h ; \
373 echo "... with 66MHz system clock" ; \
374 }
375 @[ -z "$(findstring _80MHz,$@)" ] || \
376 { echo "#define CONFIG_80MHz" >>include/config.h ; \
377 echo "... with 80MHz system clock" ; \
378 }
379 @[ -z "$(findstring _LCD,$@)" ] || \
380 { echo "#define CONFIG_LCD" >>include/config.h ; \
381 echo "#define CONFIG_NEC_NL6648BC20" >>include/config.h ; \
382 echo "... with LCD display" ; \
383 }
384 @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
385
386TTTech_config: unconfig
387 @echo "#define CONFIG_LCD" >include/config.h
388 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
389 @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
390
wdenk608c9142003-01-13 23:54:46 +0000391v37_config: unconfig
392 @echo "#define CONFIG_LCD" >include/config.h
393 @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
394 @./mkconfig $(@:_config=) ppc mpc8xx v37
395
wdenk7ebf7442002-11-02 23:17:16 +0000396#########################################################################
397## PPC4xx Systems
398#########################################################################
399
400ADCIOP_config: unconfig
401 @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
402
403AR405_config: unconfig
404 @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
405
stroese549826e2003-05-23 11:41:44 +0000406ASH405_config: unconfig
407 @./mkconfig $(@:_config=) ppc ppc4xx ash405 esd
408
409BUBINGA405EP_config:unconfig
410 @./mkconfig $(@:_config=) ppc ppc4xx bubinga405ep
411
wdenk7ebf7442002-11-02 23:17:16 +0000412CANBT_config: unconfig
413 @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
414
stroese549826e2003-05-23 11:41:44 +0000415CPCI405_config \
416CPCI4052_config \
417CPCI405AB_config: unconfig
wdenk7ebf7442002-11-02 23:17:16 +0000418 @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
419 @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk
420
421CPCI440_config: unconfig
422 @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
423
424CPCIISER4_config: unconfig
425 @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
426
427CRAYL1_config:unconfig
428 @./mkconfig $(@:_config=) ppc ppc4xx L1 cray
429
430DASA_SIM_config: unconfig
431 @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
432
433DU405_config: unconfig
434 @./mkconfig $(@:_config=) ppc ppc4xx du405 esd
435
436EBONY_config:unconfig
437 @./mkconfig $(@:_config=) ppc ppc4xx ebony
438
439ERIC_config:unconfig
440 @./mkconfig $(@:_config=) ppc ppc4xx eric
441
442MIP405_config:unconfig
443 @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
444
445ML2_config:unconfig
446 @./mkconfig $(@:_config=) ppc ppc4xx ml2
447
448OCRTC_config \
449ORSG_config: unconfig
450 @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
451
452PCI405_config: unconfig
453 @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
454
455PIP405_config:unconfig
456 @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
457
stroese549826e2003-05-23 11:41:44 +0000458PMC405_config: unconfig
459 @./mkconfig $(@:_config=) ppc ppc4xx pmc405 esd
460
wdenk7ebf7442002-11-02 23:17:16 +0000461W7OLMC_config \
462W7OLMG_config: unconfig
463 @./mkconfig $(@:_config=) ppc ppc4xx w7o
464
465WALNUT405_config:unconfig
466 @./mkconfig $(@:_config=) ppc ppc4xx walnut405
467
468#########################################################################
469## MPC824x Systems
470#########################################################################
wdenk3bac3512003-03-12 10:41:04 +0000471xtract_82xx = $(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1)))))
472
wdenk7ebf7442002-11-02 23:17:16 +0000473BMW_config: unconfig
474 @./mkconfig $(@:_config=) ppc mpc824x bmw
475
wdenk3bac3512003-03-12 10:41:04 +0000476CPC45_config \
477CPC45_ROMBOOT_config: unconfig
478 @./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
479 @cd ./include ; \
480 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
481 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
482 echo "... booting from 8-bit flash" ; \
483 else \
484 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
485 echo "... booting from 64-bit flash" ; \
486 fi; \
487 echo "export CONFIG_BOOT_ROM" >> config.mk;
488
wdenk7ebf7442002-11-02 23:17:16 +0000489CU824_config: unconfig
490 @./mkconfig $(@:_config=) ppc mpc824x cu824
491
492MOUSSE_config: unconfig
493 @./mkconfig $(@:_config=) ppc mpc824x mousse
494
495MUSENKI_config: unconfig
496 @./mkconfig $(@:_config=) ppc mpc824x musenki
497
498OXC_config: unconfig
499 @./mkconfig $(@:_config=) ppc mpc824x oxc
500
501PN62_config: unconfig
502 @./mkconfig $(@:_config=) ppc mpc824x pn62
503
504Sandpoint8240_config: unconfig
505 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
506
507Sandpoint8245_config: unconfig
508 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
509
510utx8245_config: unconfig
511 @./mkconfig $(@:_config=) ppc mpc824x utx8245
512
513#########################################################################
514## MPC8260 Systems
515#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000516
517cogent_mpc8260_config: unconfig
518 @./mkconfig $(@:_config=) ppc mpc8260 cogent
519
520CPU86_config \
521CPU86_ROMBOOT_config: unconfig
522 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
523 @cd ./include ; \
524 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
525 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
526 echo "... booting from 8-bit flash" ; \
527 else \
528 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
529 echo "... booting from 64-bit flash" ; \
530 fi; \
531 echo "export CONFIG_BOOT_ROM" >> config.mk;
532
533ep8260_config: unconfig
534 @./mkconfig $(@:_config=) ppc mpc8260 ep8260
535
536gw8260_config: unconfig
537 @./mkconfig $(@:_config=) ppc mpc8260 gw8260
538
539hymod_config: unconfig
540 @./mkconfig $(@:_config=) ppc mpc8260 hymod
541
542IPHASE4539_config: unconfig
543 @./mkconfig $(@:_config=) ppc mpc8260 iphase4539
544
545MPC8260ADS_config: unconfig
546 @./mkconfig $(@:_config=) ppc mpc8260 mpc8260ads
547
wdenkdb2f721f2003-03-06 00:58:30 +0000548MPC8266ADS_config: unconfig
549 @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
550
wdenk10f67012003-03-25 18:06:06 +0000551PM825_config \
552PM825_ROMBOOT_config: unconfig
553 @echo "#define CONFIG_PCI" >include/config.h
554 @./mkconfig -a PM826 ppc mpc8260 pm826
555 @cd ./include ; \
556 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
557 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
558 echo "... booting from 8-bit flash" ; \
559 else \
560 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
561 echo "... booting from 64-bit flash" ; \
562 fi; \
563 echo "export CONFIG_BOOT_ROM" >> config.mk; \
564
wdenk7ebf7442002-11-02 23:17:16 +0000565PM826_config \
566PM826_ROMBOOT_config: unconfig
567 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 pm826
568 @cd ./include ; \
569 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
570 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
571 echo "... booting from 8-bit flash" ; \
572 else \
573 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
574 echo "... booting from 64-bit flash" ; \
575 fi; \
576 echo "export CONFIG_BOOT_ROM" >> config.mk; \
577
578ppmc8260_config: unconfig
579 @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
580
581RPXsuper_config: unconfig
582 @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
583
584rsdproto_config: unconfig
585 @./mkconfig $(@:_config=) ppc mpc8260 rsdproto
586
587sacsng_config: unconfig
588 @./mkconfig $(@:_config=) ppc mpc8260 sacsng
589
590sbc8260_config: unconfig
591 @./mkconfig $(@:_config=) ppc mpc8260 sbc8260
592
593SCM_config: unconfig
594 @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
595
wdenk7aa78612003-05-03 15:50:43 +0000596TQM8255_config \
wdenk7ebf7442002-11-02 23:17:16 +0000597TQM8260_config \
598TQM8260_L2_config \
wdenk4532cb62003-04-27 22:52:51 +0000599TQM8255_266MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000600TQM8260_266MHz_config \
601TQM8260_L2_266MHz_config \
wdenk7aa78612003-05-03 15:50:43 +0000602TQM8255_300MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000603TQM8260_300MHz_config: unconfig
604 @ >include/config.h
605 @if [ "$(findstring _L2_,$@)" ] ; then \
606 echo "#define CONFIG_L2_CACHE" >>include/config.h ; \
607 echo "... with L2 Cache support (60x Bus Mode)" ; \
608 else \
609 echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \
610 echo "... without L2 Cache support" ; \
611 fi
612 @[ -z "$(findstring _266MHz,$@)" ] || \
613 { echo "#define CONFIG_266MHz" >>include/config.h ; \
614 echo "... with 266MHz system clock" ; \
615 }
616 @[ -z "$(findstring _300MHz,$@)" ] || \
617 { echo "#define CONFIG_300MHz" >>include/config.h ; \
618 echo "... with 300MHz system clock" ; \
619 }
wdenk4532cb62003-04-27 22:52:51 +0000620 @[ -z "$(findstring TQM8255_,$@)" ] || \
621 { echo "#define CONFIG_MPC8255" >>include/config.h ; }
622 @./mkconfig -a TQM8260 ppc mpc8260 tqm8260
wdenk7ebf7442002-11-02 23:17:16 +0000623
wdenk7aa78612003-05-03 15:50:43 +0000624atc_config: unconfig
625 @./mkconfig $(@:_config=) ppc mpc8260 atc
626
wdenk7ebf7442002-11-02 23:17:16 +0000627#########################################################################
628## 74xx/7xx Systems
629#########################################################################
630
wdenkc7de8292002-11-19 11:04:11 +0000631AmigaOneG3SE_config: unconfig
632 @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
633
wdenk7ebf7442002-11-02 23:17:16 +0000634EVB64260_config \
635EVB64260_750CX_config: unconfig
636 @./mkconfig EVB64260 ppc 74xx_7xx evb64260
637
638ZUMA_config: unconfig
639 @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
640
641PCIPPC2_config \
642PCIPPC6_config: unconfig
643 @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
644
645BAB7xx_config: unconfig
646 @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
647
648ELPPC_config: unconfig
649 @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
650
651#========================================================================
652# ARM
653#========================================================================
654#########################################################################
655## StrongARM Systems
656#########################################################################
657
wdenkdc7c9a12003-03-26 06:55:25 +0000658at91rm9200dk_config : unconfig
659 @./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
660
wdenk7ebf7442002-11-02 23:17:16 +0000661lart_config : unconfig
662 @./mkconfig $(@:_config=) arm sa1100 lart
663
664dnp1110_config : unconfig
665 @./mkconfig $(@:_config=) arm sa1100 dnp1110
666
667shannon_config : unconfig
668 @./mkconfig $(@:_config=) arm sa1100 shannon
669
670#########################################################################
671## ARM920T Systems
672#########################################################################
673
wdenk43d96162003-03-06 00:02:04 +0000674xtract_trab = $(subst _big_flash,,$(subst _config,,$1))
675
wdenk7ebf7442002-11-02 23:17:16 +0000676smdk2400_config : unconfig
677 @./mkconfig $(@:_config=) arm arm920t smdk2400
678
679smdk2410_config : unconfig
680 @./mkconfig $(@:_config=) arm arm920t smdk2410
681
wdenk43d96162003-03-06 00:02:04 +0000682trab_config \
683trab_big_flash_config: unconfig
684 @ >include/config.h
685 @[ -z "$(findstring _big_flash,$@)" ] || \
686 { echo "#define CONFIG_BIG_FLASH" >>include/config.h ; \
687 echo "... with big flash support" ; \
688 }
689 @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
wdenk7ebf7442002-11-02 23:17:16 +0000690
wdenk1cb8e982003-03-06 21:55:29 +0000691VCMA9_config : unconfig
692 @./mkconfig $(@:_config=) arm arm920t vcma9 mpl
693
wdenk7ebf7442002-11-02 23:17:16 +0000694#########################################################################
695## ARM720T Systems
696#########################################################################
697
698impa7_config : unconfig
699 @./mkconfig $(@:_config=) arm arm720t impa7
700
701ep7312_config : unconfig
702 @./mkconfig $(@:_config=) arm arm720t ep7312
703
704#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000705## XScale Systems
wdenk7ebf7442002-11-02 23:17:16 +0000706#########################################################################
707
wdenk7ebf7442002-11-02 23:17:16 +0000708cradle_config : unconfig
709 @./mkconfig $(@:_config=) arm xscale cradle
710
711csb226_config : unconfig
712 @./mkconfig $(@:_config=) arm xscale csb226
713
wdenk43d96162003-03-06 00:02:04 +0000714innokom_config : unconfig
715 @./mkconfig $(@:_config=) arm xscale innokom
716
717lubbock_config : unconfig
718 @./mkconfig $(@:_config=) arm xscale lubbock
719
wdenk3e386912003-04-05 00:53:31 +0000720wepep250_config : unconfig
721 @./mkconfig $(@:_config=) arm xscale wepep250
722
wdenk2262cfe2002-11-18 00:14:45 +0000723#========================================================================
724# i386
725#========================================================================
726#########################################################################
wdenk1cb8e982003-03-06 21:55:29 +0000727## AMD SC520 CDP
wdenk2262cfe2002-11-18 00:14:45 +0000728#########################################################################
729sc520_cdp_config : unconfig
730 @./mkconfig $(@:_config=) i386 i386 sc520_cdp
731
wdenk43d96162003-03-06 00:02:04 +0000732#========================================================================
733# MIPS
734#========================================================================
wdenk7ebf7442002-11-02 23:17:16 +0000735#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000736## MIPS32 4Kc
737#########################################################################
738
739incaip_config : unconfig
740 @./mkconfig $(@:_config=) mips mips incaip
741
wdenk3e386912003-04-05 00:53:31 +0000742purple_config : unconfig
743 @./mkconfig $(@:_config=) mips mips purple
wdenk43d96162003-03-06 00:02:04 +0000744
wdenk3e386912003-04-05 00:53:31 +0000745#########################################################################
746#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000747
748clean:
749 find . -type f \
750 \( -name 'core' -o -name '*.bak' -o -name '*~' \
751 -o -name '*.o' -o -name '*.a' \) -print \
752 | xargs rm -f
wdenk85ec0bc2003-03-31 16:34:49 +0000753 rm -f examples/hello_world examples/timer \
wdenk3e386912003-04-05 00:53:31 +0000754 examples/eepro100_eeprom examples/sched \
755 examples/mem_to_mem_idma2intr
wdenk7ebf7442002-11-02 23:17:16 +0000756 rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
757 rm -f tools/easylogo/easylogo tools/bmp_logo
758 rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
wdenk228f29a2002-12-08 09:53:23 +0000759 rm -f tools/env/fw_printenv tools/env/fw_setenv
wdenk7f70e852003-05-20 14:25:27 +0000760 rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
wdenk7ebf7442002-11-02 23:17:16 +0000761
762clobber: clean
763 find . -type f \
764 \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
765 -print \
766 | xargs rm -f
767 rm -f $(OBJS) *.bak tags TAGS
768 rm -fr *.*~
wdenkd126bfb2003-04-10 11:18:18 +0000769 rm -f u-boot u-boot.bin u-boot.srec u-boot.map System.map
wdenk228f29a2002-12-08 09:53:23 +0000770 rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
wdenk3e386912003-04-05 00:53:31 +0000771 rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
wdenk7ebf7442002-11-02 23:17:16 +0000772 rm -f include/asm/arch include/asm
773
774mrproper \
775distclean: clobber unconfig
776
777backup:
778 F=`basename $(TOPDIR)` ; cd .. ; \
779 gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
780
781#########################################################################