a2faab684be15ecaf84c024976a3ff03b1551d67
[bcm963xx.git] / kernel / linux / arch / mips / Makefile
1 #
2 # This file is subject to the terms and conditions of the GNU General Public
3 # License.  See the file "COPYING" in the main directory of this archive
4 # for more details.
5 #
6 # Copyright (C) 1994, 95, 96, 2003 by Ralf Baechle
7 # DECStation modifications by Paul M. Antoine, 1996
8 # Copyright (C) 2002, 2003  Maciej W. Rozycki
9 #
10 # This file is included by the global makefile so that you can add your own
11 # architecture-specific flags and dependencies. Remember to do have actions
12 # for "archclean" cleaning up for this architecture.
13 #
14
15 #
16 # Select the object file format to substitute into the linker script.
17 #
18 ifdef CONFIG_CPU_LITTLE_ENDIAN
19 32bit-tool-prefix       = mipsel-linux-
20 64bit-tool-prefix       = mips64el-linux-
21 32bit-bfd               = elf32-tradlittlemips
22 64bit-bfd               = elf64-tradlittlemips
23 else
24 32bit-tool-prefix       = mips-linux-
25 64bit-tool-prefix       = mips64-linux-
26 32bit-bfd               = elf32-tradbigmips
27 64bit-bfd               = elf64-tradbigmips
28 endif
29
30 ifdef CONFIG_MIPS32
31 gcc-abi                 = 32
32 gas-abi                 = 32
33 tool-prefix             = $(32bit-tool-prefix)
34 UTS_MACHINE             := mips
35 endif
36 ifdef CONFIG_MIPS64
37 gcc-abi                 = 64
38 gas-abi                 = 32
39 tool-prefix             = $(64bit-tool-prefix)
40 UTS_MACHINE             := mips64
41 endif
42
43 ifdef CONFIG_CROSSCOMPILE
44 # CONFIG_MIPS_BRCM Begin Broadcom added code.
45 ifdef CONFIG_MIPS_BRCM
46 #CROSS_COMPILE          := $(tool-prefix)
47 else
48 CROSS_COMPILE           := $(tool-prefix)
49 endif
50 # CONFIG_MIPS_BRCM End Broadcom added code.
51 endif
52
53 #
54 # GCC uses -G 0 -mabicalls -fpic as default.  We don't want PIC in the kernel
55 # code since it only slows down the whole thing.  At some point we might make
56 # use of global pointer optimizations but their use of $28 conflicts with
57 # the current pointer optimization.
58 #
59 # The DECStation requires an ECOFF kernel for remote booting, other MIPS
60 # machines may also.  Since BFD is incredibly buggy with respect to
61 # crossformat linking we rely on the elf2ecoff tool for format conversion.
62 #
63 cflags-y                        := -I $(TOPDIR)/include/asm/gcc
64 cflags-y                        += -G 0 -mno-abicalls -fno-pic -pipe
65 cflags-y                        += $(call check_gcc, -finline-limit=100000,)
66 ifeq ($(strip $(JTAG_KERNEL_DEBUG)),y)
67 cflags-y                        += -g
68 endif
69 LDFLAGS_vmlinux                 += -G 0 -static -n
70 MODFLAGS                        += -mlong-calls
71
72 cflags-$(CONFIG_SB1XXX_CORELIS) += -mno-sched-prolog -fno-omit-frame-pointer
73
74 check_warning = $(shell if $(CC) $(1) -c -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
75
76 # CONFIG_MIPS_BRCM Begin Broadcom changed code.
77 ifdef CONFIG_MIPS_BRCM 
78 cflags-$(CONFIG_REMOTE_DEBUG)   += -ggdb
79 endif
80 # CONFIG_MIPS_BRCM End Broadcom changed code.
81
82 #
83 # Use: $(call set_gccflags,<cpu0>,<isa0>,<cpu1>,<isa1>,<isa2>)
84 #
85 # <cpu0>,<isa0> -- preferred CPU and ISA designations (may require
86 #                  recent tools)
87 # <cpu1>,<isa1> -- fallback CPU and ISA designations (have to work
88 #                  with up to the oldest supported tools)
89 # <isa2>        -- an ISA designation used as an ABI selector for
90 #                  gcc versions that do not support "-mabi=32"
91 #                  (depending on the CPU type, either "mips1" or
92 #                  "mips2")
93 #
94 set_gccflags = $(shell \
95 while :; do \
96         cpu=$(1); isa=-$(2); \
97         for gcc_opt in -march= -mcpu=; do \
98                 $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
99                         -xc /dev/null > /dev/null 2>&1 && \
100                         break 2; \
101         done; \
102         cpu=$(3); isa=-$(4); \
103         for gcc_opt in -march= -mcpu=; do \
104                 $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
105                         -xc /dev/null > /dev/null 2>&1 && \
106                         break 2; \
107         done; \
108         break; \
109 done; \
110 gcc_abi=-mabi=$(gcc-abi); gcc_cpu=$$cpu; \
111 if $(CC) $$gcc_abi -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then \
112         gcc_isa=$$isa; \
113 else \
114         gcc_abi=; gcc_isa=-$(5); \
115 fi; \
116 gas_abi=-Wa,-$(gcc-abi); gas_cpu=$$cpu; gas_isa=-Wa,$$isa; \
117 while :; do \
118         for gas_opt in -Wa,-march= -Wa,-mcpu=; do \
119                 $(CC) $$gas_abi $$gas_opt$$cpu $$gas_isa -Wa,-Z -c \
120                         -o /dev/null -xassembler /dev/null > /dev/null 2>&1 && \
121                         break 2; \
122         done; \
123         gas_abi=; gas_opt=; gas_cpu=; gas_isa=; \
124         break; \
125 done; \
126 if test "$(gcc-abi)" != "$(gas-abi)"; then \
127         gas_abi="-Wa,-$(gas-abi) -Wa,-mgp$(gcc-abi)"; \
128 fi; \
129 if test "$$gcc_opt" = -march= && test -n "$$gcc_abi"; then \
130         $(CC) $$gcc_abi $$gcc_opt$$gcc_cpu -S -o /dev/null \
131                 -xc /dev/null > /dev/null 2>&1 && \
132                 gcc_isa=; \
133 fi; \
134 echo $$gcc_abi $$gcc_opt$$gcc_cpu $$gcc_isa $$gas_abi $$gas_opt$$gas_cpu $$gas_isa)
135
136 #
137 # CPU-dependent compiler/assembler options for optimization.
138 #
139 cflags-$(CONFIG_CPU_R3000)      += \
140                         $(call set_gccflags,r3000,mips1,r3000,mips1,mips1)
141
142 cflags-$(CONFIG_CPU_TX39XX)     += \
143                         $(call set_gccflags,r3900,mips1,r3000,mips1,mips1)
144
145 cflags-$(CONFIG_CPU_R6000)      += \
146                         $(call set_gccflags,r6000,mips2,r6000,mips2,mips2) \
147                         -Wa,--trap
148
149 cflags-$(CONFIG_CPU_R4300)      += \
150                         $(call set_gccflags,r4300,mips3,r4300,mips3,mips2) \
151                         -Wa,--trap
152
153 cflags-$(CONFIG_CPU_VR41XX)     += \
154                         $(call set_gccflags,r4100,mips3,r4600,mips3,mips2) \
155                         -Wa,--trap
156
157 cflags-$(CONFIG_CPU_R4X00)      += \
158                         $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \
159                         -Wa,--trap
160
161 cflags-$(CONFIG_CPU_MIPS32)     += \
162                         $(call set_gccflags,mips32,mips32,r4600,mips3,mips2) \
163                         -Wa,--trap
164
165 cflags-$(CONFIG_CPU_MIPS64)     += \
166                         $(call set_gccflags,mips64,mips64,r4600,mips3,mips2) \
167                         -Wa,--trap
168
169 cflags-$(CONFIG_CPU_R5000)      += \
170                         $(call set_gccflags,r5000,mips4,r5000,mips4,mips2) \
171                         -Wa,--trap 
172
173 cflags-$(CONFIG_CPU_R5432)      += \
174                         $(call set_gccflags,r5400,mips4,r5000,mips4,mips2) \
175                         -Wa,--trap
176
177 cflags-$(CONFIG_CPU_NEVADA)     += \
178                         $(call set_gccflags,rm5200,mips4,r5000,mips4,mips2) \
179                         -Wa,--trap
180 #                       $(call check_gcc,-mmad,)
181
182 cflags-$(CONFIG_CPU_RM7000)     += \
183                         $(call set_gccflags,rm7000,mips4,r5000,mips4,mips2) \
184                         -Wa,--trap
185
186 cflags-$(CONFIG_CPU_RM9000)     += \
187                         $(call set_gccflags,rm9000,mips4,r5000,mips4,mips2) \
188                         -Wa,--trap
189
190 cflags-$(CONFIG_CPU_SB1)        += \
191                         $(call set_gccflags,sb1,mips64,r5000,mips4,mips2) \
192                         -Wa,--trap
193
194 cflags-$(CONFIG_CPU_R8000)      += \
195                         $(call set_gccflags,r8000,mips4,r8000,mips4,mips2) \
196                         -Wa,--trap
197
198 cflags-$(CONFIG_CPU_R10000)     += \
199                         $(call set_gccflags,r10000,mips4,r8000,mips4,mips2) \
200                         -Wa,--trap
201
202 ifdef CONFIG_CPU_SB1
203 ifdef CONFIG_SB1_PASS_1_WORKAROUNDS
204 MODFLAGS        += -msb1-pass1-workarounds
205 endif
206 endif
207
208 #
209 # ramdisk/initrd support
210 # You need a compressed ramdisk image, named
211 # CONFIG_EMBEDDED_RAMDISK_IMAGE. Relative pathnames 
212 # are relative to arch/mips/ramdisk/.
213 #
214 core-$(CONFIG_EMBEDDED_RAMDISK) += arch/mips/ramdisk/
215
216 #
217 # Firmware support
218 #
219 libs-$(CONFIG_ARC)              += arch/mips/arc/
220 libs-$(CONFIG_SIBYTE_CFE)       += arch/mips/sibyte/cfe/
221
222 #
223 # Board-dependent options and extra files
224 #
225
226 #
227 # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
228 #
229 core-$(CONFIG_MACH_JAZZ)        += arch/mips/jazz/
230 cflags-$(CONFIG_MACH_JAZZ)      += -Iinclude/asm-mips/mach-jazz
231 load-$(CONFIG_MACH_JAZZ)        += 0x80080000
232
233 #
234 # Common Alchemy Au1x00 stuff
235 #
236 core-$(CONFIG_SOC_AU1X00)       += arch/mips/au1000/common/
237 cflags-$(CONFIG_SOC_AU1X00)     += -Iinclude/asm-mips/mach-au1x00
238
239 #
240 # AMD Alchemy Pb1000 eval board
241 #
242 libs-$(CONFIG_MIPS_PB1000)      += arch/mips/au1000/pb1000/
243 cflags-$(CONFIG_MIPS_PB1000)    += -Iinclude/asm-mips/mach-pb1x00
244 load-$(CONFIG_MIPS_PB1000)      += 0x80100000
245
246 #
247 # AMD Alchemy Pb1100 eval board
248 #
249 libs-$(CONFIG_MIPS_PB1100)      += arch/mips/au1000/pb1100/
250 cflags-$(CONFIG_MIPS_PB1100)    += -Iinclude/asm-mips/mach-pb1x00
251 load-$(CONFIG_MIPS_PB1100)      += 0x80100000
252
253 #
254 # AMD Alchemy Pb1500 eval board
255 #
256 libs-$(CONFIG_MIPS_PB1500)      += arch/mips/au1000/pb1500/
257 cflags-$(CONFIG_MIPS_PB1500)    += -Iinclude/asm-mips/mach-pb1x00
258 load-$(CONFIG_MIPS_PB1500)      += 0x80100000
259
260 #
261 # AMD Alchemy Pb1550 eval board
262 #
263 libs-$(CONFIG_MIPS_PB1550)      += arch/mips/au1000/pb1550/
264 cflags-$(CONFIG_MIPS_PB1550)    += -Iinclude/asm-mips/mach-pb1x00
265 load-$(CONFIG_MIPS_PB1550)      += 0x80100000
266
267 #
268 # AMD Alchemy Db1000 eval board
269 #
270 libs-$(CONFIG_MIPS_DB1000)      += arch/mips/au1000/db1x00/
271 cflags-$(CONFIG_MIPS_DB1000)    += -Iinclude/asm-mips/mach-db1x00
272 load-$(CONFIG_MIPS_DB1000)      += 0x80100000
273
274 #
275 # AMD Alchemy Db1100 eval board
276 #
277 libs-$(CONFIG_MIPS_DB1100)      += arch/mips/au1000/db1x00/
278 cflags-$(CONFIG_MIPS_DB1100)    += -Iinclude/asm-mips/mach-db1x00
279 load-$(CONFIG_MIPS_DB1100)      += 0x80100000
280
281 #
282 # AMD Alchemy Db1500 eval board
283 #
284 libs-$(CONFIG_MIPS_DB1500)      += arch/mips/au1000/db1x00/
285 cflags-$(CONFIG_MIPS_DB1500)    += -Iinclude/asm-mips/mach-db1x00
286 load-$(CONFIG_MIPS_DB1500)      += 0x80100000
287
288 #
289 # AMD Alchemy Bosporus eval board
290 #
291 libs-$(CONFIG_MIPS_BOSPORUS)    += arch/mips/au1000/db1x00/
292 cflags-$(CONFIG_MIPS_BOSPORUS)  += -Iinclude/asm-mips/mach-db1x00
293 load-$(CONFIG_MIPS_BOSPORUS)    += 0x80100000
294
295 #
296 # AMD Alchemy Mirage eval board
297 #
298 libs-$(CONFIG_MIPS_MIRAGE)      += arch/mips/au1000/db1x00/
299 cflags-$(CONFIG_MIPS_MIRAGE)    += -Iinclude/asm-mips/mach-db1x00
300 load-$(CONFIG_MIPS_MIRAGE)      += 0x80100000
301
302 #
303 # 4G-Systems eval board
304 #
305 libs-$(CONFIG_MIPS_MTX1)        += arch/mips/au1000/mtx-1/
306 load-$(CONFIG_MIPS_MTX1)        += 0x80100000
307
308 #
309 # MyCable eval board
310 #
311 libs-$(CONFIG_MIPS_XXS1500)     += arch/mips/au1000/xxs1500/
312 load-$(CONFIG_MIPS_XXS1500)     += 0x80100000
313
314 #
315 # Baget/MIPS
316 #
317 libs-$(CONFIG_BAGET_MIPS)       += arch/mips/baget/ arch/mips/baget/prom/
318 load-$(CONFIG_BAGET_MIPS)       += 0x80001000
319
320 # CONFIG_MIPS_BRCM Begin Broadcom added code.
321 ifdef CONFIG_MIPS_BRCM
322 #
323 # Broadcom board
324 core-$(CONFIG_BCM96338)         += arch/mips/brcm-boards/generic/ arch/mips/brcm-boards/bcm963xx/
325 cflags-$(CONFIG_BCM96338)       += -Iinclude/asm-mips/mach-bcm963xx
326 core-$(CONFIG_BCM96348)         += arch/mips/brcm-boards/generic/ arch/mips/brcm-boards/bcm963xx/
327 cflags-$(CONFIG_BCM96348)       += -Iinclude/asm-mips/mach-bcm963xx
328 core-$(CONFIG_BCM96358)         += arch/mips/brcm-boards/generic/ arch/mips/brcm-boards/bcm963xx/
329 cflags-$(CONFIG_BCM96358)       += -Iinclude/asm-mips/mach-bcm963xx
330 load-$(CONFIG_MIPS_BRCM)        += 0x80010000
331 endif
332 # CONFIG_MIPS_BRCM End Broadcom added code.
333
334 #
335 # Cobalt Server
336 #
337 core-$(CONFIG_MIPS_COBALT)      += arch/mips/cobalt/
338 load-$(CONFIG_MIPS_COBALT)      += 0x80080000
339
340 #
341 # DECstation family
342 #
343 core-$(CONFIG_MACH_DECSTATION)  += arch/mips/dec/
344 cflags-$(CONFIG_MACH_DECSTATION)+= -Iinclude/asm-mips/mach-dec
345 libs-$(CONFIG_MACH_DECSTATION)  += arch/mips/dec/prom/
346 load-$(CONFIG_MACH_DECSTATION)  += 0x80040000
347 CLEAN_FILES                     += drivers/tc/lk201-map.c
348
349 #
350 # Galileo EV64120 Board
351 #
352 core-$(CONFIG_MIPS_EV64120)     += arch/mips/gt64120/ev64120/
353 core-$(CONFIG_MIPS_EV64120)     += arch/mips/gt64120/common/
354 cflags-$(CONFIG_MIPS_EV64120)   += -Iinclude/asm-mips/mach-ev64120
355 load-$(CONFIG_MIPS_EV64120)     += 0x80100000
356
357 #
358 # Galileo EV96100 Board
359 #
360 core-$(CONFIG_MIPS_EV96100)     += arch/mips/galileo-boards/ev96100/
361 cflags-$(CONFIG_MIPS_EV96100)   += -Iinclude/asm-mips/mach-ev96100
362 load-$(CONFIG_MIPS_EV96100)     += 0x80100000
363
364 #
365 # Globespan IVR eval board with QED 5231 CPU
366 #
367 core-$(CONFIG_ITE_BOARD_GEN)    += arch/mips/ite-boards/generic/
368 core-$(CONFIG_MIPS_IVR)         += arch/mips/ite-boards/ivr/
369 load-$(CONFIG_MIPS_IVR)         += 0x80100000
370
371 #
372 # HP LaserJet
373 #
374 core-$(CONFIG_HP_LASERJET)      += arch/mips/hp-lj/
375 load-$(CONFIG_HP_LASERJET)      += 0x80030000
376
377 #
378 # ITE 8172 eval board with QED 5231 CPU
379 #
380 core-$(CONFIG_MIPS_ITE8172)     += arch/mips/ite-boards/qed-4n-s01b/
381 load-$(CONFIG_MIPS_ITE8172)     += 0x80100000
382
383 #
384 # For all MIPS, Inc. eval boards
385 #
386 core-$(CONFIG_MIPS_BOARDS_GEN)  += arch/mips/mips-boards/generic/
387
388 #
389 # MIPS Atlas board
390 #
391 core-$(CONFIG_MIPS_ATLAS)       += arch/mips/mips-boards/atlas/
392 cflags-$(CONFIG_MIPS_ATLAS)     += -Iinclude/asm-mips/mach-atlas
393 cflags-$(CONFIG_MIPS_ATLAS)     += -Iinclude/asm-mips/mach-mips
394 load-$(CONFIG_MIPS_ATLAS)       += 0x80100000
395
396 #
397 # MIPS Malta board
398 #
399 core-$(CONFIG_MIPS_MALTA)       += arch/mips/mips-boards/malta/
400 cflags-$(CONFIG_MIPS_MALTA)     += -Iinclude/asm-mips/mach-mips
401 load-$(CONFIG_MIPS_MALTA)       += 0x80100000
402
403 #
404 # MIPS SEAD board
405 #
406 core-$(CONFIG_MIPS_SEAD)        += arch/mips/mips-boards/sead/
407 load-$(CONFIG_MIPS_SEAD)        += 0x80100000
408
409 #
410 # Momentum Ocelot board
411 #
412 # The Ocelot setup.o must be linked early - it does the ioremap() for the
413 # mips_io_port_base.
414 #
415 core-$(CONFIG_MOMENCO_OCELOT)   += arch/mips/gt64120/common/ \
416                                    arch/mips/gt64120/momenco_ocelot/
417 cflags-$(CONFIG_MOMENCO_OCELOT) += -Iinclude/asm-mips/mach-ocelot
418 load-$(CONFIG_MOMENCO_OCELOT)   += 0x80100000
419
420 #
421 # Momentum Ocelot-G board
422 #
423 # The Ocelot-G setup.o must be linked early - it does the ioremap() for the
424 # mips_io_port_base.
425 #
426 core-$(CONFIG_MOMENCO_OCELOT_G) += arch/mips/momentum/ocelot_g/
427 load-$(CONFIG_MOMENCO_OCELOT_G) += 0x80100000
428
429 #
430 # Momentum Ocelot-C and -CS boards
431 #
432 # The Ocelot-C[S] setup.o must be linked early - it does the ioremap() for the
433 # mips_io_port_base.
434 core-$(CONFIG_MOMENCO_OCELOT_C) += arch/mips/momentum/ocelot_c/
435 load-$(CONFIG_MOMENCO_OCELOT_C) += 0x80100000
436
437 #
438 # PMC-Sierra Yosemite
439 #
440 core-$(CONFIG_PMC_YOSEMITE)     += arch/mips/pmc-sierra/yosemite/
441 cflags-$(CONFIG_PMC_YOSEMITE)   += -Iinclude/asm-mips/mach-yosemite
442 load-$(CONFIG_PMC_YOSEMITE)     += 0x80100000
443
444 #
445 # Momentum Jaguar ATX
446 #
447 core-$(CONFIG_MOMENCO_JAGUAR_ATX)       += arch/mips/momentum/jaguar_atx/
448 cflags-$(CONFIG_MOMENCO_JAGUAR_ATX)     += -Iinclude/asm-mips/mach-ja
449 #ifdef CONFIG_JAGUAR_DMALOW
450 #load-$(CONFIG_MOMENCO_JAGUAR_ATX)      += 0x88000000
451 #else
452 load-$(CONFIG_MOMENCO_JAGUAR_ATX)       += 0x80100000
453 #endif
454
455 #
456 # NEC DDB
457 #
458 core-$(CONFIG_DDB5XXX_COMMON)   += arch/mips/ddb5xxx/common/
459
460 #
461 # NEC DDB Vrc-5074
462 #
463 core-$(CONFIG_DDB5074)          += arch/mips/ddb5xxx/ddb5074/
464 load-$(CONFIG_DDB5074)          += 0x80080000
465
466 #
467 # NEC DDB Vrc-5476
468 #
469 core-$(CONFIG_DDB5476)          += arch/mips/ddb5xxx/ddb5476/
470 load-$(CONFIG_DDB5476)          += 0x80080000
471
472 #
473 # NEC DDB Vrc-5477
474 #
475 core-$(CONFIG_DDB5477)          += arch/mips/ddb5xxx/ddb5477/
476 load-$(CONFIG_DDB5477)          += 0x80100000
477
478 core-$(CONFIG_LASAT)            += arch/mips/lasat/
479 cflags-$(CONFIG_LASAT)          += -Iinclude/asm-mips/mach-lasat
480 load-$(CONFIG_LASAT)            += 0x80000000
481
482 #
483 # NEC Osprey (vr4181) board
484 #
485 core-$(CONFIG_NEC_OSPREY)       += arch/mips/vr4181/common/ \
486                                    arch/mips/vr4181/osprey/
487 load-$(CONFIG_NEC_OSPREY)       += 0x80002000
488
489 #
490 # Common VR41xx
491 #
492 core-$(CONFIG_MACH_VR41XX)      += arch/mips/vr41xx/common/
493 cflags-$(CONFIG_MACH_VR41XX)    += -Iinclude/asm-mips/mach-vr41xx
494
495 #
496 # ZAO Networks Capcella (VR4131)
497 #
498 core-$(CONFIG_ZAO_CAPCELLA)     += arch/mips/vr41xx/zao-capcella/
499 load-$(CONFIG_ZAO_CAPCELLA)     += 0x80000000
500
501 #
502 # Victor MP-C303/304 (VR4122)
503 #
504 core-$(CONFIG_VICTOR_MPC30X)    += arch/mips/vr41xx/victor-mpc30x/
505 load-$(CONFIG_VICTOR_MPC30X)    += 0x80001000
506
507 #
508 # IBM WorkPad z50 (VR4121)
509 #
510 core-$(CONFIG_IBM_WORKPAD)      += arch/mips/vr41xx/ibm-workpad/
511 load-$(CONFIG_IBM_WORKPAD)      += 0x80004000
512
513 #
514 # CASIO CASSIPEIA E-55/65 (VR4111)
515 #
516 core-$(CONFIG_CASIO_E55)        += arch/mips/vr41xx/casio-e55/
517 load-$(CONFIG_CASIO_E55)        += 0x80004000
518
519 #
520 # TANBAC TB0226 Mbase (VR4131)
521 #
522 core-$(CONFIG_TANBAC_TB0226)    += arch/mips/vr41xx/tanbac-tb0226/
523 load-$(CONFIG_TANBAC_TB0226)    += 0x80000000
524
525 #
526 # TANBAC TB0229 VR4131DIMM (VR4131)
527 #
528 core-$(CONFIG_TANBAC_TB0229)    += arch/mips/vr41xx/tanbac-tb0229/
529 load-$(CONFIG_TANBAC_TB0229)    += 0x80000000
530
531 #
532 # SGI IP22 (Indy/Indigo2)
533 #
534 # Set the load address to >= 0x88069000 if you want to leave space for symmon,
535 # 0x80002000 for production kernels.  Note that the value must be aligned to
536 # a multiple of the kernel stack size or the handling of the current variable
537 # will break so for 64-bit kernels we have to raise the start address by 8kb.
538 #
539 core-$(CONFIG_SGI_IP22)         += arch/mips/sgi-ip22/
540 cflags-$(CONFIG_SGI_IP22)       += -Iinclude/asm-mips/mach-ip22
541 ifdef CONFIG_MIPS32
542 load-$(CONFIG_SGI_IP22)         += 0x88002000
543 endif
544 ifdef CONFIG_MIPS64
545 load-$(CONFIG_SGI_IP22)         += 0x88004000
546 endif
547
548 #
549 # SGI-IP27 (Origin200/2000)
550 #
551 # Set the load address to >= 0xc000000000300000 if you want to leave space for
552 # symmon, 0xc00000000001c000 for production kernels.  Note that the value
553 # must be 16kb aligned or the handling of the current variable will break.
554 #
555 ifdef CONFIG_SGI_IP27
556 core-$(CONFIG_SGI_IP27)         += arch/mips/sgi-ip27/
557 cflags-$(CONFIG_SGI_IP27)       += -Iinclude/asm-mips/mach-ip27
558 #load-$(CONFIG_SGI_IP27)        += 0xa80000000001c000
559 ifdef CONFIG_MAPPED_KERNEL
560 load-$(CONFIG_SGI_IP27)         += 0xc001c000
561 else
562 load-$(CONFIG_SGI_IP27)         += 0x8001c000
563 endif
564 endif
565
566 #
567 # SGI-IP32 (O2)
568 #
569 # Set the load address to >= 80069000 if you want to leave space for symmon,
570 # 0x80002000 for production kernels.  Note that the value must be aligned to
571 # a multiple of the kernel stack size or the handling of the current variable
572 # will break so for 64-bit kernels we have to raise the start address by 8kb.
573 #
574 core-$(CONFIG_SGI_IP32)         += arch/mips/sgi-ip32/
575 cflags-$(CONFIG_SGI_IP32)       += -Iinclude/asm-mips/mach-ip32
576 ifdef CONFIG_MIPS32
577 load-$(CONFIG_SGI_IP32)         += 0x80002000
578 endif
579 ifdef CONFIG_MIPS64
580 load-$(CONFIG_SGI_IP32)         += 0x80004000
581 endif
582
583 #
584 # Sibyte SB1250 SOC
585 #
586 # This is a LIB so that it links at the end, and initcalls are later
587 # the sequence; but it is built as an object so that modules don't get
588 # removed (as happens, even if they have __initcall/module_init)
589 #
590 core-$(CONFIG_SIBYTE_BCM112X)   += arch/mips/sibyte/sb1250/
591
592 core-$(CONFIG_SIBYTE_SB1250)    += arch/mips/sibyte/sb1250/
593
594 #
595 # Sibyte BCM91120x (Carmel) board
596 # Sibyte BCM91120C (CRhine) board
597 # Sibyte BCM91125C (CRhone) board
598 # Sibyte BCM91125E (Rhone) board
599 # Sibyte SWARM board
600 #
601 libs-$(CONFIG_SIBYTE_CARMEL)    += arch/mips/sibyte/swarm/
602 load-$(CONFIG_SIBYTE_CARMEL)    := 0x80100000
603 libs-$(CONFIG_SIBYTE_CRHINE)    += arch/mips/sibyte/swarm/
604 load-$(CONFIG_SIBYTE_CRHINE)    := 0x80100000
605 libs-$(CONFIG_SIBYTE_CRHONE)    += arch/mips/sibyte/swarm/
606 load-$(CONFIG_SIBYTE_CRHONE)    := 0x80100000
607 libs-$(CONFIG_SIBYTE_RHONE)     += arch/mips/sibyte/swarm/
608 load-$(CONFIG_SIBYTE_RHONE)     := 0x80100000
609 libs-$(CONFIG_SIBYTE_SENTOSA)   += arch/mips/sibyte/swarm/
610 load-$(CONFIG_SIBYTE_SENTOSA)   := 0x80100000
611 libs-$(CONFIG_SIBYTE_SWARM)     += arch/mips/sibyte/swarm/
612 load-$(CONFIG_SIBYTE_SWARM)     := 0x80100000
613
614 #
615 # SNI RM200 PCI
616 #
617 core-$(CONFIG_SNI_RM200_PCI)    += arch/mips/sni/
618 cflags-$(CONFIG_SNI_RM200_PCI)  += -Iinclude/asm-mips/mach-rm200
619 load-$(CONFIG_SNI_RM200_PCI)    += 0x80600000
620
621 #
622 # Toshiba JMR-TX3927 board
623 #
624 core-$(CONFIG_TOSHIBA_JMR3927)  += arch/mips/jmr3927/rbhma3100/ \
625                                    arch/mips/jmr3927/common/
626 load-$(CONFIG_TOSHIBA_JMR3927)  += 0x80050000
627
628 #
629 # Toshiba RBTX4927 board or
630 # Toshiba RBTX4937 board
631 #
632 core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/toshiba_rbtx4927/
633 core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/common/
634 load-$(CONFIG_TOSHIBA_RBTX4927) += 0x80020000
635
636 cflags-y                        += -Iinclude/asm-mips/mach-generic
637 drivers-$(CONFIG_PCI)           += arch/mips/pci/
638
639 ifdef CONFIG_MIPS32
640 build-bfd               = $(32bit-bfd)
641 cflags-y                += $(32bit-isa-y)
642 endif
643 ifdef CONFIG_MIPS64
644 build-bfd               = $(64bit-bfd)
645 cflags-y                += $(64bit-isa-y)
646 endif
647
648 ifdef CONFIG_MIPS32
649 ifdef CONFIG_CPU_LITTLE_ENDIAN
650 JIFFIES                 = jiffies_64
651 else
652 JIFFIES                 = jiffies_64 + 4
653 endif
654 else
655 JIFFIES                 = jiffies_64
656 endif
657
658 #
659 # Some machines like the Indy need 32-bit ELF binaries for booting purposes.
660 # Other need ECOFF, so we build a 32-bit ELF binary for them which we then
661 # convert to ECOFF using elf2ecoff.
662 #
663 # The 64-bit ELF tools are pretty broken so at this time we generate 64-bit
664 # ELF files from 32-bit files by conversion.
665 #
666 #AS += -64
667 #LDFLAGS += -m elf64bmip
668
669 #
670 # Choosing incompatible machines durings configuration will result in
671 # error messages during linking.  Select a default linkscript if
672 # none has been choosen above.
673 #
674
675 AFLAGS_vmlinux.lds.o := \
676         -D"LOADADDR=$(load-y)" \
677         -D"JIFFIES=$(JIFFIES)" \
678         -imacros $(srctree)/include/asm-$(ARCH)/sn/mapped_kernel.h
679
680 AFLAGS          += $(cflags-y)
681 CFLAGS          += $(cflags-y)
682
683 LDFLAGS                 += --oformat $(32bit-bfd)
684
685 head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
686
687 libs-y                  += arch/mips/lib/
688 libs-$(CONFIG_MIPS32)   += arch/mips/lib-32/
689 libs-$(CONFIG_MIPS64)   += arch/mips/lib-64/
690
691 core-y                  += arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/
692
693 ifdef CONFIG_BAGET_MIPS
694
695 BAGETBOOT = $(MAKE) -C arch/$(ARCH)/baget
696
697 balo: vmlinux
698         $(BAGETBOOT) balo
699
700 endif
701
702 ifdef CONFIG_LASAT
703 rom.bin rom.sw: vmlinux
704         $(call descend,arch/mips/lasat/image,$@)
705 endif
706
707 ifdef CONFIG_MAPPED_KERNEL
708 vmlinux.64: vmlinux
709         $(OBJCOPY) -O $(64bit-bfd) --remove-section=.reginfo \
710                 --change-addresses=0xc000000080000000 $< $@
711 else
712 vmlinux.64: vmlinux
713         $(OBJCOPY) -O $(64bit-bfd) --remove-section=.reginfo \
714                 --change-addresses=0xa800000080000000 $< $@
715 endif
716
717 makeboot =$(Q)$(MAKE) $(build)=arch/mips/boot $(1)
718
719 ifdef CONFIG_SGI_IP27
720 all:    vmlinux.64
721 endif
722
723 ifdef CONFIG_SNI_RM200_PCI
724 all:    vmlinux.ecoff
725 endif
726
727 vmlinux.ecoff vmlinux.rm200: vmlinux
728         +@$(call makeboot,$@)
729
730 vmlinux.srec: vmlinux
731         +@$(call makeboot,$@)
732
733 CLEAN_FILES += vmlinux.ecoff \
734                vmlinux.srec \
735                vmlinux.rm200.tmp \
736                vmlinux.rm200
737
738 archclean:
739         @$(MAKE) $(clean)=arch/mips/boot
740         @$(MAKE) $(clean)=arch/mips/baget
741         @$(MAKE) $(clean)=arch/mips/lasat
742
743 # Generate <asm/offset.h 
744 #
745 # The default rule is suffering from funny problems on MIPS so we using our
746 # own ...
747 #
748 # ---------------------------------------------------------------------------
749
750 define filechk_gen-asm-offset.h
751         (set -e; \
752          echo "#ifndef _ASM_OFFSET_H"; \
753          echo "#define _ASM_OFFSET_H"; \
754          echo "/*"; \
755          echo " * DO NOT MODIFY."; \
756          echo " *"; \
757          echo " * This file was generated by arch/$(ARCH)/Makefile"; \
758          echo " *"; \
759          echo " */"; \
760          echo ""; \
761          sed -ne "/^@@@/s///p"; \
762          echo "#endif /* _ASM_OFFSET_H */" )
763 endef
764
765 define filechk_gen-asm-reg.h
766         (set -e; \
767          echo "#ifndef _ASM_REG_H"; \
768          echo "#define _ASM_REG_H"; \
769          echo "/*"; \
770          echo " * DO NOT MODIFY."; \
771          echo " *"; \
772          echo " * This file was generated by arch/$(ARCH)/Makefile"; \
773          echo " *"; \
774          echo " */"; \
775          echo ""; \
776          sed -ne "/^@@@/s///p"; \
777          echo "#endif /* _ASM_REG_H */" )
778 endef
779
780 prepare: include/asm-$(ARCH)/offset.h \
781          include/asm-$(ARCH)/reg.h
782
783 arch/$(ARCH)/kernel/offset.s: include/asm include/linux/version.h \
784                                    include/config/MARKER
785
786 include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.s
787         $(call filechk,gen-asm-offset.h)
788 include/asm-$(ARCH)/reg.h: arch/$(ARCH)/kernel/reg.s
789         $(call filechk,gen-asm-reg.h)
790
791 CLEAN_FILES += include/asm-$(ARCH)/offset.h.tmp \
792                include/asm-$(ARCH)/offset.h \
793                include/asm-$(ARCH)/reg.h.tmp \
794                include/asm-$(ARCH)/reg.h \
795                vmlinux.64 \
796                vmlinux.ecoff