xref: /openbmc/linux/arch/mips/Makefile (revision 7e69deb8)
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
15de0c1698SAdrian BunkKBUILD_DEFCONFIG := ip22_defconfig
16de0c1698SAdrian Bunk
17372a775fSRalf Baechlecflags-y := -ffunction-sections
181da177e4SLinus Torvalds
191da177e4SLinus Torvalds#
201da177e4SLinus Torvalds# Select the object file format to substitute into the linker script.
211da177e4SLinus Torvalds#
221da177e4SLinus Torvaldsifdef CONFIG_CPU_LITTLE_ENDIAN
2317f690beSRalf Baechle32bit-tool-archpref	= mipsel
2417f690beSRalf Baechle64bit-tool-archpref	= mips64el
251da177e4SLinus Torvalds32bit-bfd		= elf32-tradlittlemips
261da177e4SLinus Torvalds64bit-bfd		= elf64-tradlittlemips
271da177e4SLinus Torvalds32bit-emul		= elf32ltsmip
281da177e4SLinus Torvalds64bit-emul		= elf64ltsmip
291da177e4SLinus Torvaldselse
3017f690beSRalf Baechle32bit-tool-archpref	= mips
3117f690beSRalf Baechle64bit-tool-archpref	= mips64
321da177e4SLinus Torvalds32bit-bfd		= elf32-tradbigmips
331da177e4SLinus Torvalds64bit-bfd		= elf64-tradbigmips
341da177e4SLinus Torvalds32bit-emul		= elf32btsmip
351da177e4SLinus Torvalds64bit-emul		= elf64btsmip
361da177e4SLinus Torvaldsendif
371da177e4SLinus Torvalds
38875d43e7SRalf Baechleifdef CONFIG_32BIT
3917f690beSRalf Baechletool-archpref		= $(32bit-tool-archpref)
401da177e4SLinus TorvaldsUTS_MACHINE		:= mips
411da177e4SLinus Torvaldsendif
42875d43e7SRalf Baechleifdef CONFIG_64BIT
4317f690beSRalf Baechletool-archpref		= $(64bit-tool-archpref)
441da177e4SLinus TorvaldsUTS_MACHINE		:= mips64
451da177e4SLinus Torvaldsendif
461da177e4SLinus Torvalds
4717f690beSRalf Baechleifneq ($(SUBARCH),$(ARCH))
4817f690beSRalf Baechle  ifeq ($(CROSS_COMPILE),)
493247989eSMaciej W. Rozycki    CROSS_COMPILE := $(call cc-cross-prefix, $(tool-archpref)-linux-  $(tool-archpref)-linux-gnu-  $(tool-archpref)-unknown-linux-gnu-)
5017f690beSRalf Baechle  endif
511da177e4SLinus Torvaldsendif
521da177e4SLinus Torvalds
538145095cSRalf Baechleifdef CONFIG_32BIT
541da177e4SLinus Torvaldsld-emul			= $(32bit-emul)
551da177e4SLinus Torvaldsvmlinux-32		= vmlinux
561da177e4SLinus Torvaldsvmlinux-64		= vmlinux.64
5759b3e8e9SRalf Baechle
5859b3e8e9SRalf Baechlecflags-y		+= -mabi=32
598145095cSRalf Baechleendif
601da177e4SLinus Torvalds
618145095cSRalf Baechleifdef CONFIG_64BIT
628145095cSRalf Baechleld-emul			= $(64bit-emul)
638145095cSRalf Baechlevmlinux-32		= vmlinux.32
648145095cSRalf Baechlevmlinux-64		= vmlinux
658145095cSRalf Baechle
6659b3e8e9SRalf Baechlecflags-y		+= -mabi=64
6759b3e8e9SRalf Baechleendif
6859b3e8e9SRalf Baechle
698496b401SRalf Baechleall-$(CONFIG_BOOT_ELF32)	:= $(vmlinux-32)
708496b401SRalf Baechleall-$(CONFIG_BOOT_ELF64)	:= $(vmlinux-64)
711da177e4SLinus Torvalds
721da177e4SLinus Torvalds#
731da177e4SLinus Torvalds# GCC uses -G 0 -mabicalls -fpic as default.  We don't want PIC in the kernel
741da177e4SLinus Torvalds# code since it only slows down the whole thing.  At some point we might make
751da177e4SLinus Torvalds# use of global pointer optimizations but their use of $28 conflicts with
761da177e4SLinus Torvalds# the current pointer optimization.
771da177e4SLinus Torvalds#
781da177e4SLinus Torvalds# The DECStation requires an ECOFF kernel for remote booting, other MIPS
791da177e4SLinus Torvalds# machines may also.  Since BFD is incredibly buggy with respect to
801da177e4SLinus Torvalds# crossformat linking we rely on the elf2ecoff tool for format conversion.
811da177e4SLinus Torvalds#
821da177e4SLinus Torvaldscflags-y			+= -G 0 -mno-abicalls -fno-pic -pipe
836218cf44SRalf Baechlecflags-y			+= -msoft-float
849f83d839SThiemo SeuferLDFLAGS_vmlinux			+= -G 0 -static -n -nostdlib
851da177e4SLinus TorvaldsMODFLAGS			+= -mlong-calls
861da177e4SLinus Torvalds
8772fbfb26SRalf Baechlecflags-y += -ffreestanding
8872fbfb26SRalf Baechle
89f425a6dcSThiemo Seufer#
90f425a6dcSThiemo Seufer# We explicitly add the endianness specifier if needed, this allows
91f425a6dcSThiemo Seufer# to compile kernels with a toolchain for the other endianness. We
92f425a6dcSThiemo Seufer# carefully avoid to add it redundantly because gcc 3.3/3.4 complains
93f425a6dcSThiemo Seufer# when fed the toolchain default!
94f425a6dcSThiemo Seufer#
95f9405412SRalf Baechle# Certain gcc versions upto gcc 4.1.1 (probably 4.2-subversion as of
9659c51591SMichael Opdenacker# 2006-10-10 don't properly change the predefined symbols if -EB / -EL
97f9405412SRalf Baechle# are used, so we kludge that here.  A bug has been filed at
98f9405412SRalf Baechle# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29413.
99f9405412SRalf Baechle#
100f9405412SRalf Baechleundef-all += -UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__
101f9405412SRalf Baechleundef-all += -UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__
102f9405412SRalf Baechlepredef-be += -DMIPSEB -D_MIPSEB -D__MIPSEB -D__MIPSEB__
103f9405412SRalf Baechlepredef-le += -DMIPSEL -D_MIPSEL -D__MIPSEL -D__MIPSEL__
104f9405412SRalf Baechlecflags-$(CONFIG_CPU_BIG_ENDIAN)		+= $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be))
105f9405412SRalf Baechlecflags-$(CONFIG_CPU_LITTLE_ENDIAN)	+= $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le))
106f425a6dcSThiemo Seufer
1079693a853SFranck Bui-Huucflags-$(CONFIG_CPU_HAS_SMARTMIPS)	+= $(call cc-option,-msmartmips)
1089693a853SFranck Bui-Huu
1099007c9a2SRalf Baechlecflags-$(CONFIG_SB1XXX_CORELIS)	+= $(call cc-option,-mno-sched-prolog) \
1109007c9a2SRalf Baechle				   -fno-omit-frame-pointer
1111da177e4SLinus Torvalds
1121da177e4SLinus Torvalds#
1131da177e4SLinus Torvalds# CPU-dependent compiler/assembler options for optimization.
1141da177e4SLinus Torvalds#
11559b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R3000)	+= -march=r3000
11659b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_TX39XX)	+= -march=r3900
11759b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R6000)	+= -march=r6000 -Wa,--trap
11859b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R4300)	+= -march=r4300 -Wa,--trap
11959b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_VR41XX)	+= -march=r4100 -Wa,--trap
12059b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R4X00)	+= -march=r4600 -Wa,--trap
12159b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_TX49XX)	+= -march=r4600 -Wa,--trap
1222a21c730SFuxin Zhangcflags-$(CONFIG_CPU_LOONGSON2)	+= -march=r4600 -Wa,--trap
1239200c0b2SRalf Baechlecflags-$(CONFIG_CPU_MIPS32_R1)	+= $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
12459b3e8e9SRalf Baechle			-Wa,-mips32 -Wa,--trap
1259200c0b2SRalf Baechlecflags-$(CONFIG_CPU_MIPS32_R2)	+= $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
12659b3e8e9SRalf Baechle			-Wa,-mips32r2 -Wa,--trap
1279200c0b2SRalf Baechlecflags-$(CONFIG_CPU_MIPS64_R1)	+= $(call cc-option,-march=mips64,-mips64 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \
12859b3e8e9SRalf Baechle			-Wa,-mips64 -Wa,--trap
1299200c0b2SRalf Baechlecflags-$(CONFIG_CPU_MIPS64_R2)	+= $(call cc-option,-march=mips64r2,-mips64r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \
13059b3e8e9SRalf Baechle			-Wa,-mips64r2 -Wa,--trap
13159b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R5000)	+= -march=r5000 -Wa,--trap
132c9e321e0SRalf Baechlecflags-$(CONFIG_CPU_R5432)	+= $(call cc-option,-march=r5400,-march=r5000) \
1331da177e4SLinus Torvalds			-Wa,--trap
134542c1020SShinya Kuribayashicflags-$(CONFIG_CPU_R5500)	+= $(call cc-option,-march=r5500,-march=r5000) \
135542c1020SShinya Kuribayashi			-Wa,--trap
136c9e321e0SRalf Baechlecflags-$(CONFIG_CPU_NEVADA)	+= $(call cc-option,-march=rm5200,-march=r5000) \
1371da177e4SLinus Torvalds			-Wa,--trap
13859b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_RM7000)	+= $(call cc-option,-march=rm7000,-march=r5000) \
1391da177e4SLinus Torvalds			-Wa,--trap
14059b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_RM9000)	+= $(call cc-option,-march=rm9000,-march=r5000) \
1411da177e4SLinus Torvalds			-Wa,--trap
14259b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_SB1)	+= $(call cc-option,-march=sb1,-march=r5000) \
1431da177e4SLinus Torvalds			-Wa,--trap
14459b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R8000)	+= -march=r8000 -Wa,--trap
14559b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R10000)	+= $(call cc-option,-march=r10000,-march=r8000) \
1461da177e4SLinus Torvalds			-Wa,--trap
1477e69deb8SDavid Daneycflags-$(CONFIG_CPU_CAVIUM_OCTEON) += $(call cc-option,-march=octeon) -Wa,--trap
1487e69deb8SDavid Daneyifeq (,$(findstring march=octeon, $(cflags-$(CONFIG_CPU_CAVIUM_OCTEON))))
1497e69deb8SDavid Daneycflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -Wa,-march=octeon
1507e69deb8SDavid Daneyendif
1511da177e4SLinus Torvalds
15220d60d99SMaciej W. Rozyckicflags-$(CONFIG_CPU_R4000_WORKAROUNDS)	+= $(call cc-option,-mfix-r4000,)
15320d60d99SMaciej W. Rozyckicflags-$(CONFIG_CPU_R4400_WORKAROUNDS)	+= $(call cc-option,-mfix-r4400,)
15420d60d99SMaciej W. Rozyckicflags-$(CONFIG_CPU_DADDI_WORKAROUNDS)	+= $(call cc-option,-mno-daddi,)
15520d60d99SMaciej W. Rozycki
1561da177e4SLinus Torvaldsifdef CONFIG_CPU_SB1
1571da177e4SLinus Torvaldsifdef CONFIG_SB1_PASS_1_WORKAROUNDS
1581da177e4SLinus TorvaldsMODFLAGS	+= -msb1-pass1-workarounds
1591da177e4SLinus Torvaldsendif
1601da177e4SLinus Torvaldsendif
1611da177e4SLinus Torvalds
1621da177e4SLinus Torvalds#
1631da177e4SLinus Torvalds# Firmware support
1641da177e4SLinus Torvalds#
1652f56cfddSAurelien Jarnolibs-$(CONFIG_ARC)		+= arch/mips/fw/arc/
166df78b5c8SAurelien Jarnolibs-$(CONFIG_CFE)		+= arch/mips/fw/cfe/
167231a35d3SThomas Bogendoerferlibs-$(CONFIG_SNIPROM)		+= arch/mips/fw/sni/
168231a35d3SThomas Bogendoerferlibs-y				+= arch/mips/fw/lib/
1691da177e4SLinus Torvaldslibs-$(CONFIG_SIBYTE_CFE)	+= arch/mips/sibyte/cfe/
1701da177e4SLinus Torvalds
1711da177e4SLinus Torvalds#
1721da177e4SLinus Torvalds# Board-dependent options and extra files
1731da177e4SLinus Torvalds#
1741da177e4SLinus Torvalds
1751da177e4SLinus Torvalds#
1761da177e4SLinus Torvalds# Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
1771da177e4SLinus Torvalds#
1781da177e4SLinus Torvaldscore-$(CONFIG_MACH_JAZZ)	+= arch/mips/jazz/
179384740dcSRalf Baechlecflags-$(CONFIG_MACH_JAZZ)	+= -I$(srctree)/arch/mips/include/asm/mach-jazz
1801da177e4SLinus Torvaldsload-$(CONFIG_MACH_JAZZ)	+= 0xffffffff80080000
1811da177e4SLinus Torvalds
1821da177e4SLinus Torvalds#
1831da177e4SLinus Torvalds# Common Alchemy Au1x00 stuff
1841da177e4SLinus Torvalds#
185e8c7c482SRalf Baechlecore-$(CONFIG_SOC_AU1X00)	+= arch/mips/alchemy/common/
186384740dcSRalf Baechlecflags-$(CONFIG_SOC_AU1X00)	+= -I$(srctree)/arch/mips/include/asm/mach-au1x00
1871da177e4SLinus Torvalds
1881da177e4SLinus Torvalds#
1891da177e4SLinus Torvalds# AMD Alchemy Pb1000 eval board
1901da177e4SLinus Torvalds#
191e8c7c482SRalf Baechlelibs-$(CONFIG_MIPS_PB1000)	+= arch/mips/alchemy/pb1000/
192384740dcSRalf Baechlecflags-$(CONFIG_MIPS_PB1000)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
1931da177e4SLinus Torvaldsload-$(CONFIG_MIPS_PB1000)	+= 0xffffffff80100000
1941da177e4SLinus Torvalds
1951da177e4SLinus Torvalds#
1961da177e4SLinus Torvalds# AMD Alchemy Pb1100 eval board
1971da177e4SLinus Torvalds#
198e8c7c482SRalf Baechlelibs-$(CONFIG_MIPS_PB1100)	+= arch/mips/alchemy/pb1100/
199384740dcSRalf Baechlecflags-$(CONFIG_MIPS_PB1100)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
2001da177e4SLinus Torvaldsload-$(CONFIG_MIPS_PB1100)	+= 0xffffffff80100000
2011da177e4SLinus Torvalds
2021da177e4SLinus Torvalds#
2031da177e4SLinus Torvalds# AMD Alchemy Pb1500 eval board
2041da177e4SLinus Torvalds#
205e8c7c482SRalf Baechlelibs-$(CONFIG_MIPS_PB1500)	+= arch/mips/alchemy/pb1500/
206384740dcSRalf Baechlecflags-$(CONFIG_MIPS_PB1500)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
2071da177e4SLinus Torvaldsload-$(CONFIG_MIPS_PB1500)	+= 0xffffffff80100000
2081da177e4SLinus Torvalds
2091da177e4SLinus Torvalds#
2101da177e4SLinus Torvalds# AMD Alchemy Pb1550 eval board
2111da177e4SLinus Torvalds#
212e8c7c482SRalf Baechlelibs-$(CONFIG_MIPS_PB1550)	+= arch/mips/alchemy/pb1550/
213384740dcSRalf Baechlecflags-$(CONFIG_MIPS_PB1550)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
2141da177e4SLinus Torvaldsload-$(CONFIG_MIPS_PB1550)	+= 0xffffffff80100000
2151da177e4SLinus Torvalds
2161da177e4SLinus Torvalds#
217e3ad1c23SPete Popov# AMD Alchemy Pb1200 eval board
218e3ad1c23SPete Popov#
219e8c7c482SRalf Baechlelibs-$(CONFIG_MIPS_PB1200)	+= arch/mips/alchemy/pb1200/
220384740dcSRalf Baechlecflags-$(CONFIG_MIPS_PB1200)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
221e3ad1c23SPete Popovload-$(CONFIG_MIPS_PB1200)	+= 0xffffffff80100000
222e3ad1c23SPete Popov
223e3ad1c23SPete Popov#
2241da177e4SLinus Torvalds# AMD Alchemy Db1000 eval board
2251da177e4SLinus Torvalds#
226e8c7c482SRalf Baechlelibs-$(CONFIG_MIPS_DB1000)	+= arch/mips/alchemy/db1x00/
227384740dcSRalf Baechlecflags-$(CONFIG_MIPS_DB1000)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
2281da177e4SLinus Torvaldsload-$(CONFIG_MIPS_DB1000)	+= 0xffffffff80100000
2291da177e4SLinus Torvalds
2301da177e4SLinus Torvalds#
2311da177e4SLinus Torvalds# AMD Alchemy Db1100 eval board
2321da177e4SLinus Torvalds#
233e8c7c482SRalf Baechlelibs-$(CONFIG_MIPS_DB1100)	+= arch/mips/alchemy/db1x00/
234384740dcSRalf Baechlecflags-$(CONFIG_MIPS_DB1100)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
2351da177e4SLinus Torvaldsload-$(CONFIG_MIPS_DB1100)	+= 0xffffffff80100000
2361da177e4SLinus Torvalds
2371da177e4SLinus Torvalds#
2381da177e4SLinus Torvalds# AMD Alchemy Db1500 eval board
2391da177e4SLinus Torvalds#
240e8c7c482SRalf Baechlelibs-$(CONFIG_MIPS_DB1500)	+= arch/mips/alchemy/db1x00/
241384740dcSRalf Baechlecflags-$(CONFIG_MIPS_DB1500)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
2421da177e4SLinus Torvaldsload-$(CONFIG_MIPS_DB1500)	+= 0xffffffff80100000
2431da177e4SLinus Torvalds
2441da177e4SLinus Torvalds#
2451da177e4SLinus Torvalds# AMD Alchemy Db1550 eval board
2461da177e4SLinus Torvalds#
247e8c7c482SRalf Baechlelibs-$(CONFIG_MIPS_DB1550)	+= arch/mips/alchemy/db1x00/
248384740dcSRalf Baechlecflags-$(CONFIG_MIPS_DB1550)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
2491da177e4SLinus Torvaldsload-$(CONFIG_MIPS_DB1550)	+= 0xffffffff80100000
2501da177e4SLinus Torvalds
2511da177e4SLinus Torvalds#
252e3ad1c23SPete Popov# AMD Alchemy Db1200 eval board
253e3ad1c23SPete Popov#
254e8c7c482SRalf Baechlelibs-$(CONFIG_MIPS_DB1200)	+= arch/mips/alchemy/pb1200/
255384740dcSRalf Baechlecflags-$(CONFIG_MIPS_DB1200)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
256e3ad1c23SPete Popovload-$(CONFIG_MIPS_DB1200)	+= 0xffffffff80100000
257e3ad1c23SPete Popov
258e3ad1c23SPete Popov#
2591da177e4SLinus Torvalds# AMD Alchemy Bosporus eval board
2601da177e4SLinus Torvalds#
261e8c7c482SRalf Baechlelibs-$(CONFIG_MIPS_BOSPORUS)	+= arch/mips/alchemy/db1x00/
262384740dcSRalf Baechlecflags-$(CONFIG_MIPS_BOSPORUS)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
2631da177e4SLinus Torvaldsload-$(CONFIG_MIPS_BOSPORUS)	+= 0xffffffff80100000
2641da177e4SLinus Torvalds
2651da177e4SLinus Torvalds#
2661da177e4SLinus Torvalds# AMD Alchemy Mirage eval board
2671da177e4SLinus Torvalds#
268e8c7c482SRalf Baechlelibs-$(CONFIG_MIPS_MIRAGE)	+= arch/mips/alchemy/db1x00/
269384740dcSRalf Baechlecflags-$(CONFIG_MIPS_MIRAGE)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
2701da177e4SLinus Torvaldsload-$(CONFIG_MIPS_MIRAGE)	+= 0xffffffff80100000
2711da177e4SLinus Torvalds
2721da177e4SLinus Torvalds#
2731da177e4SLinus Torvalds# 4G-Systems eval board
2741da177e4SLinus Torvalds#
275e8c7c482SRalf Baechlelibs-$(CONFIG_MIPS_MTX1)	+= arch/mips/alchemy/mtx-1/
2761da177e4SLinus Torvaldsload-$(CONFIG_MIPS_MTX1)	+= 0xffffffff80100000
2771da177e4SLinus Torvalds
2781da177e4SLinus Torvalds#
2791da177e4SLinus Torvalds# MyCable eval board
2801da177e4SLinus Torvalds#
281e8c7c482SRalf Baechlelibs-$(CONFIG_MIPS_XXS1500)	+= arch/mips/alchemy/xxs1500/
2821da177e4SLinus Torvaldsload-$(CONFIG_MIPS_XXS1500)	+= 0xffffffff80100000
2831da177e4SLinus Torvalds
2841da177e4SLinus Torvalds#
2851da177e4SLinus Torvalds# Cobalt Server
2861da177e4SLinus Torvalds#
2871da177e4SLinus Torvaldscore-$(CONFIG_MIPS_COBALT)	+= arch/mips/cobalt/
288384740dcSRalf Baechlecflags-$(CONFIG_MIPS_COBALT)	+= -I$(srctree)/arch/mips/include/asm/mach-cobalt
2891da177e4SLinus Torvaldsload-$(CONFIG_MIPS_COBALT)	+= 0xffffffff80080000
2901da177e4SLinus Torvalds
2911da177e4SLinus Torvalds#
2921da177e4SLinus Torvalds# DECstation family
2931da177e4SLinus Torvalds#
2941da177e4SLinus Torvaldscore-$(CONFIG_MACH_DECSTATION)	+= arch/mips/dec/
295384740dcSRalf Baechlecflags-$(CONFIG_MACH_DECSTATION)+= -I$(srctree)/arch/mips/include/asm/mach-dec
2961da177e4SLinus Torvaldslibs-$(CONFIG_MACH_DECSTATION)	+= arch/mips/dec/prom/
2971da177e4SLinus Torvaldsload-$(CONFIG_MACH_DECSTATION)	+= 0xffffffff80040000
2981da177e4SLinus Torvalds
2991da177e4SLinus Torvalds#
300a240a469SMark.Zhan# Wind River PPMC Board (4KC + GT64120)
301a240a469SMark.Zhan#
302a240a469SMark.Zhancore-$(CONFIG_WR_PPMC)		+= arch/mips/gt64120/wrppmc/
303384740dcSRalf Baechlecflags-$(CONFIG_WR_PPMC)		+= -I$(srctree)/arch/mips/include/asm/mach-wrppmc
304a240a469SMark.Zhanload-$(CONFIG_WR_PPMC)		+= 0xffffffff80100000
305a240a469SMark.Zhan
306a240a469SMark.Zhan#
30742d226c7SSongmao Tian# lemote fulong mini-PC board
30842d226c7SSongmao Tian#
30942d226c7SSongmao Tiancore-$(CONFIG_LEMOTE_FULONG) +=arch/mips/lemote/lm2e/
31042d226c7SSongmao Tianload-$(CONFIG_LEMOTE_FULONG) +=0xffffffff80100000
311384740dcSRalf Baechlecflags-$(CONFIG_LEMOTE_FULONG) += -I$(srctree)/arch/mips/include/asm/mach-lemote
31242d226c7SSongmao Tian
31342d226c7SSongmao Tian#
3141da177e4SLinus Torvalds# MIPS Malta board
3151da177e4SLinus Torvalds#
316315806cbSRalf Baechlecore-$(CONFIG_MIPS_MALTA)	+= arch/mips/mti-malta/
317384740dcSRalf Baechlecflags-$(CONFIG_MIPS_MALTA)	+= -I$(srctree)/arch/mips/include/asm/mach-malta
3181da177e4SLinus Torvaldsload-$(CONFIG_MIPS_MALTA)	+= 0xffffffff80100000
319fa71c960SRalf Baechleall-$(CONFIG_MIPS_MALTA)	:= vmlinux.bin
3201da177e4SLinus Torvalds
3211da177e4SLinus Torvalds#
322c78cbf49SRalf Baechle# MIPS SIM
323c78cbf49SRalf Baechle#
324f6e2373aSRalf Baechlecore-$(CONFIG_MIPS_SIM)		+= arch/mips/mipssim/
325384740dcSRalf Baechlecflags-$(CONFIG_MIPS_SIM)	+= -I$(srctree)/arch/mips/include/asm/mach-mipssim
326c78cbf49SRalf Baechleload-$(CONFIG_MIPS_SIM)		+= 0x80100000
327c78cbf49SRalf Baechle
328c78cbf49SRalf Baechle#
3299267a30dSMarc St-Jean# PMC-Sierra MSP SOCs
3309267a30dSMarc St-Jean#
3319267a30dSMarc St-Jeancore-$(CONFIG_PMC_MSP)		+= arch/mips/pmc-sierra/msp71xx/
332384740dcSRalf Baechlecflags-$(CONFIG_PMC_MSP)	+= -I$(srctree)/arch/mips/include/asm/pmc-sierra/msp71xx \
3339267a30dSMarc St-Jean					-mno-branch-likely
3349267a30dSMarc St-Jeanload-$(CONFIG_PMC_MSP)		+= 0xffffffff80100000
3359267a30dSMarc St-Jean
3369267a30dSMarc St-Jean#
3371da177e4SLinus Torvalds# PMC-Sierra Yosemite
3381da177e4SLinus Torvalds#
3391da177e4SLinus Torvaldscore-$(CONFIG_PMC_YOSEMITE)	+= arch/mips/pmc-sierra/yosemite/
340384740dcSRalf Baechlecflags-$(CONFIG_PMC_YOSEMITE)	+= -I$(srctree)/arch/mips/include/asm/mach-yosemite
3411da177e4SLinus Torvaldsload-$(CONFIG_PMC_YOSEMITE)	+= 0xffffffff80100000
3421da177e4SLinus Torvalds
34314cd8015SRalf Baechle#
34435189fadSRalf Baechle# Basler eXcite
34535189fadSRalf Baechle#
34635189fadSRalf Baechlecore-$(CONFIG_BASLER_EXCITE)	+= arch/mips/basler/excite/
347384740dcSRalf Baechlecflags-$(CONFIG_BASLER_EXCITE)	+= -I$(srctree)/arch/mips/include/asm/mach-excite
34835189fadSRalf Baechleload-$(CONFIG_BASLER_EXCITE)	+= 0x80100000
34935189fadSRalf Baechle
35035189fadSRalf Baechle#
3511f21d2bdSBrian Murphy# LASAT platforms
3521f21d2bdSBrian Murphy#
3531f21d2bdSBrian Murphycore-$(CONFIG_LASAT)		+= arch/mips/lasat/
354384740dcSRalf Baechlecflags-$(CONFIG_LASAT)		+= -I$(srctree)/arch/mips/include/asm/mach-lasat
3551f21d2bdSBrian Murphyload-$(CONFIG_LASAT)		+= 0xffffffff80000000
3561f21d2bdSBrian Murphy
3571f21d2bdSBrian Murphy#
3581da177e4SLinus Torvalds# Common VR41xx
3591da177e4SLinus Torvalds#
3601da177e4SLinus Torvaldscore-$(CONFIG_MACH_VR41XX)	+= arch/mips/vr41xx/common/
361384740dcSRalf Baechlecflags-$(CONFIG_MACH_VR41XX)	+= -I$(srctree)/arch/mips/include/asm/mach-vr41xx
3621da177e4SLinus Torvalds
3631da177e4SLinus Torvalds#
3641da177e4SLinus Torvalds# ZAO Networks Capcella (VR4131)
3651da177e4SLinus Torvalds#
3661da177e4SLinus Torvaldsload-$(CONFIG_ZAO_CAPCELLA)	+= 0xffffffff80000000
3671da177e4SLinus Torvalds
3681da177e4SLinus Torvalds#
3691da177e4SLinus Torvalds# Victor MP-C303/304 (VR4122)
3701da177e4SLinus Torvalds#
3711da177e4SLinus Torvaldsload-$(CONFIG_VICTOR_MPC30X)	+= 0xffffffff80001000
3721da177e4SLinus Torvalds
3731da177e4SLinus Torvalds#
3741da177e4SLinus Torvalds# IBM WorkPad z50 (VR4121)
3751da177e4SLinus Torvalds#
3761da177e4SLinus Torvaldscore-$(CONFIG_IBM_WORKPAD)	+= arch/mips/vr41xx/ibm-workpad/
3771da177e4SLinus Torvaldsload-$(CONFIG_IBM_WORKPAD)	+= 0xffffffff80004000
3781da177e4SLinus Torvalds
3791da177e4SLinus Torvalds#
3801da177e4SLinus Torvalds# CASIO CASSIPEIA E-55/65 (VR4111)
3811da177e4SLinus Torvalds#
3821da177e4SLinus Torvaldscore-$(CONFIG_CASIO_E55)	+= arch/mips/vr41xx/casio-e55/
3831da177e4SLinus Torvaldsload-$(CONFIG_CASIO_E55)	+= 0xffffffff80004000
3841da177e4SLinus Torvalds
3851da177e4SLinus Torvalds#
38663b799f9SYoichi Yuasa# TANBAC VR4131 multichip module(TB0225) and TANBAC VR4131DIMM(TB0229) (VR4131)
3871da177e4SLinus Torvalds#
38863b799f9SYoichi Yuasaload-$(CONFIG_TANBAC_TB022X)	+= 0xffffffff80000000
3891da177e4SLinus Torvalds
390edb6310aSDaniel Laird# NXP STB225
391edb6310aSDaniel Lairdcore-$(CONFIG_SOC_PNX833X)		+= arch/mips/nxp/pnx833x/common/
392edb6310aSDaniel Lairdcflags-$(CONFIG_SOC_PNX833X)	+= -Iarch/mips/include/asm/mach-pnx833x
393edb6310aSDaniel Lairdlibs-$(CONFIG_NXP_STB220)		+= arch/mips/nxp/pnx833x/stb22x/
394edb6310aSDaniel Lairdload-$(CONFIG_NXP_STB220)		+= 0xffffffff80001000
395edb6310aSDaniel Lairdlibs-$(CONFIG_NXP_STB225)		+= arch/mips/nxp/pnx833x/stb22x/
396edb6310aSDaniel Lairdload-$(CONFIG_NXP_STB225)		+= 0xffffffff80001000
397edb6310aSDaniel Laird
3981da177e4SLinus Torvalds#
399a92b0588SDaniel Laird# Common NXP PNX8550
400bdf21b18SPete Popov#
401a92b0588SDaniel Lairdcore-$(CONFIG_SOC_PNX8550)	+= arch/mips/nxp/pnx8550/common/
402384740dcSRalf Baechlecflags-$(CONFIG_SOC_PNX8550)	+= -I$(srctree)/arch/mips/include/asm/mach-pnx8550
403bdf21b18SPete Popov
404bdf21b18SPete Popov#
405a92b0588SDaniel Laird# NXP PNX8550 JBS board
406bdf21b18SPete Popov#
407a92b0588SDaniel Lairdlibs-$(CONFIG_PNX8550_JBS)	+= arch/mips/nxp/pnx8550/jbs/
408384740dcSRalf Baechle#cflags-$(CONFIG_PNX8550_JBS)	+= -I$(srctree)/arch/mips/include/asm/mach-pnx8550
409bdf21b18SPete Popovload-$(CONFIG_PNX8550_JBS)	+= 0xffffffff80060000
410bdf21b18SPete Popov
411a92b0588SDaniel Laird# NXP PNX8550 STB810 board
412f0647a52SVitaly Wool#
413a92b0588SDaniel Lairdlibs-$(CONFIG_PNX8550_STB810)	+= arch/mips/nxp/pnx8550/stb810/
414f0647a52SVitaly Woolload-$(CONFIG_PNX8550_STB810)	+= 0xffffffff80060000
415f0647a52SVitaly Wool
416cd741b60SShinya Kuribayashi#
417f27655e3SShinya Kuribayashi# Common NEC EMMAXXX
418355c471fSdmitry pervushin#
419f27655e3SShinya Kuribayashicore-$(CONFIG_SOC_EMMA)		+= arch/mips/emma/common/
420cd741b60SShinya Kuribayashicflags-$(CONFIG_SOC_EMMA2RH)	+= -I$(srctree)/arch/mips/include/asm/mach-emma2rh
421355c471fSdmitry pervushin
422cd741b60SShinya Kuribayashi#
423355c471fSdmitry pervushin# NEC EMMA2RH Mark-eins
424cd741b60SShinya Kuribayashi#
425f27655e3SShinya Kuribayashicore-$(CONFIG_NEC_MARKEINS)	+= arch/mips/emma/markeins/
426cd741b60SShinya Kuribayashiload-$(CONFIG_NEC_MARKEINS)	+= 0xffffffff88100000
427355c471fSdmitry pervushin
428bdf21b18SPete Popov#
4291da177e4SLinus Torvalds# SGI IP22 (Indy/Indigo2)
4301da177e4SLinus Torvalds#
4311da177e4SLinus Torvalds# Set the load address to >= 0xffffffff88069000 if you want to leave space for
4321da177e4SLinus Torvalds# symmon, 0xffffffff80002000 for production kernels.  Note that the value must
4331da177e4SLinus Torvalds# be aligned to a multiple of the kernel stack size or the handling of the
4341da177e4SLinus Torvalds# current variable will break so for 64-bit kernels we have to raise the start
4351da177e4SLinus Torvalds# address by 8kb.
4361da177e4SLinus Torvalds#
4371da177e4SLinus Torvaldscore-$(CONFIG_SGI_IP22)		+= arch/mips/sgi-ip22/
438384740dcSRalf Baechlecflags-$(CONFIG_SGI_IP22)	+= -I$(srctree)/arch/mips/include/asm/mach-ip22
439875d43e7SRalf Baechleifdef CONFIG_32BIT
4401da177e4SLinus Torvaldsload-$(CONFIG_SGI_IP22)		+= 0xffffffff88002000
4411da177e4SLinus Torvaldsendif
442875d43e7SRalf Baechleifdef CONFIG_64BIT
4431da177e4SLinus Torvaldsload-$(CONFIG_SGI_IP22)		+= 0xffffffff88004000
4441da177e4SLinus Torvaldsendif
4451da177e4SLinus Torvalds
4461da177e4SLinus Torvalds#
4471da177e4SLinus Torvalds# SGI-IP27 (Origin200/2000)
4481da177e4SLinus Torvalds#
4491da177e4SLinus Torvalds# Set the load address to >= 0xc000000000300000 if you want to leave space for
4501da177e4SLinus Torvalds# symmon, 0xc00000000001c000 for production kernels.  Note that the value must
4511da177e4SLinus Torvalds# be 16kb aligned or the handling of the current variable will break.
4521da177e4SLinus Torvalds#
4531da177e4SLinus Torvaldsifdef CONFIG_SGI_IP27
4541da177e4SLinus Torvaldscore-$(CONFIG_SGI_IP27)		+= arch/mips/sgi-ip27/
455384740dcSRalf Baechlecflags-$(CONFIG_SGI_IP27)	+= -I$(srctree)/arch/mips/include/asm/mach-ip27
4561da177e4SLinus Torvaldsifdef CONFIG_MAPPED_KERNEL
4571da177e4SLinus Torvaldsload-$(CONFIG_SGI_IP27)		+= 0xc00000004001c000
4581da177e4SLinus TorvaldsOBJCOPYFLAGS			:= --change-addresses=0x3fffffff80000000
4591da177e4SLinus Torvaldsdataoffset-$(CONFIG_SGI_IP27)	+= 0x01000000
4601da177e4SLinus Torvaldselse
4611da177e4SLinus Torvaldsload-$(CONFIG_SGI_IP27)		+= 0xa80000000001c000
4621da177e4SLinus TorvaldsOBJCOPYFLAGS			:= --change-addresses=0x57ffffff80000000
4631da177e4SLinus Torvaldsendif
4641da177e4SLinus Torvaldsendif
4651da177e4SLinus Torvalds
4661da177e4SLinus Torvalds#
467e2defae5SThomas Bogendoerfer# SGI IP28 (Indigo2 R10k)
468e2defae5SThomas Bogendoerfer#
469e2defae5SThomas Bogendoerfer# Set the load address to >= 0xa800000020080000 if you want to leave space for
470e2defae5SThomas Bogendoerfer# symmon, 0xa800000020004000 for production kernels ?  Note that the value must
471e2defae5SThomas Bogendoerfer# be 16kb aligned or the handling of the current variable will break.
472e2defae5SThomas Bogendoerfer# Simplified: what IP22 does at 128MB+ in ksegN, IP28 does at 512MB+ in xkphys
473e2defae5SThomas Bogendoerfer#
47482933342SThomas Bogendoerferifdef CONFIG_SGI_IP28
47582933342SThomas Bogendoerfer  ifeq ($(call cc-option-yn,-mr10k-cache-barrier=1), n)
47682933342SThomas Bogendoerfer      $(error gcc doesn't support needed option -mr10k-cache-barrier=1)
47782933342SThomas Bogendoerfer  endif
47882933342SThomas Bogendoerferendif
479e2defae5SThomas Bogendoerfercore-$(CONFIG_SGI_IP28)		+= arch/mips/sgi-ip22/
480384740dcSRalf Baechlecflags-$(CONFIG_SGI_IP28)	+= -mr10k-cache-barrier=1 -I$(srctree)/arch/mips/include/asm/mach-ip28
481e2defae5SThomas Bogendoerferload-$(CONFIG_SGI_IP28)		+= 0xa800000020004000
482e2defae5SThomas Bogendoerfer
483e2defae5SThomas Bogendoerfer#
4841da177e4SLinus Torvalds# SGI-IP32 (O2)
4851da177e4SLinus Torvalds#
4861da177e4SLinus Torvalds# Set the load address to >= 80069000 if you want to leave space for symmon,
4871da177e4SLinus Torvalds# 0xffffffff80004000 for production kernels.  Note that the value must be aligned to
4881da177e4SLinus Torvalds# a multiple of the kernel stack size or the handling of the current variable
4891da177e4SLinus Torvalds# will break.
4901da177e4SLinus Torvalds#
4911da177e4SLinus Torvaldscore-$(CONFIG_SGI_IP32)		+= arch/mips/sgi-ip32/
492384740dcSRalf Baechlecflags-$(CONFIG_SGI_IP32)	+= -I$(srctree)/arch/mips/include/asm/mach-ip32
4931da177e4SLinus Torvaldsload-$(CONFIG_SGI_IP32)		+= 0xffffffff80004000
4941da177e4SLinus Torvalds
4951da177e4SLinus Torvalds#
496d619f38fSMark Mason# Sibyte SB1250/BCM1480 SOC
4971da177e4SLinus Torvalds#
4981da177e4SLinus Torvalds# This is a LIB so that it links at the end, and initcalls are later
4991da177e4SLinus Torvalds# the sequence; but it is built as an object so that modules don't get
5001da177e4SLinus Torvalds# removed (as happens, even if they have __initcall/module_init)
5011da177e4SLinus Torvalds#
5021da177e4SLinus Torvaldscore-$(CONFIG_SIBYTE_BCM112X)	+= arch/mips/sibyte/sb1250/
503d619f38fSMark Masoncore-$(CONFIG_SIBYTE_BCM112X)	+= arch/mips/sibyte/common/
504384740dcSRalf Baechlecflags-$(CONFIG_SIBYTE_BCM112X)	+= -I$(srctree)/arch/mips/include/asm/mach-sibyte \
505f137e463SAndrew Isaacson			-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
5061da177e4SLinus Torvalds
5071da177e4SLinus Torvaldscore-$(CONFIG_SIBYTE_SB1250)	+= arch/mips/sibyte/sb1250/
508d619f38fSMark Masoncore-$(CONFIG_SIBYTE_SB1250)	+= arch/mips/sibyte/common/
509384740dcSRalf Baechlecflags-$(CONFIG_SIBYTE_SB1250)	+= -I$(srctree)/arch/mips/include/asm/mach-sibyte \
510f137e463SAndrew Isaacson			-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
511f137e463SAndrew Isaacson
512f137e463SAndrew Isaacsoncore-$(CONFIG_SIBYTE_BCM1x55)	+= arch/mips/sibyte/bcm1480/
513d619f38fSMark Masoncore-$(CONFIG_SIBYTE_BCM1x55)	+= arch/mips/sibyte/common/
514384740dcSRalf Baechlecflags-$(CONFIG_SIBYTE_BCM1x55)	+= -I$(srctree)/arch/mips/include/asm/mach-sibyte \
515f137e463SAndrew Isaacson			-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
516f137e463SAndrew Isaacson
517f137e463SAndrew Isaacsoncore-$(CONFIG_SIBYTE_BCM1x80)	+= arch/mips/sibyte/bcm1480/
518d619f38fSMark Masoncore-$(CONFIG_SIBYTE_BCM1x80)	+= arch/mips/sibyte/common/
519384740dcSRalf Baechlecflags-$(CONFIG_SIBYTE_BCM1x80)	+= -I$(srctree)/arch/mips/include/asm/mach-sibyte \
520f137e463SAndrew Isaacson			-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
5211da177e4SLinus Torvalds
5221da177e4SLinus Torvalds#
5231da177e4SLinus Torvalds# Sibyte BCM91120x (Carmel) board
5241da177e4SLinus Torvalds# Sibyte BCM91120C (CRhine) board
5251da177e4SLinus Torvalds# Sibyte BCM91125C (CRhone) board
5261da177e4SLinus Torvalds# Sibyte BCM91125E (Rhone) board
5271da177e4SLinus Torvalds# Sibyte SWARM board
5289a6dcea1SAndrew Isaacson# Sibyte BCM91x80 (BigSur) board
5291da177e4SLinus Torvalds#
53063a4881aSMaciej W. Rozyckicore-$(CONFIG_SIBYTE_CARMEL)	+= arch/mips/sibyte/swarm/
5311da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_CARMEL)	:= 0xffffffff80100000
53263a4881aSMaciej W. Rozyckicore-$(CONFIG_SIBYTE_CRHINE)	+= arch/mips/sibyte/swarm/
5331da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_CRHINE)	:= 0xffffffff80100000
53463a4881aSMaciej W. Rozyckicore-$(CONFIG_SIBYTE_CRHONE)	+= arch/mips/sibyte/swarm/
5351da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_CRHONE)	:= 0xffffffff80100000
53663a4881aSMaciej W. Rozyckicore-$(CONFIG_SIBYTE_RHONE)	+= arch/mips/sibyte/swarm/
5371da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_RHONE)	:= 0xffffffff80100000
53863a4881aSMaciej W. Rozyckicore-$(CONFIG_SIBYTE_SENTOSA)	+= arch/mips/sibyte/swarm/
5391da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_SENTOSA)	:= 0xffffffff80100000
54063a4881aSMaciej W. Rozyckicore-$(CONFIG_SIBYTE_SWARM)	+= arch/mips/sibyte/swarm/
5411da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_SWARM)	:= 0xffffffff80100000
54263a4881aSMaciej W. Rozyckicore-$(CONFIG_SIBYTE_BIGSUR)	+= arch/mips/sibyte/swarm/
5439a6dcea1SAndrew Isaacsonload-$(CONFIG_SIBYTE_BIGSUR)	:= 0xffffffff80100000
5441da177e4SLinus Torvalds
5451da177e4SLinus Torvalds#
5461c0c13ebSAurelien Jarno# Broadcom BCM47XX boards
5471c0c13ebSAurelien Jarno#
5481c0c13ebSAurelien Jarnocore-$(CONFIG_BCM47XX)		+= arch/mips/bcm47xx/
549384740dcSRalf Baechlecflags-$(CONFIG_BCM47XX)	+= -I$(srctree)/arch/mips/include/asm/mach-bcm47xx
5501c0c13ebSAurelien Jarnoload-$(CONFIG_BCM47XX)		:= 0xffffffff80001000
5511c0c13ebSAurelien Jarno
5521c0c13ebSAurelien Jarno#
55314b36af4SThomas Bogendoerfer# SNI RM
5541da177e4SLinus Torvalds#
55514b36af4SThomas Bogendoerfercore-$(CONFIG_SNI_RM)		+= arch/mips/sni/
556384740dcSRalf Baechlecflags-$(CONFIG_SNI_RM)		+= -I$(srctree)/arch/mips/include/asm/mach-rm
5570e27d793SThomas Bogendoerferifdef CONFIG_CPU_LITTLE_ENDIAN
55814b36af4SThomas Bogendoerferload-$(CONFIG_SNI_RM)		+= 0xffffffff80600000
5590e27d793SThomas Bogendoerferelse
5600e27d793SThomas Bogendoerferload-$(CONFIG_SNI_RM)		+= 0xffffffff80030000
5610e27d793SThomas Bogendoerferendif
5628496b401SRalf Baechleall-$(CONFIG_SNI_RM)		:= vmlinux.ecoff
5631da177e4SLinus Torvalds
5641da177e4SLinus Torvalds#
565edcaf1a6SAtsushi Nemoto# Common TXx9
566edcaf1a6SAtsushi Nemoto#
567edcaf1a6SAtsushi Nemotocore-$(CONFIG_MACH_TX39XX)	+= arch/mips/txx9/generic/
568384740dcSRalf Baechlecflags-$(CONFIG_MACH_TX39XX) += -I$(srctree)/arch/mips/include/asm/mach-tx39xx
569edcaf1a6SAtsushi Nemotoload-$(CONFIG_MACH_TX39XX)	+= 0xffffffff80050000
570edcaf1a6SAtsushi Nemotocore-$(CONFIG_MACH_TX49XX)	+= arch/mips/txx9/generic/
571384740dcSRalf Baechlecflags-$(CONFIG_MACH_TX49XX) += -I$(srctree)/arch/mips/include/asm/mach-tx49xx
572edcaf1a6SAtsushi Nemotoload-$(CONFIG_MACH_TX49XX)	+= 0xffffffff80100000
573edcaf1a6SAtsushi Nemoto
574edcaf1a6SAtsushi Nemoto#
5751da177e4SLinus Torvalds# Toshiba JMR-TX3927 board
5761da177e4SLinus Torvalds#
577edcaf1a6SAtsushi Nemotocore-$(CONFIG_TOSHIBA_JMR3927)	+= arch/mips/txx9/jmr3927/
5781da177e4SLinus Torvalds
5791da177e4SLinus Torvalds#
58073b4390fSRalf Baechle# Routerboard 532 board
58173b4390fSRalf Baechle#
58273b4390fSRalf Baechlecore-$(CONFIG_MIKROTIK_RB532)	+= arch/mips/rb532/
583384740dcSRalf Baechlecflags-$(CONFIG_MIKROTIK_RB532) += -I$(srctree)/arch/mips/include/asm/mach-rc32434
58473b4390fSRalf Baechleload-$(CONFIG_MIKROTIK_RB532)	+= 0xffffffff80101000
58573b4390fSRalf Baechle
58673b4390fSRalf Baechle#
587b27311e1SAtsushi Nemoto# Toshiba RBTX49XX boards
5881da177e4SLinus Torvalds#
58922b1d707SAtsushi Nemotocore-$(CONFIG_TOSHIBA_RBTX4927)	+= arch/mips/txx9/rbtx4927/
59022b1d707SAtsushi Nemotocore-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/txx9/rbtx4938/
591b27311e1SAtsushi Nemotocore-$(CONFIG_TOSHIBA_RBTX4939) += arch/mips/txx9/rbtx4939/
59223fbee9dSRalf Baechle
5937e69deb8SDavid Daney#
5947e69deb8SDavid Daney# Cavium Octeon
5957e69deb8SDavid Daney#
5967e69deb8SDavid Daneycore-$(CONFIG_CPU_CAVIUM_OCTEON)	+= arch/mips/cavium-octeon/
5977e69deb8SDavid Daneycflags-$(CONFIG_CPU_CAVIUM_OCTEON)	+= -I$(srctree)/arch/mips/include/asm/mach-cavium-octeon
5987e69deb8SDavid Daneycore-$(CONFIG_CPU_CAVIUM_OCTEON)	+= arch/mips/cavium-octeon/executive/
5997e69deb8SDavid Daneyifdef CONFIG_CAVIUM_OCTEON_2ND_KERNEL
6007e69deb8SDavid Daneyload-$(CONFIG_CPU_CAVIUM_OCTEON)	+= 0xffffffff84100000
6017e69deb8SDavid Daneyelse
6027e69deb8SDavid Daneyload-$(CONFIG_CPU_CAVIUM_OCTEON) 	+= 0xffffffff81100000
6037e69deb8SDavid Daneyendif
6047e69deb8SDavid Daney
605384740dcSRalf Baechlecflags-y			+= -I$(srctree)/arch/mips/include/asm/mach-generic
6061da177e4SLinus Torvaldsdrivers-$(CONFIG_PCI)		+= arch/mips/pci/
6071da177e4SLinus Torvalds
608875d43e7SRalf Baechleifdef CONFIG_32BIT
6091da177e4SLinus Torvaldsifdef CONFIG_CPU_LITTLE_ENDIAN
6101da177e4SLinus TorvaldsJIFFIES			= jiffies_64
6111da177e4SLinus Torvaldselse
6121da177e4SLinus TorvaldsJIFFIES			= jiffies_64 + 4
6131da177e4SLinus Torvaldsendif
6141da177e4SLinus Torvaldselse
6151da177e4SLinus TorvaldsJIFFIES			= jiffies_64
6161da177e4SLinus Torvaldsendif
6171da177e4SLinus Torvalds
618adff90a9SFranck Bui-Huu#
619adff90a9SFranck Bui-Huu# Automatically detect the build format. By default we choose
620adff90a9SFranck Bui-Huu# the elf format according to the load address.
621adff90a9SFranck Bui-Huu# We can always force a build with a 64-bits symbol format by
622054c51b4SFranck Bui-Huu# passing 'KBUILD_SYM32=no' option to the make's command line.
623adff90a9SFranck Bui-Huu#
624adff90a9SFranck Bui-Huuifdef CONFIG_64BIT
625054c51b4SFranck Bui-Huu  ifndef KBUILD_SYM32
626adff90a9SFranck Bui-Huu    ifeq ($(shell expr $(load-y) \< 0xffffffff80000000), 0)
627054c51b4SFranck Bui-Huu      KBUILD_SYM32 = y
628adff90a9SFranck Bui-Huu    endif
629adff90a9SFranck Bui-Huu  endif
630adff90a9SFranck Bui-Huu
63120d60d99SMaciej W. Rozycki  ifeq ($(KBUILD_SYM32)$(call cc-option-yn,-msym32), yy)
632054c51b4SFranck Bui-Huu    cflags-y += -msym32 -DKBUILD_64BIT_SYM32
63320d60d99SMaciej W. Rozycki  else
63420d60d99SMaciej W. Rozycki    ifeq ($(CONFIG_CPU_DADDI_WORKAROUNDS), y)
63520d60d99SMaciej W. Rozycki      $(error CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32)
636adff90a9SFranck Bui-Huu    endif
637adff90a9SFranck Bui-Huu  endif
638e58d95abSFranck Bui-Huuendif
639adff90a9SFranck Bui-Huu
640222d394dSSam RavnborgKBUILD_AFLAGS	+= $(cflags-y)
641a0f97e06SSam RavnborgKBUILD_CFLAGS	+= $(cflags-y) \
6429267a30dSMarc St-Jean			-D"VMLINUX_LOAD_ADDRESS=$(load-y)"
6431da177e4SLinus Torvalds
6441da177e4SLinus TorvaldsLDFLAGS			+= -m $(ld-emul)
6451da177e4SLinus Torvalds
64659b3e8e9SRalf Baechleifdef CONFIG_MIPS
647a0f97e06SSam RavnborgCHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -xc /dev/null | \
64848c35b2dSAlexey Dobriyan	egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
6492a2c3e45SAtsushi Nemoto	sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/")
6502a2c3e45SAtsushi Nemotoifdef CONFIG_64BIT
6512a2c3e45SAtsushi NemotoCHECKFLAGS		+= -m64
6522a2c3e45SAtsushi Nemotoendif
65359b3e8e9SRalf Baechleendif
65459b3e8e9SRalf Baechle
6551da177e4SLinus TorvaldsOBJCOPYFLAGS		+= --remove-section=.reginfo
6561da177e4SLinus Torvalds
6571da177e4SLinus Torvalds#
6581da177e4SLinus Torvalds# Choosing incompatible machines durings configuration will result in
6591da177e4SLinus Torvalds# error messages during linking.  Select a default linkscript if
6601da177e4SLinus Torvalds# none has been choosen above.
6611da177e4SLinus Torvalds#
6621da177e4SLinus Torvalds
6631da177e4SLinus TorvaldsCPPFLAGS_vmlinux.lds := \
664a0f97e06SSam Ravnborg	$(KBUILD_CFLAGS) \
6651da177e4SLinus Torvalds	-D"LOADADDR=$(load-y)" \
6661da177e4SLinus Torvalds	-D"JIFFIES=$(JIFFIES)" \
6671da177e4SLinus Torvalds	-D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
6681da177e4SLinus Torvalds
6691da177e4SLinus Torvaldshead-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
6701da177e4SLinus Torvalds
6711da177e4SLinus Torvaldslibs-y			+= arch/mips/lib/
6721da177e4SLinus Torvalds
6731da177e4SLinus Torvaldscore-y			+= arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/
6741da177e4SLinus Torvalds
6751da177e4SLinus Torvaldsdrivers-$(CONFIG_OPROFILE)	+= arch/mips/oprofile/
6761da177e4SLinus Torvalds
6771f21d2bdSBrian Murphyifdef CONFIG_LASAT
6781f21d2bdSBrian Murphyrom.bin rom.sw: vmlinux
6791f21d2bdSBrian Murphy	$(Q)$(MAKE) $(build)=arch/mips/lasat/image $@
6801f21d2bdSBrian Murphyendif
6811f21d2bdSBrian Murphy
6821da177e4SLinus Torvalds#
6831da177e4SLinus Torvalds# Some machines like the Indy need 32-bit ELF binaries for booting purposes.
6841da177e4SLinus Torvalds# Other need ECOFF, so we build a 32-bit ELF binary for them which we then
6851da177e4SLinus Torvalds# convert to ECOFF using elf2ecoff.
6861da177e4SLinus Torvalds#
6871da177e4SLinus Torvaldsvmlinux.32: vmlinux
6881da177e4SLinus Torvalds	$(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@
6891da177e4SLinus Torvalds
6901da177e4SLinus Torvalds#
6911da177e4SLinus Torvalds# The 64-bit ELF tools are pretty broken so at this time we generate 64-bit
6921da177e4SLinus Torvalds# ELF files from 32-bit files by conversion.
6931da177e4SLinus Torvalds#
6941da177e4SLinus Torvaldsvmlinux.64: vmlinux
6951da177e4SLinus Torvalds	$(OBJCOPY) -O $(64bit-bfd) $(OBJCOPYFLAGS) $< $@
6961da177e4SLinus Torvalds
6971da177e4SLinus Torvaldsmakeboot =$(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) $(1)
6981da177e4SLinus Torvalds
6998496b401SRalf Baechleall:	$(all-y)
7001da177e4SLinus Torvalds
701154b500bSRalf Baechlevmlinux.bin: $(vmlinux-32)
702154b500bSRalf Baechle	+@$(call makeboot,$@)
703154b500bSRalf Baechle
704b8828d3eSYoichi Yuasavmlinux.ecoff: $(vmlinux-32)
7051da177e4SLinus Torvalds	+@$(call makeboot,$@)
7061da177e4SLinus Torvalds
7071da177e4SLinus Torvaldsvmlinux.srec: $(vmlinux-32)
7081da177e4SLinus Torvalds	+@$(call makeboot,$@)
7091da177e4SLinus Torvalds
7101da177e4SLinus TorvaldsCLEAN_FILES += vmlinux.ecoff \
711b8828d3eSYoichi Yuasa	       vmlinux.srec
7121da177e4SLinus Torvalds
713e48ce6b8SAtsushi Nemotoarchprepare:
714e48ce6b8SAtsushi Nemotoifdef CONFIG_MIPS32_N32
715e48ce6b8SAtsushi Nemoto	@echo '  Checking missing-syscalls for N32'
716e48ce6b8SAtsushi Nemoto	$(Q)$(MAKE) $(build)=. missing-syscalls EXTRA_CFLAGS="-mabi=n32"
717e48ce6b8SAtsushi Nemotoendif
718e48ce6b8SAtsushi Nemotoifdef CONFIG_MIPS32_O32
719e48ce6b8SAtsushi Nemoto	@echo '  Checking missing-syscalls for O32'
720e48ce6b8SAtsushi Nemoto	$(Q)$(MAKE) $(build)=. missing-syscalls EXTRA_CFLAGS="-mabi=32"
721e48ce6b8SAtsushi Nemotoendif
722e48ce6b8SAtsushi Nemoto
7231da177e4SLinus Torvaldsarchclean:
7241da177e4SLinus Torvalds	@$(MAKE) $(clean)=arch/mips/boot
7251f21d2bdSBrian Murphy	@$(MAKE) $(clean)=arch/mips/lasat
7261da177e4SLinus Torvalds
727e7865765SRalf Baechledefine archhelp
728e7865765SRalf Baechle	echo '  vmlinux.ecoff        - ECOFF boot image'
729e7865765SRalf Baechle	echo '  vmlinux.bin          - Raw binary boot image'
730e7865765SRalf Baechle	echo '  vmlinux.srec         - SREC boot image'
731e7865765SRalf Baechle	echo
732e7865765SRalf Baechle	echo '  These will be default as apropriate for a configured platform.'
733e7865765SRalf Baechleendef
734e7865765SRalf Baechle
735048eb582SSam RavnborgCLEAN_FILES += vmlinux.32 \
7361da177e4SLinus Torvalds	       vmlinux.64 \
7371da177e4SLinus Torvalds	       vmlinux.ecoff
738