blob: c205630856d11e394577a330b4c4438b45fe452f [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#########################################################################
185## MPC8xx Systems
186#########################################################################
187
188ADS860_config: unconfig
189 @./mkconfig $(@:_config=) ppc mpc8xx fads
190
191AMX860_config : unconfig
192 @./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
193
194c2mon_config: unconfig
195 @./mkconfig $(@:_config=) ppc mpc8xx c2mon
196
197CCM_config: unconfig
198 @./mkconfig $(@:_config=) ppc mpc8xx CCM siemens
199
200cogent_mpc8xx_config: unconfig
201 @./mkconfig $(@:_config=) ppc mpc8xx cogent
202
wdenk3bac3512003-03-12 10:41:04 +0000203ELPT860_config: unconfig
204 @./mkconfig $(@:_config=) ppc mpc8xx elpt860 LEOX
205
wdenk7ebf7442002-11-02 23:17:16 +0000206ESTEEM192E_config: unconfig
207 @./mkconfig $(@:_config=) ppc mpc8xx esteem192e
208
209ETX094_config : unconfig
210 @./mkconfig $(@:_config=) ppc mpc8xx etx094
211
212FADS823_config \
213FADS850SAR_config \
214FADS860T_config: unconfig
215 @./mkconfig $(@:_config=) ppc mpc8xx fads
216
217FLAGADM_config: unconfig
218 @./mkconfig $(@:_config=) ppc mpc8xx flagadm
219
wdenk7aa78612003-05-03 15:50:43 +0000220xtract_GEN860T = $(subst _SC,,$(subst _config,,$1))
221
222GEN860T_SC_config \
wdenk7ebf7442002-11-02 23:17:16 +0000223GEN860T_config: unconfig
wdenk7aa78612003-05-03 15:50:43 +0000224 @ >include/config.h
225 @[ -z "$(findstring _SC,$@)" ] || \
226 { echo "#define CONFIG_SC" >>include/config.h ; \
227 echo "With reduced H/W feature set (SC)..." ; \
228 }
229 @./mkconfig -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t
wdenk7ebf7442002-11-02 23:17:16 +0000230
231GENIETV_config: unconfig
232 @./mkconfig $(@:_config=) ppc mpc8xx genietv
233
234GTH_config: unconfig
235 @./mkconfig $(@:_config=) ppc mpc8xx gth
236
237hermes_config : unconfig
238 @./mkconfig $(@:_config=) ppc mpc8xx hermes
239
240IAD210_config: unconfig
241 @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
242
243xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
244
245ICU862_100MHz_config \
246ICU862_config: unconfig
247 @ >include/config.h
248 @[ -z "$(findstring _100MHz,$@)" ] || \
249 { echo "#define CONFIG_100MHz" >>include/config.h ; \
250 echo "... with 100MHz system clock" ; \
251 }
252 @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
253
254IP860_config : unconfig
255 @./mkconfig $(@:_config=) ppc mpc8xx ip860
256
257IVML24_256_config \
258IVML24_128_config \
259IVML24_config: unconfig
260 @ >include/config.h
261 @[ -z "$(findstring IVML24_config,$@)" ] || \
262 { echo "#define CONFIG_IVML24_16M" >>include/config.h ; \
263 }
264 @[ -z "$(findstring IVML24_128_config,$@)" ] || \
265 { echo "#define CONFIG_IVML24_32M" >>include/config.h ; \
266 }
267 @[ -z "$(findstring IVML24_256_config,$@)" ] || \
268 { echo "#define CONFIG_IVML24_64M" >>include/config.h ; \
269 }
270 @./mkconfig -a IVML24 ppc mpc8xx ivm
271
272IVMS8_256_config \
273IVMS8_128_config \
274IVMS8_config: unconfig
275 @ >include/config.h
276 @[ -z "$(findstring IVMS8_config,$@)" ] || \
277 { echo "#define CONFIG_IVMS8_16M" >>include/config.h ; \
278 }
279 @[ -z "$(findstring IVMS8_128_config,$@)" ] || \
280 { echo "#define CONFIG_IVMS8_32M" >>include/config.h ; \
281 }
282 @[ -z "$(findstring IVMS8_256_config,$@)" ] || \
283 { echo "#define CONFIG_IVMS8_64M" >>include/config.h ; \
284 }
285 @./mkconfig -a IVMS8 ppc mpc8xx ivm
286
wdenk56f94be2002-11-05 16:35:14 +0000287KUP4K_config : unconfig
288 @./mkconfig $(@:_config=) ppc mpc8xx kup4k
289
wdenk7ebf7442002-11-02 23:17:16 +0000290LANTEC_config : unconfig
291 @./mkconfig $(@:_config=) ppc mpc8xx lantec
292
293lwmon_config: unconfig
294 @./mkconfig $(@:_config=) ppc mpc8xx lwmon
295
296MBX_config \
297MBX860T_config: unconfig
298 @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
299
300MHPC_config: unconfig
301 @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
302
303MVS1_config : unconfig
304 @./mkconfig $(@:_config=) ppc mpc8xx mvs1
305
wdenk993cad92003-06-26 22:04:09 +0000306xtract_NETVIA = $(subst _V2,,$(subst _config,,$1))
307
308NETVIA_V2_config \
wdenk7ebf7442002-11-02 23:17:16 +0000309NETVIA_config: unconfig
wdenk993cad92003-06-26 22:04:09 +0000310 @ >include/config.h
311 @[ -z "$(findstring NETVIA_config,$@)" ] || \
312 { echo "#define CONFIG_NETVIA_VERSION 1" >>include/config.h ; \
313 echo "... Version 1" ; \
314 }
315 @[ -z "$(findstring NETVIA_V2_config,$@)" ] || \
316 { echo "#define CONFIG_NETVIA_VERSION 2" >>include/config.h ; \
317 echo "... Version 2" ; \
318 }
319 @./mkconfig -a $(call xtract_NETVIA,$@) ppc mpc8xx netvia
wdenk7ebf7442002-11-02 23:17:16 +0000320
321NX823_config: unconfig
322 @./mkconfig $(@:_config=) ppc mpc8xx nx823
323
324pcu_e_config: unconfig
325 @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
326
327R360MPI_config: unconfig
328 @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
329
wdenk682011f2003-06-03 23:54:09 +0000330RBC823_config: unconfig
331 @./mkconfig $(@:_config=) ppc mpc8xx rbc823
332
wdenk7ebf7442002-11-02 23:17:16 +0000333RPXClassic_config: unconfig
334 @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
335
336RPXlite_config: unconfig
337 @./mkconfig $(@:_config=) ppc mpc8xx RPXlite
338
wdenk73a8b272003-06-05 19:27:42 +0000339rmu_config: unconfig
340 @./mkconfig $(@:_config=) ppc mpc8xx rmu
341
wdenk7ebf7442002-11-02 23:17:16 +0000342RRvision_config: unconfig
343 @./mkconfig $(@:_config=) ppc mpc8xx RRvision
344
345RRvision_LCD_config: unconfig
346 @echo "#define CONFIG_LCD" >include/config.h
347 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
348 @./mkconfig -a RRvision ppc mpc8xx RRvision
349
350SM850_config : unconfig
351 @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
352
353SPD823TS_config: unconfig
354 @./mkconfig $(@:_config=) ppc mpc8xx spd8xx
355
wdenkdc7c9a12003-03-26 06:55:25 +0000356svm_sc8xx_config: unconfig
357 @ >include/config.h
358 @./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
359
wdenk7ebf7442002-11-02 23:17:16 +0000360SXNI855T_config: unconfig
361 @./mkconfig $(@:_config=) ppc mpc8xx sixnet
362
wdenkdb2f721f2003-03-06 00:58:30 +0000363# EMK MPC8xx based modules
364TOP860_config: unconfig
365 @./mkconfig $(@:_config=) ppc mpc8xx top860 emk
366
wdenk7ebf7442002-11-02 23:17:16 +0000367# Play some tricks for configuration selection
wdenk73a8b272003-06-05 19:27:42 +0000368# All boards can come with 50 MHz (default), 66MHz, 80MHz or 100 MHz clock,
wdenk7ebf7442002-11-02 23:17:16 +0000369# but only 855 and 860 boards may come with FEC
370# and 823 boards may have LCD support
wdenk73a8b272003-06-05 19:27:42 +0000371xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _100MHz,,$(subst _LCD,,$(subst _config,,$1)))))
wdenk7ebf7442002-11-02 23:17:16 +0000372
373FPS850L_config \
wdenk384ae022002-11-05 00:17:55 +0000374FPS860L_config \
wdenkf12e5682003-07-07 20:07:54 +0000375NSCU_config \
wdenk7ebf7442002-11-02 23:17:16 +0000376TQM823L_config \
377TQM823L_66MHz_config \
378TQM823L_80MHz_config \
379TQM823L_LCD_config \
380TQM823L_LCD_66MHz_config \
381TQM823L_LCD_80MHz_config \
382TQM850L_config \
383TQM850L_66MHz_config \
384TQM850L_80MHz_config \
385TQM855L_config \
386TQM855L_66MHz_config \
387TQM855L_80MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000388TQM860L_config \
389TQM860L_66MHz_config \
390TQM860L_80MHz_config \
wdenkd126bfb2003-04-10 11:18:18 +0000391TQM862L_config \
392TQM862L_66MHz_config \
wdenk73a8b272003-06-05 19:27:42 +0000393TQM862L_80MHz_config \
wdenkf12e5682003-07-07 20:07:54 +0000394TQM855M_config \
395TQM855M_66MHz_config \
396TQM855M_80MHz_config \
397TQM860M_config \
398TQM860M_66MHz_config \
399TQM860M_80MHz_config \
400TQM862M_config \
401TQM862M_66MHz_config \
402TQM862M_80MHz_config \
wdenk71f95112003-06-15 22:40:42 +0000403TQM862M_100MHz_config: unconfig
wdenk7ebf7442002-11-02 23:17:16 +0000404 @ >include/config.h
wdenk7ebf7442002-11-02 23:17:16 +0000405 @[ -z "$(findstring _66MHz,$@)" ] || \
406 { echo "#define CONFIG_66MHz" >>include/config.h ; \
407 echo "... with 66MHz system clock" ; \
408 }
409 @[ -z "$(findstring _80MHz,$@)" ] || \
410 { echo "#define CONFIG_80MHz" >>include/config.h ; \
411 echo "... with 80MHz system clock" ; \
412 }
wdenk73a8b272003-06-05 19:27:42 +0000413 @[ -z "$(findstring _100MHz,$@)" ] || \
414 { echo "#define CONFIG_100MHz" >>include/config.h ; \
415 echo "... with 100MHz system clock" ; \
416 }
wdenk7ebf7442002-11-02 23:17:16 +0000417 @[ -z "$(findstring _LCD,$@)" ] || \
418 { echo "#define CONFIG_LCD" >>include/config.h ; \
419 echo "#define CONFIG_NEC_NL6648BC20" >>include/config.h ; \
420 echo "... with LCD display" ; \
421 }
422 @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
423
424TTTech_config: unconfig
425 @echo "#define CONFIG_LCD" >include/config.h
426 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
427 @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
428
wdenk608c9142003-01-13 23:54:46 +0000429v37_config: unconfig
430 @echo "#define CONFIG_LCD" >include/config.h
431 @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
432 @./mkconfig $(@:_config=) ppc mpc8xx v37
433
wdenk7ebf7442002-11-02 23:17:16 +0000434#########################################################################
435## PPC4xx Systems
436#########################################################################
437
438ADCIOP_config: unconfig
439 @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
440
441AR405_config: unconfig
442 @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
443
stroese549826e2003-05-23 11:41:44 +0000444ASH405_config: unconfig
445 @./mkconfig $(@:_config=) ppc ppc4xx ash405 esd
446
447BUBINGA405EP_config:unconfig
448 @./mkconfig $(@:_config=) ppc ppc4xx bubinga405ep
449
wdenk7ebf7442002-11-02 23:17:16 +0000450CANBT_config: unconfig
451 @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
452
stroese549826e2003-05-23 11:41:44 +0000453CPCI405_config \
454CPCI4052_config \
455CPCI405AB_config: unconfig
wdenk7ebf7442002-11-02 23:17:16 +0000456 @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
457 @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk
458
459CPCI440_config: unconfig
460 @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
461
462CPCIISER4_config: unconfig
463 @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
464
465CRAYL1_config:unconfig
466 @./mkconfig $(@:_config=) ppc ppc4xx L1 cray
467
468DASA_SIM_config: unconfig
469 @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
470
471DU405_config: unconfig
472 @./mkconfig $(@:_config=) ppc ppc4xx du405 esd
473
474EBONY_config:unconfig
475 @./mkconfig $(@:_config=) ppc ppc4xx ebony
476
477ERIC_config:unconfig
478 @./mkconfig $(@:_config=) ppc ppc4xx eric
479
wdenkd1cbe852003-06-28 17:24:46 +0000480EXBITGEN_config:unconfig
481 @./mkconfig $(@:_config=) ppc ppc4xx exbitgen
482
wdenk7ebf7442002-11-02 23:17:16 +0000483MIP405_config:unconfig
484 @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
485
wdenkf3e0de62003-06-04 15:05:30 +0000486MIP405T_config:unconfig
487 @echo "#define CONFIG_MIP405T" >include/config.h
488 @echo "Enable subset config for MIP405T"
489 @./mkconfig -a MIP405 ppc ppc4xx mip405 mpl
490
wdenk7ebf7442002-11-02 23:17:16 +0000491ML2_config:unconfig
492 @./mkconfig $(@:_config=) ppc ppc4xx ml2
493
494OCRTC_config \
495ORSG_config: unconfig
496 @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
497
498PCI405_config: unconfig
499 @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
500
501PIP405_config:unconfig
502 @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
503
stroese549826e2003-05-23 11:41:44 +0000504PMC405_config: unconfig
505 @./mkconfig $(@:_config=) ppc ppc4xx pmc405 esd
506
wdenk7ebf7442002-11-02 23:17:16 +0000507W7OLMC_config \
508W7OLMG_config: unconfig
509 @./mkconfig $(@:_config=) ppc ppc4xx w7o
510
511WALNUT405_config:unconfig
512 @./mkconfig $(@:_config=) ppc ppc4xx walnut405
513
514#########################################################################
515## MPC824x Systems
516#########################################################################
wdenk3bac3512003-03-12 10:41:04 +0000517xtract_82xx = $(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1)))))
518
wdenk03329902003-06-20 22:36:30 +0000519A3000_config: unconfig
520 @./mkconfig $(@:_config=) ppc mpc824x a3000
521
wdenk7ebf7442002-11-02 23:17:16 +0000522BMW_config: unconfig
523 @./mkconfig $(@:_config=) ppc mpc824x bmw
524
wdenk3bac3512003-03-12 10:41:04 +0000525CPC45_config \
526CPC45_ROMBOOT_config: unconfig
527 @./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
528 @cd ./include ; \
529 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
530 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
531 echo "... booting from 8-bit flash" ; \
532 else \
533 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
534 echo "... booting from 64-bit flash" ; \
535 fi; \
536 echo "export CONFIG_BOOT_ROM" >> config.mk;
537
wdenk7ebf7442002-11-02 23:17:16 +0000538CU824_config: unconfig
539 @./mkconfig $(@:_config=) ppc mpc824x cu824
540
541MOUSSE_config: unconfig
542 @./mkconfig $(@:_config=) ppc mpc824x mousse
543
544MUSENKI_config: unconfig
545 @./mkconfig $(@:_config=) ppc mpc824x musenki
546
547OXC_config: unconfig
548 @./mkconfig $(@:_config=) ppc mpc824x oxc
549
550PN62_config: unconfig
551 @./mkconfig $(@:_config=) ppc mpc824x pn62
552
553Sandpoint8240_config: unconfig
554 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
555
556Sandpoint8245_config: unconfig
557 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
558
wdenkd1cbe852003-06-28 17:24:46 +0000559SL8245_config: unconfig
560 @./mkconfig $(@:_config=) ppc mpc824x sl8245
561
wdenk7ebf7442002-11-02 23:17:16 +0000562utx8245_config: unconfig
563 @./mkconfig $(@:_config=) ppc mpc824x utx8245
564
565#########################################################################
566## MPC8260 Systems
567#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000568
569cogent_mpc8260_config: unconfig
570 @./mkconfig $(@:_config=) ppc mpc8260 cogent
571
572CPU86_config \
573CPU86_ROMBOOT_config: unconfig
574 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
575 @cd ./include ; \
576 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
577 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
578 echo "... booting from 8-bit flash" ; \
579 else \
580 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
581 echo "... booting from 64-bit flash" ; \
582 fi; \
583 echo "export CONFIG_BOOT_ROM" >> config.mk;
584
585ep8260_config: unconfig
586 @./mkconfig $(@:_config=) ppc mpc8260 ep8260
587
588gw8260_config: unconfig
589 @./mkconfig $(@:_config=) ppc mpc8260 gw8260
590
591hymod_config: unconfig
592 @./mkconfig $(@:_config=) ppc mpc8260 hymod
593
594IPHASE4539_config: unconfig
595 @./mkconfig $(@:_config=) ppc mpc8260 iphase4539
596
597MPC8260ADS_config: unconfig
598 @./mkconfig $(@:_config=) ppc mpc8260 mpc8260ads
599
wdenkdb2f721f2003-03-06 00:58:30 +0000600MPC8266ADS_config: unconfig
601 @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
602
wdenk10f67012003-03-25 18:06:06 +0000603PM825_config \
604PM825_ROMBOOT_config: unconfig
605 @echo "#define CONFIG_PCI" >include/config.h
606 @./mkconfig -a PM826 ppc mpc8260 pm826
607 @cd ./include ; \
608 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
609 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
610 echo "... booting from 8-bit flash" ; \
611 else \
612 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
613 echo "... booting from 64-bit flash" ; \
614 fi; \
615 echo "export CONFIG_BOOT_ROM" >> config.mk; \
616
wdenk7ebf7442002-11-02 23:17:16 +0000617PM826_config \
618PM826_ROMBOOT_config: unconfig
619 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 pm826
620 @cd ./include ; \
621 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
622 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
623 echo "... booting from 8-bit flash" ; \
624 else \
625 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
626 echo "... booting from 64-bit flash" ; \
627 fi; \
628 echo "export CONFIG_BOOT_ROM" >> config.mk; \
629
630ppmc8260_config: unconfig
631 @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
632
633RPXsuper_config: unconfig
634 @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
635
636rsdproto_config: unconfig
637 @./mkconfig $(@:_config=) ppc mpc8260 rsdproto
638
639sacsng_config: unconfig
640 @./mkconfig $(@:_config=) ppc mpc8260 sacsng
641
642sbc8260_config: unconfig
643 @./mkconfig $(@:_config=) ppc mpc8260 sbc8260
644
645SCM_config: unconfig
646 @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
647
wdenk7aa78612003-05-03 15:50:43 +0000648TQM8255_config \
wdenk7ebf7442002-11-02 23:17:16 +0000649TQM8260_config \
650TQM8260_L2_config \
wdenk4532cb62003-04-27 22:52:51 +0000651TQM8255_266MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000652TQM8260_266MHz_config \
653TQM8260_L2_266MHz_config \
wdenk7aa78612003-05-03 15:50:43 +0000654TQM8255_300MHz_config \
wdenk7ebf7442002-11-02 23:17:16 +0000655TQM8260_300MHz_config: unconfig
656 @ >include/config.h
657 @if [ "$(findstring _L2_,$@)" ] ; then \
658 echo "#define CONFIG_L2_CACHE" >>include/config.h ; \
659 echo "... with L2 Cache support (60x Bus Mode)" ; \
660 else \
661 echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \
662 echo "... without L2 Cache support" ; \
663 fi
664 @[ -z "$(findstring _266MHz,$@)" ] || \
665 { echo "#define CONFIG_266MHz" >>include/config.h ; \
666 echo "... with 266MHz system clock" ; \
667 }
668 @[ -z "$(findstring _300MHz,$@)" ] || \
669 { echo "#define CONFIG_300MHz" >>include/config.h ; \
670 echo "... with 300MHz system clock" ; \
671 }
wdenk4532cb62003-04-27 22:52:51 +0000672 @[ -z "$(findstring TQM8255_,$@)" ] || \
673 { echo "#define CONFIG_MPC8255" >>include/config.h ; }
674 @./mkconfig -a TQM8260 ppc mpc8260 tqm8260
wdenk7ebf7442002-11-02 23:17:16 +0000675
wdenk7aa78612003-05-03 15:50:43 +0000676atc_config: unconfig
677 @./mkconfig $(@:_config=) ppc mpc8260 atc
678
wdenk7ebf7442002-11-02 23:17:16 +0000679#########################################################################
680## 74xx/7xx Systems
681#########################################################################
682
wdenkc7de8292002-11-19 11:04:11 +0000683AmigaOneG3SE_config: unconfig
684 @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
685
wdenk7ebf7442002-11-02 23:17:16 +0000686EVB64260_config \
687EVB64260_750CX_config: unconfig
688 @./mkconfig EVB64260 ppc 74xx_7xx evb64260
689
690ZUMA_config: unconfig
691 @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
692
693PCIPPC2_config \
694PCIPPC6_config: unconfig
695 @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
696
697BAB7xx_config: unconfig
698 @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
699
700ELPPC_config: unconfig
701 @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
702
703#========================================================================
704# ARM
705#========================================================================
706#########################################################################
707## StrongARM Systems
708#########################################################################
709
wdenkdc7c9a12003-03-26 06:55:25 +0000710at91rm9200dk_config : unconfig
711 @./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
712
wdenk7ebf7442002-11-02 23:17:16 +0000713lart_config : unconfig
714 @./mkconfig $(@:_config=) arm sa1100 lart
715
716dnp1110_config : unconfig
717 @./mkconfig $(@:_config=) arm sa1100 dnp1110
718
719shannon_config : unconfig
720 @./mkconfig $(@:_config=) arm sa1100 shannon
721
722#########################################################################
wdenk2e5983d2003-07-15 20:04:06 +0000723## ARM92xT Systems
wdenk7ebf7442002-11-02 23:17:16 +0000724#########################################################################
725
wdenk43d96162003-03-06 00:02:04 +0000726xtract_trab = $(subst _big_flash,,$(subst _config,,$1))
727
wdenk2e5983d2003-07-15 20:04:06 +0000728omap1510inn_config : unconfig
729 @./mkconfig $(@:_config=) arm arm925t omap1510inn
730
wdenk7ebf7442002-11-02 23:17:16 +0000731smdk2400_config : unconfig
732 @./mkconfig $(@:_config=) arm arm920t smdk2400
733
734smdk2410_config : unconfig
735 @./mkconfig $(@:_config=) arm arm920t smdk2410
736
wdenk43d96162003-03-06 00:02:04 +0000737trab_config \
738trab_big_flash_config: unconfig
739 @ >include/config.h
740 @[ -z "$(findstring _big_flash,$@)" ] || \
741 { echo "#define CONFIG_BIG_FLASH" >>include/config.h ; \
742 echo "... with big flash support" ; \
743 }
744 @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
wdenk7ebf7442002-11-02 23:17:16 +0000745
wdenk1cb8e982003-03-06 21:55:29 +0000746VCMA9_config : unconfig
747 @./mkconfig $(@:_config=) arm arm920t vcma9 mpl
748
wdenk7ebf7442002-11-02 23:17:16 +0000749#########################################################################
750## ARM720T Systems
751#########################################################################
752
753impa7_config : unconfig
754 @./mkconfig $(@:_config=) arm arm720t impa7
755
756ep7312_config : unconfig
757 @./mkconfig $(@:_config=) arm arm720t ep7312
758
759#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000760## XScale Systems
wdenk7ebf7442002-11-02 23:17:16 +0000761#########################################################################
762
wdenk7ebf7442002-11-02 23:17:16 +0000763cradle_config : unconfig
wdenk8bde7f72003-06-27 21:31:46 +0000764 @./mkconfig $(@:_config=) arm pxa cradle
wdenk7ebf7442002-11-02 23:17:16 +0000765
766csb226_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000767 @./mkconfig $(@:_config=) arm pxa csb226
wdenk7ebf7442002-11-02 23:17:16 +0000768
wdenk43d96162003-03-06 00:02:04 +0000769innokom_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000770 @./mkconfig $(@:_config=) arm pxa innokom
wdenk43d96162003-03-06 00:02:04 +0000771
772lubbock_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000773 @./mkconfig $(@:_config=) arm pxa lubbock
wdenk43d96162003-03-06 00:02:04 +0000774
wdenk52f52c12003-06-19 23:04:19 +0000775logodl_config : unconfig
776 @./mkconfig $(@:_config=) arm pxa logodl
777
wdenk3e386912003-04-05 00:53:31 +0000778wepep250_config : unconfig
wdenk4c3b21a2003-05-23 12:36:20 +0000779 @./mkconfig $(@:_config=) arm pxa wepep250
wdenk3e386912003-04-05 00:53:31 +0000780
wdenk2262cfe2002-11-18 00:14:45 +0000781#========================================================================
782# i386
783#========================================================================
784#########################################################################
wdenk1cb8e982003-03-06 21:55:29 +0000785## AMD SC520 CDP
wdenk2262cfe2002-11-18 00:14:45 +0000786#########################################################################
787sc520_cdp_config : unconfig
788 @./mkconfig $(@:_config=) i386 i386 sc520_cdp
789
wdenk7a8e9bed2003-05-31 18:35:21 +0000790sc520_spunk_config : unconfig
791 @./mkconfig $(@:_config=) i386 i386 sc520_spunk
792
793sc520_spunk_rel_config : unconfig
794 @./mkconfig $(@:_config=) i386 i386 sc520_spunk
795
wdenk43d96162003-03-06 00:02:04 +0000796#========================================================================
797# MIPS
798#========================================================================
wdenk7ebf7442002-11-02 23:17:16 +0000799#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000800## MIPS32 4Kc
801#########################################################################
802
803incaip_config : unconfig
804 @./mkconfig $(@:_config=) mips mips incaip
805
wdenk3e386912003-04-05 00:53:31 +0000806purple_config : unconfig
807 @./mkconfig $(@:_config=) mips mips purple
wdenk43d96162003-03-06 00:02:04 +0000808
wdenk3e386912003-04-05 00:53:31 +0000809#########################################################################
810#########################################################################
wdenk7ebf7442002-11-02 23:17:16 +0000811
812clean:
813 find . -type f \
814 \( -name 'core' -o -name '*.bak' -o -name '*~' \
815 -o -name '*.o' -o -name '*.a' \) -print \
816 | xargs rm -f
wdenk85ec0bc2003-03-31 16:34:49 +0000817 rm -f examples/hello_world examples/timer \
wdenk3e386912003-04-05 00:53:31 +0000818 examples/eepro100_eeprom examples/sched \
wdenk7a8e9bed2003-05-31 18:35:21 +0000819 examples/mem_to_mem_idma2intr examples/82559_eeprom
820
wdenk7ebf7442002-11-02 23:17:16 +0000821 rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
822 rm -f tools/easylogo/easylogo tools/bmp_logo
823 rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
wdenk228f29a2002-12-08 09:53:23 +0000824 rm -f tools/env/fw_printenv tools/env/fw_setenv
wdenk7f70e852003-05-20 14:25:27 +0000825 rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
wdenk7ebf7442002-11-02 23:17:16 +0000826
827clobber: clean
828 find . -type f \
829 \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
830 -print \
831 | xargs rm -f
832 rm -f $(OBJS) *.bak tags TAGS
833 rm -fr *.*~
wdenkd126bfb2003-04-10 11:18:18 +0000834 rm -f u-boot u-boot.bin u-boot.srec u-boot.map System.map
wdenk228f29a2002-12-08 09:53:23 +0000835 rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
wdenk3e386912003-04-05 00:53:31 +0000836 rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
wdenkb783eda2003-06-25 22:26:29 +0000837 rm -f include/asm/proc include/asm/arch include/asm
wdenk7ebf7442002-11-02 23:17:16 +0000838
839mrproper \
840distclean: clobber unconfig
841
842backup:
843 F=`basename $(TOPDIR)` ; cd .. ; \
844 gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
845
846#########################################################################