blob: e10e4185bcf424590714101d556ad85763f85877 [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#########################################################################
120
121all: u-boot.srec u-boot.bin System.map
122
123install: all
wdenk43d96162003-03-06 00:02:04 +0000124 -cp u-boot.bin /tftpboot/u-boot.bin
125 -cp u-boot.bin /net/denx/tftpboot/u-boot.bin
wdenk7ebf7442002-11-02 23:17:16 +0000126
127u-boot.srec: u-boot
128 $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
129
130u-boot.bin: u-boot
131 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
132
133u-boot.dis: u-boot
134 $(OBJDUMP) -d $< > $@
135
136u-boot: depend subdirs $(OBJS) $(LIBS) $(LDSCRIPT)
wdenk8bde7f72003-06-27 21:31:46 +0000137 UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
138 $(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \
wdenkb2184c32002-11-19 23:01:07 +0000139 --start-group $(LIBS) --end-group \
140 -Map u-boot.map -o u-boot
wdenk7ebf7442002-11-02 23:17:16 +0000141
142subdirs:
143 @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir || exit 1 ; done
144
145depend dep:
146 @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
147
148tags:
149 ctags -w `find $(SUBDIRS) include \
150 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
151
152etags:
153 etags -a `find $(SUBDIRS) include \
154 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
155
156System.map: u-boot
157 @$(NM) $< | \
158 grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
159 sort > System.map
160
161#########################################################################
162else
163all install u-boot u-boot.srec depend dep:
164 @echo "System not configured - see README" >&2
165 @ exit 1
166endif
167
168#########################################################################
169
170unconfig:
171 rm -f include/config.h include/config.mk
172
173#========================================================================
174# PowerPC
175#========================================================================
wdenk0db5bca2003-03-31 17:27:09 +0000176
177#########################################################################
178## MPC5xx Systems
179#########################################################################
180
181cmi_mpc5xx_config: unconfig
182 @./mkconfig $(@:_config=) ppc mpc5xx cmi
183
wdenk7ebf7442002-11-02 23:17:16 +0000184#########################################################################
wdenk945af8d2003-07-16 21:53:01 +0000185## MPC5xxx Systems
186#########################################################################
187IceCube_5200_config \
188IceCube_5100_config: unconfig
189 @ >include/config.h
190 @[ -z "$(findstring _5200,$@)" ] || \
191 { echo "#define CONFIG_MPC5200" >>include/config.h ; \
192 echo "... with MPC5200 processor" ; \
193 }
194 @[ -z "$(findstring _5100,$@)" ] || \
195 { echo "#define CONFIG_MGT5100" >>include/config.h ; \
196 echo "... with MGT5100 processor" ; \
197 }
198 @./mkconfig -a IceCube ppc mpc5xxx icecube
199
200#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000201## MPC8xx Systems
202#########################################################################
203
204ADS860_config: unconfig
205 @./mkconfig $(@:_config=) ppc mpc8xx fads
206
207AMX860_config : unconfig
208 @./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
209
210c2mon_config: unconfig
211 @./mkconfig $(@:_config=) ppc mpc8xx c2mon
212
213CCM_config: unconfig
214 @./mkconfig $(@:_config=) ppc mpc8xx CCM siemens
215
216cogent_mpc8xx_config: unconfig
217 @./mkconfig $(@:_config=) ppc mpc8xx cogent
218
wdenk3bac3512003-03-12 10:41:04 +0000219ELPT860_config: unconfig
220 @./mkconfig $(@:_config=) ppc mpc8xx elpt860 LEOX
221
wdenk7ebf7442002-11-02 23:17:16 +0000222ESTEEM192E_config: unconfig
223 @./mkconfig $(@:_config=) ppc mpc8xx esteem192e
224
225ETX094_config : unconfig
226 @./mkconfig $(@:_config=) ppc mpc8xx etx094
227
228FADS823_config \
229FADS850SAR_config \
wdenk2535d602003-07-17 23:16:40 +0000230MPC86xADS_config \
wdenk7ebf7442002-11-02 23:17:16 +0000231FADS860T_config: unconfig
232 @./mkconfig $(@:_config=) ppc mpc8xx fads
233
234FLAGADM_config: unconfig
235 @./mkconfig $(@:_config=) ppc mpc8xx flagadm
236
wdenk7aa78612003-05-03 15:50:43 +0000237xtract_GEN860T = $(subst _SC,,$(subst _config,,$1))
238
239GEN860T_SC_config \
wdenk7ebf7442002-11-02 23:17:16 +0000240GEN860T_config: unconfig
wdenk7aa78612003-05-03 15:50:43 +0000241 @ >include/config.h
242 @[ -z "$(findstring _SC,$@)" ] || \
243 { echo "#define CONFIG_SC" >>include/config.h ; \
244 echo "With reduced H/W feature set (SC)..." ; \
245 }
246 @./mkconfig -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t
wdenk7ebf7442002-11-02 23:17:16 +0000247
248GENIETV_config: unconfig
249 @./mkconfig $(@:_config=) ppc mpc8xx genietv
250
251GTH_config: unconfig
252 @./mkconfig $(@:_config=) ppc mpc8xx gth
253
254hermes_config : unconfig
255 @./mkconfig $(@:_config=) ppc mpc8xx hermes
256
257IAD210_config: unconfig
258 @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
259
260xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
261
262ICU862_100MHz_config \
263ICU862_config: unconfig
264 @ >include/config.h
265 @[ -z "$(findstring _100MHz,$@)" ] || \
266 { echo "#define CONFIG_100MHz" >>include/config.h ; \
267 echo "... with 100MHz system clock" ; \
268 }
269 @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
270
271IP860_config : unconfig
272 @./mkconfig $(@:_config=) ppc mpc8xx ip860
273
274IVML24_256_config \
275IVML24_128_config \
276IVML24_config: unconfig
277 @ >include/config.h
278 @[ -z "$(findstring IVML24_config,$@)" ] || \
279 { echo "#define CONFIG_IVML24_16M" >>include/config.h ; \
280 }
281 @[ -z "$(findstring IVML24_128_config,$@)" ] || \
282 { echo "#define CONFIG_IVML24_32M" >>include/config.h ; \
283 }
284 @[ -z "$(findstring IVML24_256_config,$@)" ] || \
285 { echo "#define CONFIG_IVML24_64M" >>include/config.h ; \
286 }
287 @./mkconfig -a IVML24 ppc mpc8xx ivm
288
289IVMS8_256_config \
290IVMS8_128_config \
291IVMS8_config: unconfig
292 @ >include/config.h
293 @[ -z "$(findstring IVMS8_config,$@)" ] || \
294 { echo "#define CONFIG_IVMS8_16M" >>include/config.h ; \
295 }
296 @[ -z "$(findstring IVMS8_128_config,$@)" ] || \
297 { echo "#define CONFIG_IVMS8_32M" >>include/config.h ; \
298 }
299 @[ -z "$(findstring IVMS8_256_config,$@)" ] || \
300 { echo "#define CONFIG_IVMS8_64M" >>include/config.h ; \
301 }
302 @./mkconfig -a IVMS8 ppc mpc8xx ivm
303
wdenk56f94be2002-11-05 16:35:14 +0000304KUP4K_config : unconfig
305 @./mkconfig $(@:_config=) ppc mpc8xx kup4k
306
wdenk7ebf7442002-11-02 23:17:16 +0000307LANTEC_config : unconfig
308 @./mkconfig $(@:_config=) ppc mpc8xx lantec
309
310lwmon_config: unconfig
311 @./mkconfig $(@:_config=) ppc mpc8xx lwmon
312
313MBX_config \
314MBX860T_config: unconfig
315 @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
316
317MHPC_config: unconfig
318 @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
319
320MVS1_config : unconfig
321 @./mkconfig $(@:_config=) ppc mpc8xx mvs1
322
wdenk993cad92003-06-26 22:04:09 +0000323xtract_NETVIA = $(subst _V2,,$(subst _config,,$1))
324
325NETVIA_V2_config \
wdenk7ebf7442002-11-02 23:17:16 +0000326NETVIA_config: unconfig
wdenk993cad92003-06-26 22:04:09 +0000327 @ >include/config.h
328 @[ -z "$(findstring NETVIA_config,$@)" ] || \
329 { echo "#define CONFIG_NETVIA_VERSION 1" >>include/config.h ; \
330 echo "... Version 1" ; \
331 }
332 @[ -z "$(findstring NETVIA_V2_config,$@)" ] || \
333 { echo "#define CONFIG_NETVIA_VERSION 2" >>include/config.h ; \
334 echo "... Version 2" ; \
335 }
336 @./mkconfig -a $(call xtract_NETVIA,$@) ppc mpc8xx netvia
wdenk7ebf7442002-11-02 23:17:16 +0000337
338NX823_config: unconfig
339 @./mkconfig $(@:_config=) ppc mpc8xx nx823
340
341pcu_e_config: unconfig
342 @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
343
344R360MPI_config: unconfig
345 @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
346
wdenk682011f2003-06-03 23:54:09 +0000347RBC823_config: unconfig
348 @./mkconfig $(@:_config=) ppc mpc8xx rbc823
349
wdenk7ebf7442002-11-02 23:17:16 +0000350RPXClassic_config: unconfig
351 @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
352
353RPXlite_config: unconfig
354 @./mkconfig $(@:_config=) ppc mpc8xx RPXlite
355
wdenk73a8b272003-06-05 19:27:42 +0000356rmu_config: unconfig
357 @./mkconfig $(@:_config=) ppc mpc8xx rmu
358
wdenk7ebf7442002-11-02 23:17:16 +0000359RRvision_config: unconfig
360 @./mkconfig $(@:_config=) ppc mpc8xx RRvision
361
362RRvision_LCD_config: unconfig
363 @echo "#define CONFIG_LCD" >include/config.h
364 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
365 @./mkconfig -a RRvision ppc mpc8xx RRvision
366
367SM850_config : unconfig
368 @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
369
370SPD823TS_config: unconfig
371 @./mkconfig $(@:_config=) ppc mpc8xx spd8xx
372
wdenkdc7c9a12003-03-26 06:55:25 +0000373svm_sc8xx_config: unconfig
374 @ >include/config.h
375 @./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
376
wdenk7ebf7442002-11-02 23:17:16 +0000377SXNI855T_config: unconfig
378 @./mkconfig $(@:_config=) ppc mpc8xx sixnet
379
wdenkdb2f7212003-03-06 00:58:30 +0000380# EMK MPC8xx based modules
381TOP860_config: unconfig
382 @./mkconfig $(@:_config=) ppc mpc8xx top860 emk
383
wdenk7ebf7442002-11-02 23:17:16 +0000384# Play some tricks for configuration selection
wdenk73a8b272003-06-05 19:27:42 +0000385# All boards can come with 50 MHz (default), 66MHz, 80MHz or 100 MHz clock,
wdenk7ebf7442002-11-02 23:17:16 +0000386# but only 855 and 860 boards may come with FEC
387# and 823 boards may have LCD support
wdenk73a8b272003-06-05 19:27:42 +0000388xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _100MHz,,$(subst _LCD,,$(subst _config,,$1)))))
wdenk7ebf7442002-11-02 23:17:16 +0000389
390FPS850L_config \
wdenk384ae022002-11-05 00:17:55 +0000391FPS860L_config \
wdenkf12e5682003-07-07 20:07:54 +0000392NSCU_config \
wdenk7ebf7442002-11-02 23:17:16 +0000393TQM823L_config \
394TQM823L_66MHz_config \
395TQM823L_80MHz_config \
396TQM823L_LCD_config \
397TQM823L_LCD_66MHz_config \
398TQM823L_LCD_80MHz_config \
399TQM850L_config \
400TQM850L_66MHz_config \
401TQM850L_80MHz_config \
402TQM855L_config \
403TQM855L_66MHz_config \
404TQM855L_80MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000405TQM860L_config \
406TQM860L_66MHz_config \
407TQM860L_80MHz_config \
wdenkd126bfb2003-04-10 11:18:18 +0000408TQM862L_config \
409TQM862L_66MHz_config \
wdenk73a8b272003-06-05 19:27:42 +0000410TQM862L_80MHz_config \
wdenkf12e5682003-07-07 20:07:54 +0000411TQM855M_config \
412TQM855M_66MHz_config \
413TQM855M_80MHz_config \
414TQM860M_config \
415TQM860M_66MHz_config \
416TQM860M_80MHz_config \
417TQM862M_config \
418TQM862M_66MHz_config \
419TQM862M_80MHz_config \
wdenk71f95112003-06-15 22:40:42 +0000420TQM862M_100MHz_config: unconfig
wdenk7ebf7442002-11-02 23:17:16 +0000421 @ >include/config.h
wdenk7ebf7442002-11-02 23:17:16 +0000422 @[ -z "$(findstring _66MHz,$@)" ] || \
423 { echo "#define CONFIG_66MHz" >>include/config.h ; \
424 echo "... with 66MHz system clock" ; \
425 }
426 @[ -z "$(findstring _80MHz,$@)" ] || \
427 { echo "#define CONFIG_80MHz" >>include/config.h ; \
428 echo "... with 80MHz system clock" ; \
429 }
wdenk73a8b272003-06-05 19:27:42 +0000430 @[ -z "$(findstring _100MHz,$@)" ] || \
431 { echo "#define CONFIG_100MHz" >>include/config.h ; \
432 echo "... with 100MHz system clock" ; \
433 }
wdenk7ebf7442002-11-02 23:17:16 +0000434 @[ -z "$(findstring _LCD,$@)" ] || \
435 { echo "#define CONFIG_LCD" >>include/config.h ; \
436 echo "#define CONFIG_NEC_NL6648BC20" >>include/config.h ; \
437 echo "... with LCD display" ; \
438 }
439 @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
440
441TTTech_config: unconfig
442 @echo "#define CONFIG_LCD" >include/config.h
443 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
444 @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
445
wdenk608c9142003-01-13 23:54:46 +0000446v37_config: unconfig
447 @echo "#define CONFIG_LCD" >include/config.h
448 @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
449 @./mkconfig $(@:_config=) ppc mpc8xx v37
450
wdenk7ebf7442002-11-02 23:17:16 +0000451#########################################################################
452## PPC4xx Systems
453#########################################################################
454
455ADCIOP_config: unconfig
456 @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
457
458AR405_config: unconfig
459 @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
460
stroese549826e2003-05-23 11:41:44 +0000461ASH405_config: unconfig
462 @./mkconfig $(@:_config=) ppc ppc4xx ash405 esd
463
464BUBINGA405EP_config:unconfig
465 @./mkconfig $(@:_config=) ppc ppc4xx bubinga405ep
466
wdenk7ebf7442002-11-02 23:17:16 +0000467CANBT_config: unconfig
468 @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
469
stroese549826e2003-05-23 11:41:44 +0000470CPCI405_config \
471CPCI4052_config \
472CPCI405AB_config: unconfig
wdenk7ebf7442002-11-02 23:17:16 +0000473 @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
474 @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk
475
476CPCI440_config: unconfig
477 @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
478
479CPCIISER4_config: unconfig
480 @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
481
482CRAYL1_config:unconfig
483 @./mkconfig $(@:_config=) ppc ppc4xx L1 cray
484
485DASA_SIM_config: unconfig
486 @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
487
488DU405_config: unconfig
489 @./mkconfig $(@:_config=) ppc ppc4xx du405 esd
490
491EBONY_config:unconfig
492 @./mkconfig $(@:_config=) ppc ppc4xx ebony
493
494ERIC_config:unconfig
495 @./mkconfig $(@:_config=) ppc ppc4xx eric
496
wdenkd1cbe852003-06-28 17:24:46 +0000497EXBITGEN_config:unconfig
498 @./mkconfig $(@:_config=) ppc ppc4xx exbitgen
499
wdenk7ebf7442002-11-02 23:17:16 +0000500MIP405_config:unconfig
501 @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
502
wdenkf3e0de62003-06-04 15:05:30 +0000503MIP405T_config:unconfig
504 @echo "#define CONFIG_MIP405T" >include/config.h
505 @echo "Enable subset config for MIP405T"
506 @./mkconfig -a MIP405 ppc ppc4xx mip405 mpl
507
wdenk7ebf7442002-11-02 23:17:16 +0000508ML2_config:unconfig
509 @./mkconfig $(@:_config=) ppc ppc4xx ml2
510
511OCRTC_config \
512ORSG_config: unconfig
513 @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
514
515PCI405_config: unconfig
516 @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
517
518PIP405_config:unconfig
519 @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
520
stroese549826e2003-05-23 11:41:44 +0000521PMC405_config: unconfig
522 @./mkconfig $(@:_config=) ppc ppc4xx pmc405 esd
523
wdenk7ebf7442002-11-02 23:17:16 +0000524W7OLMC_config \
525W7OLMG_config: unconfig
526 @./mkconfig $(@:_config=) ppc ppc4xx w7o
527
528WALNUT405_config:unconfig
529 @./mkconfig $(@:_config=) ppc ppc4xx walnut405
530
531#########################################################################
532## MPC824x Systems
533#########################################################################
wdenk3bac3512003-03-12 10:41:04 +0000534xtract_82xx = $(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1)))))
535
wdenk03329902003-06-20 22:36:30 +0000536A3000_config: unconfig
537 @./mkconfig $(@:_config=) ppc mpc824x a3000
538
wdenk7ebf7442002-11-02 23:17:16 +0000539BMW_config: unconfig
540 @./mkconfig $(@:_config=) ppc mpc824x bmw
541
wdenk3bac3512003-03-12 10:41:04 +0000542CPC45_config \
543CPC45_ROMBOOT_config: unconfig
544 @./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
545 @cd ./include ; \
546 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
547 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
548 echo "... booting from 8-bit flash" ; \
549 else \
550 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
551 echo "... booting from 64-bit flash" ; \
552 fi; \
553 echo "export CONFIG_BOOT_ROM" >> config.mk;
554
wdenk7ebf7442002-11-02 23:17:16 +0000555CU824_config: unconfig
556 @./mkconfig $(@:_config=) ppc mpc824x cu824
557
558MOUSSE_config: unconfig
559 @./mkconfig $(@:_config=) ppc mpc824x mousse
560
561MUSENKI_config: unconfig
562 @./mkconfig $(@:_config=) ppc mpc824x musenki
563
564OXC_config: unconfig
565 @./mkconfig $(@:_config=) ppc mpc824x oxc
566
567PN62_config: unconfig
568 @./mkconfig $(@:_config=) ppc mpc824x pn62
569
570Sandpoint8240_config: unconfig
571 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
572
573Sandpoint8245_config: unconfig
574 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
575
wdenkd1cbe852003-06-28 17:24:46 +0000576SL8245_config: unconfig
577 @./mkconfig $(@:_config=) ppc mpc824x sl8245
578
wdenk7ebf7442002-11-02 23:17:16 +0000579utx8245_config: unconfig
580 @./mkconfig $(@:_config=) ppc mpc824x utx8245
581
582#########################################################################
583## MPC8260 Systems
584#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000585
586cogent_mpc8260_config: unconfig
587 @./mkconfig $(@:_config=) ppc mpc8260 cogent
588
589CPU86_config \
590CPU86_ROMBOOT_config: unconfig
591 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
592 @cd ./include ; \
593 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
594 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
595 echo "... booting from 8-bit flash" ; \
596 else \
597 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
598 echo "... booting from 64-bit flash" ; \
599 fi; \
600 echo "export CONFIG_BOOT_ROM" >> config.mk;
601
602ep8260_config: unconfig
603 @./mkconfig $(@:_config=) ppc mpc8260 ep8260
604
605gw8260_config: unconfig
606 @./mkconfig $(@:_config=) ppc mpc8260 gw8260
607
608hymod_config: unconfig
609 @./mkconfig $(@:_config=) ppc mpc8260 hymod
610
611IPHASE4539_config: unconfig
612 @./mkconfig $(@:_config=) ppc mpc8260 iphase4539
613
614MPC8260ADS_config: unconfig
615 @./mkconfig $(@:_config=) ppc mpc8260 mpc8260ads
616
wdenkdb2f7212003-03-06 00:58:30 +0000617MPC8266ADS_config: unconfig
618 @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
619
wdenk10f67012003-03-25 18:06:06 +0000620PM825_config \
621PM825_ROMBOOT_config: unconfig
622 @echo "#define CONFIG_PCI" >include/config.h
623 @./mkconfig -a PM826 ppc mpc8260 pm826
624 @cd ./include ; \
625 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
626 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
627 echo "... booting from 8-bit flash" ; \
628 else \
629 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
630 echo "... booting from 64-bit flash" ; \
631 fi; \
632 echo "export CONFIG_BOOT_ROM" >> config.mk; \
633
wdenk7ebf7442002-11-02 23:17:16 +0000634PM826_config \
635PM826_ROMBOOT_config: unconfig
636 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 pm826
637 @cd ./include ; \
638 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
639 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
640 echo "... booting from 8-bit flash" ; \
641 else \
642 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
643 echo "... booting from 64-bit flash" ; \
644 fi; \
645 echo "export CONFIG_BOOT_ROM" >> config.mk; \
646
647ppmc8260_config: unconfig
648 @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
649
650RPXsuper_config: unconfig
651 @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
652
653rsdproto_config: unconfig
654 @./mkconfig $(@:_config=) ppc mpc8260 rsdproto
655
656sacsng_config: unconfig
657 @./mkconfig $(@:_config=) ppc mpc8260 sacsng
658
659sbc8260_config: unconfig
660 @./mkconfig $(@:_config=) ppc mpc8260 sbc8260
661
662SCM_config: unconfig
663 @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
664
wdenk7aa78612003-05-03 15:50:43 +0000665TQM8255_config \
wdenk7ebf7442002-11-02 23:17:16 +0000666TQM8260_config \
667TQM8260_L2_config \
wdenk4532cb62003-04-27 22:52:51 +0000668TQM8255_266MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000669TQM8260_266MHz_config \
670TQM8260_L2_266MHz_config \
wdenk7aa78612003-05-03 15:50:43 +0000671TQM8255_300MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000672TQM8260_300MHz_config: unconfig
673 @ >include/config.h
674 @if [ "$(findstring _L2_,$@)" ] ; then \
675 echo "#define CONFIG_L2_CACHE" >>include/config.h ; \
676 echo "... with L2 Cache support (60x Bus Mode)" ; \
677 else \
678 echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \
679 echo "... without L2 Cache support" ; \
680 fi
681 @[ -z "$(findstring _266MHz,$@)" ] || \
682 { echo "#define CONFIG_266MHz" >>include/config.h ; \
683 echo "... with 266MHz system clock" ; \
684 }
685 @[ -z "$(findstring _300MHz,$@)" ] || \
686 { echo "#define CONFIG_300MHz" >>include/config.h ; \
687 echo "... with 300MHz system clock" ; \
688 }
wdenk4532cb62003-04-27 22:52:51 +0000689 @[ -z "$(findstring TQM8255_,$@)" ] || \
690 { echo "#define CONFIG_MPC8255" >>include/config.h ; }
691 @./mkconfig -a TQM8260 ppc mpc8260 tqm8260
wdenk7ebf7442002-11-02 23:17:16 +0000692
wdenk7aa78612003-05-03 15:50:43 +0000693atc_config: unconfig
694 @./mkconfig $(@:_config=) ppc mpc8260 atc
695
wdenk7ebf7442002-11-02 23:17:16 +0000696#########################################################################
697## 74xx/7xx Systems
698#########################################################################
699
wdenkc7de8292002-11-19 11:04:11 +0000700AmigaOneG3SE_config: unconfig
701 @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
702
wdenk7ebf7442002-11-02 23:17:16 +0000703EVB64260_config \
704EVB64260_750CX_config: unconfig
705 @./mkconfig EVB64260 ppc 74xx_7xx evb64260
706
707ZUMA_config: unconfig
708 @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
709
710PCIPPC2_config \
711PCIPPC6_config: unconfig
712 @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
713
714BAB7xx_config: unconfig
715 @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
716
717ELPPC_config: unconfig
718 @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
719
720#========================================================================
721# ARM
722#========================================================================
723#########################################################################
724## StrongARM Systems
725#########################################################################
726
wdenkdc7c9a12003-03-26 06:55:25 +0000727at91rm9200dk_config : unconfig
728 @./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
729
wdenk7ebf7442002-11-02 23:17:16 +0000730lart_config : unconfig
731 @./mkconfig $(@:_config=) arm sa1100 lart
732
733dnp1110_config : unconfig
734 @./mkconfig $(@:_config=) arm sa1100 dnp1110
735
736shannon_config : unconfig
737 @./mkconfig $(@:_config=) arm sa1100 shannon
738
739#########################################################################
wdenk2e5983d2003-07-15 20:04:06 +0000740## ARM92xT Systems
wdenk7ebf7442002-11-02 23:17:16 +0000741#########################################################################
742
wdenk43d96162003-03-06 00:02:04 +0000743xtract_trab = $(subst _big_flash,,$(subst _config,,$1))
744
wdenk2e5983d2003-07-15 20:04:06 +0000745omap1510inn_config : unconfig
746 @./mkconfig $(@:_config=) arm arm925t omap1510inn
747
wdenk7ebf7442002-11-02 23:17:16 +0000748smdk2400_config : unconfig
749 @./mkconfig $(@:_config=) arm arm920t smdk2400
750
751smdk2410_config : unconfig
752 @./mkconfig $(@:_config=) arm arm920t smdk2410
753
wdenk43d96162003-03-06 00:02:04 +0000754trab_config \
755trab_big_flash_config: unconfig
756 @ >include/config.h
757 @[ -z "$(findstring _big_flash,$@)" ] || \
758 { echo "#define CONFIG_BIG_FLASH" >>include/config.h ; \
759 echo "... with big flash support" ; \
760 }
761 @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
wdenk7ebf7442002-11-02 23:17:16 +0000762
wdenk1cb8e982003-03-06 21:55:29 +0000763VCMA9_config : unconfig
764 @./mkconfig $(@:_config=) arm arm920t vcma9 mpl
765
wdenk7ebf7442002-11-02 23:17:16 +0000766#########################################################################
767## ARM720T Systems
768#########################################################################
769
770impa7_config : unconfig
771 @./mkconfig $(@:_config=) arm arm720t impa7
772
773ep7312_config : unconfig
774 @./mkconfig $(@:_config=) arm arm720t ep7312
775
776#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000777## XScale Systems
wdenk7ebf7442002-11-02 23:17:16 +0000778#########################################################################
779
wdenk7ebf7442002-11-02 23:17:16 +0000780cradle_config : unconfig
wdenk8bde7f72003-06-27 21:31:46 +0000781 @./mkconfig $(@:_config=) arm pxa cradle
wdenk7ebf7442002-11-02 23:17:16 +0000782
783csb226_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000784 @./mkconfig $(@:_config=) arm pxa csb226
wdenk7ebf7442002-11-02 23:17:16 +0000785
wdenk43d96162003-03-06 00:02:04 +0000786innokom_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000787 @./mkconfig $(@:_config=) arm pxa innokom
wdenk43d96162003-03-06 00:02:04 +0000788
789lubbock_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000790 @./mkconfig $(@:_config=) arm pxa lubbock
wdenk43d96162003-03-06 00:02:04 +0000791
wdenk52f52c12003-06-19 23:04:19 +0000792logodl_config : unconfig
793 @./mkconfig $(@:_config=) arm pxa logodl
794
wdenk3e386912003-04-05 00:53:31 +0000795wepep250_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000796 @./mkconfig $(@:_config=) arm pxa wepep250
wdenk3e386912003-04-05 00:53:31 +0000797
wdenk2262cfe2002-11-18 00:14:45 +0000798#========================================================================
799# i386
800#========================================================================
801#########################################################################
wdenk1cb8e982003-03-06 21:55:29 +0000802## AMD SC520 CDP
wdenk2262cfe2002-11-18 00:14:45 +0000803#########################################################################
804sc520_cdp_config : unconfig
805 @./mkconfig $(@:_config=) i386 i386 sc520_cdp
806
wdenk7a8e9bed2003-05-31 18:35:21 +0000807sc520_spunk_config : unconfig
808 @./mkconfig $(@:_config=) i386 i386 sc520_spunk
809
810sc520_spunk_rel_config : unconfig
811 @./mkconfig $(@:_config=) i386 i386 sc520_spunk
812
wdenk43d96162003-03-06 00:02:04 +0000813#========================================================================
814# MIPS
815#========================================================================
wdenk7ebf7442002-11-02 23:17:16 +0000816#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000817## MIPS32 4Kc
818#########################################################################
819
820incaip_config : unconfig
821 @./mkconfig $(@:_config=) mips mips incaip
822
wdenk3e386912003-04-05 00:53:31 +0000823purple_config : unconfig
824 @./mkconfig $(@:_config=) mips mips purple
wdenk43d96162003-03-06 00:02:04 +0000825
wdenk3e386912003-04-05 00:53:31 +0000826#########################################################################
827#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000828
829clean:
830 find . -type f \
831 \( -name 'core' -o -name '*.bak' -o -name '*~' \
832 -o -name '*.o' -o -name '*.a' \) -print \
833 | xargs rm -f
wdenk85ec0bc2003-03-31 16:34:49 +0000834 rm -f examples/hello_world examples/timer \
wdenk3e386912003-04-05 00:53:31 +0000835 examples/eepro100_eeprom examples/sched \
wdenk7a8e9bed2003-05-31 18:35:21 +0000836 examples/mem_to_mem_idma2intr examples/82559_eeprom
837
wdenk7ebf7442002-11-02 23:17:16 +0000838 rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
839 rm -f tools/easylogo/easylogo tools/bmp_logo
840 rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
wdenk228f29a2002-12-08 09:53:23 +0000841 rm -f tools/env/fw_printenv tools/env/fw_setenv
wdenk7f70e852003-05-20 14:25:27 +0000842 rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
wdenk7ebf7442002-11-02 23:17:16 +0000843
844clobber: clean
845 find . -type f \
846 \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
847 -print \
848 | xargs rm -f
849 rm -f $(OBJS) *.bak tags TAGS
850 rm -fr *.*~
wdenkd126bfb2003-04-10 11:18:18 +0000851 rm -f u-boot u-boot.bin u-boot.srec u-boot.map System.map
wdenk228f29a2002-12-08 09:53:23 +0000852 rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
wdenk3e386912003-04-05 00:53:31 +0000853 rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
wdenkb783eda2003-06-25 22:26:29 +0000854 rm -f include/asm/proc include/asm/arch include/asm
wdenk7ebf7442002-11-02 23:17:16 +0000855
856mrproper \
857distclean: clobber unconfig
858
859backup:
860 F=`basename $(TOPDIR)` ; cd .. ; \
861 gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
862
863#########################################################################