blob: af1404292692b3216aedb64d1180a002e2c1fa11 [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)
wdenkc8434db2003-03-26 06:55:25 +000060CROSS_COMPILE = arm-linux-
wdenk7ebf7442002-11-02 23:17:16 +000061endif
wdenk591dda52002-11-18 00:14:45 +000062ifeq ($(ARCH),i386)
wdenkabda5ca2003-05-31 18:35:21 +000063ifeq ($(HOSTARCH),i386)
64CROSS_COMPILE =
65else
66CROSS_COMPILE = i386-linux-
67endif
wdenk7ebf7442002-11-02 23:17:16 +000068endif
wdenk4a5c8a72003-03-06 00:02:04 +000069ifeq ($(ARCH),mips)
70CROSS_COMPILE = mips_4KC-
wdenk7ebf7442002-11-02 23:17:16 +000071endif
wdenk591dda52002-11-18 00:14:45 +000072endif
wdenk4a5c8a72003-03-06 00:02:04 +000073endif
wdenk7ebf7442002-11-02 23:17:16 +000074
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
wdenk591dda52002-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
wdenk7a428cc2003-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
wdenk4a5c8a72003-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)
wdenk67ff36c2002-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#========================================================================
wdenk359733b2003-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
wdenkef5fe752003-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
wdenk541a76d2003-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
wdenk541a76d2003-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
wdenk70764a32003-06-26 22:04:09 +0000305xtract_NETVIA = $(subst _V2,,$(subst _config,,$1))
306
307NETVIA_V2_config \
wdenk7ebf7442002-11-02 23:17:16 +0000308NETVIA_config: unconfig
wdenk70764a32003-06-26 22:04:09 +0000309 @ >include/config.h
310 @[ -z "$(findstring NETVIA_config,$@)" ] || \
311 { echo "#define CONFIG_NETVIA_VERSION 1" >>include/config.h ; \
312 echo "... Version 1" ; \
313 }
314 @[ -z "$(findstring NETVIA_V2_config,$@)" ] || \
315 { echo "#define CONFIG_NETVIA_VERSION 2" >>include/config.h ; \
316 echo "... Version 2" ; \
317 }
318 @./mkconfig -a $(call xtract_NETVIA,$@) ppc mpc8xx netvia
wdenk7ebf7442002-11-02 23:17:16 +0000319
320NX823_config: unconfig
321 @./mkconfig $(@:_config=) ppc mpc8xx nx823
322
323pcu_e_config: unconfig
324 @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
325
326R360MPI_config: unconfig
327 @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
328
wdenk4e112c12003-06-03 23:54:09 +0000329RBC823_config: unconfig
330 @./mkconfig $(@:_config=) ppc mpc8xx rbc823
331
wdenk7ebf7442002-11-02 23:17:16 +0000332RPXClassic_config: unconfig
333 @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
334
335RPXlite_config: unconfig
336 @./mkconfig $(@:_config=) ppc mpc8xx RPXlite
337
wdenke6466f62003-06-05 19:27:42 +0000338rmu_config: unconfig
339 @./mkconfig $(@:_config=) ppc mpc8xx rmu
340
wdenk7ebf7442002-11-02 23:17:16 +0000341RRvision_config: unconfig
342 @./mkconfig $(@:_config=) ppc mpc8xx RRvision
343
344RRvision_LCD_config: unconfig
345 @echo "#define CONFIG_LCD" >include/config.h
346 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
347 @./mkconfig -a RRvision ppc mpc8xx RRvision
348
349SM850_config : unconfig
350 @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
351
352SPD823TS_config: unconfig
353 @./mkconfig $(@:_config=) ppc mpc8xx spd8xx
354
wdenkc8434db2003-03-26 06:55:25 +0000355svm_sc8xx_config: unconfig
356 @ >include/config.h
357 @./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
358
wdenk7ebf7442002-11-02 23:17:16 +0000359SXNI855T_config: unconfig
360 @./mkconfig $(@:_config=) ppc mpc8xx sixnet
361
wdenkb666c8f2003-03-06 00:58:30 +0000362# EMK MPC8xx based modules
363TOP860_config: unconfig
364 @./mkconfig $(@:_config=) ppc mpc8xx top860 emk
365
wdenk7ebf7442002-11-02 23:17:16 +0000366# Play some tricks for configuration selection
wdenke6466f62003-06-05 19:27:42 +0000367# All boards can come with 50 MHz (default), 66MHz, 80MHz or 100 MHz clock,
wdenk7ebf7442002-11-02 23:17:16 +0000368# but only 855 and 860 boards may come with FEC
369# and 823 boards may have LCD support
wdenke6466f62003-06-05 19:27:42 +0000370xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _100MHz,,$(subst _LCD,,$(subst _config,,$1)))))
wdenk7ebf7442002-11-02 23:17:16 +0000371
372FPS850L_config \
wdenk384ae022002-11-05 00:17:55 +0000373FPS860L_config \
wdenk7ebf7442002-11-02 23:17:16 +0000374TQM823L_config \
375TQM823L_66MHz_config \
376TQM823L_80MHz_config \
377TQM823L_LCD_config \
378TQM823L_LCD_66MHz_config \
379TQM823L_LCD_80MHz_config \
380TQM850L_config \
381TQM850L_66MHz_config \
382TQM850L_80MHz_config \
383TQM855L_config \
384TQM855L_66MHz_config \
385TQM855L_80MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000386TQM860L_config \
387TQM860L_66MHz_config \
388TQM860L_80MHz_config \
wdenk6bd14892003-04-10 11:18:18 +0000389TQM862L_config \
390TQM862L_66MHz_config \
wdenke6466f62003-06-05 19:27:42 +0000391TQM862L_80MHz_config \
wdenk7a428cc2003-06-15 22:40:42 +0000392TQM862M_100MHz_config: unconfig
wdenk7ebf7442002-11-02 23:17:16 +0000393 @ >include/config.h
wdenk7ebf7442002-11-02 23:17:16 +0000394 @[ -z "$(findstring _66MHz,$@)" ] || \
395 { echo "#define CONFIG_66MHz" >>include/config.h ; \
396 echo "... with 66MHz system clock" ; \
397 }
398 @[ -z "$(findstring _80MHz,$@)" ] || \
399 { echo "#define CONFIG_80MHz" >>include/config.h ; \
400 echo "... with 80MHz system clock" ; \
401 }
wdenke6466f62003-06-05 19:27:42 +0000402 @[ -z "$(findstring _100MHz,$@)" ] || \
403 { echo "#define CONFIG_100MHz" >>include/config.h ; \
404 echo "... with 100MHz system clock" ; \
405 }
wdenk7ebf7442002-11-02 23:17:16 +0000406 @[ -z "$(findstring _LCD,$@)" ] || \
407 { echo "#define CONFIG_LCD" >>include/config.h ; \
408 echo "#define CONFIG_NEC_NL6648BC20" >>include/config.h ; \
409 echo "... with LCD display" ; \
410 }
411 @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
412
413TTTech_config: unconfig
414 @echo "#define CONFIG_LCD" >include/config.h
415 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
416 @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
417
wdenk2dad91b2003-01-13 23:54:46 +0000418v37_config: unconfig
419 @echo "#define CONFIG_LCD" >include/config.h
420 @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
421 @./mkconfig $(@:_config=) ppc mpc8xx v37
422
wdenk7ebf7442002-11-02 23:17:16 +0000423#########################################################################
424## PPC4xx Systems
425#########################################################################
426
427ADCIOP_config: unconfig
428 @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
429
430AR405_config: unconfig
431 @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
432
stroesebfcc82b2003-05-23 11:41:44 +0000433ASH405_config: unconfig
434 @./mkconfig $(@:_config=) ppc ppc4xx ash405 esd
435
436BUBINGA405EP_config:unconfig
437 @./mkconfig $(@:_config=) ppc ppc4xx bubinga405ep
438
wdenk7ebf7442002-11-02 23:17:16 +0000439CANBT_config: unconfig
440 @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
441
stroesebfcc82b2003-05-23 11:41:44 +0000442CPCI405_config \
443CPCI4052_config \
444CPCI405AB_config: unconfig
wdenk7ebf7442002-11-02 23:17:16 +0000445 @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
446 @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk
447
448CPCI440_config: unconfig
449 @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
450
451CPCIISER4_config: unconfig
452 @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
453
454CRAYL1_config:unconfig
455 @./mkconfig $(@:_config=) ppc ppc4xx L1 cray
456
457DASA_SIM_config: unconfig
458 @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
459
460DU405_config: unconfig
461 @./mkconfig $(@:_config=) ppc ppc4xx du405 esd
462
463EBONY_config:unconfig
464 @./mkconfig $(@:_config=) ppc ppc4xx ebony
465
466ERIC_config:unconfig
467 @./mkconfig $(@:_config=) ppc ppc4xx eric
468
469MIP405_config:unconfig
470 @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
471
wdenke39c2842003-06-04 15:05:30 +0000472MIP405T_config:unconfig
473 @echo "#define CONFIG_MIP405T" >include/config.h
474 @echo "Enable subset config for MIP405T"
475 @./mkconfig -a MIP405 ppc ppc4xx mip405 mpl
476
wdenk7ebf7442002-11-02 23:17:16 +0000477ML2_config:unconfig
478 @./mkconfig $(@:_config=) ppc ppc4xx ml2
479
480OCRTC_config \
481ORSG_config: unconfig
482 @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
483
484PCI405_config: unconfig
485 @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
486
487PIP405_config:unconfig
488 @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
489
stroesebfcc82b2003-05-23 11:41:44 +0000490PMC405_config: unconfig
491 @./mkconfig $(@:_config=) ppc ppc4xx pmc405 esd
492
wdenk7ebf7442002-11-02 23:17:16 +0000493W7OLMC_config \
494W7OLMG_config: unconfig
495 @./mkconfig $(@:_config=) ppc ppc4xx w7o
496
497WALNUT405_config:unconfig
498 @./mkconfig $(@:_config=) ppc ppc4xx walnut405
499
500#########################################################################
501## MPC824x Systems
502#########################################################################
wdenkef5fe752003-03-12 10:41:04 +0000503xtract_82xx = $(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1)))))
504
wdenk8aeb24e2003-06-20 22:36:30 +0000505A3000_config: unconfig
506 @./mkconfig $(@:_config=) ppc mpc824x a3000
507
wdenk7ebf7442002-11-02 23:17:16 +0000508BMW_config: unconfig
509 @./mkconfig $(@:_config=) ppc mpc824x bmw
510
wdenkef5fe752003-03-12 10:41:04 +0000511CPC45_config \
512CPC45_ROMBOOT_config: unconfig
513 @./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
514 @cd ./include ; \
515 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
516 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
517 echo "... booting from 8-bit flash" ; \
518 else \
519 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
520 echo "... booting from 64-bit flash" ; \
521 fi; \
522 echo "export CONFIG_BOOT_ROM" >> config.mk;
523
wdenk7ebf7442002-11-02 23:17:16 +0000524CU824_config: unconfig
525 @./mkconfig $(@:_config=) ppc mpc824x cu824
526
527MOUSSE_config: unconfig
528 @./mkconfig $(@:_config=) ppc mpc824x mousse
529
530MUSENKI_config: unconfig
531 @./mkconfig $(@:_config=) ppc mpc824x musenki
532
533OXC_config: unconfig
534 @./mkconfig $(@:_config=) ppc mpc824x oxc
535
536PN62_config: unconfig
537 @./mkconfig $(@:_config=) ppc mpc824x pn62
538
539Sandpoint8240_config: unconfig
540 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
541
542Sandpoint8245_config: unconfig
543 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
544
545utx8245_config: unconfig
546 @./mkconfig $(@:_config=) ppc mpc824x utx8245
547
548#########################################################################
549## MPC8260 Systems
550#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000551
552cogent_mpc8260_config: unconfig
553 @./mkconfig $(@:_config=) ppc mpc8260 cogent
554
555CPU86_config \
556CPU86_ROMBOOT_config: unconfig
557 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
558 @cd ./include ; \
559 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
560 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
561 echo "... booting from 8-bit flash" ; \
562 else \
563 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
564 echo "... booting from 64-bit flash" ; \
565 fi; \
566 echo "export CONFIG_BOOT_ROM" >> config.mk;
567
568ep8260_config: unconfig
569 @./mkconfig $(@:_config=) ppc mpc8260 ep8260
570
571gw8260_config: unconfig
572 @./mkconfig $(@:_config=) ppc mpc8260 gw8260
573
574hymod_config: unconfig
575 @./mkconfig $(@:_config=) ppc mpc8260 hymod
576
577IPHASE4539_config: unconfig
578 @./mkconfig $(@:_config=) ppc mpc8260 iphase4539
579
580MPC8260ADS_config: unconfig
581 @./mkconfig $(@:_config=) ppc mpc8260 mpc8260ads
582
wdenkb666c8f2003-03-06 00:58:30 +0000583MPC8266ADS_config: unconfig
584 @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
585
wdenk4b57dcc2003-03-25 18:06:06 +0000586PM825_config \
587PM825_ROMBOOT_config: unconfig
588 @echo "#define CONFIG_PCI" >include/config.h
589 @./mkconfig -a PM826 ppc mpc8260 pm826
590 @cd ./include ; \
591 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
592 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
593 echo "... booting from 8-bit flash" ; \
594 else \
595 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
596 echo "... booting from 64-bit flash" ; \
597 fi; \
598 echo "export CONFIG_BOOT_ROM" >> config.mk; \
599
wdenk7ebf7442002-11-02 23:17:16 +0000600PM826_config \
601PM826_ROMBOOT_config: unconfig
602 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 pm826
603 @cd ./include ; \
604 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
605 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
606 echo "... booting from 8-bit flash" ; \
607 else \
608 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
609 echo "... booting from 64-bit flash" ; \
610 fi; \
611 echo "export CONFIG_BOOT_ROM" >> config.mk; \
612
613ppmc8260_config: unconfig
614 @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
615
616RPXsuper_config: unconfig
617 @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
618
619rsdproto_config: unconfig
620 @./mkconfig $(@:_config=) ppc mpc8260 rsdproto
621
622sacsng_config: unconfig
623 @./mkconfig $(@:_config=) ppc mpc8260 sacsng
624
625sbc8260_config: unconfig
626 @./mkconfig $(@:_config=) ppc mpc8260 sbc8260
627
628SCM_config: unconfig
629 @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
630
wdenk541a76d2003-05-03 15:50:43 +0000631TQM8255_config \
wdenk7ebf7442002-11-02 23:17:16 +0000632TQM8260_config \
633TQM8260_L2_config \
wdenkc08f1582003-04-27 22:52:51 +0000634TQM8255_266MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000635TQM8260_266MHz_config \
636TQM8260_L2_266MHz_config \
wdenk541a76d2003-05-03 15:50:43 +0000637TQM8255_300MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000638TQM8260_300MHz_config: unconfig
639 @ >include/config.h
640 @if [ "$(findstring _L2_,$@)" ] ; then \
641 echo "#define CONFIG_L2_CACHE" >>include/config.h ; \
642 echo "... with L2 Cache support (60x Bus Mode)" ; \
643 else \
644 echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \
645 echo "... without L2 Cache support" ; \
646 fi
647 @[ -z "$(findstring _266MHz,$@)" ] || \
648 { echo "#define CONFIG_266MHz" >>include/config.h ; \
649 echo "... with 266MHz system clock" ; \
650 }
651 @[ -z "$(findstring _300MHz,$@)" ] || \
652 { echo "#define CONFIG_300MHz" >>include/config.h ; \
653 echo "... with 300MHz system clock" ; \
654 }
wdenkc08f1582003-04-27 22:52:51 +0000655 @[ -z "$(findstring TQM8255_,$@)" ] || \
656 { echo "#define CONFIG_MPC8255" >>include/config.h ; }
657 @./mkconfig -a TQM8260 ppc mpc8260 tqm8260
wdenk7ebf7442002-11-02 23:17:16 +0000658
wdenk541a76d2003-05-03 15:50:43 +0000659atc_config: unconfig
660 @./mkconfig $(@:_config=) ppc mpc8260 atc
661
wdenk7ebf7442002-11-02 23:17:16 +0000662#########################################################################
663## 74xx/7xx Systems
664#########################################################################
665
wdenk452cfd62002-11-19 11:04:11 +0000666AmigaOneG3SE_config: unconfig
667 @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
668
wdenk7ebf7442002-11-02 23:17:16 +0000669EVB64260_config \
670EVB64260_750CX_config: unconfig
671 @./mkconfig EVB64260 ppc 74xx_7xx evb64260
672
673ZUMA_config: unconfig
674 @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
675
676PCIPPC2_config \
677PCIPPC6_config: unconfig
678 @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
679
680BAB7xx_config: unconfig
681 @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
682
683ELPPC_config: unconfig
684 @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
685
686#========================================================================
687# ARM
688#========================================================================
689#########################################################################
690## StrongARM Systems
691#########################################################################
692
wdenkc8434db2003-03-26 06:55:25 +0000693at91rm9200dk_config : unconfig
694 @./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
695
wdenk7ebf7442002-11-02 23:17:16 +0000696lart_config : unconfig
697 @./mkconfig $(@:_config=) arm sa1100 lart
698
699dnp1110_config : unconfig
700 @./mkconfig $(@:_config=) arm sa1100 dnp1110
701
702shannon_config : unconfig
703 @./mkconfig $(@:_config=) arm sa1100 shannon
704
705#########################################################################
706## ARM920T Systems
707#########################################################################
708
wdenk4a5c8a72003-03-06 00:02:04 +0000709xtract_trab = $(subst _big_flash,,$(subst _config,,$1))
710
wdenk7ebf7442002-11-02 23:17:16 +0000711smdk2400_config : unconfig
712 @./mkconfig $(@:_config=) arm arm920t smdk2400
713
714smdk2410_config : unconfig
715 @./mkconfig $(@:_config=) arm arm920t smdk2410
716
wdenk4a5c8a72003-03-06 00:02:04 +0000717trab_config \
718trab_big_flash_config: unconfig
719 @ >include/config.h
720 @[ -z "$(findstring _big_flash,$@)" ] || \
721 { echo "#define CONFIG_BIG_FLASH" >>include/config.h ; \
722 echo "... with big flash support" ; \
723 }
724 @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
wdenk7ebf7442002-11-02 23:17:16 +0000725
wdenk1fe2c702003-03-06 21:55:29 +0000726VCMA9_config : unconfig
727 @./mkconfig $(@:_config=) arm arm920t vcma9 mpl
728
wdenk7ebf7442002-11-02 23:17:16 +0000729#########################################################################
730## ARM720T Systems
731#########################################################################
732
733impa7_config : unconfig
734 @./mkconfig $(@:_config=) arm arm720t impa7
735
736ep7312_config : unconfig
737 @./mkconfig $(@:_config=) arm arm720t ep7312
738
739#########################################################################
wdenk4a5c8a72003-03-06 00:02:04 +0000740## XScale Systems
wdenk7ebf7442002-11-02 23:17:16 +0000741#########################################################################
742
wdenk7ebf7442002-11-02 23:17:16 +0000743cradle_config : unconfig
wdenk0463e042003-05-23 12:36:20 +0000744 @./mkconfig $(@:_config=) arm pxa cradle
wdenk7ebf7442002-11-02 23:17:16 +0000745
746csb226_config : unconfig
wdenk0463e042003-05-23 12:36:20 +0000747 @./mkconfig $(@:_config=) arm pxa csb226
wdenk7ebf7442002-11-02 23:17:16 +0000748
wdenk4a5c8a72003-03-06 00:02:04 +0000749innokom_config : unconfig
wdenk0463e042003-05-23 12:36:20 +0000750 @./mkconfig $(@:_config=) arm pxa innokom
wdenk4a5c8a72003-03-06 00:02:04 +0000751
752lubbock_config : unconfig
wdenk0463e042003-05-23 12:36:20 +0000753 @./mkconfig $(@:_config=) arm pxa lubbock
wdenk4a5c8a72003-03-06 00:02:04 +0000754
wdenk88e72a32003-06-19 23:04:19 +0000755logodl_config : unconfig
756 @./mkconfig $(@:_config=) arm pxa logodl
757
wdenkb02744a2003-04-05 00:53:31 +0000758wepep250_config : unconfig
wdenk0463e042003-05-23 12:36:20 +0000759 @./mkconfig $(@:_config=) arm pxa wepep250
wdenkb02744a2003-04-05 00:53:31 +0000760
wdenk591dda52002-11-18 00:14:45 +0000761#========================================================================
762# i386
763#========================================================================
764#########################################################################
wdenk1fe2c702003-03-06 21:55:29 +0000765## AMD SC520 CDP
wdenk591dda52002-11-18 00:14:45 +0000766#########################################################################
767sc520_cdp_config : unconfig
768 @./mkconfig $(@:_config=) i386 i386 sc520_cdp
769
wdenkabda5ca2003-05-31 18:35:21 +0000770sc520_spunk_config : unconfig
771 @./mkconfig $(@:_config=) i386 i386 sc520_spunk
772
773sc520_spunk_rel_config : unconfig
774 @./mkconfig $(@:_config=) i386 i386 sc520_spunk
775
wdenk4a5c8a72003-03-06 00:02:04 +0000776#========================================================================
777# MIPS
778#========================================================================
wdenk7ebf7442002-11-02 23:17:16 +0000779#########################################################################
wdenk4a5c8a72003-03-06 00:02:04 +0000780## MIPS32 4Kc
781#########################################################################
782
783incaip_config : unconfig
784 @./mkconfig $(@:_config=) mips mips incaip
785
wdenkb02744a2003-04-05 00:53:31 +0000786purple_config : unconfig
787 @./mkconfig $(@:_config=) mips mips purple
wdenk4a5c8a72003-03-06 00:02:04 +0000788
wdenkb02744a2003-04-05 00:53:31 +0000789#########################################################################
790#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000791
792clean:
793 find . -type f \
794 \( -name 'core' -o -name '*.bak' -o -name '*~' \
795 -o -name '*.o' -o -name '*.a' \) -print \
796 | xargs rm -f
wdenk8dba0502003-03-31 16:34:49 +0000797 rm -f examples/hello_world examples/timer \
wdenkb02744a2003-04-05 00:53:31 +0000798 examples/eepro100_eeprom examples/sched \
wdenkabda5ca2003-05-31 18:35:21 +0000799 examples/mem_to_mem_idma2intr examples/82559_eeprom
800
wdenk7ebf7442002-11-02 23:17:16 +0000801 rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
802 rm -f tools/easylogo/easylogo tools/bmp_logo
803 rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
wdenk9dfa8d12002-12-08 09:53:23 +0000804 rm -f tools/env/fw_printenv tools/env/fw_setenv
wdenk0893c472003-05-20 14:25:27 +0000805 rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
wdenk7ebf7442002-11-02 23:17:16 +0000806
807clobber: clean
808 find . -type f \
809 \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
810 -print \
811 | xargs rm -f
812 rm -f $(OBJS) *.bak tags TAGS
813 rm -fr *.*~
wdenk6bd14892003-04-10 11:18:18 +0000814 rm -f u-boot u-boot.bin u-boot.srec u-boot.map System.map
wdenk9dfa8d12002-12-08 09:53:23 +0000815 rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
wdenkb02744a2003-04-05 00:53:31 +0000816 rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
wdenkbb2d9272003-06-25 22:26:29 +0000817 rm -f include/asm/proc include/asm/arch include/asm
wdenk7ebf7442002-11-02 23:17:16 +0000818
819mrproper \
820distclean: clobber unconfig
821
822backup:
823 F=`basename $(TOPDIR)` ; cd .. ; \
824 gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
825
826#########################################################################