RT-AC66 3.0.0.4.374.130 core
[tomato.git] / release / src-rt-6.x / linux / linux-2.6 / arch / mips / Makefile
blob57b5195848550238ba2f91533a1354dea3c6e917
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.
6 # Copyright (C) 1994, 95, 96, 2003 by Ralf Baechle
7 # DECStation modifications by Paul M. Antoine, 1996
8 # Copyright (C) 2002, 2003, 2004 Maciej W. Rozycki
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.
15 cflags-y := -ffunction-sections
16 cflags-y += $(call cc-option, -mno-check-zero-division)
19 # Select the object file format to substitute into the linker script.
21 ifdef CONFIG_CPU_LITTLE_ENDIAN
22 32bit-tool-prefix = mipsel-linux-
23 64bit-tool-prefix = mips64el-linux-
24 32bit-bfd = elf32-tradlittlemips
25 64bit-bfd = elf64-tradlittlemips
26 32bit-emul = elf32ltsmip
27 64bit-emul = elf64ltsmip
28 else
29 32bit-tool-prefix = mips-linux-
30 64bit-tool-prefix = mips64-linux-
31 32bit-bfd = elf32-tradbigmips
32 64bit-bfd = elf64-tradbigmips
33 32bit-emul = elf32btsmip
34 64bit-emul = elf64btsmip
35 endif
37 ifdef CONFIG_32BIT
38 tool-prefix = $(32bit-tool-prefix)
39 UTS_MACHINE := mips
40 endif
41 ifdef CONFIG_64BIT
42 tool-prefix = $(64bit-tool-prefix)
43 UTS_MACHINE := mips64
44 endif
46 ifdef CONFIG_CROSSCOMPILE
47 CROSS_COMPILE := $(tool-prefix)
48 endif
50 ifdef CONFIG_32BIT
51 ld-emul = $(32bit-emul)
52 vmlinux-32 = vmlinux
53 vmlinux-64 = vmlinux.64
55 cflags-y += -mabi=32
56 endif
58 ifdef CONFIG_64BIT
59 ld-emul = $(64bit-emul)
60 vmlinux-32 = vmlinux.32
61 vmlinux-64 = vmlinux
63 cflags-y += -mabi=64
64 ifdef CONFIG_BUILD_ELF64
65 cflags-y += $(call cc-option,-mno-explicit-relocs)
66 else
67 cflags-y += $(call cc-option,-msym32)
68 endif
69 endif
73 # GCC uses -G 0 -mabicalls -fpic as default. We don't want PIC in the kernel
74 # code since it only slows down the whole thing. At some point we might make
75 # use of global pointer optimizations but their use of $28 conflicts with
76 # the current pointer optimization.
78 # The DECStation requires an ECOFF kernel for remote booting, other MIPS
79 # machines may also. Since BFD is incredibly buggy with respect to
80 # crossformat linking we rely on the elf2ecoff tool for format conversion.
82 cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
83 cflags-y += -msoft-float
84 LDFLAGS_vmlinux += -G 0 -static -n -nostdlib
85 MODFLAGS += -mlong-calls -fno-common
87 # Always compile with debug symbols. They will be stripped by the router
88 # makefile to produce the final kernel. Debug versions of kernel and brcm
89 # kernel modules will be kept with the extension dbgsym attached to their
90 # names.
91 cflags-y += -ggdb
93 cflags-y += -ffreestanding
96 # We explicitly add the endianness specifier if needed, this allows
97 # to compile kernels with a toolchain for the other endianness. We
98 # carefully avoid to add it redundantly because gcc 3.3/3.4 complains
99 # when fed the toolchain default!
101 # Certain gcc versions upto gcc 4.1.1 (probably 4.2-subversion as of
102 # 2006-10-10 don't properly change the predefined symbols if -EB / -EL
103 # are used, so we kludge that here. A bug has been filed at
104 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29413.
106 undef-all += -UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__
107 undef-all += -UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__
108 predef-be += -DMIPSEB -D_MIPSEB -D__MIPSEB -D__MIPSEB__
109 predef-le += -DMIPSEL -D_MIPSEL -D__MIPSEL -D__MIPSEL__
110 cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be))
111 cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le))
113 cflags-$(CONFIG_CPU_HAS_SMARTMIPS) += $(call cc-option,-msmartmips)
115 cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \
116 -fno-omit-frame-pointer
119 # CPU-dependent compiler/assembler options for optimization.
121 cflags-$(CONFIG_CPU_R3000) += -march=r3000
122 cflags-$(CONFIG_CPU_TX39XX) += -march=r3900
123 cflags-$(CONFIG_CPU_R6000) += -march=r6000 -Wa,--trap
124 cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap
125 cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap
126 cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap
127 cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap
128 cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
129 -Wa,-mips32 -Wa,--trap
130 cflags-$(CONFIG_CPU_MIPS32_R2) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
131 -Wa,-mips32r2 -Wa,--trap
132 cflags-$(CONFIG_CPU_MIPS64_R1) += $(call cc-option,-march=mips64,-mips64 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \
133 -Wa,-mips64 -Wa,--trap
134 cflags-$(CONFIG_CPU_MIPS64_R2) += $(call cc-option,-march=mips64r2,-mips64r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \
135 -Wa,-mips64r2 -Wa,--trap
136 cflags-$(CONFIG_CPU_R5000) += -march=r5000 -Wa,--trap
137 cflags-$(CONFIG_CPU_R5432) += $(call cc-option,-march=r5400,-march=r5000) \
138 -Wa,--trap
139 cflags-$(CONFIG_CPU_NEVADA) += $(call cc-option,-march=rm5200,-march=r5000) \
140 -Wa,--trap
141 cflags-$(CONFIG_CPU_RM7000) += $(call cc-option,-march=rm7000,-march=r5000) \
142 -Wa,--trap
143 cflags-$(CONFIG_CPU_RM9000) += $(call cc-option,-march=rm9000,-march=r5000) \
144 -Wa,--trap
145 cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-march=sb1,-march=r5000) \
146 -Wa,--trap
147 cflags-$(CONFIG_CPU_R8000) += -march=r8000 -Wa,--trap
148 cflags-$(CONFIG_CPU_R10000) += $(call cc-option,-march=r10000,-march=r8000) \
149 -Wa,--trap
151 ifdef CONFIG_CPU_SB1
152 ifdef CONFIG_SB1_PASS_1_WORKAROUNDS
153 MODFLAGS += -msb1-pass1-workarounds
154 endif
155 endif
157 cflags-y += $(call check_gcc, -m4710a0kern, )
160 # Firmware support
162 libs-$(CONFIG_ARC) += arch/mips/arc/
163 libs-$(CONFIG_SIBYTE_CFE) += arch/mips/sibyte/cfe/
166 # Board-dependent options and extra files
170 # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
172 core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/
173 cflags-$(CONFIG_MACH_JAZZ) += -Iinclude/asm-mips/mach-jazz
174 load-$(CONFIG_MACH_JAZZ) += 0xffffffff80080000
177 # Common Alchemy Au1x00 stuff
179 core-$(CONFIG_SOC_AU1X00) += arch/mips/au1000/common/
180 cflags-$(CONFIG_SOC_AU1X00) += -Iinclude/asm-mips/mach-au1x00
183 # AMD Alchemy Pb1000 eval board
185 libs-$(CONFIG_MIPS_PB1000) += arch/mips/au1000/pb1000/
186 cflags-$(CONFIG_MIPS_PB1000) += -Iinclude/asm-mips/mach-pb1x00
187 load-$(CONFIG_MIPS_PB1000) += 0xffffffff80100000
190 # AMD Alchemy Pb1100 eval board
192 libs-$(CONFIG_MIPS_PB1100) += arch/mips/au1000/pb1100/
193 cflags-$(CONFIG_MIPS_PB1100) += -Iinclude/asm-mips/mach-pb1x00
194 load-$(CONFIG_MIPS_PB1100) += 0xffffffff80100000
197 # AMD Alchemy Pb1500 eval board
199 libs-$(CONFIG_MIPS_PB1500) += arch/mips/au1000/pb1500/
200 cflags-$(CONFIG_MIPS_PB1500) += -Iinclude/asm-mips/mach-pb1x00
201 load-$(CONFIG_MIPS_PB1500) += 0xffffffff80100000
204 # AMD Alchemy Pb1550 eval board
206 libs-$(CONFIG_MIPS_PB1550) += arch/mips/au1000/pb1550/
207 cflags-$(CONFIG_MIPS_PB1550) += -Iinclude/asm-mips/mach-pb1x00
208 load-$(CONFIG_MIPS_PB1550) += 0xffffffff80100000
211 # AMD Alchemy Pb1200 eval board
213 libs-$(CONFIG_MIPS_PB1200) += arch/mips/au1000/pb1200/
214 cflags-$(CONFIG_MIPS_PB1200) += -Iinclude/asm-mips/mach-pb1x00
215 load-$(CONFIG_MIPS_PB1200) += 0xffffffff80100000
218 # AMD Alchemy Db1000 eval board
220 libs-$(CONFIG_MIPS_DB1000) += arch/mips/au1000/db1x00/
221 cflags-$(CONFIG_MIPS_DB1000) += -Iinclude/asm-mips/mach-db1x00
222 load-$(CONFIG_MIPS_DB1000) += 0xffffffff80100000
225 # AMD Alchemy Db1100 eval board
227 libs-$(CONFIG_MIPS_DB1100) += arch/mips/au1000/db1x00/
228 cflags-$(CONFIG_MIPS_DB1100) += -Iinclude/asm-mips/mach-db1x00
229 load-$(CONFIG_MIPS_DB1100) += 0xffffffff80100000
232 # AMD Alchemy Db1500 eval board
234 libs-$(CONFIG_MIPS_DB1500) += arch/mips/au1000/db1x00/
235 cflags-$(CONFIG_MIPS_DB1500) += -Iinclude/asm-mips/mach-db1x00
236 load-$(CONFIG_MIPS_DB1500) += 0xffffffff80100000
239 # AMD Alchemy Db1550 eval board
241 libs-$(CONFIG_MIPS_DB1550) += arch/mips/au1000/db1x00/
242 cflags-$(CONFIG_MIPS_DB1550) += -Iinclude/asm-mips/mach-db1x00
243 load-$(CONFIG_MIPS_DB1550) += 0xffffffff80100000
246 # AMD Alchemy Db1200 eval board
248 libs-$(CONFIG_MIPS_DB1200) += arch/mips/au1000/pb1200/
249 cflags-$(CONFIG_MIPS_DB1200) += -Iinclude/asm-mips/mach-db1x00
250 load-$(CONFIG_MIPS_DB1200) += 0xffffffff80100000
253 # AMD Alchemy Bosporus eval board
255 libs-$(CONFIG_MIPS_BOSPORUS) += arch/mips/au1000/db1x00/
256 cflags-$(CONFIG_MIPS_BOSPORUS) += -Iinclude/asm-mips/mach-db1x00
257 load-$(CONFIG_MIPS_BOSPORUS) += 0xffffffff80100000
260 # AMD Alchemy Mirage eval board
262 libs-$(CONFIG_MIPS_MIRAGE) += arch/mips/au1000/db1x00/
263 cflags-$(CONFIG_MIPS_MIRAGE) += -Iinclude/asm-mips/mach-db1x00
264 load-$(CONFIG_MIPS_MIRAGE) += 0xffffffff80100000
267 # 4G-Systems eval board
269 libs-$(CONFIG_MIPS_MTX1) += arch/mips/au1000/mtx-1/
270 load-$(CONFIG_MIPS_MTX1) += 0xffffffff80100000
273 # MyCable eval board
275 libs-$(CONFIG_MIPS_XXS1500) += arch/mips/au1000/xxs1500/
276 load-$(CONFIG_MIPS_XXS1500) += 0xffffffff80100000
279 # Cobalt Server
281 core-$(CONFIG_MIPS_COBALT) += arch/mips/cobalt/
282 cflags-$(CONFIG_MIPS_COBALT) += -Iinclude/asm-mips/mach-cobalt
283 load-$(CONFIG_MIPS_COBALT) += 0xffffffff80080000
286 # DECstation family
288 core-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/
289 cflags-$(CONFIG_MACH_DECSTATION)+= -Iinclude/asm-mips/mach-dec
290 libs-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/prom/
291 load-$(CONFIG_MACH_DECSTATION) += 0xffffffff80040000
292 CLEAN_FILES += drivers/tc/lk201-map.c
295 # Galileo EV64120 Board
297 core-$(CONFIG_MIPS_EV64120) += arch/mips/gt64120/ev64120/
298 core-$(CONFIG_MIPS_EV64120) += arch/mips/gt64120/common/
299 cflags-$(CONFIG_MIPS_EV64120) += -Iinclude/asm-mips/mach-ev64120
300 load-$(CONFIG_MIPS_EV64120) += 0xffffffff80100000
303 # Wind River PPMC Board (4KC + GT64120)
305 core-$(CONFIG_WR_PPMC) += arch/mips/gt64120/wrppmc/
306 cflags-$(CONFIG_WR_PPMC) += -Iinclude/asm-mips/mach-wrppmc
307 load-$(CONFIG_WR_PPMC) += 0xffffffff80100000
310 # For all MIPS, Inc. eval boards
312 core-$(CONFIG_MIPS_BOARDS_GEN) += arch/mips/mips-boards/generic/
315 # MIPS Atlas board
317 core-$(CONFIG_MIPS_ATLAS) += arch/mips/mips-boards/atlas/
318 cflags-$(CONFIG_MIPS_ATLAS) += -Iinclude/asm-mips/mach-atlas
319 cflags-$(CONFIG_MIPS_ATLAS) += -Iinclude/asm-mips/mach-mips
320 load-$(CONFIG_MIPS_ATLAS) += 0xffffffff80100000
323 # MIPS Malta board
325 core-$(CONFIG_MIPS_MALTA) += arch/mips/mips-boards/malta/
326 cflags-$(CONFIG_MIPS_MALTA) += -Iinclude/asm-mips/mach-mips
327 load-$(CONFIG_MIPS_MALTA) += 0xffffffff80100000
330 # MIPS SEAD board
332 core-$(CONFIG_MIPS_SEAD) += arch/mips/mips-boards/sead/
333 cflags-$(CONFIG_MIPS_SEAD) += -Iinclude/asm-mips/mach-mips
334 load-$(CONFIG_MIPS_SEAD) += 0xffffffff80100000
337 # MIPS SIM
339 core-$(CONFIG_MIPS_SIM) += arch/mips/mips-boards/sim/
340 cflags-$(CONFIG_MIPS_SIM) += -Iinclude/asm-mips/mach-sim
341 load-$(CONFIG_MIPS_SIM) += 0x80100000
344 # Momentum Ocelot board
346 # The Ocelot setup.o must be linked early - it does the ioremap() for the
347 # mips_io_port_base.
349 core-$(CONFIG_MOMENCO_OCELOT) += arch/mips/gt64120/common/ \
350 arch/mips/gt64120/momenco_ocelot/
351 cflags-$(CONFIG_MOMENCO_OCELOT) += -Iinclude/asm-mips/mach-ocelot
352 load-$(CONFIG_MOMENCO_OCELOT) += 0xffffffff80100000
355 # Momentum Ocelot-C and -CS boards
357 # The Ocelot-C[S] setup.o must be linked early - it does the ioremap() for the
358 # mips_io_port_base.
359 core-$(CONFIG_MOMENCO_OCELOT_C) += arch/mips/momentum/ocelot_c/
360 load-$(CONFIG_MOMENCO_OCELOT_C) += 0xffffffff80100000
363 # PMC-Sierra Yosemite
365 core-$(CONFIG_PMC_YOSEMITE) += arch/mips/pmc-sierra/yosemite/
366 cflags-$(CONFIG_PMC_YOSEMITE) += -Iinclude/asm-mips/mach-yosemite
367 load-$(CONFIG_PMC_YOSEMITE) += 0xffffffff80100000
370 # Qemu simulating MIPS32 4Kc
372 core-$(CONFIG_QEMU) += arch/mips/qemu/
373 cflags-$(CONFIG_QEMU) += -Iinclude/asm-mips/mach-qemu
374 load-$(CONFIG_QEMU) += 0xffffffff80010000
377 # Momentum Ocelot-3
379 core-$(CONFIG_MOMENCO_OCELOT_3) += arch/mips/momentum/ocelot_3/
380 cflags-$(CONFIG_MOMENCO_OCELOT_3) += -Iinclude/asm-mips/mach-ocelot3
381 load-$(CONFIG_MOMENCO_OCELOT_3) += 0xffffffff80100000
384 # Basler eXcite
386 core-$(CONFIG_BASLER_EXCITE) += arch/mips/basler/excite/
387 cflags-$(CONFIG_BASLER_EXCITE) += -Iinclude/asm-mips/mach-excite
388 load-$(CONFIG_BASLER_EXCITE) += 0x80100000
391 # NEC DDB
393 core-$(CONFIG_DDB5XXX_COMMON) += arch/mips/ddb5xxx/common/
396 # NEC DDB Vrc-5477
398 core-$(CONFIG_DDB5477) += arch/mips/ddb5xxx/ddb5477/
399 load-$(CONFIG_DDB5477) += 0xffffffff80100000
401 core-$(CONFIG_LASAT) += arch/mips/lasat/
402 cflags-$(CONFIG_LASAT) += -Iinclude/asm-mips/mach-lasat
403 load-$(CONFIG_LASAT) += 0xffffffff80000000
406 # Common VR41xx
408 core-$(CONFIG_MACH_VR41XX) += arch/mips/vr41xx/common/
409 cflags-$(CONFIG_MACH_VR41XX) += -Iinclude/asm-mips/mach-vr41xx
412 # NEC VR4133
414 core-$(CONFIG_NEC_CMBVR4133) += arch/mips/vr41xx/nec-cmbvr4133/
415 load-$(CONFIG_NEC_CMBVR4133) += 0xffffffff80100000
418 # ZAO Networks Capcella (VR4131)
420 load-$(CONFIG_ZAO_CAPCELLA) += 0xffffffff80000000
423 # Victor MP-C303/304 (VR4122)
425 load-$(CONFIG_VICTOR_MPC30X) += 0xffffffff80001000
428 # IBM WorkPad z50 (VR4121)
430 core-$(CONFIG_IBM_WORKPAD) += arch/mips/vr41xx/ibm-workpad/
431 load-$(CONFIG_IBM_WORKPAD) += 0xffffffff80004000
434 # CASIO CASSIPEIA E-55/65 (VR4111)
436 core-$(CONFIG_CASIO_E55) += arch/mips/vr41xx/casio-e55/
437 load-$(CONFIG_CASIO_E55) += 0xffffffff80004000
440 # TANBAC VR4131 multichip module(TB0225) and TANBAC VR4131DIMM(TB0229) (VR4131)
442 load-$(CONFIG_TANBAC_TB022X) += 0xffffffff80000000
445 # Common Philips PNX8550
447 core-$(CONFIG_SOC_PNX8550) += arch/mips/philips/pnx8550/common/
448 cflags-$(CONFIG_SOC_PNX8550) += -Iinclude/asm-mips/mach-pnx8550
451 # Philips PNX8550 JBS board
453 libs-$(CONFIG_PNX8550_JBS) += arch/mips/philips/pnx8550/jbs/
454 #cflags-$(CONFIG_PNX8550_JBS) += -Iinclude/asm-mips/mach-pnx8550
455 load-$(CONFIG_PNX8550_JBS) += 0xffffffff80060000
457 # Philips PNX8550 STB810 board
459 libs-$(CONFIG_PNX8550_STB810) += arch/mips/philips/pnx8550/stb810/
460 load-$(CONFIG_PNX8550_STB810) += 0xffffffff80060000
462 # NEC EMMA2RH boards
464 core-$(CONFIG_EMMA2RH) += arch/mips/emma2rh/common/
465 cflags-$(CONFIG_EMMA2RH) += -Iinclude/asm-mips/mach-emma2rh
467 # NEC EMMA2RH Mark-eins
468 core-$(CONFIG_MARKEINS) += arch/mips/emma2rh/markeins/
469 load-$(CONFIG_MARKEINS) += 0xffffffff88100000
472 # SGI IP22 (Indy/Indigo2)
474 # Set the load address to >= 0xffffffff88069000 if you want to leave space for
475 # symmon, 0xffffffff80002000 for production kernels. Note that the value must
476 # be aligned to a multiple of the kernel stack size or the handling of the
477 # current variable will break so for 64-bit kernels we have to raise the start
478 # address by 8kb.
480 core-$(CONFIG_SGI_IP22) += arch/mips/sgi-ip22/
481 cflags-$(CONFIG_SGI_IP22) += -Iinclude/asm-mips/mach-ip22
482 ifdef CONFIG_32BIT
483 load-$(CONFIG_SGI_IP22) += 0xffffffff88002000
484 endif
485 ifdef CONFIG_64BIT
486 load-$(CONFIG_SGI_IP22) += 0xffffffff88004000
487 endif
490 # SGI-IP27 (Origin200/2000)
492 # Set the load address to >= 0xc000000000300000 if you want to leave space for
493 # symmon, 0xc00000000001c000 for production kernels. Note that the value must
494 # be 16kb aligned or the handling of the current variable will break.
496 ifdef CONFIG_SGI_IP27
497 core-$(CONFIG_SGI_IP27) += arch/mips/sgi-ip27/
498 cflags-$(CONFIG_SGI_IP27) += -Iinclude/asm-mips/mach-ip27
499 ifdef CONFIG_MAPPED_KERNEL
500 load-$(CONFIG_SGI_IP27) += 0xc00000004001c000
501 OBJCOPYFLAGS := --change-addresses=0x3fffffff80000000
502 dataoffset-$(CONFIG_SGI_IP27) += 0x01000000
503 else
504 load-$(CONFIG_SGI_IP27) += 0xa80000000001c000
505 OBJCOPYFLAGS := --change-addresses=0x57ffffff80000000
506 endif
507 endif
510 # SGI-IP32 (O2)
512 # Set the load address to >= 80069000 if you want to leave space for symmon,
513 # 0xffffffff80004000 for production kernels. Note that the value must be aligned to
514 # a multiple of the kernel stack size or the handling of the current variable
515 # will break.
517 core-$(CONFIG_SGI_IP32) += arch/mips/sgi-ip32/
518 cflags-$(CONFIG_SGI_IP32) += -Iinclude/asm-mips/mach-ip32
519 load-$(CONFIG_SGI_IP32) += 0xffffffff80004000
522 # Sibyte SB1250/BCM1480 SOC
524 # This is a LIB so that it links at the end, and initcalls are later
525 # the sequence; but it is built as an object so that modules don't get
526 # removed (as happens, even if they have __initcall/module_init)
528 core-$(CONFIG_SIBYTE_BCM112X) += arch/mips/sibyte/sb1250/
529 core-$(CONFIG_SIBYTE_BCM112X) += arch/mips/sibyte/common/
530 cflags-$(CONFIG_SIBYTE_BCM112X) += -Iinclude/asm-mips/mach-sibyte \
531 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
533 core-$(CONFIG_SIBYTE_SB1250) += arch/mips/sibyte/sb1250/
534 core-$(CONFIG_SIBYTE_SB1250) += arch/mips/sibyte/common/
535 cflags-$(CONFIG_SIBYTE_SB1250) += -Iinclude/asm-mips/mach-sibyte \
536 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
538 core-$(CONFIG_SIBYTE_BCM1x55) += arch/mips/sibyte/bcm1480/
539 core-$(CONFIG_SIBYTE_BCM1x55) += arch/mips/sibyte/common/
540 cflags-$(CONFIG_SIBYTE_BCM1x55) += -Iinclude/asm-mips/mach-sibyte \
541 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
543 core-$(CONFIG_SIBYTE_BCM1x80) += arch/mips/sibyte/bcm1480/
544 core-$(CONFIG_SIBYTE_BCM1x80) += arch/mips/sibyte/common/
545 cflags-$(CONFIG_SIBYTE_BCM1x80) += -Iinclude/asm-mips/mach-sibyte \
546 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
549 # Sibyte BCM91120x (Carmel) board
550 # Sibyte BCM91120C (CRhine) board
551 # Sibyte BCM91125C (CRhone) board
552 # Sibyte BCM91125E (Rhone) board
553 # Sibyte SWARM board
554 # Sibyte BCM91x80 (BigSur) board
556 libs-$(CONFIG_SIBYTE_CARMEL) += arch/mips/sibyte/swarm/
557 load-$(CONFIG_SIBYTE_CARMEL) := 0xffffffff80100000
558 libs-$(CONFIG_SIBYTE_CRHINE) += arch/mips/sibyte/swarm/
559 load-$(CONFIG_SIBYTE_CRHINE) := 0xffffffff80100000
560 libs-$(CONFIG_SIBYTE_CRHONE) += arch/mips/sibyte/swarm/
561 load-$(CONFIG_SIBYTE_CRHONE) := 0xffffffff80100000
562 libs-$(CONFIG_SIBYTE_RHONE) += arch/mips/sibyte/swarm/
563 load-$(CONFIG_SIBYTE_RHONE) := 0xffffffff80100000
564 libs-$(CONFIG_SIBYTE_SENTOSA) += arch/mips/sibyte/swarm/
565 load-$(CONFIG_SIBYTE_SENTOSA) := 0xffffffff80100000
566 libs-$(CONFIG_SIBYTE_SWARM) += arch/mips/sibyte/swarm/
567 load-$(CONFIG_SIBYTE_SWARM) := 0xffffffff80100000
568 libs-$(CONFIG_SIBYTE_BIGSUR) += arch/mips/sibyte/swarm/
569 load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000
572 # SNI RM
574 core-$(CONFIG_SNI_RM) += arch/mips/sni/
575 cflags-$(CONFIG_SNI_RM) += -Iinclude/asm-mips/mach-rm
576 ifdef CONFIG_CPU_LITTLE_ENDIAN
577 load-$(CONFIG_SNI_RM) += 0xffffffff80600000
578 else
579 load-$(CONFIG_SNI_RM) += 0xffffffff80030000
580 endif
583 # Toshiba JMR-TX3927 board
585 core-$(CONFIG_TOSHIBA_JMR3927) += arch/mips/jmr3927/rbhma3100/ \
586 arch/mips/jmr3927/common/
587 cflags-$(CONFIG_TOSHIBA_JMR3927) += -Iinclude/asm-mips/mach-jmr3927
588 load-$(CONFIG_TOSHIBA_JMR3927) += 0xffffffff80050000
591 # Toshiba RBTX4927 board or
592 # Toshiba RBTX4937 board
594 core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/toshiba_rbtx4927/
595 core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/common/
596 load-$(CONFIG_TOSHIBA_RBTX4927) += 0xffffffff80020000
599 # Toshiba RBTX4938 board
601 core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/toshiba_rbtx4938/
602 core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/common/
603 load-$(CONFIG_TOSHIBA_RBTX4938) += 0xffffffff80100000
605 cflags-y += -Iinclude/asm-mips/mach-generic
606 drivers-$(CONFIG_PCI) += arch/mips/pci/
609 # Broadcom BCM947XX variants
611 ifdef CONFIG_BCM947XX
612 core-$(CONFIG_BCM947XX) += arch/mips/brcm-boards/generic/ arch/mips/brcm-boards/bcm947xx/
613 load-$(CONFIG_BCM947XX) := 0xffffffff80001000
614 zImage: vmlinux
615 endif
617 ifdef CONFIG_32BIT
618 ifdef CONFIG_CPU_LITTLE_ENDIAN
619 JIFFIES = jiffies_64
620 else
621 JIFFIES = jiffies_64 + 4
622 endif
623 else
624 JIFFIES = jiffies_64
625 endif
627 AFLAGS += $(cflags-y)
628 ASFLAGS += $(cflags-y)
629 CFLAGS += $(cflags-y)
631 LDFLAGS += -m $(ld-emul)
633 ifdef CONFIG_MIPS
634 CHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \
635 egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
636 sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/")
637 ifdef CONFIG_64BIT
638 CHECKFLAGS += -m64
639 endif
640 endif
642 OBJCOPYFLAGS += --remove-section=.reginfo
645 # Choosing incompatible machines durings configuration will result in
646 # error messages during linking. Select a default linkscript if
647 # none has been choosen above.
650 CPPFLAGS_vmlinux.lds := \
651 $(CFLAGS) \
652 -D"LOADADDR=$(load-y)" \
653 -D"JIFFIES=$(JIFFIES)" \
654 -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
656 head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
658 libs-y += arch/mips/lib/
660 core-y += arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/
662 drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/
664 ifdef CONFIG_LASAT
665 rom.bin rom.sw: vmlinux
666 $(Q)$(MAKE) $(build)=arch/mips/lasat/image $@
667 endif
670 # Some machines like the Indy need 32-bit ELF binaries for booting purposes.
671 # Other need ECOFF, so we build a 32-bit ELF binary for them which we then
672 # convert to ECOFF using elf2ecoff.
674 vmlinux.32: vmlinux
675 $(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@
678 # The 64-bit ELF tools are pretty broken so at this time we generate 64-bit
679 # ELF files from 32-bit files by conversion.
681 vmlinux.64: vmlinux
682 $(OBJCOPY) -O $(64bit-bfd) $(OBJCOPYFLAGS) $< $@
684 makeboot =$(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) $(1)
686 ifdef CONFIG_BOOT_ELF32
687 all: $(vmlinux-32)
688 endif
690 ifdef CONFIG_BOOT_ELF64
691 all: $(vmlinux-64)
692 endif
694 ifdef CONFIG_MIPS_ATLAS
695 all: vmlinux.srec
696 endif
698 ifdef CONFIG_MIPS_MALTA
699 all: vmlinux.srec
700 endif
702 ifdef CONFIG_MIPS_SEAD
703 all: vmlinux.srec
704 endif
706 ifdef CONFIG_QEMU
707 all: vmlinux.bin
708 endif
710 ifdef CONFIG_SNI_RM
711 all: vmlinux.ecoff
712 endif
714 vmlinux.bin: $(vmlinux-32)
715 +@$(call makeboot,$@)
717 vmlinux.ecoff: $(vmlinux-32)
718 +@$(call makeboot,$@)
720 vmlinux.srec: $(vmlinux-32)
721 +@$(call makeboot,$@)
723 CLEAN_FILES += vmlinux.ecoff \
724 vmlinux.srec
726 archprepare:
727 ifdef CONFIG_MIPS32_N32
728 @echo ' Checking missing-syscalls for N32'
729 $(Q)$(MAKE) $(build)=. missing-syscalls EXTRA_CFLAGS="-mabi=n32"
730 endif
731 ifdef CONFIG_MIPS32_O32
732 @echo ' Checking missing-syscalls for O32'
733 $(Q)$(MAKE) $(build)=. missing-syscalls EXTRA_CFLAGS="-mabi=32"
734 endif
736 archclean:
737 @$(MAKE) $(clean)=arch/mips/boot
738 @$(MAKE) $(clean)=arch/mips/lasat
739 $(Q)$(MAKE) -C arch/mips/brcm-boards/bcm947xx/compressed clean
741 CLEAN_FILES += vmlinux.32 \
742 vmlinux.64 \
743 vmlinux.ecoff