blob: e755928d4c58c64bb08872bb788bdd3fe00c8fd5 [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)
wdenk7a8e9bed2003-05-31 18:35:21 +000063ifeq ($(HOSTARCH),i386)
64CROSS_COMPILE =
65else
66CROSS_COMPILE = i386-linux-
67endif
wdenk2262cfe2002-11-18 00:14:45 +000068endif
wdenk43d96162003-03-06 00:02:04 +000069ifeq ($(ARCH),mips)
70CROSS_COMPILE = mips_4KC-
71endif
wdenk7ebf7442002-11-02 23:17:16 +000072endif
73endif
74
75export CROSS_COMPILE
76
77# The "tools" are needed early, so put this first
78SUBDIRS = tools \
79 lib_generic \
80 lib_$(ARCH) \
81 cpu/$(CPU) \
82 board/$(BOARDDIR) \
83 common \
84 disk \
85 fs \
86 net \
87 rtc \
88 dtt \
89 drivers \
90 post \
91 post/cpu \
92 examples
93
94#########################################################################
95# U-Boot objects....order is important (i.e. start must be first)
96
97OBJS = cpu/$(CPU)/start.o
wdenk2262cfe2002-11-18 00:14:45 +000098ifeq ($(CPU),i386)
99OBJS += cpu/$(CPU)/start16.o
100OBJS += cpu/$(CPU)/reset.o
101endif
wdenk7ebf7442002-11-02 23:17:16 +0000102ifeq ($(CPU),ppc4xx)
103OBJS += cpu/$(CPU)/resetvec.o
104endif
105
106LIBS = board/$(BOARDDIR)/lib$(BOARD).a
107LIBS += cpu/$(CPU)/lib$(CPU).a
108LIBS += lib_$(ARCH)/lib$(ARCH).a
wdenk71f95112003-06-15 22:40:42 +0000109LIBS += fs/jffs2/libjffs2.a fs/fdos/libfdos.a fs/fat/libfat.a
wdenk7ebf7442002-11-02 23:17:16 +0000110LIBS += net/libnet.a
111LIBS += disk/libdisk.a
112LIBS += rtc/librtc.a
113LIBS += dtt/libdtt.a
114LIBS += drivers/libdrivers.a
115LIBS += post/libpost.a post/cpu/libcpu.a
116LIBS += common/libcommon.a
117LIBS += lib_generic/libgeneric.a
118
119#########################################################################
wdenkbdccc4f2003-08-05 17:43:17 +0000120#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000121
wdenkbdccc4f2003-08-05 17:43:17 +0000122ALL = u-boot.srec u-boot.bin System.map
wdenk7ebf7442002-11-02 23:17:16 +0000123
wdenkbdccc4f2003-08-05 17:43:17 +0000124all: $(ALL)
wdenk7ebf7442002-11-02 23:17:16 +0000125
126u-boot.srec: u-boot
127 $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
128
129u-boot.bin: u-boot
130 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
131
wdenkbdccc4f2003-08-05 17:43:17 +0000132u-boot.img: u-boot.bin
133 ./tools/mkimage -A $(ARCH) -T firmware -C none \
134 -a $(TEXT_BASE) -e 0 \
135 -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' include/version.h | \
136 sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \
137 -d $< $@
138
wdenk7ebf7442002-11-02 23:17:16 +0000139u-boot.dis: u-boot
140 $(OBJDUMP) -d $< > $@
141
142u-boot: depend subdirs $(OBJS) $(LIBS) $(LDSCRIPT)
wdenk8bde7f72003-06-27 21:31:46 +0000143 UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
144 $(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \
wdenkb2184c32002-11-19 23:01:07 +0000145 --start-group $(LIBS) --end-group \
146 -Map u-boot.map -o u-boot
wdenk7ebf7442002-11-02 23:17:16 +0000147
148subdirs:
149 @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir || exit 1 ; done
150
dzu8f713fd2003-08-07 14:20:31 +0000151gdbtools:
152 $(MAKE) -C tools/gdb || exit 1
153
wdenk7ebf7442002-11-02 23:17:16 +0000154depend dep:
155 @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
156
157tags:
158 ctags -w `find $(SUBDIRS) include \
159 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
160
161etags:
162 etags -a `find $(SUBDIRS) include \
163 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
164
165System.map: u-boot
166 @$(NM) $< | \
167 grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
168 sort > System.map
169
170#########################################################################
171else
172all install u-boot u-boot.srec depend dep:
173 @echo "System not configured - see README" >&2
174 @ exit 1
175endif
176
177#########################################################################
178
179unconfig:
180 rm -f include/config.h include/config.mk
181
182#========================================================================
183# PowerPC
184#========================================================================
wdenk0db5bca2003-03-31 17:27:09 +0000185
186#########################################################################
187## MPC5xx Systems
188#########################################################################
189
190cmi_mpc5xx_config: unconfig
191 @./mkconfig $(@:_config=) ppc mpc5xx cmi
192
wdenk7ebf7442002-11-02 23:17:16 +0000193#########################################################################
wdenk945af8d2003-07-16 21:53:01 +0000194## MPC5xxx Systems
195#########################################################################
196IceCube_5200_config \
197IceCube_5100_config: unconfig
198 @ >include/config.h
199 @[ -z "$(findstring _5200,$@)" ] || \
200 { echo "#define CONFIG_MPC5200" >>include/config.h ; \
201 echo "... with MPC5200 processor" ; \
202 }
203 @[ -z "$(findstring _5100,$@)" ] || \
204 { echo "#define CONFIG_MGT5100" >>include/config.h ; \
205 echo "... with MGT5100 processor" ; \
206 }
207 @./mkconfig -a IceCube ppc mpc5xxx icecube
208
209#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000210## MPC8xx Systems
211#########################################################################
212
wdenk0cb61d72003-08-30 00:05:50 +0000213AdderII_config: unconfig
214 @./mkconfig $(@:_config=) ppc mpc8xx adderII
215
wdenk7ebf7442002-11-02 23:17:16 +0000216ADS860_config: unconfig
217 @./mkconfig $(@:_config=) ppc mpc8xx fads
218
219AMX860_config : unconfig
220 @./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
221
222c2mon_config: unconfig
223 @./mkconfig $(@:_config=) ppc mpc8xx c2mon
224
225CCM_config: unconfig
226 @./mkconfig $(@:_config=) ppc mpc8xx CCM siemens
227
228cogent_mpc8xx_config: unconfig
229 @./mkconfig $(@:_config=) ppc mpc8xx cogent
230
wdenk3bac3512003-03-12 10:41:04 +0000231ELPT860_config: unconfig
232 @./mkconfig $(@:_config=) ppc mpc8xx elpt860 LEOX
233
wdenk7ebf7442002-11-02 23:17:16 +0000234ESTEEM192E_config: unconfig
235 @./mkconfig $(@:_config=) ppc mpc8xx esteem192e
236
237ETX094_config : unconfig
238 @./mkconfig $(@:_config=) ppc mpc8xx etx094
239
240FADS823_config \
241FADS850SAR_config \
wdenk2535d602003-07-17 23:16:40 +0000242MPC86xADS_config \
wdenk7ebf7442002-11-02 23:17:16 +0000243FADS860T_config: unconfig
244 @./mkconfig $(@:_config=) ppc mpc8xx fads
245
246FLAGADM_config: unconfig
247 @./mkconfig $(@:_config=) ppc mpc8xx flagadm
248
wdenk7aa78612003-05-03 15:50:43 +0000249xtract_GEN860T = $(subst _SC,,$(subst _config,,$1))
250
251GEN860T_SC_config \
wdenk7ebf7442002-11-02 23:17:16 +0000252GEN860T_config: unconfig
wdenk7aa78612003-05-03 15:50:43 +0000253 @ >include/config.h
254 @[ -z "$(findstring _SC,$@)" ] || \
255 { echo "#define CONFIG_SC" >>include/config.h ; \
256 echo "With reduced H/W feature set (SC)..." ; \
257 }
258 @./mkconfig -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t
wdenk7ebf7442002-11-02 23:17:16 +0000259
260GENIETV_config: unconfig
261 @./mkconfig $(@:_config=) ppc mpc8xx genietv
262
263GTH_config: unconfig
264 @./mkconfig $(@:_config=) ppc mpc8xx gth
265
266hermes_config : unconfig
267 @./mkconfig $(@:_config=) ppc mpc8xx hermes
268
269IAD210_config: unconfig
270 @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
271
272xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
273
274ICU862_100MHz_config \
275ICU862_config: unconfig
276 @ >include/config.h
277 @[ -z "$(findstring _100MHz,$@)" ] || \
278 { echo "#define CONFIG_100MHz" >>include/config.h ; \
279 echo "... with 100MHz system clock" ; \
280 }
281 @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
282
283IP860_config : unconfig
284 @./mkconfig $(@:_config=) ppc mpc8xx ip860
285
286IVML24_256_config \
287IVML24_128_config \
288IVML24_config: unconfig
289 @ >include/config.h
290 @[ -z "$(findstring IVML24_config,$@)" ] || \
291 { echo "#define CONFIG_IVML24_16M" >>include/config.h ; \
292 }
293 @[ -z "$(findstring IVML24_128_config,$@)" ] || \
294 { echo "#define CONFIG_IVML24_32M" >>include/config.h ; \
295 }
296 @[ -z "$(findstring IVML24_256_config,$@)" ] || \
297 { echo "#define CONFIG_IVML24_64M" >>include/config.h ; \
298 }
299 @./mkconfig -a IVML24 ppc mpc8xx ivm
300
301IVMS8_256_config \
302IVMS8_128_config \
303IVMS8_config: unconfig
304 @ >include/config.h
305 @[ -z "$(findstring IVMS8_config,$@)" ] || \
306 { echo "#define CONFIG_IVMS8_16M" >>include/config.h ; \
307 }
308 @[ -z "$(findstring IVMS8_128_config,$@)" ] || \
309 { echo "#define CONFIG_IVMS8_32M" >>include/config.h ; \
310 }
311 @[ -z "$(findstring IVMS8_256_config,$@)" ] || \
312 { echo "#define CONFIG_IVMS8_64M" >>include/config.h ; \
313 }
314 @./mkconfig -a IVMS8 ppc mpc8xx ivm
315
wdenk56f94be2002-11-05 16:35:14 +0000316KUP4K_config : unconfig
317 @./mkconfig $(@:_config=) ppc mpc8xx kup4k
318
wdenk7ebf7442002-11-02 23:17:16 +0000319LANTEC_config : unconfig
320 @./mkconfig $(@:_config=) ppc mpc8xx lantec
321
322lwmon_config: unconfig
323 @./mkconfig $(@:_config=) ppc mpc8xx lwmon
324
325MBX_config \
326MBX860T_config: unconfig
327 @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
328
329MHPC_config: unconfig
330 @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
331
332MVS1_config : unconfig
333 @./mkconfig $(@:_config=) ppc mpc8xx mvs1
334
wdenk993cad92003-06-26 22:04:09 +0000335xtract_NETVIA = $(subst _V2,,$(subst _config,,$1))
336
337NETVIA_V2_config \
wdenk7ebf7442002-11-02 23:17:16 +0000338NETVIA_config: unconfig
wdenk993cad92003-06-26 22:04:09 +0000339 @ >include/config.h
340 @[ -z "$(findstring NETVIA_config,$@)" ] || \
341 { echo "#define CONFIG_NETVIA_VERSION 1" >>include/config.h ; \
342 echo "... Version 1" ; \
343 }
344 @[ -z "$(findstring NETVIA_V2_config,$@)" ] || \
345 { echo "#define CONFIG_NETVIA_VERSION 2" >>include/config.h ; \
346 echo "... Version 2" ; \
347 }
348 @./mkconfig -a $(call xtract_NETVIA,$@) ppc mpc8xx netvia
wdenk7ebf7442002-11-02 23:17:16 +0000349
350NX823_config: unconfig
351 @./mkconfig $(@:_config=) ppc mpc8xx nx823
352
353pcu_e_config: unconfig
354 @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
355
356R360MPI_config: unconfig
357 @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
358
wdenk682011f2003-06-03 23:54:09 +0000359RBC823_config: unconfig
360 @./mkconfig $(@:_config=) ppc mpc8xx rbc823
361
wdenk7ebf7442002-11-02 23:17:16 +0000362RPXClassic_config: unconfig
363 @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
364
365RPXlite_config: unconfig
366 @./mkconfig $(@:_config=) ppc mpc8xx RPXlite
367
wdenk73a8b272003-06-05 19:27:42 +0000368rmu_config: unconfig
369 @./mkconfig $(@:_config=) ppc mpc8xx rmu
370
wdenk7ebf7442002-11-02 23:17:16 +0000371RRvision_config: unconfig
372 @./mkconfig $(@:_config=) ppc mpc8xx RRvision
373
374RRvision_LCD_config: unconfig
375 @echo "#define CONFIG_LCD" >include/config.h
376 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
377 @./mkconfig -a RRvision ppc mpc8xx RRvision
378
379SM850_config : unconfig
380 @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
381
382SPD823TS_config: unconfig
383 @./mkconfig $(@:_config=) ppc mpc8xx spd8xx
384
wdenkdc7c9a12003-03-26 06:55:25 +0000385svm_sc8xx_config: unconfig
386 @ >include/config.h
387 @./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
388
wdenk7ebf7442002-11-02 23:17:16 +0000389SXNI855T_config: unconfig
390 @./mkconfig $(@:_config=) ppc mpc8xx sixnet
391
wdenkdb2f721f2003-03-06 00:58:30 +0000392# EMK MPC8xx based modules
393TOP860_config: unconfig
394 @./mkconfig $(@:_config=) ppc mpc8xx top860 emk
395
wdenk7ebf7442002-11-02 23:17:16 +0000396# Play some tricks for configuration selection
wdenk73a8b272003-06-05 19:27:42 +0000397# All boards can come with 50 MHz (default), 66MHz, 80MHz or 100 MHz clock,
wdenk7ebf7442002-11-02 23:17:16 +0000398# but only 855 and 860 boards may come with FEC
399# and 823 boards may have LCD support
wdenk73a8b272003-06-05 19:27:42 +0000400xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _100MHz,,$(subst _LCD,,$(subst _config,,$1)))))
wdenk7ebf7442002-11-02 23:17:16 +0000401
402FPS850L_config \
wdenk384ae022002-11-05 00:17:55 +0000403FPS860L_config \
wdenkf12e5682003-07-07 20:07:54 +0000404NSCU_config \
wdenk7ebf7442002-11-02 23:17:16 +0000405TQM823L_config \
406TQM823L_66MHz_config \
407TQM823L_80MHz_config \
408TQM823L_LCD_config \
409TQM823L_LCD_66MHz_config \
410TQM823L_LCD_80MHz_config \
411TQM850L_config \
412TQM850L_66MHz_config \
413TQM850L_80MHz_config \
414TQM855L_config \
415TQM855L_66MHz_config \
416TQM855L_80MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000417TQM860L_config \
418TQM860L_66MHz_config \
419TQM860L_80MHz_config \
wdenkd126bfb2003-04-10 11:18:18 +0000420TQM862L_config \
421TQM862L_66MHz_config \
wdenk73a8b272003-06-05 19:27:42 +0000422TQM862L_80MHz_config \
wdenkae3af052003-08-07 22:18:11 +0000423TQM823M_config \
424TQM823M_66MHz_config \
425TQM823M_80MHz_config \
426TQM850M_config \
427TQM850M_66MHz_config \
428TQM850M_80MHz_config \
wdenkf12e5682003-07-07 20:07:54 +0000429TQM855M_config \
430TQM855M_66MHz_config \
431TQM855M_80MHz_config \
432TQM860M_config \
433TQM860M_66MHz_config \
434TQM860M_80MHz_config \
435TQM862M_config \
436TQM862M_66MHz_config \
437TQM862M_80MHz_config \
wdenk71f95112003-06-15 22:40:42 +0000438TQM862M_100MHz_config: unconfig
wdenk7ebf7442002-11-02 23:17:16 +0000439 @ >include/config.h
wdenk7ebf7442002-11-02 23:17:16 +0000440 @[ -z "$(findstring _66MHz,$@)" ] || \
441 { echo "#define CONFIG_66MHz" >>include/config.h ; \
442 echo "... with 66MHz system clock" ; \
443 }
444 @[ -z "$(findstring _80MHz,$@)" ] || \
445 { echo "#define CONFIG_80MHz" >>include/config.h ; \
446 echo "... with 80MHz system clock" ; \
447 }
wdenk73a8b272003-06-05 19:27:42 +0000448 @[ -z "$(findstring _100MHz,$@)" ] || \
449 { echo "#define CONFIG_100MHz" >>include/config.h ; \
450 echo "... with 100MHz system clock" ; \
451 }
wdenk7ebf7442002-11-02 23:17:16 +0000452 @[ -z "$(findstring _LCD,$@)" ] || \
453 { echo "#define CONFIG_LCD" >>include/config.h ; \
454 echo "#define CONFIG_NEC_NL6648BC20" >>include/config.h ; \
455 echo "... with LCD display" ; \
456 }
457 @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
458
459TTTech_config: unconfig
460 @echo "#define CONFIG_LCD" >include/config.h
461 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
462 @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
463
wdenk608c9142003-01-13 23:54:46 +0000464v37_config: unconfig
465 @echo "#define CONFIG_LCD" >include/config.h
466 @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
467 @./mkconfig $(@:_config=) ppc mpc8xx v37
468
wdenk7ebf7442002-11-02 23:17:16 +0000469#########################################################################
470## PPC4xx Systems
471#########################################################################
472
473ADCIOP_config: unconfig
474 @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
475
476AR405_config: unconfig
477 @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
478
stroese549826e2003-05-23 11:41:44 +0000479ASH405_config: unconfig
480 @./mkconfig $(@:_config=) ppc ppc4xx ash405 esd
481
482BUBINGA405EP_config:unconfig
483 @./mkconfig $(@:_config=) ppc ppc4xx bubinga405ep
484
wdenk7ebf7442002-11-02 23:17:16 +0000485CANBT_config: unconfig
486 @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
487
stroese549826e2003-05-23 11:41:44 +0000488CPCI405_config \
489CPCI4052_config \
490CPCI405AB_config: unconfig
wdenk7ebf7442002-11-02 23:17:16 +0000491 @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
492 @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk
493
494CPCI440_config: unconfig
495 @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
496
497CPCIISER4_config: unconfig
498 @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
499
500CRAYL1_config:unconfig
501 @./mkconfig $(@:_config=) ppc ppc4xx L1 cray
502
503DASA_SIM_config: unconfig
504 @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
505
506DU405_config: unconfig
507 @./mkconfig $(@:_config=) ppc ppc4xx du405 esd
508
509EBONY_config:unconfig
510 @./mkconfig $(@:_config=) ppc ppc4xx ebony
511
512ERIC_config:unconfig
513 @./mkconfig $(@:_config=) ppc ppc4xx eric
514
wdenkd1cbe852003-06-28 17:24:46 +0000515EXBITGEN_config:unconfig
516 @./mkconfig $(@:_config=) ppc ppc4xx exbitgen
517
wdenk7ebf7442002-11-02 23:17:16 +0000518MIP405_config:unconfig
519 @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
520
wdenkf3e0de62003-06-04 15:05:30 +0000521MIP405T_config:unconfig
522 @echo "#define CONFIG_MIP405T" >include/config.h
523 @echo "Enable subset config for MIP405T"
524 @./mkconfig -a MIP405 ppc ppc4xx mip405 mpl
525
wdenk7ebf7442002-11-02 23:17:16 +0000526ML2_config:unconfig
527 @./mkconfig $(@:_config=) ppc ppc4xx ml2
528
529OCRTC_config \
530ORSG_config: unconfig
531 @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
532
533PCI405_config: unconfig
534 @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
535
536PIP405_config:unconfig
537 @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
538
stroese549826e2003-05-23 11:41:44 +0000539PMC405_config: unconfig
540 @./mkconfig $(@:_config=) ppc ppc4xx pmc405 esd
541
wdenk12f34242003-09-02 22:48:03 +0000542PPChameleonEVB_config: unconfig
543 @./mkconfig $(@:_config=) ppc ppc4xx PPChameleonEVB dave
544
wdenk7ebf7442002-11-02 23:17:16 +0000545W7OLMC_config \
546W7OLMG_config: unconfig
547 @./mkconfig $(@:_config=) ppc ppc4xx w7o
548
549WALNUT405_config:unconfig
550 @./mkconfig $(@:_config=) ppc ppc4xx walnut405
551
552#########################################################################
553## MPC824x Systems
554#########################################################################
wdenk3bac3512003-03-12 10:41:04 +0000555xtract_82xx = $(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1)))))
556
wdenk03329902003-06-20 22:36:30 +0000557A3000_config: unconfig
558 @./mkconfig $(@:_config=) ppc mpc824x a3000
559
wdenk7ebf7442002-11-02 23:17:16 +0000560BMW_config: unconfig
561 @./mkconfig $(@:_config=) ppc mpc824x bmw
562
wdenk3bac3512003-03-12 10:41:04 +0000563CPC45_config \
564CPC45_ROMBOOT_config: unconfig
565 @./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
566 @cd ./include ; \
567 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
568 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
569 echo "... booting from 8-bit flash" ; \
570 else \
571 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
572 echo "... booting from 64-bit flash" ; \
573 fi; \
574 echo "export CONFIG_BOOT_ROM" >> config.mk;
575
wdenk7ebf7442002-11-02 23:17:16 +0000576CU824_config: unconfig
577 @./mkconfig $(@:_config=) ppc mpc824x cu824
578
579MOUSSE_config: unconfig
580 @./mkconfig $(@:_config=) ppc mpc824x mousse
581
582MUSENKI_config: unconfig
583 @./mkconfig $(@:_config=) ppc mpc824x musenki
584
585OXC_config: unconfig
586 @./mkconfig $(@:_config=) ppc mpc824x oxc
587
588PN62_config: unconfig
589 @./mkconfig $(@:_config=) ppc mpc824x pn62
590
591Sandpoint8240_config: unconfig
592 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
593
594Sandpoint8245_config: unconfig
595 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
596
wdenkd1cbe852003-06-28 17:24:46 +0000597SL8245_config: unconfig
598 @./mkconfig $(@:_config=) ppc mpc824x sl8245
599
wdenk7ebf7442002-11-02 23:17:16 +0000600utx8245_config: unconfig
601 @./mkconfig $(@:_config=) ppc mpc824x utx8245
602
603#########################################################################
604## MPC8260 Systems
605#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000606
607cogent_mpc8260_config: unconfig
608 @./mkconfig $(@:_config=) ppc mpc8260 cogent
609
610CPU86_config \
611CPU86_ROMBOOT_config: unconfig
612 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
613 @cd ./include ; \
614 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
615 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
616 echo "... booting from 8-bit flash" ; \
617 else \
618 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
619 echo "... booting from 64-bit flash" ; \
620 fi; \
621 echo "export CONFIG_BOOT_ROM" >> config.mk;
622
623ep8260_config: unconfig
624 @./mkconfig $(@:_config=) ppc mpc8260 ep8260
625
626gw8260_config: unconfig
627 @./mkconfig $(@:_config=) ppc mpc8260 gw8260
628
629hymod_config: unconfig
630 @./mkconfig $(@:_config=) ppc mpc8260 hymod
631
632IPHASE4539_config: unconfig
633 @./mkconfig $(@:_config=) ppc mpc8260 iphase4539
634
635MPC8260ADS_config: unconfig
636 @./mkconfig $(@:_config=) ppc mpc8260 mpc8260ads
637
wdenkdb2f721f2003-03-06 00:58:30 +0000638MPC8266ADS_config: unconfig
639 @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
640
wdenk10f67012003-03-25 18:06:06 +0000641PM825_config \
642PM825_ROMBOOT_config: unconfig
643 @echo "#define CONFIG_PCI" >include/config.h
644 @./mkconfig -a PM826 ppc mpc8260 pm826
645 @cd ./include ; \
646 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
647 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
648 echo "... booting from 8-bit flash" ; \
649 else \
650 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
651 echo "... booting from 64-bit flash" ; \
652 fi; \
653 echo "export CONFIG_BOOT_ROM" >> config.mk; \
654
wdenk7ebf7442002-11-02 23:17:16 +0000655PM826_config \
656PM826_ROMBOOT_config: unconfig
657 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 pm826
658 @cd ./include ; \
659 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
660 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
661 echo "... booting from 8-bit flash" ; \
662 else \
663 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
664 echo "... booting from 64-bit flash" ; \
665 fi; \
666 echo "export CONFIG_BOOT_ROM" >> config.mk; \
667
668ppmc8260_config: unconfig
669 @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
670
671RPXsuper_config: unconfig
672 @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
673
674rsdproto_config: unconfig
675 @./mkconfig $(@:_config=) ppc mpc8260 rsdproto
676
677sacsng_config: unconfig
678 @./mkconfig $(@:_config=) ppc mpc8260 sacsng
679
680sbc8260_config: unconfig
681 @./mkconfig $(@:_config=) ppc mpc8260 sbc8260
682
683SCM_config: unconfig
684 @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
685
wdenk27b207f2003-07-24 23:38:38 +0000686TQM8255_AA_config \
687TQM8260_AA_config \
688TQM8260_AB_config \
689TQM8260_AC_config \
690TQM8260_AD_config \
691TQM8260_AE_config \
692TQM8260_AF_config \
693TQM8260_AG_config \
694TQM8260_AH_config \
695TQM8265_AA_config: unconfig
696 @case "$@" in \
697 TQM8255_AA_config) CTYPE=MPC8255; CFREQ=300; CACHE=no; BMODE=8260;; \
698 TQM8260_AA_config) CTYPE=MPC8260; CFREQ=200; CACHE=no; BMODE=8260;; \
699 TQM8260_AB_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;; \
700 TQM8260_AC_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;; \
701 TQM8260_AD_config) CTYPE=MPC8260; CFREQ=300; CACHE=no; BMODE=60x;; \
702 TQM8260_AE_config) CTYPE=MPC8260; CFREQ=266; CACHE=no; BMODE=8260;; \
703 TQM8260_AF_config) CTYPE=MPC8260; CFREQ=300; CACHE=no; BMODE=60x;; \
704 TQM8260_AG_config) CTYPE=MPC8260; CFREQ=300; CACHE=no; BMODE=8260;; \
705 TQM8260_AH_config) CTYPE=MPC8260; CFREQ=300; CACHE=yes; BMODE=60x;; \
706 TQM8265_AA_config) CTYPE=MPC8265; CFREQ=300; CACHE=no; BMODE=60x;; \
707 esac; \
708 >include/config.h ; \
709 if [ "$${CTYPE}" != "MPC8260" ] ; then \
710 echo "#define CONFIG_$${CTYPE}" >>include/config.h ; \
711 fi; \
712 echo "#define CONFIG_$${CFREQ}MHz" >>include/config.h ; \
713 echo "... with $${CFREQ}MHz system clock" ; \
714 if [ "$${CACHE}" == "yes" ] ; then \
wdenk7ebf7442002-11-02 23:17:16 +0000715 echo "#define CONFIG_L2_CACHE" >>include/config.h ; \
wdenk27b207f2003-07-24 23:38:38 +0000716 echo "... with L2 Cache support" ; \
wdenk7ebf7442002-11-02 23:17:16 +0000717 else \
718 echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \
719 echo "... without L2 Cache support" ; \
wdenk27b207f2003-07-24 23:38:38 +0000720 fi; \
721 if [ "$${BMODE}" == "60x" ] ; then \
722 echo "#define CONFIG_BUSMODE_60x" >>include/config.h ; \
723 echo "... with 60x Bus Mode" ; \
724 else \
725 echo "#undef CONFIG_BUSMODE_60x" >>include/config.h ; \
726 echo "... without 60x Bus Mode" ; \
wdenk7ebf7442002-11-02 23:17:16 +0000727 fi
wdenk4532cb62003-04-27 22:52:51 +0000728 @./mkconfig -a TQM8260 ppc mpc8260 tqm8260
wdenk7ebf7442002-11-02 23:17:16 +0000729
wdenk7aa78612003-05-03 15:50:43 +0000730atc_config: unconfig
731 @./mkconfig $(@:_config=) ppc mpc8260 atc
732
wdenk7ebf7442002-11-02 23:17:16 +0000733#########################################################################
734## 74xx/7xx Systems
735#########################################################################
736
wdenkc7de8292002-11-19 11:04:11 +0000737AmigaOneG3SE_config: unconfig
738 @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
739
wdenk7ebf7442002-11-02 23:17:16 +0000740EVB64260_config \
741EVB64260_750CX_config: unconfig
742 @./mkconfig EVB64260 ppc 74xx_7xx evb64260
743
744ZUMA_config: unconfig
745 @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
746
747PCIPPC2_config \
748PCIPPC6_config: unconfig
749 @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
750
751BAB7xx_config: unconfig
752 @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
753
754ELPPC_config: unconfig
755 @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
756
wdenk12f34242003-09-02 22:48:03 +0000757P3G4_config: unconfig
758 @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
759
wdenk7ebf7442002-11-02 23:17:16 +0000760#========================================================================
761# ARM
762#========================================================================
763#########################################################################
764## StrongARM Systems
765#########################################################################
766
wdenkdc7c9a12003-03-26 06:55:25 +0000767at91rm9200dk_config : unconfig
768 @./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
769
wdenk7ebf7442002-11-02 23:17:16 +0000770lart_config : unconfig
771 @./mkconfig $(@:_config=) arm sa1100 lart
772
773dnp1110_config : unconfig
774 @./mkconfig $(@:_config=) arm sa1100 dnp1110
775
776shannon_config : unconfig
777 @./mkconfig $(@:_config=) arm sa1100 shannon
778
779#########################################################################
wdenk2e5983d2003-07-15 20:04:06 +0000780## ARM92xT Systems
wdenk7ebf7442002-11-02 23:17:16 +0000781#########################################################################
782
wdenk43d96162003-03-06 00:02:04 +0000783xtract_trab = $(subst _big_flash,,$(subst _config,,$1))
784
wdenk2e5983d2003-07-15 20:04:06 +0000785omap1510inn_config : unconfig
786 @./mkconfig $(@:_config=) arm arm925t omap1510inn
787
wdenk6f213472003-08-29 22:00:43 +0000788omap1610inn_config : unconfig
789 @./mkconfig $(@:_config=) arm arm926ejs omap1610inn
790
wdenk7ebf7442002-11-02 23:17:16 +0000791smdk2400_config : unconfig
792 @./mkconfig $(@:_config=) arm arm920t smdk2400
793
794smdk2410_config : unconfig
795 @./mkconfig $(@:_config=) arm arm920t smdk2410
796
wdenk43d96162003-03-06 00:02:04 +0000797trab_config \
798trab_big_flash_config: unconfig
799 @ >include/config.h
800 @[ -z "$(findstring _big_flash,$@)" ] || \
801 { echo "#define CONFIG_BIG_FLASH" >>include/config.h ; \
802 echo "... with big flash support" ; \
803 }
804 @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
wdenk7ebf7442002-11-02 23:17:16 +0000805
wdenk1cb8e982003-03-06 21:55:29 +0000806VCMA9_config : unconfig
807 @./mkconfig $(@:_config=) arm arm920t vcma9 mpl
808
wdenk7ebf7442002-11-02 23:17:16 +0000809#########################################################################
810## ARM720T Systems
811#########################################################################
812
813impa7_config : unconfig
814 @./mkconfig $(@:_config=) arm arm720t impa7
815
816ep7312_config : unconfig
817 @./mkconfig $(@:_config=) arm arm720t ep7312
818
819#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000820## XScale Systems
wdenk7ebf7442002-11-02 23:17:16 +0000821#########################################################################
822
wdenk7ebf7442002-11-02 23:17:16 +0000823cradle_config : unconfig
wdenk8bde7f72003-06-27 21:31:46 +0000824 @./mkconfig $(@:_config=) arm pxa cradle
wdenk7ebf7442002-11-02 23:17:16 +0000825
826csb226_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000827 @./mkconfig $(@:_config=) arm pxa csb226
wdenk7ebf7442002-11-02 23:17:16 +0000828
wdenk43d96162003-03-06 00:02:04 +0000829innokom_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000830 @./mkconfig $(@:_config=) arm pxa innokom
wdenk43d96162003-03-06 00:02:04 +0000831
832lubbock_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000833 @./mkconfig $(@:_config=) arm pxa lubbock
wdenk43d96162003-03-06 00:02:04 +0000834
wdenk52f52c12003-06-19 23:04:19 +0000835logodl_config : unconfig
836 @./mkconfig $(@:_config=) arm pxa logodl
837
wdenk3e386912003-04-05 00:53:31 +0000838wepep250_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000839 @./mkconfig $(@:_config=) arm pxa wepep250
wdenk3e386912003-04-05 00:53:31 +0000840
wdenk2262cfe2002-11-18 00:14:45 +0000841#========================================================================
842# i386
843#========================================================================
844#########################################################################
wdenk1cb8e982003-03-06 21:55:29 +0000845## AMD SC520 CDP
wdenk2262cfe2002-11-18 00:14:45 +0000846#########################################################################
847sc520_cdp_config : unconfig
848 @./mkconfig $(@:_config=) i386 i386 sc520_cdp
849
wdenk7a8e9bed2003-05-31 18:35:21 +0000850sc520_spunk_config : unconfig
851 @./mkconfig $(@:_config=) i386 i386 sc520_spunk
852
853sc520_spunk_rel_config : unconfig
854 @./mkconfig $(@:_config=) i386 i386 sc520_spunk
855
wdenk43d96162003-03-06 00:02:04 +0000856#========================================================================
857# MIPS
858#========================================================================
wdenk7ebf7442002-11-02 23:17:16 +0000859#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000860## MIPS32 4Kc
861#########################################################################
862
wdenke0ac62d2003-08-17 18:55:18 +0000863xtract_incaip = $(subst _100MHz,,$(subst _133MHz,,$(subst _150MHz,,$(subst _config,,$1))))
864
865incaip_100MHz_config \
866incaip_133MHz_config \
867incaip_150MHz_config \
868incaip_config: unconfig
869 @ >include/config.h
870 @[ -z "$(findstring _100MHz,$@)" ] || \
871 { echo "#define CPU_CLOCK_RATE 100000000" >>include/config.h ; \
872 echo "... with 100MHz system clock" ; \
873 }
874 @[ -z "$(findstring _133MHz,$@)" ] || \
875 { echo "#define CPU_CLOCK_RATE 133000000" >>include/config.h ; \
876 echo "... with 133MHz system clock" ; \
877 }
878 @[ -z "$(findstring _150MHz,$@)" ] || \
879 { echo "#define CPU_CLOCK_RATE 150000000" >>include/config.h ; \
880 echo "... with 150MHz system clock" ; \
881 }
882 @./mkconfig -a $(call xtract_incaip,$@) mips mips incaip
883
884#########################################################################
885## MIPS64 5Kc
886#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000887
wdenk3e386912003-04-05 00:53:31 +0000888purple_config : unconfig
889 @./mkconfig $(@:_config=) mips mips purple
wdenk43d96162003-03-06 00:02:04 +0000890
wdenk3e386912003-04-05 00:53:31 +0000891#########################################################################
892#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000893
894clean:
895 find . -type f \
896 \( -name 'core' -o -name '*.bak' -o -name '*~' \
897 -o -name '*.o' -o -name '*.a' \) -print \
898 | xargs rm -f
wdenk85ec0bc2003-03-31 16:34:49 +0000899 rm -f examples/hello_world examples/timer \
wdenk3e386912003-04-05 00:53:31 +0000900 examples/eepro100_eeprom examples/sched \
wdenk7a8e9bed2003-05-31 18:35:21 +0000901 examples/mem_to_mem_idma2intr examples/82559_eeprom
902
wdenk7ebf7442002-11-02 23:17:16 +0000903 rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
904 rm -f tools/easylogo/easylogo tools/bmp_logo
905 rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
wdenk228f29a2002-12-08 09:53:23 +0000906 rm -f tools/env/fw_printenv tools/env/fw_setenv
wdenk7f70e852003-05-20 14:25:27 +0000907 rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
wdenk7ebf7442002-11-02 23:17:16 +0000908
909clobber: clean
910 find . -type f \
911 \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
912 -print \
913 | xargs rm -f
914 rm -f $(OBJS) *.bak tags TAGS
915 rm -fr *.*~
wdenkbdccc4f2003-08-05 17:43:17 +0000916 rm -f u-boot u-boot.map $(ALL)
wdenk228f29a2002-12-08 09:53:23 +0000917 rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
wdenk3e386912003-04-05 00:53:31 +0000918 rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
wdenkb783eda2003-06-25 22:26:29 +0000919 rm -f include/asm/proc include/asm/arch include/asm
wdenk7ebf7442002-11-02 23:17:16 +0000920
921mrproper \
922distclean: clobber unconfig
923
924backup:
925 F=`basename $(TOPDIR)` ; cd .. ; \
926 gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
927
928#########################################################################