blob: c4bb10c2cf886c668c30e525f0e204fbf5878450 [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
151depend dep:
152 @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
153
154tags:
155 ctags -w `find $(SUBDIRS) include \
156 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
157
158etags:
159 etags -a `find $(SUBDIRS) include \
160 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
161
162System.map: u-boot
163 @$(NM) $< | \
164 grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
165 sort > System.map
166
167#########################################################################
168else
169all install u-boot u-boot.srec depend dep:
170 @echo "System not configured - see README" >&2
171 @ exit 1
172endif
173
174#########################################################################
175
176unconfig:
177 rm -f include/config.h include/config.mk
178
179#========================================================================
180# PowerPC
181#========================================================================
wdenk0db5bca2003-03-31 17:27:09 +0000182
183#########################################################################
184## MPC5xx Systems
185#########################################################################
186
187cmi_mpc5xx_config: unconfig
188 @./mkconfig $(@:_config=) ppc mpc5xx cmi
189
wdenk7ebf7442002-11-02 23:17:16 +0000190#########################################################################
wdenk945af8d2003-07-16 21:53:01 +0000191## MPC5xxx Systems
192#########################################################################
193IceCube_5200_config \
194IceCube_5100_config: unconfig
195 @ >include/config.h
196 @[ -z "$(findstring _5200,$@)" ] || \
197 { echo "#define CONFIG_MPC5200" >>include/config.h ; \
198 echo "... with MPC5200 processor" ; \
199 }
200 @[ -z "$(findstring _5100,$@)" ] || \
201 { echo "#define CONFIG_MGT5100" >>include/config.h ; \
202 echo "... with MGT5100 processor" ; \
203 }
204 @./mkconfig -a IceCube ppc mpc5xxx icecube
205
206#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000207## MPC8xx Systems
208#########################################################################
209
210ADS860_config: unconfig
211 @./mkconfig $(@:_config=) ppc mpc8xx fads
212
213AMX860_config : unconfig
214 @./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
215
216c2mon_config: unconfig
217 @./mkconfig $(@:_config=) ppc mpc8xx c2mon
218
219CCM_config: unconfig
220 @./mkconfig $(@:_config=) ppc mpc8xx CCM siemens
221
222cogent_mpc8xx_config: unconfig
223 @./mkconfig $(@:_config=) ppc mpc8xx cogent
224
wdenk3bac3512003-03-12 10:41:04 +0000225ELPT860_config: unconfig
226 @./mkconfig $(@:_config=) ppc mpc8xx elpt860 LEOX
227
wdenk7ebf7442002-11-02 23:17:16 +0000228ESTEEM192E_config: unconfig
229 @./mkconfig $(@:_config=) ppc mpc8xx esteem192e
230
231ETX094_config : unconfig
232 @./mkconfig $(@:_config=) ppc mpc8xx etx094
233
234FADS823_config \
235FADS850SAR_config \
wdenk2535d602003-07-17 23:16:40 +0000236MPC86xADS_config \
wdenk7ebf7442002-11-02 23:17:16 +0000237FADS860T_config: unconfig
238 @./mkconfig $(@:_config=) ppc mpc8xx fads
239
240FLAGADM_config: unconfig
241 @./mkconfig $(@:_config=) ppc mpc8xx flagadm
242
wdenk7aa78612003-05-03 15:50:43 +0000243xtract_GEN860T = $(subst _SC,,$(subst _config,,$1))
244
245GEN860T_SC_config \
wdenk7ebf7442002-11-02 23:17:16 +0000246GEN860T_config: unconfig
wdenk7aa78612003-05-03 15:50:43 +0000247 @ >include/config.h
248 @[ -z "$(findstring _SC,$@)" ] || \
249 { echo "#define CONFIG_SC" >>include/config.h ; \
250 echo "With reduced H/W feature set (SC)..." ; \
251 }
252 @./mkconfig -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t
wdenk7ebf7442002-11-02 23:17:16 +0000253
254GENIETV_config: unconfig
255 @./mkconfig $(@:_config=) ppc mpc8xx genietv
256
257GTH_config: unconfig
258 @./mkconfig $(@:_config=) ppc mpc8xx gth
259
260hermes_config : unconfig
261 @./mkconfig $(@:_config=) ppc mpc8xx hermes
262
263IAD210_config: unconfig
264 @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
265
266xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
267
268ICU862_100MHz_config \
269ICU862_config: unconfig
270 @ >include/config.h
271 @[ -z "$(findstring _100MHz,$@)" ] || \
272 { echo "#define CONFIG_100MHz" >>include/config.h ; \
273 echo "... with 100MHz system clock" ; \
274 }
275 @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
276
277IP860_config : unconfig
278 @./mkconfig $(@:_config=) ppc mpc8xx ip860
279
280IVML24_256_config \
281IVML24_128_config \
282IVML24_config: unconfig
283 @ >include/config.h
284 @[ -z "$(findstring IVML24_config,$@)" ] || \
285 { echo "#define CONFIG_IVML24_16M" >>include/config.h ; \
286 }
287 @[ -z "$(findstring IVML24_128_config,$@)" ] || \
288 { echo "#define CONFIG_IVML24_32M" >>include/config.h ; \
289 }
290 @[ -z "$(findstring IVML24_256_config,$@)" ] || \
291 { echo "#define CONFIG_IVML24_64M" >>include/config.h ; \
292 }
293 @./mkconfig -a IVML24 ppc mpc8xx ivm
294
295IVMS8_256_config \
296IVMS8_128_config \
297IVMS8_config: unconfig
298 @ >include/config.h
299 @[ -z "$(findstring IVMS8_config,$@)" ] || \
300 { echo "#define CONFIG_IVMS8_16M" >>include/config.h ; \
301 }
302 @[ -z "$(findstring IVMS8_128_config,$@)" ] || \
303 { echo "#define CONFIG_IVMS8_32M" >>include/config.h ; \
304 }
305 @[ -z "$(findstring IVMS8_256_config,$@)" ] || \
306 { echo "#define CONFIG_IVMS8_64M" >>include/config.h ; \
307 }
308 @./mkconfig -a IVMS8 ppc mpc8xx ivm
309
wdenk56f94be2002-11-05 16:35:14 +0000310KUP4K_config : unconfig
311 @./mkconfig $(@:_config=) ppc mpc8xx kup4k
312
wdenk7ebf7442002-11-02 23:17:16 +0000313LANTEC_config : unconfig
314 @./mkconfig $(@:_config=) ppc mpc8xx lantec
315
316lwmon_config: unconfig
317 @./mkconfig $(@:_config=) ppc mpc8xx lwmon
318
319MBX_config \
320MBX860T_config: unconfig
321 @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
322
323MHPC_config: unconfig
324 @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
325
326MVS1_config : unconfig
327 @./mkconfig $(@:_config=) ppc mpc8xx mvs1
328
wdenk993cad92003-06-26 22:04:09 +0000329xtract_NETVIA = $(subst _V2,,$(subst _config,,$1))
330
331NETVIA_V2_config \
wdenk7ebf7442002-11-02 23:17:16 +0000332NETVIA_config: unconfig
wdenk993cad92003-06-26 22:04:09 +0000333 @ >include/config.h
334 @[ -z "$(findstring NETVIA_config,$@)" ] || \
335 { echo "#define CONFIG_NETVIA_VERSION 1" >>include/config.h ; \
336 echo "... Version 1" ; \
337 }
338 @[ -z "$(findstring NETVIA_V2_config,$@)" ] || \
339 { echo "#define CONFIG_NETVIA_VERSION 2" >>include/config.h ; \
340 echo "... Version 2" ; \
341 }
342 @./mkconfig -a $(call xtract_NETVIA,$@) ppc mpc8xx netvia
wdenk7ebf7442002-11-02 23:17:16 +0000343
344NX823_config: unconfig
345 @./mkconfig $(@:_config=) ppc mpc8xx nx823
346
347pcu_e_config: unconfig
348 @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
349
350R360MPI_config: unconfig
351 @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
352
wdenk682011f2003-06-03 23:54:09 +0000353RBC823_config: unconfig
354 @./mkconfig $(@:_config=) ppc mpc8xx rbc823
355
wdenk7ebf7442002-11-02 23:17:16 +0000356RPXClassic_config: unconfig
357 @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
358
359RPXlite_config: unconfig
360 @./mkconfig $(@:_config=) ppc mpc8xx RPXlite
361
wdenk73a8b272003-06-05 19:27:42 +0000362rmu_config: unconfig
363 @./mkconfig $(@:_config=) ppc mpc8xx rmu
364
wdenk7ebf7442002-11-02 23:17:16 +0000365RRvision_config: unconfig
366 @./mkconfig $(@:_config=) ppc mpc8xx RRvision
367
368RRvision_LCD_config: unconfig
369 @echo "#define CONFIG_LCD" >include/config.h
370 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
371 @./mkconfig -a RRvision ppc mpc8xx RRvision
372
373SM850_config : unconfig
374 @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
375
376SPD823TS_config: unconfig
377 @./mkconfig $(@:_config=) ppc mpc8xx spd8xx
378
wdenkdc7c9a12003-03-26 06:55:25 +0000379svm_sc8xx_config: unconfig
380 @ >include/config.h
381 @./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
382
wdenk7ebf7442002-11-02 23:17:16 +0000383SXNI855T_config: unconfig
384 @./mkconfig $(@:_config=) ppc mpc8xx sixnet
385
wdenkdb2f721f2003-03-06 00:58:30 +0000386# EMK MPC8xx based modules
387TOP860_config: unconfig
388 @./mkconfig $(@:_config=) ppc mpc8xx top860 emk
389
wdenk7ebf7442002-11-02 23:17:16 +0000390# Play some tricks for configuration selection
wdenk73a8b272003-06-05 19:27:42 +0000391# All boards can come with 50 MHz (default), 66MHz, 80MHz or 100 MHz clock,
wdenk7ebf7442002-11-02 23:17:16 +0000392# but only 855 and 860 boards may come with FEC
393# and 823 boards may have LCD support
wdenk73a8b272003-06-05 19:27:42 +0000394xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _100MHz,,$(subst _LCD,,$(subst _config,,$1)))))
wdenk7ebf7442002-11-02 23:17:16 +0000395
396FPS850L_config \
wdenk384ae022002-11-05 00:17:55 +0000397FPS860L_config \
wdenkf12e5682003-07-07 20:07:54 +0000398NSCU_config \
wdenk7ebf7442002-11-02 23:17:16 +0000399TQM823L_config \
400TQM823L_66MHz_config \
401TQM823L_80MHz_config \
402TQM823L_LCD_config \
403TQM823L_LCD_66MHz_config \
404TQM823L_LCD_80MHz_config \
405TQM850L_config \
406TQM850L_66MHz_config \
407TQM850L_80MHz_config \
408TQM855L_config \
409TQM855L_66MHz_config \
410TQM855L_80MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000411TQM860L_config \
412TQM860L_66MHz_config \
413TQM860L_80MHz_config \
wdenkd126bfb2003-04-10 11:18:18 +0000414TQM862L_config \
415TQM862L_66MHz_config \
wdenk73a8b272003-06-05 19:27:42 +0000416TQM862L_80MHz_config \
wdenkf12e5682003-07-07 20:07:54 +0000417TQM855M_config \
418TQM855M_66MHz_config \
419TQM855M_80MHz_config \
420TQM860M_config \
421TQM860M_66MHz_config \
422TQM860M_80MHz_config \
423TQM862M_config \
424TQM862M_66MHz_config \
425TQM862M_80MHz_config \
wdenk71f95112003-06-15 22:40:42 +0000426TQM862M_100MHz_config: unconfig
wdenk7ebf7442002-11-02 23:17:16 +0000427 @ >include/config.h
wdenk7ebf7442002-11-02 23:17:16 +0000428 @[ -z "$(findstring _66MHz,$@)" ] || \
429 { echo "#define CONFIG_66MHz" >>include/config.h ; \
430 echo "... with 66MHz system clock" ; \
431 }
432 @[ -z "$(findstring _80MHz,$@)" ] || \
433 { echo "#define CONFIG_80MHz" >>include/config.h ; \
434 echo "... with 80MHz system clock" ; \
435 }
wdenk73a8b272003-06-05 19:27:42 +0000436 @[ -z "$(findstring _100MHz,$@)" ] || \
437 { echo "#define CONFIG_100MHz" >>include/config.h ; \
438 echo "... with 100MHz system clock" ; \
439 }
wdenk7ebf7442002-11-02 23:17:16 +0000440 @[ -z "$(findstring _LCD,$@)" ] || \
441 { echo "#define CONFIG_LCD" >>include/config.h ; \
442 echo "#define CONFIG_NEC_NL6648BC20" >>include/config.h ; \
443 echo "... with LCD display" ; \
444 }
445 @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
446
447TTTech_config: unconfig
448 @echo "#define CONFIG_LCD" >include/config.h
449 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
450 @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
451
wdenk608c9142003-01-13 23:54:46 +0000452v37_config: unconfig
453 @echo "#define CONFIG_LCD" >include/config.h
454 @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
455 @./mkconfig $(@:_config=) ppc mpc8xx v37
456
wdenk7ebf7442002-11-02 23:17:16 +0000457#########################################################################
458## PPC4xx Systems
459#########################################################################
460
461ADCIOP_config: unconfig
462 @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
463
464AR405_config: unconfig
465 @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
466
stroese549826e2003-05-23 11:41:44 +0000467ASH405_config: unconfig
468 @./mkconfig $(@:_config=) ppc ppc4xx ash405 esd
469
470BUBINGA405EP_config:unconfig
471 @./mkconfig $(@:_config=) ppc ppc4xx bubinga405ep
472
wdenk7ebf7442002-11-02 23:17:16 +0000473CANBT_config: unconfig
474 @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
475
stroese549826e2003-05-23 11:41:44 +0000476CPCI405_config \
477CPCI4052_config \
478CPCI405AB_config: unconfig
wdenk7ebf7442002-11-02 23:17:16 +0000479 @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
480 @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk
481
482CPCI440_config: unconfig
483 @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
484
485CPCIISER4_config: unconfig
486 @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
487
488CRAYL1_config:unconfig
489 @./mkconfig $(@:_config=) ppc ppc4xx L1 cray
490
491DASA_SIM_config: unconfig
492 @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
493
494DU405_config: unconfig
495 @./mkconfig $(@:_config=) ppc ppc4xx du405 esd
496
497EBONY_config:unconfig
498 @./mkconfig $(@:_config=) ppc ppc4xx ebony
499
500ERIC_config:unconfig
501 @./mkconfig $(@:_config=) ppc ppc4xx eric
502
wdenkd1cbe852003-06-28 17:24:46 +0000503EXBITGEN_config:unconfig
504 @./mkconfig $(@:_config=) ppc ppc4xx exbitgen
505
wdenk7ebf7442002-11-02 23:17:16 +0000506MIP405_config:unconfig
507 @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
508
wdenkf3e0de62003-06-04 15:05:30 +0000509MIP405T_config:unconfig
510 @echo "#define CONFIG_MIP405T" >include/config.h
511 @echo "Enable subset config for MIP405T"
512 @./mkconfig -a MIP405 ppc ppc4xx mip405 mpl
513
wdenk7ebf7442002-11-02 23:17:16 +0000514ML2_config:unconfig
515 @./mkconfig $(@:_config=) ppc ppc4xx ml2
516
517OCRTC_config \
518ORSG_config: unconfig
519 @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
520
521PCI405_config: unconfig
522 @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
523
524PIP405_config:unconfig
525 @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
526
stroese549826e2003-05-23 11:41:44 +0000527PMC405_config: unconfig
528 @./mkconfig $(@:_config=) ppc ppc4xx pmc405 esd
529
wdenk7ebf7442002-11-02 23:17:16 +0000530W7OLMC_config \
531W7OLMG_config: unconfig
532 @./mkconfig $(@:_config=) ppc ppc4xx w7o
533
534WALNUT405_config:unconfig
535 @./mkconfig $(@:_config=) ppc ppc4xx walnut405
536
537#########################################################################
538## MPC824x Systems
539#########################################################################
wdenk3bac3512003-03-12 10:41:04 +0000540xtract_82xx = $(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1)))))
541
wdenk03329902003-06-20 22:36:30 +0000542A3000_config: unconfig
543 @./mkconfig $(@:_config=) ppc mpc824x a3000
544
wdenk7ebf7442002-11-02 23:17:16 +0000545BMW_config: unconfig
546 @./mkconfig $(@:_config=) ppc mpc824x bmw
547
wdenk3bac3512003-03-12 10:41:04 +0000548CPC45_config \
549CPC45_ROMBOOT_config: unconfig
550 @./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
551 @cd ./include ; \
552 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
553 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
554 echo "... booting from 8-bit flash" ; \
555 else \
556 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
557 echo "... booting from 64-bit flash" ; \
558 fi; \
559 echo "export CONFIG_BOOT_ROM" >> config.mk;
560
wdenk7ebf7442002-11-02 23:17:16 +0000561CU824_config: unconfig
562 @./mkconfig $(@:_config=) ppc mpc824x cu824
563
564MOUSSE_config: unconfig
565 @./mkconfig $(@:_config=) ppc mpc824x mousse
566
567MUSENKI_config: unconfig
568 @./mkconfig $(@:_config=) ppc mpc824x musenki
569
570OXC_config: unconfig
571 @./mkconfig $(@:_config=) ppc mpc824x oxc
572
573PN62_config: unconfig
574 @./mkconfig $(@:_config=) ppc mpc824x pn62
575
576Sandpoint8240_config: unconfig
577 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
578
579Sandpoint8245_config: unconfig
580 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
581
wdenkd1cbe852003-06-28 17:24:46 +0000582SL8245_config: unconfig
583 @./mkconfig $(@:_config=) ppc mpc824x sl8245
584
wdenk7ebf7442002-11-02 23:17:16 +0000585utx8245_config: unconfig
586 @./mkconfig $(@:_config=) ppc mpc824x utx8245
587
588#########################################################################
589## MPC8260 Systems
590#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000591
592cogent_mpc8260_config: unconfig
593 @./mkconfig $(@:_config=) ppc mpc8260 cogent
594
595CPU86_config \
596CPU86_ROMBOOT_config: unconfig
597 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
598 @cd ./include ; \
599 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
600 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
601 echo "... booting from 8-bit flash" ; \
602 else \
603 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
604 echo "... booting from 64-bit flash" ; \
605 fi; \
606 echo "export CONFIG_BOOT_ROM" >> config.mk;
607
608ep8260_config: unconfig
609 @./mkconfig $(@:_config=) ppc mpc8260 ep8260
610
611gw8260_config: unconfig
612 @./mkconfig $(@:_config=) ppc mpc8260 gw8260
613
614hymod_config: unconfig
615 @./mkconfig $(@:_config=) ppc mpc8260 hymod
616
617IPHASE4539_config: unconfig
618 @./mkconfig $(@:_config=) ppc mpc8260 iphase4539
619
620MPC8260ADS_config: unconfig
621 @./mkconfig $(@:_config=) ppc mpc8260 mpc8260ads
622
wdenkdb2f721f2003-03-06 00:58:30 +0000623MPC8266ADS_config: unconfig
624 @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
625
wdenk10f67012003-03-25 18:06:06 +0000626PM825_config \
627PM825_ROMBOOT_config: unconfig
628 @echo "#define CONFIG_PCI" >include/config.h
629 @./mkconfig -a PM826 ppc mpc8260 pm826
630 @cd ./include ; \
631 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
632 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
633 echo "... booting from 8-bit flash" ; \
634 else \
635 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
636 echo "... booting from 64-bit flash" ; \
637 fi; \
638 echo "export CONFIG_BOOT_ROM" >> config.mk; \
639
wdenk7ebf7442002-11-02 23:17:16 +0000640PM826_config \
641PM826_ROMBOOT_config: unconfig
642 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 pm826
643 @cd ./include ; \
644 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
645 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
646 echo "... booting from 8-bit flash" ; \
647 else \
648 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
649 echo "... booting from 64-bit flash" ; \
650 fi; \
651 echo "export CONFIG_BOOT_ROM" >> config.mk; \
652
653ppmc8260_config: unconfig
654 @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
655
656RPXsuper_config: unconfig
657 @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
658
659rsdproto_config: unconfig
660 @./mkconfig $(@:_config=) ppc mpc8260 rsdproto
661
662sacsng_config: unconfig
663 @./mkconfig $(@:_config=) ppc mpc8260 sacsng
664
665sbc8260_config: unconfig
666 @./mkconfig $(@:_config=) ppc mpc8260 sbc8260
667
668SCM_config: unconfig
669 @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
670
wdenk27b207f2003-07-24 23:38:38 +0000671TQM8255_AA_config \
672TQM8260_AA_config \
673TQM8260_AB_config \
674TQM8260_AC_config \
675TQM8260_AD_config \
676TQM8260_AE_config \
677TQM8260_AF_config \
678TQM8260_AG_config \
679TQM8260_AH_config \
680TQM8265_AA_config: unconfig
681 @case "$@" in \
682 TQM8255_AA_config) CTYPE=MPC8255; CFREQ=300; CACHE=no; BMODE=8260;; \
683 TQM8260_AA_config) CTYPE=MPC8260; CFREQ=200; CACHE=no; BMODE=8260;; \
684 TQM8260_AB_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;; \
685 TQM8260_AC_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;; \
686 TQM8260_AD_config) CTYPE=MPC8260; CFREQ=300; CACHE=no; BMODE=60x;; \
687 TQM8260_AE_config) CTYPE=MPC8260; CFREQ=266; CACHE=no; BMODE=8260;; \
688 TQM8260_AF_config) CTYPE=MPC8260; CFREQ=300; CACHE=no; BMODE=60x;; \
689 TQM8260_AG_config) CTYPE=MPC8260; CFREQ=300; CACHE=no; BMODE=8260;; \
690 TQM8260_AH_config) CTYPE=MPC8260; CFREQ=300; CACHE=yes; BMODE=60x;; \
691 TQM8265_AA_config) CTYPE=MPC8265; CFREQ=300; CACHE=no; BMODE=60x;; \
692 esac; \
693 >include/config.h ; \
694 if [ "$${CTYPE}" != "MPC8260" ] ; then \
695 echo "#define CONFIG_$${CTYPE}" >>include/config.h ; \
696 fi; \
697 echo "#define CONFIG_$${CFREQ}MHz" >>include/config.h ; \
698 echo "... with $${CFREQ}MHz system clock" ; \
699 if [ "$${CACHE}" == "yes" ] ; then \
wdenk7ebf7442002-11-02 23:17:16 +0000700 echo "#define CONFIG_L2_CACHE" >>include/config.h ; \
wdenk27b207f2003-07-24 23:38:38 +0000701 echo "... with L2 Cache support" ; \
wdenk7ebf7442002-11-02 23:17:16 +0000702 else \
703 echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \
704 echo "... without L2 Cache support" ; \
wdenk27b207f2003-07-24 23:38:38 +0000705 fi; \
706 if [ "$${BMODE}" == "60x" ] ; then \
707 echo "#define CONFIG_BUSMODE_60x" >>include/config.h ; \
708 echo "... with 60x Bus Mode" ; \
709 else \
710 echo "#undef CONFIG_BUSMODE_60x" >>include/config.h ; \
711 echo "... without 60x Bus Mode" ; \
wdenk7ebf7442002-11-02 23:17:16 +0000712 fi
wdenk4532cb62003-04-27 22:52:51 +0000713 @./mkconfig -a TQM8260 ppc mpc8260 tqm8260
wdenk7ebf7442002-11-02 23:17:16 +0000714
wdenk7aa78612003-05-03 15:50:43 +0000715atc_config: unconfig
716 @./mkconfig $(@:_config=) ppc mpc8260 atc
717
wdenk7ebf7442002-11-02 23:17:16 +0000718#########################################################################
719## 74xx/7xx Systems
720#########################################################################
721
wdenkc7de8292002-11-19 11:04:11 +0000722AmigaOneG3SE_config: unconfig
723 @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
724
wdenk7ebf7442002-11-02 23:17:16 +0000725EVB64260_config \
726EVB64260_750CX_config: unconfig
727 @./mkconfig EVB64260 ppc 74xx_7xx evb64260
728
729ZUMA_config: unconfig
730 @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
731
732PCIPPC2_config \
733PCIPPC6_config: unconfig
734 @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
735
736BAB7xx_config: unconfig
737 @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
738
739ELPPC_config: unconfig
740 @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
741
742#========================================================================
743# ARM
744#========================================================================
745#########################################################################
746## StrongARM Systems
747#########################################################################
748
wdenkdc7c9a12003-03-26 06:55:25 +0000749at91rm9200dk_config : unconfig
750 @./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
751
wdenk7ebf7442002-11-02 23:17:16 +0000752lart_config : unconfig
753 @./mkconfig $(@:_config=) arm sa1100 lart
754
755dnp1110_config : unconfig
756 @./mkconfig $(@:_config=) arm sa1100 dnp1110
757
758shannon_config : unconfig
759 @./mkconfig $(@:_config=) arm sa1100 shannon
760
761#########################################################################
wdenk2e5983d2003-07-15 20:04:06 +0000762## ARM92xT Systems
wdenk7ebf7442002-11-02 23:17:16 +0000763#########################################################################
764
wdenk43d96162003-03-06 00:02:04 +0000765xtract_trab = $(subst _big_flash,,$(subst _config,,$1))
766
wdenk2e5983d2003-07-15 20:04:06 +0000767omap1510inn_config : unconfig
768 @./mkconfig $(@:_config=) arm arm925t omap1510inn
769
wdenk7ebf7442002-11-02 23:17:16 +0000770smdk2400_config : unconfig
771 @./mkconfig $(@:_config=) arm arm920t smdk2400
772
773smdk2410_config : unconfig
774 @./mkconfig $(@:_config=) arm arm920t smdk2410
775
wdenk43d96162003-03-06 00:02:04 +0000776trab_config \
777trab_big_flash_config: unconfig
778 @ >include/config.h
779 @[ -z "$(findstring _big_flash,$@)" ] || \
780 { echo "#define CONFIG_BIG_FLASH" >>include/config.h ; \
781 echo "... with big flash support" ; \
782 }
783 @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
wdenk7ebf7442002-11-02 23:17:16 +0000784
wdenk1cb8e982003-03-06 21:55:29 +0000785VCMA9_config : unconfig
786 @./mkconfig $(@:_config=) arm arm920t vcma9 mpl
787
wdenk7ebf7442002-11-02 23:17:16 +0000788#########################################################################
789## ARM720T Systems
790#########################################################################
791
792impa7_config : unconfig
793 @./mkconfig $(@:_config=) arm arm720t impa7
794
795ep7312_config : unconfig
796 @./mkconfig $(@:_config=) arm arm720t ep7312
797
798#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000799## XScale Systems
wdenk7ebf7442002-11-02 23:17:16 +0000800#########################################################################
801
wdenk7ebf7442002-11-02 23:17:16 +0000802cradle_config : unconfig
wdenk8bde7f72003-06-27 21:31:46 +0000803 @./mkconfig $(@:_config=) arm pxa cradle
wdenk7ebf7442002-11-02 23:17:16 +0000804
805csb226_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000806 @./mkconfig $(@:_config=) arm pxa csb226
wdenk7ebf7442002-11-02 23:17:16 +0000807
wdenk43d96162003-03-06 00:02:04 +0000808innokom_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000809 @./mkconfig $(@:_config=) arm pxa innokom
wdenk43d96162003-03-06 00:02:04 +0000810
811lubbock_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000812 @./mkconfig $(@:_config=) arm pxa lubbock
wdenk43d96162003-03-06 00:02:04 +0000813
wdenk52f52c12003-06-19 23:04:19 +0000814logodl_config : unconfig
815 @./mkconfig $(@:_config=) arm pxa logodl
816
wdenk3e386912003-04-05 00:53:31 +0000817wepep250_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000818 @./mkconfig $(@:_config=) arm pxa wepep250
wdenk3e386912003-04-05 00:53:31 +0000819
wdenk2262cfe2002-11-18 00:14:45 +0000820#========================================================================
821# i386
822#========================================================================
823#########################################################################
wdenk1cb8e982003-03-06 21:55:29 +0000824## AMD SC520 CDP
wdenk2262cfe2002-11-18 00:14:45 +0000825#########################################################################
826sc520_cdp_config : unconfig
827 @./mkconfig $(@:_config=) i386 i386 sc520_cdp
828
wdenk7a8e9bed2003-05-31 18:35:21 +0000829sc520_spunk_config : unconfig
830 @./mkconfig $(@:_config=) i386 i386 sc520_spunk
831
832sc520_spunk_rel_config : unconfig
833 @./mkconfig $(@:_config=) i386 i386 sc520_spunk
834
wdenk43d96162003-03-06 00:02:04 +0000835#========================================================================
836# MIPS
837#========================================================================
wdenk7ebf7442002-11-02 23:17:16 +0000838#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000839## MIPS32 4Kc
840#########################################################################
841
842incaip_config : unconfig
843 @./mkconfig $(@:_config=) mips mips incaip
844
wdenk3e386912003-04-05 00:53:31 +0000845purple_config : unconfig
846 @./mkconfig $(@:_config=) mips mips purple
wdenk43d96162003-03-06 00:02:04 +0000847
wdenk3e386912003-04-05 00:53:31 +0000848#########################################################################
849#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000850
851clean:
852 find . -type f \
853 \( -name 'core' -o -name '*.bak' -o -name '*~' \
854 -o -name '*.o' -o -name '*.a' \) -print \
855 | xargs rm -f
wdenk85ec0bc2003-03-31 16:34:49 +0000856 rm -f examples/hello_world examples/timer \
wdenk3e386912003-04-05 00:53:31 +0000857 examples/eepro100_eeprom examples/sched \
wdenk7a8e9bed2003-05-31 18:35:21 +0000858 examples/mem_to_mem_idma2intr examples/82559_eeprom
859
wdenk7ebf7442002-11-02 23:17:16 +0000860 rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
861 rm -f tools/easylogo/easylogo tools/bmp_logo
862 rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
wdenk228f29a2002-12-08 09:53:23 +0000863 rm -f tools/env/fw_printenv tools/env/fw_setenv
wdenk7f70e852003-05-20 14:25:27 +0000864 rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
wdenk7ebf7442002-11-02 23:17:16 +0000865
866clobber: clean
867 find . -type f \
868 \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
869 -print \
870 | xargs rm -f
871 rm -f $(OBJS) *.bak tags TAGS
872 rm -fr *.*~
wdenkbdccc4f2003-08-05 17:43:17 +0000873 rm -f u-boot u-boot.map $(ALL)
wdenk228f29a2002-12-08 09:53:23 +0000874 rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
wdenk3e386912003-04-05 00:53:31 +0000875 rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
wdenkb783eda2003-06-25 22:26:29 +0000876 rm -f include/asm/proc include/asm/arch include/asm
wdenk7ebf7442002-11-02 23:17:16 +0000877
878mrproper \
879distclean: clobber unconfig
880
881backup:
882 F=`basename $(TOPDIR)` ; cd .. ; \
883 gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
884
885#########################################################################