]>
Commit | Line | Data |
---|---|---|
7ebf7443 WD |
1 | # |
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 | ||
24 | HOSTARCH := $(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 | ||
32 | HOSTOS := $(shell uname -s | tr A-Z a-z | \ | |
33 | sed -e 's/\(cygwin\).*/cygwin/') | |
34 | ||
35 | export HOSTARCH | |
36 | ||
37 | # Deal with colliding definitions from tcsh etc. | |
38 | VENDOR= | |
39 | ||
40 | ######################################################################### | |
41 | ||
42 | TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) | |
43 | export TOPDIR | |
44 | ||
45 | ifeq (include/config.mk,$(wildcard include/config.mk)) | |
46 | # load ARCH, BOARD, and CPU configuration | |
47 | include include/config.mk | |
48 | export ARCH CPU BOARD VENDOR | |
49 | # load other configuration | |
50 | include $(TOPDIR)/config.mk | |
51 | ||
52 | ifndef CROSS_COMPILE | |
53 | ifeq ($(HOSTARCH),ppc) | |
54 | CROSS_COMPILE = | |
55 | else | |
7ebf7443 WD |
56 | ifeq ($(ARCH),ppc) |
57 | CROSS_COMPILE = ppc_8xx- | |
58 | endif | |
59 | ifeq ($(ARCH),arm) | |
dc7c9a1a | 60 | CROSS_COMPILE = arm-linux- |
7ebf7443 | 61 | endif |
2262cfee WD |
62 | ifeq ($(ARCH),i386) |
63 | #CROSS_COMPILE = i386-elf- | |
64 | endif | |
43d9616c WD |
65 | ifeq ($(ARCH),mips) |
66 | CROSS_COMPILE = mips_4KC- | |
67 | endif | |
7ebf7443 WD |
68 | endif |
69 | endif | |
70 | ||
71 | export CROSS_COMPILE | |
72 | ||
73 | # The "tools" are needed early, so put this first | |
74 | SUBDIRS = tools \ | |
75 | lib_generic \ | |
76 | lib_$(ARCH) \ | |
77 | cpu/$(CPU) \ | |
78 | board/$(BOARDDIR) \ | |
79 | common \ | |
80 | disk \ | |
81 | fs \ | |
82 | net \ | |
83 | rtc \ | |
84 | dtt \ | |
85 | drivers \ | |
86 | post \ | |
87 | post/cpu \ | |
88 | examples | |
89 | ||
90 | ######################################################################### | |
91 | # U-Boot objects....order is important (i.e. start must be first) | |
92 | ||
93 | OBJS = cpu/$(CPU)/start.o | |
2262cfee WD |
94 | ifeq ($(CPU),i386) |
95 | OBJS += cpu/$(CPU)/start16.o | |
96 | OBJS += cpu/$(CPU)/reset.o | |
97 | endif | |
7ebf7443 WD |
98 | ifeq ($(CPU),ppc4xx) |
99 | OBJS += cpu/$(CPU)/resetvec.o | |
100 | endif | |
101 | ||
102 | LIBS = board/$(BOARDDIR)/lib$(BOARD).a | |
103 | LIBS += cpu/$(CPU)/lib$(CPU).a | |
104 | LIBS += lib_$(ARCH)/lib$(ARCH).a | |
2262cfee | 105 | LIBS += fs/jffs2/libjffs2.a fs/fdos/libfdos.a |
7ebf7443 WD |
106 | LIBS += net/libnet.a |
107 | LIBS += disk/libdisk.a | |
108 | LIBS += rtc/librtc.a | |
109 | LIBS += dtt/libdtt.a | |
110 | LIBS += drivers/libdrivers.a | |
111 | LIBS += post/libpost.a post/cpu/libcpu.a | |
112 | LIBS += common/libcommon.a | |
113 | LIBS += lib_generic/libgeneric.a | |
114 | ||
115 | ######################################################################### | |
116 | ||
117 | all: u-boot.srec u-boot.bin System.map | |
118 | ||
119 | install: all | |
43d9616c WD |
120 | -cp u-boot.bin /tftpboot/u-boot.bin |
121 | -cp u-boot.bin /net/denx/tftpboot/u-boot.bin | |
7ebf7443 WD |
122 | |
123 | u-boot.srec: u-boot | |
124 | $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ | |
125 | ||
126 | u-boot.bin: u-boot | |
127 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ | |
128 | ||
129 | u-boot.dis: u-boot | |
130 | $(OBJDUMP) -d $< > $@ | |
131 | ||
132 | u-boot: depend subdirs $(OBJS) $(LIBS) $(LDSCRIPT) | |
b2184c31 WD |
133 | $(LD) $(LDFLAGS) $(OBJS) \ |
134 | --start-group $(LIBS) --end-group \ | |
135 | -Map u-boot.map -o u-boot | |
7ebf7443 WD |
136 | |
137 | subdirs: | |
138 | @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir || exit 1 ; done | |
139 | ||
140 | depend dep: | |
141 | @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done | |
142 | ||
143 | tags: | |
144 | ctags -w `find $(SUBDIRS) include \ | |
145 | \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)` | |
146 | ||
147 | etags: | |
148 | etags -a `find $(SUBDIRS) include \ | |
149 | \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)` | |
150 | ||
151 | System.map: u-boot | |
152 | @$(NM) $< | \ | |
153 | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ | |
154 | sort > System.map | |
155 | ||
156 | ######################################################################### | |
157 | else | |
158 | all install u-boot u-boot.srec depend dep: | |
159 | @echo "System not configured - see README" >&2 | |
160 | @ exit 1 | |
161 | endif | |
162 | ||
163 | ######################################################################### | |
164 | ||
165 | unconfig: | |
166 | rm -f include/config.h include/config.mk | |
167 | ||
168 | #======================================================================== | |
169 | # PowerPC | |
170 | #======================================================================== | |
0db5bca8 WD |
171 | |
172 | ######################################################################### | |
173 | ## MPC5xx Systems | |
174 | ######################################################################### | |
175 | ||
176 | cmi_mpc5xx_config: unconfig | |
177 | @./mkconfig $(@:_config=) ppc mpc5xx cmi | |
178 | ||
7ebf7443 WD |
179 | ######################################################################### |
180 | ## MPC8xx Systems | |
181 | ######################################################################### | |
182 | ||
183 | ADS860_config: unconfig | |
184 | @./mkconfig $(@:_config=) ppc mpc8xx fads | |
185 | ||
186 | AMX860_config : unconfig | |
187 | @./mkconfig $(@:_config=) ppc mpc8xx amx860 westel | |
188 | ||
189 | c2mon_config: unconfig | |
190 | @./mkconfig $(@:_config=) ppc mpc8xx c2mon | |
191 | ||
192 | CCM_config: unconfig | |
193 | @./mkconfig $(@:_config=) ppc mpc8xx CCM siemens | |
194 | ||
195 | cogent_mpc8xx_config: unconfig | |
196 | @./mkconfig $(@:_config=) ppc mpc8xx cogent | |
197 | ||
3bac3513 WD |
198 | ELPT860_config: unconfig |
199 | @./mkconfig $(@:_config=) ppc mpc8xx elpt860 LEOX | |
200 | ||
7ebf7443 WD |
201 | ESTEEM192E_config: unconfig |
202 | @./mkconfig $(@:_config=) ppc mpc8xx esteem192e | |
203 | ||
204 | ETX094_config : unconfig | |
205 | @./mkconfig $(@:_config=) ppc mpc8xx etx094 | |
206 | ||
207 | FADS823_config \ | |
208 | FADS850SAR_config \ | |
209 | FADS860T_config: unconfig | |
210 | @./mkconfig $(@:_config=) ppc mpc8xx fads | |
211 | ||
212 | FLAGADM_config: unconfig | |
213 | @./mkconfig $(@:_config=) ppc mpc8xx flagadm | |
214 | ||
215 | GEN860T_config: unconfig | |
216 | @./mkconfig $(@:_config=) ppc mpc8xx gen860t | |
217 | ||
218 | GENIETV_config: unconfig | |
219 | @./mkconfig $(@:_config=) ppc mpc8xx genietv | |
220 | ||
221 | GTH_config: unconfig | |
222 | @./mkconfig $(@:_config=) ppc mpc8xx gth | |
223 | ||
224 | hermes_config : unconfig | |
225 | @./mkconfig $(@:_config=) ppc mpc8xx hermes | |
226 | ||
227 | IAD210_config: unconfig | |
228 | @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens | |
229 | ||
230 | xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1)) | |
231 | ||
232 | ICU862_100MHz_config \ | |
233 | ICU862_config: unconfig | |
234 | @ >include/config.h | |
235 | @[ -z "$(findstring _100MHz,$@)" ] || \ | |
236 | { echo "#define CONFIG_100MHz" >>include/config.h ; \ | |
237 | echo "... with 100MHz system clock" ; \ | |
238 | } | |
239 | @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862 | |
240 | ||
241 | IP860_config : unconfig | |
242 | @./mkconfig $(@:_config=) ppc mpc8xx ip860 | |
243 | ||
244 | IVML24_256_config \ | |
245 | IVML24_128_config \ | |
246 | IVML24_config: unconfig | |
247 | @ >include/config.h | |
248 | @[ -z "$(findstring IVML24_config,$@)" ] || \ | |
249 | { echo "#define CONFIG_IVML24_16M" >>include/config.h ; \ | |
250 | } | |
251 | @[ -z "$(findstring IVML24_128_config,$@)" ] || \ | |
252 | { echo "#define CONFIG_IVML24_32M" >>include/config.h ; \ | |
253 | } | |
254 | @[ -z "$(findstring IVML24_256_config,$@)" ] || \ | |
255 | { echo "#define CONFIG_IVML24_64M" >>include/config.h ; \ | |
256 | } | |
257 | @./mkconfig -a IVML24 ppc mpc8xx ivm | |
258 | ||
259 | IVMS8_256_config \ | |
260 | IVMS8_128_config \ | |
261 | IVMS8_config: unconfig | |
262 | @ >include/config.h | |
263 | @[ -z "$(findstring IVMS8_config,$@)" ] || \ | |
264 | { echo "#define CONFIG_IVMS8_16M" >>include/config.h ; \ | |
265 | } | |
266 | @[ -z "$(findstring IVMS8_128_config,$@)" ] || \ | |
267 | { echo "#define CONFIG_IVMS8_32M" >>include/config.h ; \ | |
268 | } | |
269 | @[ -z "$(findstring IVMS8_256_config,$@)" ] || \ | |
270 | { echo "#define CONFIG_IVMS8_64M" >>include/config.h ; \ | |
271 | } | |
272 | @./mkconfig -a IVMS8 ppc mpc8xx ivm | |
273 | ||
56f94be3 WD |
274 | KUP4K_config : unconfig |
275 | @./mkconfig $(@:_config=) ppc mpc8xx kup4k | |
276 | ||
7ebf7443 WD |
277 | LANTEC_config : unconfig |
278 | @./mkconfig $(@:_config=) ppc mpc8xx lantec | |
279 | ||
280 | lwmon_config: unconfig | |
281 | @./mkconfig $(@:_config=) ppc mpc8xx lwmon | |
282 | ||
283 | MBX_config \ | |
284 | MBX860T_config: unconfig | |
285 | @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx | |
286 | ||
287 | MHPC_config: unconfig | |
288 | @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec | |
289 | ||
290 | MVS1_config : unconfig | |
291 | @./mkconfig $(@:_config=) ppc mpc8xx mvs1 | |
292 | ||
293 | NETVIA_config: unconfig | |
294 | @./mkconfig $(@:_config=) ppc mpc8xx netvia | |
295 | ||
296 | NX823_config: unconfig | |
297 | @./mkconfig $(@:_config=) ppc mpc8xx nx823 | |
298 | ||
299 | pcu_e_config: unconfig | |
300 | @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens | |
301 | ||
302 | R360MPI_config: unconfig | |
303 | @./mkconfig $(@:_config=) ppc mpc8xx r360mpi | |
304 | ||
305 | RPXClassic_config: unconfig | |
306 | @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic | |
307 | ||
308 | RPXlite_config: unconfig | |
309 | @./mkconfig $(@:_config=) ppc mpc8xx RPXlite | |
310 | ||
311 | RRvision_config: unconfig | |
312 | @./mkconfig $(@:_config=) ppc mpc8xx RRvision | |
313 | ||
314 | RRvision_LCD_config: unconfig | |
315 | @echo "#define CONFIG_LCD" >include/config.h | |
316 | @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h | |
317 | @./mkconfig -a RRvision ppc mpc8xx RRvision | |
318 | ||
319 | SM850_config : unconfig | |
320 | @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx | |
321 | ||
322 | SPD823TS_config: unconfig | |
323 | @./mkconfig $(@:_config=) ppc mpc8xx spd8xx | |
324 | ||
dc7c9a1a WD |
325 | svm_sc8xx_config: unconfig |
326 | @ >include/config.h | |
327 | @./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx | |
328 | ||
7ebf7443 WD |
329 | SXNI855T_config: unconfig |
330 | @./mkconfig $(@:_config=) ppc mpc8xx sixnet | |
331 | ||
db2f721f WD |
332 | # EMK MPC8xx based modules |
333 | TOP860_config: unconfig | |
334 | @./mkconfig $(@:_config=) ppc mpc8xx top860 emk | |
335 | ||
7ebf7443 WD |
336 | # Play some tricks for configuration selection |
337 | # All boards can come with 50 MHz (default), 66MHz or 80MHz clock, | |
338 | # but only 855 and 860 boards may come with FEC | |
339 | # and 823 boards may have LCD support | |
824a1ebf | 340 | xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _LCD,,$(subst _config,,$1)))) |
7ebf7443 WD |
341 | |
342 | FPS850L_config \ | |
384ae025 | 343 | FPS860L_config \ |
7ebf7443 WD |
344 | TQM823L_config \ |
345 | TQM823L_66MHz_config \ | |
346 | TQM823L_80MHz_config \ | |
347 | TQM823L_LCD_config \ | |
348 | TQM823L_LCD_66MHz_config \ | |
349 | TQM823L_LCD_80MHz_config \ | |
350 | TQM850L_config \ | |
351 | TQM850L_66MHz_config \ | |
352 | TQM850L_80MHz_config \ | |
353 | TQM855L_config \ | |
354 | TQM855L_66MHz_config \ | |
355 | TQM855L_80MHz_config \ | |
7ebf7443 WD |
356 | TQM860L_config \ |
357 | TQM860L_66MHz_config \ | |
358 | TQM860L_80MHz_config \ | |
d126bfbd WD |
359 | TQM862L_config \ |
360 | TQM862L_66MHz_config \ | |
361 | TQM862L_80MHz_config: unconfig | |
7ebf7443 | 362 | @ >include/config.h |
7ebf7443 WD |
363 | @[ -z "$(findstring _66MHz,$@)" ] || \ |
364 | { echo "#define CONFIG_66MHz" >>include/config.h ; \ | |
365 | echo "... with 66MHz system clock" ; \ | |
366 | } | |
367 | @[ -z "$(findstring _80MHz,$@)" ] || \ | |
368 | { echo "#define CONFIG_80MHz" >>include/config.h ; \ | |
369 | echo "... with 80MHz system clock" ; \ | |
370 | } | |
371 | @[ -z "$(findstring _LCD,$@)" ] || \ | |
372 | { echo "#define CONFIG_LCD" >>include/config.h ; \ | |
373 | echo "#define CONFIG_NEC_NL6648BC20" >>include/config.h ; \ | |
374 | echo "... with LCD display" ; \ | |
375 | } | |
376 | @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx | |
377 | ||
378 | TTTech_config: unconfig | |
379 | @echo "#define CONFIG_LCD" >include/config.h | |
380 | @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h | |
381 | @./mkconfig -a TQM823L ppc mpc8xx tqm8xx | |
382 | ||
608c9146 WD |
383 | v37_config: unconfig |
384 | @echo "#define CONFIG_LCD" >include/config.h | |
385 | @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h | |
386 | @./mkconfig $(@:_config=) ppc mpc8xx v37 | |
387 | ||
7ebf7443 WD |
388 | ######################################################################### |
389 | ## PPC4xx Systems | |
390 | ######################################################################### | |
391 | ||
392 | ADCIOP_config: unconfig | |
393 | @./mkconfig $(@:_config=) ppc ppc4xx adciop esd | |
394 | ||
395 | AR405_config: unconfig | |
396 | @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd | |
397 | ||
398 | CANBT_config: unconfig | |
399 | @./mkconfig $(@:_config=) ppc ppc4xx canbt esd | |
400 | ||
401 | CPCI405_config \ | |
402 | CPCI4052_config: unconfig | |
403 | @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd | |
404 | @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk | |
405 | ||
406 | CPCI440_config: unconfig | |
407 | @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd | |
408 | ||
409 | CPCIISER4_config: unconfig | |
410 | @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd | |
411 | ||
412 | CRAYL1_config:unconfig | |
413 | @./mkconfig $(@:_config=) ppc ppc4xx L1 cray | |
414 | ||
415 | DASA_SIM_config: unconfig | |
416 | @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd | |
417 | ||
418 | DU405_config: unconfig | |
419 | @./mkconfig $(@:_config=) ppc ppc4xx du405 esd | |
420 | ||
421 | EBONY_config:unconfig | |
422 | @./mkconfig $(@:_config=) ppc ppc4xx ebony | |
423 | ||
424 | ERIC_config:unconfig | |
425 | @./mkconfig $(@:_config=) ppc ppc4xx eric | |
426 | ||
427 | MIP405_config:unconfig | |
428 | @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl | |
429 | ||
430 | ML2_config:unconfig | |
431 | @./mkconfig $(@:_config=) ppc ppc4xx ml2 | |
432 | ||
433 | OCRTC_config \ | |
434 | ORSG_config: unconfig | |
435 | @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd | |
436 | ||
437 | PCI405_config: unconfig | |
438 | @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd | |
439 | ||
440 | PIP405_config:unconfig | |
441 | @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl | |
442 | ||
443 | W7OLMC_config \ | |
444 | W7OLMG_config: unconfig | |
445 | @./mkconfig $(@:_config=) ppc ppc4xx w7o | |
446 | ||
447 | WALNUT405_config:unconfig | |
448 | @./mkconfig $(@:_config=) ppc ppc4xx walnut405 | |
449 | ||
450 | ######################################################################### | |
451 | ## MPC824x Systems | |
452 | ######################################################################### | |
3bac3513 WD |
453 | xtract_82xx = $(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1))))) |
454 | ||
7ebf7443 WD |
455 | BMW_config: unconfig |
456 | @./mkconfig $(@:_config=) ppc mpc824x bmw | |
457 | ||
3bac3513 WD |
458 | CPC45_config \ |
459 | CPC45_ROMBOOT_config: unconfig | |
460 | @./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45 | |
461 | @cd ./include ; \ | |
462 | if [ "$(findstring _ROMBOOT_,$@)" ] ; then \ | |
463 | echo "CONFIG_BOOT_ROM = y" >> config.mk ; \ | |
464 | echo "... booting from 8-bit flash" ; \ | |
465 | else \ | |
466 | echo "CONFIG_BOOT_ROM = n" >> config.mk ; \ | |
467 | echo "... booting from 64-bit flash" ; \ | |
468 | fi; \ | |
469 | echo "export CONFIG_BOOT_ROM" >> config.mk; | |
470 | ||
7ebf7443 WD |
471 | CU824_config: unconfig |
472 | @./mkconfig $(@:_config=) ppc mpc824x cu824 | |
473 | ||
474 | MOUSSE_config: unconfig | |
475 | @./mkconfig $(@:_config=) ppc mpc824x mousse | |
476 | ||
477 | MUSENKI_config: unconfig | |
478 | @./mkconfig $(@:_config=) ppc mpc824x musenki | |
479 | ||
480 | OXC_config: unconfig | |
481 | @./mkconfig $(@:_config=) ppc mpc824x oxc | |
482 | ||
483 | PN62_config: unconfig | |
484 | @./mkconfig $(@:_config=) ppc mpc824x pn62 | |
485 | ||
486 | Sandpoint8240_config: unconfig | |
487 | @./mkconfig $(@:_config=) ppc mpc824x sandpoint | |
488 | ||
489 | Sandpoint8245_config: unconfig | |
490 | @./mkconfig $(@:_config=) ppc mpc824x sandpoint | |
491 | ||
492 | utx8245_config: unconfig | |
493 | @./mkconfig $(@:_config=) ppc mpc824x utx8245 | |
494 | ||
495 | ######################################################################### | |
496 | ## MPC8260 Systems | |
497 | ######################################################################### | |
7ebf7443 WD |
498 | |
499 | cogent_mpc8260_config: unconfig | |
500 | @./mkconfig $(@:_config=) ppc mpc8260 cogent | |
501 | ||
502 | CPU86_config \ | |
503 | CPU86_ROMBOOT_config: unconfig | |
504 | @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86 | |
505 | @cd ./include ; \ | |
506 | if [ "$(findstring _ROMBOOT_,$@)" ] ; then \ | |
507 | echo "CONFIG_BOOT_ROM = y" >> config.mk ; \ | |
508 | echo "... booting from 8-bit flash" ; \ | |
509 | else \ | |
510 | echo "CONFIG_BOOT_ROM = n" >> config.mk ; \ | |
511 | echo "... booting from 64-bit flash" ; \ | |
512 | fi; \ | |
513 | echo "export CONFIG_BOOT_ROM" >> config.mk; | |
514 | ||
515 | ep8260_config: unconfig | |
516 | @./mkconfig $(@:_config=) ppc mpc8260 ep8260 | |
517 | ||
518 | gw8260_config: unconfig | |
519 | @./mkconfig $(@:_config=) ppc mpc8260 gw8260 | |
520 | ||
521 | hymod_config: unconfig | |
522 | @./mkconfig $(@:_config=) ppc mpc8260 hymod | |
523 | ||
524 | IPHASE4539_config: unconfig | |
525 | @./mkconfig $(@:_config=) ppc mpc8260 iphase4539 | |
526 | ||
527 | MPC8260ADS_config: unconfig | |
528 | @./mkconfig $(@:_config=) ppc mpc8260 mpc8260ads | |
529 | ||
db2f721f WD |
530 | MPC8266ADS_config: unconfig |
531 | @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads | |
532 | ||
10f67017 WD |
533 | PM825_config \ |
534 | PM825_ROMBOOT_config: unconfig | |
535 | @echo "#define CONFIG_PCI" >include/config.h | |
536 | @./mkconfig -a PM826 ppc mpc8260 pm826 | |
537 | @cd ./include ; \ | |
538 | if [ "$(findstring _ROMBOOT_,$@)" ] ; then \ | |
539 | echo "CONFIG_BOOT_ROM = y" >> config.mk ; \ | |
540 | echo "... booting from 8-bit flash" ; \ | |
541 | else \ | |
542 | echo "CONFIG_BOOT_ROM = n" >> config.mk ; \ | |
543 | echo "... booting from 64-bit flash" ; \ | |
544 | fi; \ | |
545 | echo "export CONFIG_BOOT_ROM" >> config.mk; \ | |
546 | ||
7ebf7443 WD |
547 | PM826_config \ |
548 | PM826_ROMBOOT_config: unconfig | |
549 | @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 pm826 | |
550 | @cd ./include ; \ | |
551 | if [ "$(findstring _ROMBOOT_,$@)" ] ; then \ | |
552 | echo "CONFIG_BOOT_ROM = y" >> config.mk ; \ | |
553 | echo "... booting from 8-bit flash" ; \ | |
554 | else \ | |
555 | echo "CONFIG_BOOT_ROM = n" >> config.mk ; \ | |
556 | echo "... booting from 64-bit flash" ; \ | |
557 | fi; \ | |
558 | echo "export CONFIG_BOOT_ROM" >> config.mk; \ | |
559 | ||
560 | ppmc8260_config: unconfig | |
561 | @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260 | |
562 | ||
563 | RPXsuper_config: unconfig | |
564 | @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper | |
565 | ||
566 | rsdproto_config: unconfig | |
567 | @./mkconfig $(@:_config=) ppc mpc8260 rsdproto | |
568 | ||
569 | sacsng_config: unconfig | |
570 | @./mkconfig $(@:_config=) ppc mpc8260 sacsng | |
571 | ||
572 | sbc8260_config: unconfig | |
573 | @./mkconfig $(@:_config=) ppc mpc8260 sbc8260 | |
574 | ||
575 | SCM_config: unconfig | |
576 | @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens | |
577 | ||
578 | TQM8260_config \ | |
579 | TQM8260_L2_config \ | |
4532cb69 | 580 | TQM8255_266MHz_config \ |
7ebf7443 WD |
581 | TQM8260_266MHz_config \ |
582 | TQM8260_L2_266MHz_config \ | |
583 | TQM8260_300MHz_config: unconfig | |
584 | @ >include/config.h | |
585 | @if [ "$(findstring _L2_,$@)" ] ; then \ | |
586 | echo "#define CONFIG_L2_CACHE" >>include/config.h ; \ | |
587 | echo "... with L2 Cache support (60x Bus Mode)" ; \ | |
588 | else \ | |
589 | echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \ | |
590 | echo "... without L2 Cache support" ; \ | |
591 | fi | |
592 | @[ -z "$(findstring _266MHz,$@)" ] || \ | |
593 | { echo "#define CONFIG_266MHz" >>include/config.h ; \ | |
594 | echo "... with 266MHz system clock" ; \ | |
595 | } | |
596 | @[ -z "$(findstring _300MHz,$@)" ] || \ | |
597 | { echo "#define CONFIG_300MHz" >>include/config.h ; \ | |
598 | echo "... with 300MHz system clock" ; \ | |
599 | } | |
4532cb69 WD |
600 | @[ -z "$(findstring TQM8255_,$@)" ] || \ |
601 | { echo "#define CONFIG_MPC8255" >>include/config.h ; } | |
602 | @./mkconfig -a TQM8260 ppc mpc8260 tqm8260 | |
7ebf7443 WD |
603 | |
604 | ######################################################################### | |
605 | ## 74xx/7xx Systems | |
606 | ######################################################################### | |
607 | ||
c7de829c WD |
608 | AmigaOneG3SE_config: unconfig |
609 | @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI | |
610 | ||
7ebf7443 WD |
611 | EVB64260_config \ |
612 | EVB64260_750CX_config: unconfig | |
613 | @./mkconfig EVB64260 ppc 74xx_7xx evb64260 | |
614 | ||
615 | ZUMA_config: unconfig | |
616 | @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260 | |
617 | ||
618 | PCIPPC2_config \ | |
619 | PCIPPC6_config: unconfig | |
620 | @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2 | |
621 | ||
622 | BAB7xx_config: unconfig | |
623 | @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec | |
624 | ||
625 | ELPPC_config: unconfig | |
626 | @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec | |
627 | ||
628 | #======================================================================== | |
629 | # ARM | |
630 | #======================================================================== | |
631 | ######################################################################### | |
632 | ## StrongARM Systems | |
633 | ######################################################################### | |
634 | ||
dc7c9a1a WD |
635 | at91rm9200dk_config : unconfig |
636 | @./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk | |
637 | ||
7ebf7443 WD |
638 | lart_config : unconfig |
639 | @./mkconfig $(@:_config=) arm sa1100 lart | |
640 | ||
641 | dnp1110_config : unconfig | |
642 | @./mkconfig $(@:_config=) arm sa1100 dnp1110 | |
643 | ||
644 | shannon_config : unconfig | |
645 | @./mkconfig $(@:_config=) arm sa1100 shannon | |
646 | ||
647 | ######################################################################### | |
648 | ## ARM920T Systems | |
649 | ######################################################################### | |
650 | ||
43d9616c WD |
651 | xtract_trab = $(subst _big_flash,,$(subst _config,,$1)) |
652 | ||
7ebf7443 WD |
653 | smdk2400_config : unconfig |
654 | @./mkconfig $(@:_config=) arm arm920t smdk2400 | |
655 | ||
656 | smdk2410_config : unconfig | |
657 | @./mkconfig $(@:_config=) arm arm920t smdk2410 | |
658 | ||
43d9616c WD |
659 | trab_config \ |
660 | trab_big_flash_config: unconfig | |
661 | @ >include/config.h | |
662 | @[ -z "$(findstring _big_flash,$@)" ] || \ | |
663 | { echo "#define CONFIG_BIG_FLASH" >>include/config.h ; \ | |
664 | echo "... with big flash support" ; \ | |
665 | } | |
666 | @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab | |
7ebf7443 | 667 | |
1cb8e980 WD |
668 | VCMA9_config : unconfig |
669 | @./mkconfig $(@:_config=) arm arm920t vcma9 mpl | |
670 | ||
7ebf7443 WD |
671 | ######################################################################### |
672 | ## ARM720T Systems | |
673 | ######################################################################### | |
674 | ||
675 | impa7_config : unconfig | |
676 | @./mkconfig $(@:_config=) arm arm720t impa7 | |
677 | ||
678 | ep7312_config : unconfig | |
679 | @./mkconfig $(@:_config=) arm arm720t ep7312 | |
680 | ||
681 | ######################################################################### | |
43d9616c | 682 | ## XScale Systems |
7ebf7443 WD |
683 | ######################################################################### |
684 | ||
7ebf7443 WD |
685 | cradle_config : unconfig |
686 | @./mkconfig $(@:_config=) arm xscale cradle | |
687 | ||
688 | csb226_config : unconfig | |
689 | @./mkconfig $(@:_config=) arm xscale csb226 | |
690 | ||
43d9616c WD |
691 | innokom_config : unconfig |
692 | @./mkconfig $(@:_config=) arm xscale innokom | |
693 | ||
694 | lubbock_config : unconfig | |
695 | @./mkconfig $(@:_config=) arm xscale lubbock | |
696 | ||
3e38691e WD |
697 | wepep250_config : unconfig |
698 | @./mkconfig $(@:_config=) arm xscale wepep250 | |
699 | ||
2262cfee WD |
700 | #======================================================================== |
701 | # i386 | |
702 | #======================================================================== | |
703 | ######################################################################### | |
1cb8e980 | 704 | ## AMD SC520 CDP |
2262cfee WD |
705 | ######################################################################### |
706 | sc520_cdp_config : unconfig | |
707 | @./mkconfig $(@:_config=) i386 i386 sc520_cdp | |
708 | ||
43d9616c WD |
709 | #======================================================================== |
710 | # MIPS | |
711 | #======================================================================== | |
7ebf7443 | 712 | ######################################################################### |
43d9616c WD |
713 | ## MIPS32 4Kc |
714 | ######################################################################### | |
715 | ||
716 | incaip_config : unconfig | |
717 | @./mkconfig $(@:_config=) mips mips incaip | |
718 | ||
3e38691e WD |
719 | purple_config : unconfig |
720 | @./mkconfig $(@:_config=) mips mips purple | |
43d9616c | 721 | |
3e38691e WD |
722 | ######################################################################### |
723 | ######################################################################### | |
7ebf7443 WD |
724 | |
725 | clean: | |
726 | find . -type f \ | |
727 | \( -name 'core' -o -name '*.bak' -o -name '*~' \ | |
728 | -o -name '*.o' -o -name '*.a' \) -print \ | |
729 | | xargs rm -f | |
85ec0bcc | 730 | rm -f examples/hello_world examples/timer \ |
3e38691e WD |
731 | examples/eepro100_eeprom examples/sched \ |
732 | examples/mem_to_mem_idma2intr | |
7ebf7443 WD |
733 | rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr |
734 | rm -f tools/easylogo/easylogo tools/bmp_logo | |
735 | rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend | |
228f29ac | 736 | rm -f tools/env/fw_printenv tools/env/fw_setenv |
7ebf7443 WD |
737 | |
738 | clobber: clean | |
739 | find . -type f \ | |
740 | \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \ | |
741 | -print \ | |
742 | | xargs rm -f | |
743 | rm -f $(OBJS) *.bak tags TAGS | |
744 | rm -fr *.*~ | |
d126bfbd | 745 | rm -f u-boot u-boot.bin u-boot.srec u-boot.map System.map |
228f29ac | 746 | rm -f tools/crc32.c tools/environment.c tools/env/crc32.c |
3e38691e | 747 | rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c |
7ebf7443 WD |
748 | rm -f include/asm/arch include/asm |
749 | ||
750 | mrproper \ | |
751 | distclean: clobber unconfig | |
752 | ||
753 | backup: | |
754 | F=`basename $(TOPDIR)` ; cd .. ; \ | |
755 | gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F | |
756 | ||
757 | ######################################################################### |