xref: /openbmc/linux/arch/mips/Makefile (revision 9a0f3b73)
11da177e4SLinus Torvalds#
21da177e4SLinus Torvalds# This file is subject to the terms and conditions of the GNU General Public
31da177e4SLinus Torvalds# License.  See the file "COPYING" in the main directory of this archive
41da177e4SLinus Torvalds# for more details.
51da177e4SLinus Torvalds#
61da177e4SLinus Torvalds# Copyright (C) 1994, 95, 96, 2003 by Ralf Baechle
71da177e4SLinus Torvalds# DECStation modifications by Paul M. Antoine, 1996
81da177e4SLinus Torvalds# Copyright (C) 2002, 2003, 2004  Maciej W. Rozycki
91da177e4SLinus Torvalds#
101da177e4SLinus Torvalds# This file is included by the global makefile so that you can add your own
111da177e4SLinus Torvalds# architecture-specific flags and dependencies. Remember to do have actions
121da177e4SLinus Torvalds# for "archclean" cleaning up for this architecture.
131da177e4SLinus Torvalds#
141da177e4SLinus Torvalds
151da177e4SLinus Torvaldscflags-y :=
161da177e4SLinus Torvalds
171da177e4SLinus Torvalds#
181da177e4SLinus Torvalds# Select the object file format to substitute into the linker script.
191da177e4SLinus Torvalds#
201da177e4SLinus Torvaldsifdef CONFIG_CPU_LITTLE_ENDIAN
211da177e4SLinus Torvalds32bit-tool-prefix	= mipsel-linux-
221da177e4SLinus Torvalds64bit-tool-prefix	= mips64el-linux-
231da177e4SLinus Torvalds32bit-bfd		= elf32-tradlittlemips
241da177e4SLinus Torvalds64bit-bfd		= elf64-tradlittlemips
251da177e4SLinus Torvalds32bit-emul		= elf32ltsmip
261da177e4SLinus Torvalds64bit-emul		= elf64ltsmip
271da177e4SLinus Torvaldselse
281da177e4SLinus Torvalds32bit-tool-prefix	= mips-linux-
291da177e4SLinus Torvalds64bit-tool-prefix	= mips64-linux-
301da177e4SLinus Torvalds32bit-bfd		= elf32-tradbigmips
311da177e4SLinus Torvalds64bit-bfd		= elf64-tradbigmips
321da177e4SLinus Torvalds32bit-emul		= elf32btsmip
331da177e4SLinus Torvalds64bit-emul		= elf64btsmip
341da177e4SLinus Torvaldsendif
351da177e4SLinus Torvalds
36875d43e7SRalf Baechleifdef CONFIG_32BIT
371da177e4SLinus Torvaldstool-prefix		= $(32bit-tool-prefix)
381da177e4SLinus TorvaldsUTS_MACHINE		:= mips
391da177e4SLinus Torvaldsendif
40875d43e7SRalf Baechleifdef CONFIG_64BIT
411da177e4SLinus Torvaldstool-prefix		= $(64bit-tool-prefix)
421da177e4SLinus TorvaldsUTS_MACHINE		:= mips64
431da177e4SLinus Torvaldsendif
441da177e4SLinus Torvalds
451da177e4SLinus Torvaldsifdef CONFIG_CROSSCOMPILE
461da177e4SLinus TorvaldsCROSS_COMPILE		:= $(tool-prefix)
471da177e4SLinus Torvaldsendif
481da177e4SLinus Torvalds
498145095cSRalf Baechleifdef CONFIG_32BIT
501da177e4SLinus Torvaldsld-emul			= $(32bit-emul)
511da177e4SLinus Torvaldsvmlinux-32		= vmlinux
521da177e4SLinus Torvaldsvmlinux-64		= vmlinux.64
5359b3e8e9SRalf Baechle
5459b3e8e9SRalf Baechlecflags-y		+= -mabi=32
558145095cSRalf Baechleendif
561da177e4SLinus Torvalds
578145095cSRalf Baechleifdef CONFIG_64BIT
588145095cSRalf Baechleld-emul			= $(64bit-emul)
598145095cSRalf Baechlevmlinux-32		= vmlinux.32
608145095cSRalf Baechlevmlinux-64		= vmlinux
618145095cSRalf Baechle
6259b3e8e9SRalf Baechlecflags-y		+= -mabi=64
6359b3e8e9SRalf Baechleifdef CONFIG_BUILD_ELF64
648145095cSRalf Baechlecflags-y		+= $(call cc-option,-mno-explicit-relocs)
6559b3e8e9SRalf Baechleelse
66656be92fSAtsushi Nemotocflags-y		+= $(call cc-option,-msym32)
671da177e4SLinus Torvaldsendif
6859b3e8e9SRalf Baechleendif
6959b3e8e9SRalf Baechle
701da177e4SLinus Torvalds
711da177e4SLinus Torvalds#
721da177e4SLinus Torvalds# GCC uses -G 0 -mabicalls -fpic as default.  We don't want PIC in the kernel
731da177e4SLinus Torvalds# code since it only slows down the whole thing.  At some point we might make
741da177e4SLinus Torvalds# use of global pointer optimizations but their use of $28 conflicts with
751da177e4SLinus Torvalds# the current pointer optimization.
761da177e4SLinus Torvalds#
771da177e4SLinus Torvalds# The DECStation requires an ECOFF kernel for remote booting, other MIPS
781da177e4SLinus Torvalds# machines may also.  Since BFD is incredibly buggy with respect to
791da177e4SLinus Torvalds# crossformat linking we rely on the elf2ecoff tool for format conversion.
801da177e4SLinus Torvalds#
811da177e4SLinus Torvaldscflags-y			+= -G 0 -mno-abicalls -fno-pic -pipe
826218cf44SRalf Baechlecflags-y			+= -msoft-float
839f83d839SThiemo SeuferLDFLAGS_vmlinux			+= -G 0 -static -n -nostdlib
841da177e4SLinus TorvaldsMODFLAGS			+= -mlong-calls
851da177e4SLinus Torvalds
8672fbfb26SRalf Baechlecflags-y += -ffreestanding
8772fbfb26SRalf Baechle
88f425a6dcSThiemo Seufer#
89f425a6dcSThiemo Seufer# We explicitly add the endianness specifier if needed, this allows
90f425a6dcSThiemo Seufer# to compile kernels with a toolchain for the other endianness. We
91f425a6dcSThiemo Seufer# carefully avoid to add it redundantly because gcc 3.3/3.4 complains
92f425a6dcSThiemo Seufer# when fed the toolchain default!
93f425a6dcSThiemo Seufer#
94f9405412SRalf Baechle# Certain gcc versions upto gcc 4.1.1 (probably 4.2-subversion as of
9559c51591SMichael Opdenacker# 2006-10-10 don't properly change the predefined symbols if -EB / -EL
96f9405412SRalf Baechle# are used, so we kludge that here.  A bug has been filed at
97f9405412SRalf Baechle# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29413.
98f9405412SRalf Baechle#
99f9405412SRalf Baechleundef-all += -UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__
100f9405412SRalf Baechleundef-all += -UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__
101f9405412SRalf Baechlepredef-be += -DMIPSEB -D_MIPSEB -D__MIPSEB -D__MIPSEB__
102f9405412SRalf Baechlepredef-le += -DMIPSEL -D_MIPSEL -D__MIPSEL -D__MIPSEL__
103f9405412SRalf Baechlecflags-$(CONFIG_CPU_BIG_ENDIAN)		+= $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be))
104f9405412SRalf Baechlecflags-$(CONFIG_CPU_LITTLE_ENDIAN)	+= $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le))
105f425a6dcSThiemo Seufer
1069693a853SFranck Bui-Huucflags-$(CONFIG_CPU_HAS_SMARTMIPS)	+= $(call cc-option,-msmartmips)
1079693a853SFranck Bui-Huu
1089007c9a2SRalf Baechlecflags-$(CONFIG_SB1XXX_CORELIS)	+= $(call cc-option,-mno-sched-prolog) \
1099007c9a2SRalf Baechle				   -fno-omit-frame-pointer
1101da177e4SLinus Torvalds
1111da177e4SLinus Torvalds#
1121da177e4SLinus Torvalds# CPU-dependent compiler/assembler options for optimization.
1131da177e4SLinus Torvalds#
11459b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R3000)	+= -march=r3000
11559b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_TX39XX)	+= -march=r3900
11659b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R6000)	+= -march=r6000 -Wa,--trap
11759b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R4300)	+= -march=r4300 -Wa,--trap
11859b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_VR41XX)	+= -march=r4100 -Wa,--trap
11959b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R4X00)	+= -march=r4600 -Wa,--trap
12059b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_TX49XX)	+= -march=r4600 -Wa,--trap
1212a21c730SFuxin Zhangcflags-$(CONFIG_CPU_LOONGSON2)	+= -march=r4600 -Wa,--trap
1229200c0b2SRalf Baechlecflags-$(CONFIG_CPU_MIPS32_R1)	+= $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
12359b3e8e9SRalf Baechle			-Wa,-mips32 -Wa,--trap
1249200c0b2SRalf Baechlecflags-$(CONFIG_CPU_MIPS32_R2)	+= $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
12559b3e8e9SRalf Baechle			-Wa,-mips32r2 -Wa,--trap
1269200c0b2SRalf Baechlecflags-$(CONFIG_CPU_MIPS64_R1)	+= $(call cc-option,-march=mips64,-mips64 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \
12759b3e8e9SRalf Baechle			-Wa,-mips64 -Wa,--trap
1289200c0b2SRalf Baechlecflags-$(CONFIG_CPU_MIPS64_R2)	+= $(call cc-option,-march=mips64r2,-mips64r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \
12959b3e8e9SRalf Baechle			-Wa,-mips64r2 -Wa,--trap
13059b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R5000)	+= -march=r5000 -Wa,--trap
131c9e321e0SRalf Baechlecflags-$(CONFIG_CPU_R5432)	+= $(call cc-option,-march=r5400,-march=r5000) \
1321da177e4SLinus Torvalds			-Wa,--trap
133c9e321e0SRalf Baechlecflags-$(CONFIG_CPU_NEVADA)	+= $(call cc-option,-march=rm5200,-march=r5000) \
1341da177e4SLinus Torvalds			-Wa,--trap
13559b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_RM7000)	+= $(call cc-option,-march=rm7000,-march=r5000) \
1361da177e4SLinus Torvalds			-Wa,--trap
13759b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_RM9000)	+= $(call cc-option,-march=rm9000,-march=r5000) \
1381da177e4SLinus Torvalds			-Wa,--trap
13959b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_SB1)	+= $(call cc-option,-march=sb1,-march=r5000) \
1401da177e4SLinus Torvalds			-Wa,--trap
14159b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R8000)	+= -march=r8000 -Wa,--trap
14259b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R10000)	+= $(call cc-option,-march=r10000,-march=r8000) \
1431da177e4SLinus Torvalds			-Wa,--trap
1441da177e4SLinus Torvalds
1451da177e4SLinus Torvaldsifdef CONFIG_CPU_SB1
1461da177e4SLinus Torvaldsifdef CONFIG_SB1_PASS_1_WORKAROUNDS
1471da177e4SLinus TorvaldsMODFLAGS	+= -msb1-pass1-workarounds
1481da177e4SLinus Torvaldsendif
1491da177e4SLinus Torvaldsendif
1501da177e4SLinus Torvalds
1511da177e4SLinus Torvalds#
1521da177e4SLinus Torvalds# Firmware support
1531da177e4SLinus Torvalds#
1541da177e4SLinus Torvaldslibs-$(CONFIG_ARC)		+= arch/mips/arc/
1551da177e4SLinus Torvaldslibs-$(CONFIG_SIBYTE_CFE)	+= arch/mips/sibyte/cfe/
1561da177e4SLinus Torvalds
1571da177e4SLinus Torvalds#
1581da177e4SLinus Torvalds# Board-dependent options and extra files
1591da177e4SLinus Torvalds#
1601da177e4SLinus Torvalds
1611da177e4SLinus Torvalds#
1621da177e4SLinus Torvalds# Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
1631da177e4SLinus Torvalds#
1641da177e4SLinus Torvaldscore-$(CONFIG_MACH_JAZZ)	+= arch/mips/jazz/
1651da177e4SLinus Torvaldscflags-$(CONFIG_MACH_JAZZ)	+= -Iinclude/asm-mips/mach-jazz
1661da177e4SLinus Torvaldsload-$(CONFIG_MACH_JAZZ)	+= 0xffffffff80080000
1671da177e4SLinus Torvalds
1681da177e4SLinus Torvalds#
1691da177e4SLinus Torvalds# Common Alchemy Au1x00 stuff
1701da177e4SLinus Torvalds#
1711da177e4SLinus Torvaldscore-$(CONFIG_SOC_AU1X00)	+= arch/mips/au1000/common/
1721da177e4SLinus Torvaldscflags-$(CONFIG_SOC_AU1X00)	+= -Iinclude/asm-mips/mach-au1x00
1731da177e4SLinus Torvalds
1741da177e4SLinus Torvalds#
1751da177e4SLinus Torvalds# AMD Alchemy Pb1000 eval board
1761da177e4SLinus Torvalds#
1771da177e4SLinus Torvaldslibs-$(CONFIG_MIPS_PB1000)	+= arch/mips/au1000/pb1000/
1781da177e4SLinus Torvaldscflags-$(CONFIG_MIPS_PB1000)	+= -Iinclude/asm-mips/mach-pb1x00
1791da177e4SLinus Torvaldsload-$(CONFIG_MIPS_PB1000)	+= 0xffffffff80100000
1801da177e4SLinus Torvalds
1811da177e4SLinus Torvalds#
1821da177e4SLinus Torvalds# AMD Alchemy Pb1100 eval board
1831da177e4SLinus Torvalds#
1841da177e4SLinus Torvaldslibs-$(CONFIG_MIPS_PB1100)	+= arch/mips/au1000/pb1100/
1851da177e4SLinus Torvaldscflags-$(CONFIG_MIPS_PB1100)	+= -Iinclude/asm-mips/mach-pb1x00
1861da177e4SLinus Torvaldsload-$(CONFIG_MIPS_PB1100)	+= 0xffffffff80100000
1871da177e4SLinus Torvalds
1881da177e4SLinus Torvalds#
1891da177e4SLinus Torvalds# AMD Alchemy Pb1500 eval board
1901da177e4SLinus Torvalds#
1911da177e4SLinus Torvaldslibs-$(CONFIG_MIPS_PB1500)	+= arch/mips/au1000/pb1500/
1921da177e4SLinus Torvaldscflags-$(CONFIG_MIPS_PB1500)	+= -Iinclude/asm-mips/mach-pb1x00
1931da177e4SLinus Torvaldsload-$(CONFIG_MIPS_PB1500)	+= 0xffffffff80100000
1941da177e4SLinus Torvalds
1951da177e4SLinus Torvalds#
1961da177e4SLinus Torvalds# AMD Alchemy Pb1550 eval board
1971da177e4SLinus Torvalds#
1981da177e4SLinus Torvaldslibs-$(CONFIG_MIPS_PB1550)	+= arch/mips/au1000/pb1550/
1991da177e4SLinus Torvaldscflags-$(CONFIG_MIPS_PB1550)	+= -Iinclude/asm-mips/mach-pb1x00
2001da177e4SLinus Torvaldsload-$(CONFIG_MIPS_PB1550)	+= 0xffffffff80100000
2011da177e4SLinus Torvalds
2021da177e4SLinus Torvalds#
203e3ad1c23SPete Popov# AMD Alchemy Pb1200 eval board
204e3ad1c23SPete Popov#
205e3ad1c23SPete Popovlibs-$(CONFIG_MIPS_PB1200)	+= arch/mips/au1000/pb1200/
206e3ad1c23SPete Popovcflags-$(CONFIG_MIPS_PB1200)	+= -Iinclude/asm-mips/mach-pb1x00
207e3ad1c23SPete Popovload-$(CONFIG_MIPS_PB1200)	+= 0xffffffff80100000
208e3ad1c23SPete Popov
209e3ad1c23SPete Popov#
2101da177e4SLinus Torvalds# AMD Alchemy Db1000 eval board
2111da177e4SLinus Torvalds#
2121da177e4SLinus Torvaldslibs-$(CONFIG_MIPS_DB1000)	+= arch/mips/au1000/db1x00/
2131da177e4SLinus Torvaldscflags-$(CONFIG_MIPS_DB1000)	+= -Iinclude/asm-mips/mach-db1x00
2141da177e4SLinus Torvaldsload-$(CONFIG_MIPS_DB1000)	+= 0xffffffff80100000
2151da177e4SLinus Torvalds
2161da177e4SLinus Torvalds#
2171da177e4SLinus Torvalds# AMD Alchemy Db1100 eval board
2181da177e4SLinus Torvalds#
2191da177e4SLinus Torvaldslibs-$(CONFIG_MIPS_DB1100)	+= arch/mips/au1000/db1x00/
2201da177e4SLinus Torvaldscflags-$(CONFIG_MIPS_DB1100)	+= -Iinclude/asm-mips/mach-db1x00
2211da177e4SLinus Torvaldsload-$(CONFIG_MIPS_DB1100)	+= 0xffffffff80100000
2221da177e4SLinus Torvalds
2231da177e4SLinus Torvalds#
2241da177e4SLinus Torvalds# AMD Alchemy Db1500 eval board
2251da177e4SLinus Torvalds#
2261da177e4SLinus Torvaldslibs-$(CONFIG_MIPS_DB1500)	+= arch/mips/au1000/db1x00/
2271da177e4SLinus Torvaldscflags-$(CONFIG_MIPS_DB1500)	+= -Iinclude/asm-mips/mach-db1x00
2281da177e4SLinus Torvaldsload-$(CONFIG_MIPS_DB1500)	+= 0xffffffff80100000
2291da177e4SLinus Torvalds
2301da177e4SLinus Torvalds#
2311da177e4SLinus Torvalds# AMD Alchemy Db1550 eval board
2321da177e4SLinus Torvalds#
2331da177e4SLinus Torvaldslibs-$(CONFIG_MIPS_DB1550)	+= arch/mips/au1000/db1x00/
2341da177e4SLinus Torvaldscflags-$(CONFIG_MIPS_DB1550)	+= -Iinclude/asm-mips/mach-db1x00
2351da177e4SLinus Torvaldsload-$(CONFIG_MIPS_DB1550)	+= 0xffffffff80100000
2361da177e4SLinus Torvalds
2371da177e4SLinus Torvalds#
238e3ad1c23SPete Popov# AMD Alchemy Db1200 eval board
239e3ad1c23SPete Popov#
240e3ad1c23SPete Popovlibs-$(CONFIG_MIPS_DB1200)	+= arch/mips/au1000/pb1200/
241e3ad1c23SPete Popovcflags-$(CONFIG_MIPS_DB1200)	+= -Iinclude/asm-mips/mach-db1x00
242e3ad1c23SPete Popovload-$(CONFIG_MIPS_DB1200)	+= 0xffffffff80100000
243e3ad1c23SPete Popov
244e3ad1c23SPete Popov#
2451da177e4SLinus Torvalds# AMD Alchemy Bosporus eval board
2461da177e4SLinus Torvalds#
2471da177e4SLinus Torvaldslibs-$(CONFIG_MIPS_BOSPORUS)	+= arch/mips/au1000/db1x00/
2481da177e4SLinus Torvaldscflags-$(CONFIG_MIPS_BOSPORUS)	+= -Iinclude/asm-mips/mach-db1x00
2491da177e4SLinus Torvaldsload-$(CONFIG_MIPS_BOSPORUS)	+= 0xffffffff80100000
2501da177e4SLinus Torvalds
2511da177e4SLinus Torvalds#
2521da177e4SLinus Torvalds# AMD Alchemy Mirage eval board
2531da177e4SLinus Torvalds#
2541da177e4SLinus Torvaldslibs-$(CONFIG_MIPS_MIRAGE)	+= arch/mips/au1000/db1x00/
2551da177e4SLinus Torvaldscflags-$(CONFIG_MIPS_MIRAGE)	+= -Iinclude/asm-mips/mach-db1x00
2561da177e4SLinus Torvaldsload-$(CONFIG_MIPS_MIRAGE)	+= 0xffffffff80100000
2571da177e4SLinus Torvalds
2581da177e4SLinus Torvalds#
2591da177e4SLinus Torvalds# 4G-Systems eval board
2601da177e4SLinus Torvalds#
2611da177e4SLinus Torvaldslibs-$(CONFIG_MIPS_MTX1)	+= arch/mips/au1000/mtx-1/
2621da177e4SLinus Torvaldsload-$(CONFIG_MIPS_MTX1)	+= 0xffffffff80100000
2631da177e4SLinus Torvalds
2641da177e4SLinus Torvalds#
2651da177e4SLinus Torvalds# MyCable eval board
2661da177e4SLinus Torvalds#
2671da177e4SLinus Torvaldslibs-$(CONFIG_MIPS_XXS1500)	+= arch/mips/au1000/xxs1500/
2681da177e4SLinus Torvaldsload-$(CONFIG_MIPS_XXS1500)	+= 0xffffffff80100000
2691da177e4SLinus Torvalds
2701da177e4SLinus Torvalds#
2711da177e4SLinus Torvalds# Cobalt Server
2721da177e4SLinus Torvalds#
2731da177e4SLinus Torvaldscore-$(CONFIG_MIPS_COBALT)	+= arch/mips/cobalt/
27411ed6d5bSRalf Baechlecflags-$(CONFIG_MIPS_COBALT)	+= -Iinclude/asm-mips/mach-cobalt
2751da177e4SLinus Torvaldsload-$(CONFIG_MIPS_COBALT)	+= 0xffffffff80080000
2761da177e4SLinus Torvalds
2771da177e4SLinus Torvalds#
2781da177e4SLinus Torvalds# DECstation family
2791da177e4SLinus Torvalds#
2801da177e4SLinus Torvaldscore-$(CONFIG_MACH_DECSTATION)	+= arch/mips/dec/
2811da177e4SLinus Torvaldscflags-$(CONFIG_MACH_DECSTATION)+= -Iinclude/asm-mips/mach-dec
2821da177e4SLinus Torvaldslibs-$(CONFIG_MACH_DECSTATION)	+= arch/mips/dec/prom/
2831da177e4SLinus Torvaldsload-$(CONFIG_MACH_DECSTATION)	+= 0xffffffff80040000
2841da177e4SLinus TorvaldsCLEAN_FILES			+= drivers/tc/lk201-map.c
2851da177e4SLinus Torvalds
2861da177e4SLinus Torvalds#
287a240a469SMark.Zhan# Wind River PPMC Board (4KC + GT64120)
288a240a469SMark.Zhan#
289a240a469SMark.Zhancore-$(CONFIG_WR_PPMC)		+= arch/mips/gt64120/wrppmc/
290a240a469SMark.Zhancflags-$(CONFIG_WR_PPMC)		+= -Iinclude/asm-mips/mach-wrppmc
291a240a469SMark.Zhanload-$(CONFIG_WR_PPMC)		+= 0xffffffff80100000
292a240a469SMark.Zhan
293a240a469SMark.Zhan#
29442d226c7SSongmao Tian# lemote fulong mini-PC board
29542d226c7SSongmao Tian#
29642d226c7SSongmao Tiancore-$(CONFIG_LEMOTE_FULONG) +=arch/mips/lemote/lm2e/
29742d226c7SSongmao Tianload-$(CONFIG_LEMOTE_FULONG) +=0xffffffff80100000
29842d226c7SSongmao Tiancflags-$(CONFIG_LEMOTE_FULONG) += -Iinclude/asm-mips/mach-lemote
29942d226c7SSongmao Tian
30042d226c7SSongmao Tian#
3011da177e4SLinus Torvalds# For all MIPS, Inc. eval boards
3021da177e4SLinus Torvalds#
3031da177e4SLinus Torvaldscore-$(CONFIG_MIPS_BOARDS_GEN)	+= arch/mips/mips-boards/generic/
3041da177e4SLinus Torvalds
3051da177e4SLinus Torvalds#
3061da177e4SLinus Torvalds# MIPS Atlas board
3071da177e4SLinus Torvalds#
3081da177e4SLinus Torvaldscore-$(CONFIG_MIPS_ATLAS)	+= arch/mips/mips-boards/atlas/
3091da177e4SLinus Torvaldscflags-$(CONFIG_MIPS_ATLAS)	+= -Iinclude/asm-mips/mach-atlas
3101da177e4SLinus Torvaldscflags-$(CONFIG_MIPS_ATLAS)	+= -Iinclude/asm-mips/mach-mips
3111da177e4SLinus Torvaldsload-$(CONFIG_MIPS_ATLAS)	+= 0xffffffff80100000
3121da177e4SLinus Torvalds
3131da177e4SLinus Torvalds#
3141da177e4SLinus Torvalds# MIPS Malta board
3151da177e4SLinus Torvalds#
3161da177e4SLinus Torvaldscore-$(CONFIG_MIPS_MALTA)	+= arch/mips/mips-boards/malta/
3171da177e4SLinus Torvaldscflags-$(CONFIG_MIPS_MALTA)	+= -Iinclude/asm-mips/mach-mips
3181da177e4SLinus Torvaldsload-$(CONFIG_MIPS_MALTA)	+= 0xffffffff80100000
3191da177e4SLinus Torvalds
3201da177e4SLinus Torvalds#
3211da177e4SLinus Torvalds# MIPS SEAD board
3221da177e4SLinus Torvalds#
3231da177e4SLinus Torvaldscore-$(CONFIG_MIPS_SEAD)	+= arch/mips/mips-boards/sead/
32409f451bfSMaciej W. Rozyckicflags-$(CONFIG_MIPS_SEAD)	+= -Iinclude/asm-mips/mach-mips
3251da177e4SLinus Torvaldsload-$(CONFIG_MIPS_SEAD)	+= 0xffffffff80100000
3261da177e4SLinus Torvalds
3271da177e4SLinus Torvalds#
328c78cbf49SRalf Baechle# MIPS SIM
329c78cbf49SRalf Baechle#
330f6e2373aSRalf Baechlecore-$(CONFIG_MIPS_SIM)		+= arch/mips/mipssim/
3319a0f3b73SYoichi Yuasacflags-$(CONFIG_MIPS_SIM)	+= -Iinclude/asm-mips/mach-mipssim
332c78cbf49SRalf Baechleload-$(CONFIG_MIPS_SIM)		+= 0x80100000
333c78cbf49SRalf Baechle
334c78cbf49SRalf Baechle#
3351da177e4SLinus Torvalds# Momentum Ocelot board
3361da177e4SLinus Torvalds#
3371da177e4SLinus Torvalds# The Ocelot setup.o must be linked early - it does the ioremap() for the
3381da177e4SLinus Torvalds# mips_io_port_base.
3391da177e4SLinus Torvalds#
3401da177e4SLinus Torvaldscore-$(CONFIG_MOMENCO_OCELOT)	+= arch/mips/gt64120/common/ \
3411da177e4SLinus Torvalds				   arch/mips/gt64120/momenco_ocelot/
3421da177e4SLinus Torvaldscflags-$(CONFIG_MOMENCO_OCELOT)	+= -Iinclude/asm-mips/mach-ocelot
3431da177e4SLinus Torvaldsload-$(CONFIG_MOMENCO_OCELOT)	+= 0xffffffff80100000
3441da177e4SLinus Torvalds
3451da177e4SLinus Torvalds#
3469267a30dSMarc St-Jean# PMC-Sierra MSP SOCs
3479267a30dSMarc St-Jean#
3489267a30dSMarc St-Jeancore-$(CONFIG_PMC_MSP)		+= arch/mips/pmc-sierra/msp71xx/
3499267a30dSMarc St-Jeancflags-$(CONFIG_PMC_MSP)	+= -Iinclude/asm-mips/pmc-sierra/msp71xx \
3509267a30dSMarc St-Jean					-mno-branch-likely
3519267a30dSMarc St-Jeanload-$(CONFIG_PMC_MSP)		+= 0xffffffff80100000
3529267a30dSMarc St-Jean
3539267a30dSMarc St-Jean#
3541da177e4SLinus Torvalds# PMC-Sierra Yosemite
3551da177e4SLinus Torvalds#
3561da177e4SLinus Torvaldscore-$(CONFIG_PMC_YOSEMITE)	+= arch/mips/pmc-sierra/yosemite/
3571da177e4SLinus Torvaldscflags-$(CONFIG_PMC_YOSEMITE)	+= -Iinclude/asm-mips/mach-yosemite
3581da177e4SLinus Torvaldsload-$(CONFIG_PMC_YOSEMITE)	+= 0xffffffff80100000
3591da177e4SLinus Torvalds
36014cd8015SRalf Baechle#
36107119621SRalf Baechle# Qemu simulating MIPS32 4Kc
36207119621SRalf Baechle#
36307119621SRalf Baechlecore-$(CONFIG_QEMU)		+= arch/mips/qemu/
36407119621SRalf Baechlecflags-$(CONFIG_QEMU)		+= -Iinclude/asm-mips/mach-qemu
36507119621SRalf Baechleload-$(CONFIG_QEMU)		+= 0xffffffff80010000
36607119621SRalf Baechle
3671da177e4SLinus Torvalds#
36835189fadSRalf Baechle# Basler eXcite
36935189fadSRalf Baechle#
37035189fadSRalf Baechlecore-$(CONFIG_BASLER_EXCITE)	+= arch/mips/basler/excite/
37135189fadSRalf Baechlecflags-$(CONFIG_BASLER_EXCITE)	+= -Iinclude/asm-mips/mach-excite
37235189fadSRalf Baechleload-$(CONFIG_BASLER_EXCITE)	+= 0x80100000
37335189fadSRalf Baechle
37435189fadSRalf Baechle#
3751da177e4SLinus Torvalds# NEC DDB
3761da177e4SLinus Torvalds#
3771da177e4SLinus Torvaldscore-$(CONFIG_DDB5XXX_COMMON)	+= arch/mips/ddb5xxx/common/
3781da177e4SLinus Torvalds
3791da177e4SLinus Torvalds#
3801da177e4SLinus Torvalds# NEC DDB Vrc-5477
3811da177e4SLinus Torvalds#
3821da177e4SLinus Torvaldscore-$(CONFIG_DDB5477)		+= arch/mips/ddb5xxx/ddb5477/
3831da177e4SLinus Torvaldsload-$(CONFIG_DDB5477)		+= 0xffffffff80100000
3841da177e4SLinus Torvalds
3851da177e4SLinus Torvalds#
3861da177e4SLinus Torvalds# Common VR41xx
3871da177e4SLinus Torvalds#
3881da177e4SLinus Torvaldscore-$(CONFIG_MACH_VR41XX)	+= arch/mips/vr41xx/common/
3891da177e4SLinus Torvaldscflags-$(CONFIG_MACH_VR41XX)	+= -Iinclude/asm-mips/mach-vr41xx
3901da177e4SLinus Torvalds
3911da177e4SLinus Torvalds#
3921da177e4SLinus Torvalds# NEC VR4133
3931da177e4SLinus Torvalds#
3941da177e4SLinus Torvaldscore-$(CONFIG_NEC_CMBVR4133)	+= arch/mips/vr41xx/nec-cmbvr4133/
3951da177e4SLinus Torvaldsload-$(CONFIG_NEC_CMBVR4133)	+= 0xffffffff80100000
3961da177e4SLinus Torvalds
3971da177e4SLinus Torvalds#
3981da177e4SLinus Torvalds# ZAO Networks Capcella (VR4131)
3991da177e4SLinus Torvalds#
4001da177e4SLinus Torvaldsload-$(CONFIG_ZAO_CAPCELLA)	+= 0xffffffff80000000
4011da177e4SLinus Torvalds
4021da177e4SLinus Torvalds#
4031da177e4SLinus Torvalds# Victor MP-C303/304 (VR4122)
4041da177e4SLinus Torvalds#
4051da177e4SLinus Torvaldsload-$(CONFIG_VICTOR_MPC30X)	+= 0xffffffff80001000
4061da177e4SLinus Torvalds
4071da177e4SLinus Torvalds#
4081da177e4SLinus Torvalds# IBM WorkPad z50 (VR4121)
4091da177e4SLinus Torvalds#
4101da177e4SLinus Torvaldscore-$(CONFIG_IBM_WORKPAD)	+= arch/mips/vr41xx/ibm-workpad/
4111da177e4SLinus Torvaldsload-$(CONFIG_IBM_WORKPAD)	+= 0xffffffff80004000
4121da177e4SLinus Torvalds
4131da177e4SLinus Torvalds#
4141da177e4SLinus Torvalds# CASIO CASSIPEIA E-55/65 (VR4111)
4151da177e4SLinus Torvalds#
4161da177e4SLinus Torvaldscore-$(CONFIG_CASIO_E55)	+= arch/mips/vr41xx/casio-e55/
4171da177e4SLinus Torvaldsload-$(CONFIG_CASIO_E55)	+= 0xffffffff80004000
4181da177e4SLinus Torvalds
4191da177e4SLinus Torvalds#
42063b799f9SYoichi Yuasa# TANBAC VR4131 multichip module(TB0225) and TANBAC VR4131DIMM(TB0229) (VR4131)
4211da177e4SLinus Torvalds#
42263b799f9SYoichi Yuasaload-$(CONFIG_TANBAC_TB022X)	+= 0xffffffff80000000
4231da177e4SLinus Torvalds
4241da177e4SLinus Torvalds#
425bdf21b18SPete Popov# Common Philips PNX8550
426bdf21b18SPete Popov#
427bdf21b18SPete Popovcore-$(CONFIG_SOC_PNX8550)	+= arch/mips/philips/pnx8550/common/
428bdf21b18SPete Popovcflags-$(CONFIG_SOC_PNX8550)	+= -Iinclude/asm-mips/mach-pnx8550
429bdf21b18SPete Popov
430bdf21b18SPete Popov#
431bdf21b18SPete Popov# Philips PNX8550 JBS board
432bdf21b18SPete Popov#
433bdf21b18SPete Popovlibs-$(CONFIG_PNX8550_JBS)	+= arch/mips/philips/pnx8550/jbs/
434bdf21b18SPete Popov#cflags-$(CONFIG_PNX8550_JBS)	+= -Iinclude/asm-mips/mach-pnx8550
435bdf21b18SPete Popovload-$(CONFIG_PNX8550_JBS)	+= 0xffffffff80060000
436bdf21b18SPete Popov
437f0647a52SVitaly Wool# Philips PNX8550 STB810 board
438f0647a52SVitaly Wool#
439f0647a52SVitaly Woollibs-$(CONFIG_PNX8550_STB810)	+= arch/mips/philips/pnx8550/stb810/
440f0647a52SVitaly Woolload-$(CONFIG_PNX8550_STB810)	+= 0xffffffff80060000
441f0647a52SVitaly Wool
442355c471fSdmitry pervushin# NEC EMMA2RH boards
443355c471fSdmitry pervushin#
444355c471fSdmitry pervushincore-$(CONFIG_EMMA2RH)          += arch/mips/emma2rh/common/
445355c471fSdmitry pervushincflags-$(CONFIG_EMMA2RH)        += -Iinclude/asm-mips/mach-emma2rh
446355c471fSdmitry pervushin
447355c471fSdmitry pervushin# NEC EMMA2RH Mark-eins
448355c471fSdmitry pervushincore-$(CONFIG_MARKEINS)         += arch/mips/emma2rh/markeins/
449355c471fSdmitry pervushinload-$(CONFIG_MARKEINS)         += 0xffffffff88100000
450355c471fSdmitry pervushin
451bdf21b18SPete Popov#
4521da177e4SLinus Torvalds# SGI IP22 (Indy/Indigo2)
4531da177e4SLinus Torvalds#
4541da177e4SLinus Torvalds# Set the load address to >= 0xffffffff88069000 if you want to leave space for
4551da177e4SLinus Torvalds# symmon, 0xffffffff80002000 for production kernels.  Note that the value must
4561da177e4SLinus Torvalds# be aligned to a multiple of the kernel stack size or the handling of the
4571da177e4SLinus Torvalds# current variable will break so for 64-bit kernels we have to raise the start
4581da177e4SLinus Torvalds# address by 8kb.
4591da177e4SLinus Torvalds#
4601da177e4SLinus Torvaldscore-$(CONFIG_SGI_IP22)		+= arch/mips/sgi-ip22/
4611da177e4SLinus Torvaldscflags-$(CONFIG_SGI_IP22)	+= -Iinclude/asm-mips/mach-ip22
462875d43e7SRalf Baechleifdef CONFIG_32BIT
4631da177e4SLinus Torvaldsload-$(CONFIG_SGI_IP22)		+= 0xffffffff88002000
4641da177e4SLinus Torvaldsendif
465875d43e7SRalf Baechleifdef CONFIG_64BIT
4661da177e4SLinus Torvaldsload-$(CONFIG_SGI_IP22)		+= 0xffffffff88004000
4671da177e4SLinus Torvaldsendif
4681da177e4SLinus Torvalds
4691da177e4SLinus Torvalds#
4701da177e4SLinus Torvalds# SGI-IP27 (Origin200/2000)
4711da177e4SLinus Torvalds#
4721da177e4SLinus Torvalds# Set the load address to >= 0xc000000000300000 if you want to leave space for
4731da177e4SLinus Torvalds# symmon, 0xc00000000001c000 for production kernels.  Note that the value must
4741da177e4SLinus Torvalds# be 16kb aligned or the handling of the current variable will break.
4751da177e4SLinus Torvalds#
4761da177e4SLinus Torvaldsifdef CONFIG_SGI_IP27
4771da177e4SLinus Torvaldscore-$(CONFIG_SGI_IP27)		+= arch/mips/sgi-ip27/
4781da177e4SLinus Torvaldscflags-$(CONFIG_SGI_IP27)	+= -Iinclude/asm-mips/mach-ip27
4791da177e4SLinus Torvaldsifdef CONFIG_MAPPED_KERNEL
4801da177e4SLinus Torvaldsload-$(CONFIG_SGI_IP27)		+= 0xc00000004001c000
4811da177e4SLinus TorvaldsOBJCOPYFLAGS			:= --change-addresses=0x3fffffff80000000
4821da177e4SLinus Torvaldsdataoffset-$(CONFIG_SGI_IP27)	+= 0x01000000
4831da177e4SLinus Torvaldselse
4841da177e4SLinus Torvaldsload-$(CONFIG_SGI_IP27)		+= 0xa80000000001c000
4851da177e4SLinus TorvaldsOBJCOPYFLAGS			:= --change-addresses=0x57ffffff80000000
4861da177e4SLinus Torvaldsendif
4871da177e4SLinus Torvaldsendif
4881da177e4SLinus Torvalds
4891da177e4SLinus Torvalds#
4901da177e4SLinus Torvalds# SGI-IP32 (O2)
4911da177e4SLinus Torvalds#
4921da177e4SLinus Torvalds# Set the load address to >= 80069000 if you want to leave space for symmon,
4931da177e4SLinus Torvalds# 0xffffffff80004000 for production kernels.  Note that the value must be aligned to
4941da177e4SLinus Torvalds# a multiple of the kernel stack size or the handling of the current variable
4951da177e4SLinus Torvalds# will break.
4961da177e4SLinus Torvalds#
4971da177e4SLinus Torvaldscore-$(CONFIG_SGI_IP32)		+= arch/mips/sgi-ip32/
4981da177e4SLinus Torvaldscflags-$(CONFIG_SGI_IP32)	+= -Iinclude/asm-mips/mach-ip32
4991da177e4SLinus Torvaldsload-$(CONFIG_SGI_IP32)		+= 0xffffffff80004000
5001da177e4SLinus Torvalds
5011da177e4SLinus Torvalds#
502d619f38fSMark Mason# Sibyte SB1250/BCM1480 SOC
5031da177e4SLinus Torvalds#
5041da177e4SLinus Torvalds# This is a LIB so that it links at the end, and initcalls are later
5051da177e4SLinus Torvalds# the sequence; but it is built as an object so that modules don't get
5061da177e4SLinus Torvalds# removed (as happens, even if they have __initcall/module_init)
5071da177e4SLinus Torvalds#
5081da177e4SLinus Torvaldscore-$(CONFIG_SIBYTE_BCM112X)	+= arch/mips/sibyte/sb1250/
509d619f38fSMark Masoncore-$(CONFIG_SIBYTE_BCM112X)	+= arch/mips/sibyte/common/
510f137e463SAndrew Isaacsoncflags-$(CONFIG_SIBYTE_BCM112X)	+= -Iinclude/asm-mips/mach-sibyte \
511f137e463SAndrew Isaacson			-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
5121da177e4SLinus Torvalds
5131da177e4SLinus Torvaldscore-$(CONFIG_SIBYTE_SB1250)	+= arch/mips/sibyte/sb1250/
514d619f38fSMark Masoncore-$(CONFIG_SIBYTE_SB1250)	+= arch/mips/sibyte/common/
515f137e463SAndrew Isaacsoncflags-$(CONFIG_SIBYTE_SB1250)	+= -Iinclude/asm-mips/mach-sibyte \
516f137e463SAndrew Isaacson			-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
517f137e463SAndrew Isaacson
518f137e463SAndrew Isaacsoncore-$(CONFIG_SIBYTE_BCM1x55)	+= arch/mips/sibyte/bcm1480/
519d619f38fSMark Masoncore-$(CONFIG_SIBYTE_BCM1x55)	+= arch/mips/sibyte/common/
520f137e463SAndrew Isaacsoncflags-$(CONFIG_SIBYTE_BCM1x55)	+= -Iinclude/asm-mips/mach-sibyte \
521f137e463SAndrew Isaacson			-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
522f137e463SAndrew Isaacson
523f137e463SAndrew Isaacsoncore-$(CONFIG_SIBYTE_BCM1x80)	+= arch/mips/sibyte/bcm1480/
524d619f38fSMark Masoncore-$(CONFIG_SIBYTE_BCM1x80)	+= arch/mips/sibyte/common/
525f137e463SAndrew Isaacsoncflags-$(CONFIG_SIBYTE_BCM1x80)	+= -Iinclude/asm-mips/mach-sibyte \
526f137e463SAndrew Isaacson			-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
5271da177e4SLinus Torvalds
5281da177e4SLinus Torvalds#
5291da177e4SLinus Torvalds# Sibyte BCM91120x (Carmel) board
5301da177e4SLinus Torvalds# Sibyte BCM91120C (CRhine) board
5311da177e4SLinus Torvalds# Sibyte BCM91125C (CRhone) board
5321da177e4SLinus Torvalds# Sibyte BCM91125E (Rhone) board
5331da177e4SLinus Torvalds# Sibyte SWARM board
5349a6dcea1SAndrew Isaacson# Sibyte BCM91x80 (BigSur) board
5351da177e4SLinus Torvalds#
5361da177e4SLinus Torvaldslibs-$(CONFIG_SIBYTE_CARMEL)	+= arch/mips/sibyte/swarm/
5371da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_CARMEL)	:= 0xffffffff80100000
5381da177e4SLinus Torvaldslibs-$(CONFIG_SIBYTE_CRHINE)	+= arch/mips/sibyte/swarm/
5391da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_CRHINE)	:= 0xffffffff80100000
5401da177e4SLinus Torvaldslibs-$(CONFIG_SIBYTE_CRHONE)	+= arch/mips/sibyte/swarm/
5411da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_CRHONE)	:= 0xffffffff80100000
5421da177e4SLinus Torvaldslibs-$(CONFIG_SIBYTE_RHONE)	+= arch/mips/sibyte/swarm/
5431da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_RHONE)	:= 0xffffffff80100000
5441da177e4SLinus Torvaldslibs-$(CONFIG_SIBYTE_SENTOSA)	+= arch/mips/sibyte/swarm/
5451da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_SENTOSA)	:= 0xffffffff80100000
5461da177e4SLinus Torvaldslibs-$(CONFIG_SIBYTE_SWARM)	+= arch/mips/sibyte/swarm/
5471da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_SWARM)	:= 0xffffffff80100000
5489a6dcea1SAndrew Isaacsonlibs-$(CONFIG_SIBYTE_BIGSUR)	+= arch/mips/sibyte/swarm/
5499a6dcea1SAndrew Isaacsonload-$(CONFIG_SIBYTE_BIGSUR)	:= 0xffffffff80100000
5501da177e4SLinus Torvalds
5511da177e4SLinus Torvalds#
55214b36af4SThomas Bogendoerfer# SNI RM
5531da177e4SLinus Torvalds#
55414b36af4SThomas Bogendoerfercore-$(CONFIG_SNI_RM)		+= arch/mips/sni/
55514b36af4SThomas Bogendoerfercflags-$(CONFIG_SNI_RM)		+= -Iinclude/asm-mips/mach-rm
55614b36af4SThomas Bogendoerferload-$(CONFIG_SNI_RM)		+= 0xffffffff80600000
5571da177e4SLinus Torvalds
5581da177e4SLinus Torvalds#
5591da177e4SLinus Torvalds# Toshiba JMR-TX3927 board
5601da177e4SLinus Torvalds#
5611da177e4SLinus Torvaldscore-$(CONFIG_TOSHIBA_JMR3927)	+= arch/mips/jmr3927/rbhma3100/ \
5621da177e4SLinus Torvalds				   arch/mips/jmr3927/common/
5635135b0cdSRalf Baechlecflags-$(CONFIG_TOSHIBA_JMR3927) += -Iinclude/asm-mips/mach-jmr3927
5641da177e4SLinus Torvaldsload-$(CONFIG_TOSHIBA_JMR3927)	+= 0xffffffff80050000
5651da177e4SLinus Torvalds
5661da177e4SLinus Torvalds#
5671da177e4SLinus Torvalds# Toshiba RBTX4927 board or
5681da177e4SLinus Torvalds# Toshiba RBTX4937 board
5691da177e4SLinus Torvalds#
5701da177e4SLinus Torvaldscore-$(CONFIG_TOSHIBA_RBTX4927)	+= arch/mips/tx4927/toshiba_rbtx4927/
5711da177e4SLinus Torvaldscore-$(CONFIG_TOSHIBA_RBTX4927)	+= arch/mips/tx4927/common/
5725ddcb3c3SAtsushi Nemotocflags-$(CONFIG_TOSHIBA_RBTX4927) += -Iinclude/asm-mips/mach-tx49xx
5731da177e4SLinus Torvaldsload-$(CONFIG_TOSHIBA_RBTX4927)	+= 0xffffffff80020000
5741da177e4SLinus Torvalds
57523fbee9dSRalf Baechle#
57623fbee9dSRalf Baechle# Toshiba RBTX4938 board
57723fbee9dSRalf Baechle#
57823fbee9dSRalf Baechlecore-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/toshiba_rbtx4938/
57923fbee9dSRalf Baechlecore-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/common/
5805ddcb3c3SAtsushi Nemotocflags-$(CONFIG_TOSHIBA_RBTX4938) += -Iinclude/asm-mips/mach-tx49xx
58123fbee9dSRalf Baechleload-$(CONFIG_TOSHIBA_RBTX4938) += 0xffffffff80100000
58223fbee9dSRalf Baechle
5831da177e4SLinus Torvaldscflags-y			+= -Iinclude/asm-mips/mach-generic
5841da177e4SLinus Torvaldsdrivers-$(CONFIG_PCI)		+= arch/mips/pci/
5851da177e4SLinus Torvalds
586875d43e7SRalf Baechleifdef CONFIG_32BIT
5871da177e4SLinus Torvaldsifdef CONFIG_CPU_LITTLE_ENDIAN
5881da177e4SLinus TorvaldsJIFFIES			= jiffies_64
5891da177e4SLinus Torvaldselse
5901da177e4SLinus TorvaldsJIFFIES			= jiffies_64 + 4
5911da177e4SLinus Torvaldsendif
5921da177e4SLinus Torvaldselse
5931da177e4SLinus TorvaldsJIFFIES			= jiffies_64
5941da177e4SLinus Torvaldsendif
5951da177e4SLinus Torvalds
5961da177e4SLinus TorvaldsAFLAGS		+= $(cflags-y)
5979267a30dSMarc St-JeanCFLAGS		+= $(cflags-y) \
5989267a30dSMarc St-Jean			-D"VMLINUX_LOAD_ADDRESS=$(load-y)"
5991da177e4SLinus Torvalds
6001da177e4SLinus TorvaldsLDFLAGS			+= -m $(ld-emul)
6011da177e4SLinus Torvalds
60259b3e8e9SRalf Baechleifdef CONFIG_MIPS
60359b3e8e9SRalf BaechleCHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \
60448c35b2dSAlexey Dobriyan	egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
6052a2c3e45SAtsushi Nemoto	sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/")
6062a2c3e45SAtsushi Nemotoifdef CONFIG_64BIT
6072a2c3e45SAtsushi NemotoCHECKFLAGS		+= -m64
6082a2c3e45SAtsushi Nemotoendif
60959b3e8e9SRalf Baechleendif
61059b3e8e9SRalf Baechle
6111da177e4SLinus TorvaldsOBJCOPYFLAGS		+= --remove-section=.reginfo
6121da177e4SLinus Torvalds
6131da177e4SLinus Torvalds#
6141da177e4SLinus Torvalds# Choosing incompatible machines durings configuration will result in
6151da177e4SLinus Torvalds# error messages during linking.  Select a default linkscript if
6161da177e4SLinus Torvalds# none has been choosen above.
6171da177e4SLinus Torvalds#
6181da177e4SLinus Torvalds
6191da177e4SLinus TorvaldsCPPFLAGS_vmlinux.lds := \
6201da177e4SLinus Torvalds	$(CFLAGS) \
6211da177e4SLinus Torvalds	-D"LOADADDR=$(load-y)" \
6221da177e4SLinus Torvalds	-D"JIFFIES=$(JIFFIES)" \
6231da177e4SLinus Torvalds	-D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
6241da177e4SLinus Torvalds
6251da177e4SLinus Torvaldshead-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
6261da177e4SLinus Torvalds
6271da177e4SLinus Torvaldslibs-y			+= arch/mips/lib/
6281da177e4SLinus Torvalds
6291da177e4SLinus Torvaldscore-y			+= arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/
6301da177e4SLinus Torvalds
6311da177e4SLinus Torvaldsdrivers-$(CONFIG_OPROFILE)	+= arch/mips/oprofile/
6321da177e4SLinus Torvalds
6331da177e4SLinus Torvalds#
6341da177e4SLinus Torvalds# Some machines like the Indy need 32-bit ELF binaries for booting purposes.
6351da177e4SLinus Torvalds# Other need ECOFF, so we build a 32-bit ELF binary for them which we then
6361da177e4SLinus Torvalds# convert to ECOFF using elf2ecoff.
6371da177e4SLinus Torvalds#
6381da177e4SLinus Torvaldsvmlinux.32: vmlinux
6391da177e4SLinus Torvalds	$(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@
6401da177e4SLinus Torvalds
6411da177e4SLinus Torvalds#
6421da177e4SLinus Torvalds# The 64-bit ELF tools are pretty broken so at this time we generate 64-bit
6431da177e4SLinus Torvalds# ELF files from 32-bit files by conversion.
6441da177e4SLinus Torvalds#
6451da177e4SLinus Torvaldsvmlinux.64: vmlinux
6461da177e4SLinus Torvalds	$(OBJCOPY) -O $(64bit-bfd) $(OBJCOPYFLAGS) $< $@
6471da177e4SLinus Torvalds
6481da177e4SLinus Torvaldsmakeboot =$(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) $(1)
6491da177e4SLinus Torvalds
6501da177e4SLinus Torvaldsifdef CONFIG_BOOT_ELF32
6511da177e4SLinus Torvaldsall:	$(vmlinux-32)
6521da177e4SLinus Torvaldsendif
6531da177e4SLinus Torvalds
6541da177e4SLinus Torvaldsifdef CONFIG_BOOT_ELF64
6551da177e4SLinus Torvaldsall:	$(vmlinux-64)
6561da177e4SLinus Torvaldsendif
6571da177e4SLinus Torvalds
658149f60b3SRalf Baechleifdef CONFIG_MIPS_ATLAS
659149f60b3SRalf Baechleall:	vmlinux.srec
660149f60b3SRalf Baechleendif
661149f60b3SRalf Baechle
662149f60b3SRalf Baechleifdef CONFIG_MIPS_MALTA
663149f60b3SRalf Baechleall:	vmlinux.srec
664149f60b3SRalf Baechleendif
665149f60b3SRalf Baechle
666149f60b3SRalf Baechleifdef CONFIG_MIPS_SEAD
667149f60b3SRalf Baechleall:	vmlinux.srec
668149f60b3SRalf Baechleendif
669149f60b3SRalf Baechle
670154b500bSRalf Baechleifdef CONFIG_QEMU
671154b500bSRalf Baechleall:	vmlinux.bin
672154b500bSRalf Baechleendif
673154b500bSRalf Baechle
67414b36af4SThomas Bogendoerferifdef CONFIG_SNI_RM
6751da177e4SLinus Torvaldsall:	vmlinux.ecoff
6761da177e4SLinus Torvaldsendif
6771da177e4SLinus Torvalds
678154b500bSRalf Baechlevmlinux.bin: $(vmlinux-32)
679154b500bSRalf Baechle	+@$(call makeboot,$@)
680154b500bSRalf Baechle
681b8828d3eSYoichi Yuasavmlinux.ecoff: $(vmlinux-32)
6821da177e4SLinus Torvalds	+@$(call makeboot,$@)
6831da177e4SLinus Torvalds
6841da177e4SLinus Torvaldsvmlinux.srec: $(vmlinux-32)
6851da177e4SLinus Torvalds	+@$(call makeboot,$@)
6861da177e4SLinus Torvalds
6871da177e4SLinus TorvaldsCLEAN_FILES += vmlinux.ecoff \
688b8828d3eSYoichi Yuasa	       vmlinux.srec
6891da177e4SLinus Torvalds
690e48ce6b8SAtsushi Nemotoarchprepare:
691e48ce6b8SAtsushi Nemotoifdef CONFIG_MIPS32_N32
692e48ce6b8SAtsushi Nemoto	@echo '  Checking missing-syscalls for N32'
693e48ce6b8SAtsushi Nemoto	$(Q)$(MAKE) $(build)=. missing-syscalls EXTRA_CFLAGS="-mabi=n32"
694e48ce6b8SAtsushi Nemotoendif
695e48ce6b8SAtsushi Nemotoifdef CONFIG_MIPS32_O32
696e48ce6b8SAtsushi Nemoto	@echo '  Checking missing-syscalls for O32'
697e48ce6b8SAtsushi Nemoto	$(Q)$(MAKE) $(build)=. missing-syscalls EXTRA_CFLAGS="-mabi=32"
698e48ce6b8SAtsushi Nemotoendif
699e48ce6b8SAtsushi Nemoto
7001da177e4SLinus Torvaldsarchclean:
7011da177e4SLinus Torvalds	@$(MAKE) $(clean)=arch/mips/boot
7021da177e4SLinus Torvalds
703048eb582SSam RavnborgCLEAN_FILES += vmlinux.32 \
7041da177e4SLinus Torvalds	       vmlinux.64 \
7051da177e4SLinus Torvalds	       vmlinux.ecoff
706