blob: 8ceaad1d1e43663c4c1831fa6b74a1c75fa17099 [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
wdenk2262cfe2002-11-18 00:14:45 +0000109LIBS += fs/jffs2/libjffs2.a fs/fdos/libfdos.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)
wdenkb2184c32002-11-19 23:01:07 +0000137 $(LD) $(LDFLAGS) $(OBJS) \
138 --start-group $(LIBS) --end-group \
139 -Map u-boot.map -o u-boot
wdenk7ebf7442002-11-02 23:17:16 +0000140
141subdirs:
142 @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir || exit 1 ; done
143
144depend dep:
145 @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
146
147tags:
148 ctags -w `find $(SUBDIRS) include \
149 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
150
151etags:
152 etags -a `find $(SUBDIRS) include \
153 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
154
155System.map: u-boot
156 @$(NM) $< | \
157 grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
158 sort > System.map
159
160#########################################################################
161else
162all install u-boot u-boot.srec depend dep:
163 @echo "System not configured - see README" >&2
164 @ exit 1
165endif
166
167#########################################################################
168
169unconfig:
170 rm -f include/config.h include/config.mk
171
172#========================================================================
173# PowerPC
174#========================================================================
wdenk0db5bca2003-03-31 17:27:09 +0000175
176#########################################################################
177## MPC5xx Systems
178#########################################################################
179
180cmi_mpc5xx_config: unconfig
181 @./mkconfig $(@:_config=) ppc mpc5xx cmi
182
wdenk7ebf7442002-11-02 23:17:16 +0000183#########################################################################
184## MPC8xx Systems
185#########################################################################
186
187ADS860_config: unconfig
188 @./mkconfig $(@:_config=) ppc mpc8xx fads
189
190AMX860_config : unconfig
191 @./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
192
193c2mon_config: unconfig
194 @./mkconfig $(@:_config=) ppc mpc8xx c2mon
195
196CCM_config: unconfig
197 @./mkconfig $(@:_config=) ppc mpc8xx CCM siemens
198
199cogent_mpc8xx_config: unconfig
200 @./mkconfig $(@:_config=) ppc mpc8xx cogent
201
wdenk3bac3512003-03-12 10:41:04 +0000202ELPT860_config: unconfig
203 @./mkconfig $(@:_config=) ppc mpc8xx elpt860 LEOX
204
wdenk7ebf7442002-11-02 23:17:16 +0000205ESTEEM192E_config: unconfig
206 @./mkconfig $(@:_config=) ppc mpc8xx esteem192e
207
208ETX094_config : unconfig
209 @./mkconfig $(@:_config=) ppc mpc8xx etx094
210
211FADS823_config \
212FADS850SAR_config \
213FADS860T_config: unconfig
214 @./mkconfig $(@:_config=) ppc mpc8xx fads
215
216FLAGADM_config: unconfig
217 @./mkconfig $(@:_config=) ppc mpc8xx flagadm
218
wdenk7aa78612003-05-03 15:50:43 +0000219xtract_GEN860T = $(subst _SC,,$(subst _config,,$1))
220
221GEN860T_SC_config \
wdenk7ebf7442002-11-02 23:17:16 +0000222GEN860T_config: unconfig
wdenk7aa78612003-05-03 15:50:43 +0000223 @ >include/config.h
224 @[ -z "$(findstring _SC,$@)" ] || \
225 { echo "#define CONFIG_SC" >>include/config.h ; \
226 echo "With reduced H/W feature set (SC)..." ; \
227 }
228 @./mkconfig -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t
wdenk7ebf7442002-11-02 23:17:16 +0000229
230GENIETV_config: unconfig
231 @./mkconfig $(@:_config=) ppc mpc8xx genietv
232
233GTH_config: unconfig
234 @./mkconfig $(@:_config=) ppc mpc8xx gth
235
236hermes_config : unconfig
237 @./mkconfig $(@:_config=) ppc mpc8xx hermes
238
239IAD210_config: unconfig
240 @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
241
242xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
243
244ICU862_100MHz_config \
245ICU862_config: unconfig
246 @ >include/config.h
247 @[ -z "$(findstring _100MHz,$@)" ] || \
248 { echo "#define CONFIG_100MHz" >>include/config.h ; \
249 echo "... with 100MHz system clock" ; \
250 }
251 @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
252
253IP860_config : unconfig
254 @./mkconfig $(@:_config=) ppc mpc8xx ip860
255
256IVML24_256_config \
257IVML24_128_config \
258IVML24_config: unconfig
259 @ >include/config.h
260 @[ -z "$(findstring IVML24_config,$@)" ] || \
261 { echo "#define CONFIG_IVML24_16M" >>include/config.h ; \
262 }
263 @[ -z "$(findstring IVML24_128_config,$@)" ] || \
264 { echo "#define CONFIG_IVML24_32M" >>include/config.h ; \
265 }
266 @[ -z "$(findstring IVML24_256_config,$@)" ] || \
267 { echo "#define CONFIG_IVML24_64M" >>include/config.h ; \
268 }
269 @./mkconfig -a IVML24 ppc mpc8xx ivm
270
271IVMS8_256_config \
272IVMS8_128_config \
273IVMS8_config: unconfig
274 @ >include/config.h
275 @[ -z "$(findstring IVMS8_config,$@)" ] || \
276 { echo "#define CONFIG_IVMS8_16M" >>include/config.h ; \
277 }
278 @[ -z "$(findstring IVMS8_128_config,$@)" ] || \
279 { echo "#define CONFIG_IVMS8_32M" >>include/config.h ; \
280 }
281 @[ -z "$(findstring IVMS8_256_config,$@)" ] || \
282 { echo "#define CONFIG_IVMS8_64M" >>include/config.h ; \
283 }
284 @./mkconfig -a IVMS8 ppc mpc8xx ivm
285
wdenk56f94be2002-11-05 16:35:14 +0000286KUP4K_config : unconfig
287 @./mkconfig $(@:_config=) ppc mpc8xx kup4k
288
wdenk7ebf7442002-11-02 23:17:16 +0000289LANTEC_config : unconfig
290 @./mkconfig $(@:_config=) ppc mpc8xx lantec
291
292lwmon_config: unconfig
293 @./mkconfig $(@:_config=) ppc mpc8xx lwmon
294
295MBX_config \
296MBX860T_config: unconfig
297 @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
298
299MHPC_config: unconfig
300 @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
301
302MVS1_config : unconfig
303 @./mkconfig $(@:_config=) ppc mpc8xx mvs1
304
305NETVIA_config: unconfig
306 @./mkconfig $(@:_config=) ppc mpc8xx netvia
307
308NX823_config: unconfig
309 @./mkconfig $(@:_config=) ppc mpc8xx nx823
310
311pcu_e_config: unconfig
312 @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
313
314R360MPI_config: unconfig
315 @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
316
wdenk682011f2003-06-03 23:54:09 +0000317RBC823_config: unconfig
318 @./mkconfig $(@:_config=) ppc mpc8xx rbc823
319
wdenk7ebf7442002-11-02 23:17:16 +0000320RPXClassic_config: unconfig
321 @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
322
323RPXlite_config: unconfig
324 @./mkconfig $(@:_config=) ppc mpc8xx RPXlite
325
326RRvision_config: unconfig
327 @./mkconfig $(@:_config=) ppc mpc8xx RRvision
328
329RRvision_LCD_config: unconfig
330 @echo "#define CONFIG_LCD" >include/config.h
331 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
332 @./mkconfig -a RRvision ppc mpc8xx RRvision
333
334SM850_config : unconfig
335 @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
336
337SPD823TS_config: unconfig
338 @./mkconfig $(@:_config=) ppc mpc8xx spd8xx
339
wdenkdc7c9a12003-03-26 06:55:25 +0000340svm_sc8xx_config: unconfig
341 @ >include/config.h
342 @./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
343
wdenk7ebf7442002-11-02 23:17:16 +0000344SXNI855T_config: unconfig
345 @./mkconfig $(@:_config=) ppc mpc8xx sixnet
346
wdenkdb2f7212003-03-06 00:58:30 +0000347# EMK MPC8xx based modules
348TOP860_config: unconfig
349 @./mkconfig $(@:_config=) ppc mpc8xx top860 emk
350
wdenk7ebf7442002-11-02 23:17:16 +0000351# Play some tricks for configuration selection
352# All boards can come with 50 MHz (default), 66MHz or 80MHz clock,
353# but only 855 and 860 boards may come with FEC
354# and 823 boards may have LCD support
wdenk824a1eb2003-04-20 16:49:37 +0000355xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _LCD,,$(subst _config,,$1))))
wdenk7ebf7442002-11-02 23:17:16 +0000356
357FPS850L_config \
wdenk384ae022002-11-05 00:17:55 +0000358FPS860L_config \
wdenk7ebf7442002-11-02 23:17:16 +0000359TQM823L_config \
360TQM823L_66MHz_config \
361TQM823L_80MHz_config \
362TQM823L_LCD_config \
363TQM823L_LCD_66MHz_config \
364TQM823L_LCD_80MHz_config \
365TQM850L_config \
366TQM850L_66MHz_config \
367TQM850L_80MHz_config \
368TQM855L_config \
369TQM855L_66MHz_config \
370TQM855L_80MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000371TQM860L_config \
372TQM860L_66MHz_config \
373TQM860L_80MHz_config \
wdenkd126bfb2003-04-10 11:18:18 +0000374TQM862L_config \
375TQM862L_66MHz_config \
376TQM862L_80MHz_config: unconfig
wdenk7ebf7442002-11-02 23:17:16 +0000377 @ >include/config.h
wdenk7ebf7442002-11-02 23:17:16 +0000378 @[ -z "$(findstring _66MHz,$@)" ] || \
379 { echo "#define CONFIG_66MHz" >>include/config.h ; \
380 echo "... with 66MHz system clock" ; \
381 }
382 @[ -z "$(findstring _80MHz,$@)" ] || \
383 { echo "#define CONFIG_80MHz" >>include/config.h ; \
384 echo "... with 80MHz system clock" ; \
385 }
386 @[ -z "$(findstring _LCD,$@)" ] || \
387 { echo "#define CONFIG_LCD" >>include/config.h ; \
388 echo "#define CONFIG_NEC_NL6648BC20" >>include/config.h ; \
389 echo "... with LCD display" ; \
390 }
391 @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
392
393TTTech_config: unconfig
394 @echo "#define CONFIG_LCD" >include/config.h
395 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
396 @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
397
wdenk608c9142003-01-13 23:54:46 +0000398v37_config: unconfig
399 @echo "#define CONFIG_LCD" >include/config.h
400 @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
401 @./mkconfig $(@:_config=) ppc mpc8xx v37
402
wdenk7ebf7442002-11-02 23:17:16 +0000403#########################################################################
404## PPC4xx Systems
405#########################################################################
406
407ADCIOP_config: unconfig
408 @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
409
410AR405_config: unconfig
411 @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
412
stroese549826e2003-05-23 11:41:44 +0000413ASH405_config: unconfig
414 @./mkconfig $(@:_config=) ppc ppc4xx ash405 esd
415
416BUBINGA405EP_config:unconfig
417 @./mkconfig $(@:_config=) ppc ppc4xx bubinga405ep
418
wdenk7ebf7442002-11-02 23:17:16 +0000419CANBT_config: unconfig
420 @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
421
stroese549826e2003-05-23 11:41:44 +0000422CPCI405_config \
423CPCI4052_config \
424CPCI405AB_config: unconfig
wdenk7ebf7442002-11-02 23:17:16 +0000425 @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
426 @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk
427
428CPCI440_config: unconfig
429 @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
430
431CPCIISER4_config: unconfig
432 @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
433
434CRAYL1_config:unconfig
435 @./mkconfig $(@:_config=) ppc ppc4xx L1 cray
436
437DASA_SIM_config: unconfig
438 @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
439
440DU405_config: unconfig
441 @./mkconfig $(@:_config=) ppc ppc4xx du405 esd
442
443EBONY_config:unconfig
444 @./mkconfig $(@:_config=) ppc ppc4xx ebony
445
446ERIC_config:unconfig
447 @./mkconfig $(@:_config=) ppc ppc4xx eric
448
449MIP405_config:unconfig
450 @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
451
wdenkf3e0de62003-06-04 15:05:30 +0000452MIP405T_config:unconfig
453 @echo "#define CONFIG_MIP405T" >include/config.h
454 @echo "Enable subset config for MIP405T"
455 @./mkconfig -a MIP405 ppc ppc4xx mip405 mpl
456
wdenk7ebf7442002-11-02 23:17:16 +0000457ML2_config:unconfig
458 @./mkconfig $(@:_config=) ppc ppc4xx ml2
459
460OCRTC_config \
461ORSG_config: unconfig
462 @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
463
464PCI405_config: unconfig
465 @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
466
467PIP405_config:unconfig
468 @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
469
stroese549826e2003-05-23 11:41:44 +0000470PMC405_config: unconfig
471 @./mkconfig $(@:_config=) ppc ppc4xx pmc405 esd
472
wdenk7ebf7442002-11-02 23:17:16 +0000473W7OLMC_config \
474W7OLMG_config: unconfig
475 @./mkconfig $(@:_config=) ppc ppc4xx w7o
476
477WALNUT405_config:unconfig
478 @./mkconfig $(@:_config=) ppc ppc4xx walnut405
479
480#########################################################################
481## MPC824x Systems
482#########################################################################
wdenk3bac3512003-03-12 10:41:04 +0000483xtract_82xx = $(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1)))))
484
wdenk7ebf7442002-11-02 23:17:16 +0000485BMW_config: unconfig
486 @./mkconfig $(@:_config=) ppc mpc824x bmw
487
wdenk3bac3512003-03-12 10:41:04 +0000488CPC45_config \
489CPC45_ROMBOOT_config: unconfig
490 @./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
491 @cd ./include ; \
492 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
493 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
494 echo "... booting from 8-bit flash" ; \
495 else \
496 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
497 echo "... booting from 64-bit flash" ; \
498 fi; \
499 echo "export CONFIG_BOOT_ROM" >> config.mk;
500
wdenk7ebf7442002-11-02 23:17:16 +0000501CU824_config: unconfig
502 @./mkconfig $(@:_config=) ppc mpc824x cu824
503
504MOUSSE_config: unconfig
505 @./mkconfig $(@:_config=) ppc mpc824x mousse
506
507MUSENKI_config: unconfig
508 @./mkconfig $(@:_config=) ppc mpc824x musenki
509
510OXC_config: unconfig
511 @./mkconfig $(@:_config=) ppc mpc824x oxc
512
513PN62_config: unconfig
514 @./mkconfig $(@:_config=) ppc mpc824x pn62
515
516Sandpoint8240_config: unconfig
517 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
518
519Sandpoint8245_config: unconfig
520 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
521
522utx8245_config: unconfig
523 @./mkconfig $(@:_config=) ppc mpc824x utx8245
524
525#########################################################################
526## MPC8260 Systems
527#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000528
529cogent_mpc8260_config: unconfig
530 @./mkconfig $(@:_config=) ppc mpc8260 cogent
531
532CPU86_config \
533CPU86_ROMBOOT_config: unconfig
534 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
535 @cd ./include ; \
536 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
537 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
538 echo "... booting from 8-bit flash" ; \
539 else \
540 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
541 echo "... booting from 64-bit flash" ; \
542 fi; \
543 echo "export CONFIG_BOOT_ROM" >> config.mk;
544
545ep8260_config: unconfig
546 @./mkconfig $(@:_config=) ppc mpc8260 ep8260
547
548gw8260_config: unconfig
549 @./mkconfig $(@:_config=) ppc mpc8260 gw8260
550
551hymod_config: unconfig
552 @./mkconfig $(@:_config=) ppc mpc8260 hymod
553
554IPHASE4539_config: unconfig
555 @./mkconfig $(@:_config=) ppc mpc8260 iphase4539
556
557MPC8260ADS_config: unconfig
558 @./mkconfig $(@:_config=) ppc mpc8260 mpc8260ads
559
wdenkdb2f7212003-03-06 00:58:30 +0000560MPC8266ADS_config: unconfig
561 @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
562
wdenk10f67012003-03-25 18:06:06 +0000563PM825_config \
564PM825_ROMBOOT_config: unconfig
565 @echo "#define CONFIG_PCI" >include/config.h
566 @./mkconfig -a PM826 ppc mpc8260 pm826
567 @cd ./include ; \
568 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
569 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
570 echo "... booting from 8-bit flash" ; \
571 else \
572 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
573 echo "... booting from 64-bit flash" ; \
574 fi; \
575 echo "export CONFIG_BOOT_ROM" >> config.mk; \
576
wdenk7ebf7442002-11-02 23:17:16 +0000577PM826_config \
578PM826_ROMBOOT_config: unconfig
579 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 pm826
580 @cd ./include ; \
581 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
582 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
583 echo "... booting from 8-bit flash" ; \
584 else \
585 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
586 echo "... booting from 64-bit flash" ; \
587 fi; \
588 echo "export CONFIG_BOOT_ROM" >> config.mk; \
589
590ppmc8260_config: unconfig
591 @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
592
593RPXsuper_config: unconfig
594 @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
595
596rsdproto_config: unconfig
597 @./mkconfig $(@:_config=) ppc mpc8260 rsdproto
598
599sacsng_config: unconfig
600 @./mkconfig $(@:_config=) ppc mpc8260 sacsng
601
602sbc8260_config: unconfig
603 @./mkconfig $(@:_config=) ppc mpc8260 sbc8260
604
605SCM_config: unconfig
606 @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
607
wdenk7aa78612003-05-03 15:50:43 +0000608TQM8255_config \
wdenk7ebf7442002-11-02 23:17:16 +0000609TQM8260_config \
610TQM8260_L2_config \
wdenk4532cb62003-04-27 22:52:51 +0000611TQM8255_266MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000612TQM8260_266MHz_config \
613TQM8260_L2_266MHz_config \
wdenk7aa78612003-05-03 15:50:43 +0000614TQM8255_300MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000615TQM8260_300MHz_config: unconfig
616 @ >include/config.h
617 @if [ "$(findstring _L2_,$@)" ] ; then \
618 echo "#define CONFIG_L2_CACHE" >>include/config.h ; \
619 echo "... with L2 Cache support (60x Bus Mode)" ; \
620 else \
621 echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \
622 echo "... without L2 Cache support" ; \
623 fi
624 @[ -z "$(findstring _266MHz,$@)" ] || \
625 { echo "#define CONFIG_266MHz" >>include/config.h ; \
626 echo "... with 266MHz system clock" ; \
627 }
628 @[ -z "$(findstring _300MHz,$@)" ] || \
629 { echo "#define CONFIG_300MHz" >>include/config.h ; \
630 echo "... with 300MHz system clock" ; \
631 }
wdenk4532cb62003-04-27 22:52:51 +0000632 @[ -z "$(findstring TQM8255_,$@)" ] || \
633 { echo "#define CONFIG_MPC8255" >>include/config.h ; }
634 @./mkconfig -a TQM8260 ppc mpc8260 tqm8260
wdenk7ebf7442002-11-02 23:17:16 +0000635
wdenk7aa78612003-05-03 15:50:43 +0000636atc_config: unconfig
637 @./mkconfig $(@:_config=) ppc mpc8260 atc
638
wdenk7ebf7442002-11-02 23:17:16 +0000639#########################################################################
640## 74xx/7xx Systems
641#########################################################################
642
wdenkc7de8292002-11-19 11:04:11 +0000643AmigaOneG3SE_config: unconfig
644 @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
645
wdenk7ebf7442002-11-02 23:17:16 +0000646EVB64260_config \
647EVB64260_750CX_config: unconfig
648 @./mkconfig EVB64260 ppc 74xx_7xx evb64260
649
650ZUMA_config: unconfig
651 @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
652
653PCIPPC2_config \
654PCIPPC6_config: unconfig
655 @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
656
657BAB7xx_config: unconfig
658 @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
659
660ELPPC_config: unconfig
661 @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
662
663#========================================================================
664# ARM
665#========================================================================
666#########################################################################
667## StrongARM Systems
668#########################################################################
669
wdenkdc7c9a12003-03-26 06:55:25 +0000670at91rm9200dk_config : unconfig
671 @./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
672
wdenk7ebf7442002-11-02 23:17:16 +0000673lart_config : unconfig
674 @./mkconfig $(@:_config=) arm sa1100 lart
675
676dnp1110_config : unconfig
677 @./mkconfig $(@:_config=) arm sa1100 dnp1110
678
679shannon_config : unconfig
680 @./mkconfig $(@:_config=) arm sa1100 shannon
681
682#########################################################################
683## ARM920T Systems
684#########################################################################
685
wdenk43d96162003-03-06 00:02:04 +0000686xtract_trab = $(subst _big_flash,,$(subst _config,,$1))
687
wdenk7ebf7442002-11-02 23:17:16 +0000688smdk2400_config : unconfig
689 @./mkconfig $(@:_config=) arm arm920t smdk2400
690
691smdk2410_config : unconfig
692 @./mkconfig $(@:_config=) arm arm920t smdk2410
693
wdenk43d96162003-03-06 00:02:04 +0000694trab_config \
695trab_big_flash_config: unconfig
696 @ >include/config.h
697 @[ -z "$(findstring _big_flash,$@)" ] || \
698 { echo "#define CONFIG_BIG_FLASH" >>include/config.h ; \
699 echo "... with big flash support" ; \
700 }
701 @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
wdenk7ebf7442002-11-02 23:17:16 +0000702
wdenk1cb8e982003-03-06 21:55:29 +0000703VCMA9_config : unconfig
704 @./mkconfig $(@:_config=) arm arm920t vcma9 mpl
705
wdenk7ebf7442002-11-02 23:17:16 +0000706#########################################################################
707## ARM720T Systems
708#########################################################################
709
710impa7_config : unconfig
711 @./mkconfig $(@:_config=) arm arm720t impa7
712
713ep7312_config : unconfig
714 @./mkconfig $(@:_config=) arm arm720t ep7312
715
716#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000717## XScale Systems
wdenk7ebf7442002-11-02 23:17:16 +0000718#########################################################################
719
wdenk7ebf7442002-11-02 23:17:16 +0000720cradle_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000721 @./mkconfig $(@:_config=) arm pxa cradle
wdenk7ebf7442002-11-02 23:17:16 +0000722
723csb226_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000724 @./mkconfig $(@:_config=) arm pxa csb226
wdenk7ebf7442002-11-02 23:17:16 +0000725
wdenk43d96162003-03-06 00:02:04 +0000726innokom_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000727 @./mkconfig $(@:_config=) arm pxa innokom
wdenk43d96162003-03-06 00:02:04 +0000728
729lubbock_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000730 @./mkconfig $(@:_config=) arm pxa lubbock
wdenk43d96162003-03-06 00:02:04 +0000731
wdenk3e386912003-04-05 00:53:31 +0000732wepep250_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000733 @./mkconfig $(@:_config=) arm pxa wepep250
wdenk3e386912003-04-05 00:53:31 +0000734
wdenk2262cfe2002-11-18 00:14:45 +0000735#========================================================================
736# i386
737#========================================================================
738#########################################################################
wdenk1cb8e982003-03-06 21:55:29 +0000739## AMD SC520 CDP
wdenk2262cfe2002-11-18 00:14:45 +0000740#########################################################################
741sc520_cdp_config : unconfig
742 @./mkconfig $(@:_config=) i386 i386 sc520_cdp
743
wdenk7a8e9bed2003-05-31 18:35:21 +0000744sc520_spunk_config : unconfig
745 @./mkconfig $(@:_config=) i386 i386 sc520_spunk
746
747sc520_spunk_rel_config : unconfig
748 @./mkconfig $(@:_config=) i386 i386 sc520_spunk
749
wdenk43d96162003-03-06 00:02:04 +0000750#========================================================================
751# MIPS
752#========================================================================
wdenk7ebf7442002-11-02 23:17:16 +0000753#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000754## MIPS32 4Kc
755#########################################################################
756
757incaip_config : unconfig
758 @./mkconfig $(@:_config=) mips mips incaip
759
wdenk3e386912003-04-05 00:53:31 +0000760purple_config : unconfig
761 @./mkconfig $(@:_config=) mips mips purple
wdenk43d96162003-03-06 00:02:04 +0000762
wdenk3e386912003-04-05 00:53:31 +0000763#########################################################################
764#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000765
766clean:
767 find . -type f \
768 \( -name 'core' -o -name '*.bak' -o -name '*~' \
769 -o -name '*.o' -o -name '*.a' \) -print \
770 | xargs rm -f
wdenk85ec0bc2003-03-31 16:34:49 +0000771 rm -f examples/hello_world examples/timer \
wdenk3e386912003-04-05 00:53:31 +0000772 examples/eepro100_eeprom examples/sched \
wdenk7a8e9bed2003-05-31 18:35:21 +0000773 examples/mem_to_mem_idma2intr examples/82559_eeprom
774
wdenk7ebf7442002-11-02 23:17:16 +0000775 rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
776 rm -f tools/easylogo/easylogo tools/bmp_logo
777 rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
wdenk228f29a2002-12-08 09:53:23 +0000778 rm -f tools/env/fw_printenv tools/env/fw_setenv
wdenk7f70e852003-05-20 14:25:27 +0000779 rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
wdenk7ebf7442002-11-02 23:17:16 +0000780
781clobber: clean
782 find . -type f \
783 \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
784 -print \
785 | xargs rm -f
786 rm -f $(OBJS) *.bak tags TAGS
787 rm -fr *.*~
wdenkd126bfb2003-04-10 11:18:18 +0000788 rm -f u-boot u-boot.bin u-boot.srec u-boot.map System.map
wdenk228f29a2002-12-08 09:53:23 +0000789 rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
wdenk3e386912003-04-05 00:53:31 +0000790 rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
wdenk7ebf7442002-11-02 23:17:16 +0000791 rm -f include/asm/arch include/asm
792
793mrproper \
794distclean: clobber unconfig
795
796backup:
797 F=`basename $(TOPDIR)` ; cd .. ; \
798 gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
799
800#########################################################################