xref: /openbmc/linux/arch/mips/Makefile (revision 9aeb404b)
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
171da177e4SLinus Torvalds#
181da177e4SLinus Torvalds# Select the object file format to substitute into the linker script.
191da177e4SLinus Torvalds#
201da177e4SLinus Torvaldsifdef CONFIG_CPU_LITTLE_ENDIAN
2117f690beSRalf Baechle32bit-tool-archpref	= mipsel
2217f690beSRalf Baechle64bit-tool-archpref	= mips64el
231da177e4SLinus Torvalds32bit-bfd		= elf32-tradlittlemips
241da177e4SLinus Torvalds64bit-bfd		= elf64-tradlittlemips
251da177e4SLinus Torvalds32bit-emul		= elf32ltsmip
261da177e4SLinus Torvalds64bit-emul		= elf64ltsmip
271da177e4SLinus Torvaldselse
2817f690beSRalf Baechle32bit-tool-archpref	= mips
2917f690beSRalf Baechle64bit-tool-archpref	= mips64
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
3717f690beSRalf Baechletool-archpref		= $(32bit-tool-archpref)
381da177e4SLinus TorvaldsUTS_MACHINE		:= mips
391da177e4SLinus Torvaldsendif
40875d43e7SRalf Baechleifdef CONFIG_64BIT
4117f690beSRalf Baechletool-archpref		= $(64bit-tool-archpref)
421da177e4SLinus TorvaldsUTS_MACHINE		:= mips64
431da177e4SLinus Torvaldsendif
441da177e4SLinus Torvalds
4517f690beSRalf Baechleifneq ($(SUBARCH),$(ARCH))
4617f690beSRalf Baechle  ifeq ($(CROSS_COMPILE),)
473247989eSMaciej W. Rozycki    CROSS_COMPILE := $(call cc-cross-prefix, $(tool-archpref)-linux-  $(tool-archpref)-linux-gnu-  $(tool-archpref)-unknown-linux-gnu-)
4817f690beSRalf Baechle  endif
491da177e4SLinus Torvaldsendif
501da177e4SLinus Torvalds
51d2bb0762SWu Zhangjinifndef CONFIG_FUNCTION_TRACER
5205e41404SRalf Baechlecflags-y := -ffunction-sections
53d2bb0762SWu Zhangjinendif
547326c4e5SWu Zhangjinifdef CONFIG_FUNCTION_GRAPH_TRACER
557326c4e5SWu Zhangjin  ifndef KBUILD_MCOUNT_RA_ADDRESS
567326c4e5SWu Zhangjin    ifeq ($(call cc-option-yn,-mmcount-ra-address), y)
577326c4e5SWu Zhangjin      cflags-y += -mmcount-ra-address -DKBUILD_MCOUNT_RA_ADDRESS
587326c4e5SWu Zhangjin    endif
597326c4e5SWu Zhangjin  endif
607326c4e5SWu Zhangjinendif
611a4ba061SRalf Baechlecflags-y += $(call cc-option, -mno-check-zero-division)
6205e41404SRalf Baechle
638145095cSRalf Baechleifdef CONFIG_32BIT
641da177e4SLinus Torvaldsld-emul			= $(32bit-emul)
651da177e4SLinus Torvaldsvmlinux-32		= vmlinux
661da177e4SLinus Torvaldsvmlinux-64		= vmlinux.64
6759b3e8e9SRalf Baechle
6859b3e8e9SRalf Baechlecflags-y		+= -mabi=32
698145095cSRalf Baechleendif
701da177e4SLinus Torvalds
718145095cSRalf Baechleifdef CONFIG_64BIT
728145095cSRalf Baechleld-emul			= $(64bit-emul)
738145095cSRalf Baechlevmlinux-32		= vmlinux.32
748145095cSRalf Baechlevmlinux-64		= vmlinux
758145095cSRalf Baechle
7659b3e8e9SRalf Baechlecflags-y		+= -mabi=64
7759b3e8e9SRalf Baechleendif
7859b3e8e9SRalf Baechle
798496b401SRalf Baechleall-$(CONFIG_BOOT_ELF32)	:= $(vmlinux-32)
808496b401SRalf Baechleall-$(CONFIG_BOOT_ELF64)	:= $(vmlinux-64)
811b93b3c3SWu Zhangjinall-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlinuz
821da177e4SLinus Torvalds
831da177e4SLinus Torvalds#
841da177e4SLinus Torvalds# GCC uses -G 0 -mabicalls -fpic as default.  We don't want PIC in the kernel
851da177e4SLinus Torvalds# code since it only slows down the whole thing.  At some point we might make
861da177e4SLinus Torvalds# use of global pointer optimizations but their use of $28 conflicts with
871da177e4SLinus Torvalds# the current pointer optimization.
881da177e4SLinus Torvalds#
891da177e4SLinus Torvalds# The DECStation requires an ECOFF kernel for remote booting, other MIPS
901da177e4SLinus Torvalds# machines may also.  Since BFD is incredibly buggy with respect to
911da177e4SLinus Torvalds# crossformat linking we rely on the elf2ecoff tool for format conversion.
921da177e4SLinus Torvalds#
931da177e4SLinus Torvaldscflags-y			+= -G 0 -mno-abicalls -fno-pic -pipe
946218cf44SRalf Baechlecflags-y			+= -msoft-float
959f83d839SThiemo SeuferLDFLAGS_vmlinux			+= -G 0 -static -n -nostdlib
961da177e4SLinus TorvaldsMODFLAGS			+= -mlong-calls
971da177e4SLinus Torvalds
9872fbfb26SRalf Baechlecflags-y += -ffreestanding
9972fbfb26SRalf Baechle
100f425a6dcSThiemo Seufer#
101f425a6dcSThiemo Seufer# We explicitly add the endianness specifier if needed, this allows
102f425a6dcSThiemo Seufer# to compile kernels with a toolchain for the other endianness. We
103f425a6dcSThiemo Seufer# carefully avoid to add it redundantly because gcc 3.3/3.4 complains
104f425a6dcSThiemo Seufer# when fed the toolchain default!
105f425a6dcSThiemo Seufer#
106f9405412SRalf Baechle# Certain gcc versions upto gcc 4.1.1 (probably 4.2-subversion as of
10759c51591SMichael Opdenacker# 2006-10-10 don't properly change the predefined symbols if -EB / -EL
108f9405412SRalf Baechle# are used, so we kludge that here.  A bug has been filed at
109f9405412SRalf Baechle# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29413.
110f9405412SRalf Baechle#
111f9405412SRalf Baechleundef-all += -UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__
112f9405412SRalf Baechleundef-all += -UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__
113f9405412SRalf Baechlepredef-be += -DMIPSEB -D_MIPSEB -D__MIPSEB -D__MIPSEB__
114f9405412SRalf Baechlepredef-le += -DMIPSEL -D_MIPSEL -D__MIPSEL -D__MIPSEL__
115f9405412SRalf Baechlecflags-$(CONFIG_CPU_BIG_ENDIAN)		+= $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be))
116f9405412SRalf Baechlecflags-$(CONFIG_CPU_LITTLE_ENDIAN)	+= $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le))
117f425a6dcSThiemo Seufer
1189693a853SFranck Bui-Huucflags-$(CONFIG_CPU_HAS_SMARTMIPS)	+= $(call cc-option,-msmartmips)
1199693a853SFranck Bui-Huu
1209007c9a2SRalf Baechlecflags-$(CONFIG_SB1XXX_CORELIS)	+= $(call cc-option,-mno-sched-prolog) \
1219007c9a2SRalf Baechle				   -fno-omit-frame-pointer
1221da177e4SLinus Torvalds
1231da177e4SLinus Torvalds#
1241da177e4SLinus Torvalds# CPU-dependent compiler/assembler options for optimization.
1251da177e4SLinus Torvalds#
12659b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R3000)	+= -march=r3000
12759b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_TX39XX)	+= -march=r3900
12859b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R6000)	+= -march=r6000 -Wa,--trap
12959b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R4300)	+= -march=r4300 -Wa,--trap
13059b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_VR41XX)	+= -march=r4100 -Wa,--trap
13159b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R4X00)	+= -march=r4600 -Wa,--trap
13259b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_TX49XX)	+= -march=r4600 -Wa,--trap
1333702bba5SWu Zhangjin# only gcc >= 4.4 have the loongson-specific support
1343702bba5SWu Zhangjincflags-$(CONFIG_CPU_LOONGSON2)	+= -Wa,--trap
1353702bba5SWu Zhangjincflags-$(CONFIG_CPU_LOONGSON2E) += \
1363702bba5SWu Zhangjin	$(call cc-option,-march=loongson2e,-march=r4600)
1376f7a251aSWu Zhangjincflags-$(CONFIG_CPU_LOONGSON2F) += \
1386f7a251aSWu Zhangjin	$(call cc-option,-march=loongson2f,-march=r4600)
1398bbda428SWu Zhangjin# enable the workarounds for loongson2f
1408bbda428SWu Zhangjinifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS
1418bbda428SWu Zhangjin  ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-nop,),)
1428bbda428SWu Zhangjin    $(error only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop)
1438bbda428SWu Zhangjin  else
1448bbda428SWu Zhangjin    cflags-$(CONFIG_CPU_NOP_WORKAROUNDS) += -Wa$(comma)-mfix-loongson2f-nop
1458bbda428SWu Zhangjin  endif
1468bbda428SWu Zhangjin  ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-jump,),)
1478bbda428SWu Zhangjin    $(error only binutils >= 2.20.2 have needed option -mfix-loongson2f-jump)
1488bbda428SWu Zhangjin  else
1498bbda428SWu Zhangjin    cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-loongson2f-jump
1508bbda428SWu Zhangjin  endif
1518bbda428SWu Zhangjinendif
1523702bba5SWu Zhangjin
1539200c0b2SRalf Baechlecflags-$(CONFIG_CPU_MIPS32_R1)	+= $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
15459b3e8e9SRalf Baechle			-Wa,-mips32 -Wa,--trap
1559200c0b2SRalf Baechlecflags-$(CONFIG_CPU_MIPS32_R2)	+= $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
15659b3e8e9SRalf Baechle			-Wa,-mips32r2 -Wa,--trap
1579200c0b2SRalf Baechlecflags-$(CONFIG_CPU_MIPS64_R1)	+= $(call cc-option,-march=mips64,-mips64 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \
15859b3e8e9SRalf Baechle			-Wa,-mips64 -Wa,--trap
1599200c0b2SRalf Baechlecflags-$(CONFIG_CPU_MIPS64_R2)	+= $(call cc-option,-march=mips64r2,-mips64r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \
16059b3e8e9SRalf Baechle			-Wa,-mips64r2 -Wa,--trap
16159b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R5000)	+= -march=r5000 -Wa,--trap
162c9e321e0SRalf Baechlecflags-$(CONFIG_CPU_R5432)	+= $(call cc-option,-march=r5400,-march=r5000) \
1631da177e4SLinus Torvalds			-Wa,--trap
164542c1020SShinya Kuribayashicflags-$(CONFIG_CPU_R5500)	+= $(call cc-option,-march=r5500,-march=r5000) \
165542c1020SShinya Kuribayashi			-Wa,--trap
166c9e321e0SRalf Baechlecflags-$(CONFIG_CPU_NEVADA)	+= $(call cc-option,-march=rm5200,-march=r5000) \
1671da177e4SLinus Torvalds			-Wa,--trap
16859b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_RM7000)	+= $(call cc-option,-march=rm7000,-march=r5000) \
1691da177e4SLinus Torvalds			-Wa,--trap
17059b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_RM9000)	+= $(call cc-option,-march=rm9000,-march=r5000) \
1711da177e4SLinus Torvalds			-Wa,--trap
17259b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_SB1)	+= $(call cc-option,-march=sb1,-march=r5000) \
1731da177e4SLinus Torvalds			-Wa,--trap
17459b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R8000)	+= -march=r8000 -Wa,--trap
17559b3e8e9SRalf Baechlecflags-$(CONFIG_CPU_R10000)	+= $(call cc-option,-march=r10000,-march=r8000) \
1761da177e4SLinus Torvalds			-Wa,--trap
1777e69deb8SDavid Daneycflags-$(CONFIG_CPU_CAVIUM_OCTEON) += $(call cc-option,-march=octeon) -Wa,--trap
1787e69deb8SDavid Daneyifeq (,$(findstring march=octeon, $(cflags-$(CONFIG_CPU_CAVIUM_OCTEON))))
1797e69deb8SDavid Daneycflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -Wa,-march=octeon
1807e69deb8SDavid Daneyendif
1811da177e4SLinus Torvalds
18220d60d99SMaciej W. Rozyckicflags-$(CONFIG_CPU_R4000_WORKAROUNDS)	+= $(call cc-option,-mfix-r4000,)
18320d60d99SMaciej W. Rozyckicflags-$(CONFIG_CPU_R4400_WORKAROUNDS)	+= $(call cc-option,-mfix-r4400,)
18420d60d99SMaciej W. Rozyckicflags-$(CONFIG_CPU_DADDI_WORKAROUNDS)	+= $(call cc-option,-mno-daddi,)
18520d60d99SMaciej W. Rozycki
1861da177e4SLinus Torvaldsifdef CONFIG_CPU_SB1
1871da177e4SLinus Torvaldsifdef CONFIG_SB1_PASS_1_WORKAROUNDS
1881da177e4SLinus TorvaldsMODFLAGS	+= -msb1-pass1-workarounds
1891da177e4SLinus Torvaldsendif
1901da177e4SLinus Torvaldsendif
1911da177e4SLinus Torvalds
1921da177e4SLinus Torvalds#
1931da177e4SLinus Torvalds# Firmware support
1941da177e4SLinus Torvalds#
1952f56cfddSAurelien Jarnolibs-$(CONFIG_ARC)		+= arch/mips/fw/arc/
196df78b5c8SAurelien Jarnolibs-$(CONFIG_CFE)		+= arch/mips/fw/cfe/
197231a35d3SThomas Bogendoerferlibs-$(CONFIG_SNIPROM)		+= arch/mips/fw/sni/
198231a35d3SThomas Bogendoerferlibs-y				+= arch/mips/fw/lib/
1991da177e4SLinus Torvalds
2001da177e4SLinus Torvalds#
201ebc89718SRalf Baechle# Kernel compression
202ebc89718SRalf Baechle#
203ebc89718SRalf Baechleifdef SYS_SUPPORTS_ZBOOT
204ebc89718SRalf BaechleCOMPRESSION_FNAME		= vmlinuz
205ebc89718SRalf Baechleelse
206ebc89718SRalf BaechleCOMPRESSION_FNAME		= vmlinux
207ebc89718SRalf Baechleendif
208ebc89718SRalf Baechle
209ebc89718SRalf Baechle#
2101da177e4SLinus Torvalds# Board-dependent options and extra files
2111da177e4SLinus Torvalds#
2121da177e4SLinus Torvalds
2131da177e4SLinus Torvalds#
2147ca5dc14SFlorian Fainelli# Texas Instruments AR7
2157ca5dc14SFlorian Fainelli#
2167ca5dc14SFlorian Fainellicore-$(CONFIG_AR7)		+= arch/mips/ar7/
2177ca5dc14SFlorian Fainellicflags-$(CONFIG_AR7)		+= -I$(srctree)/arch/mips/include/asm/mach-ar7
2187ca5dc14SFlorian Fainelliload-$(CONFIG_AR7)		+= 0xffffffff94100000
2197ca5dc14SFlorian Fainelli
2207ca5dc14SFlorian Fainelli#
2211da177e4SLinus Torvalds# Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
2221da177e4SLinus Torvalds#
2231da177e4SLinus Torvaldscore-$(CONFIG_MACH_JAZZ)	+= arch/mips/jazz/
224384740dcSRalf Baechlecflags-$(CONFIG_MACH_JAZZ)	+= -I$(srctree)/arch/mips/include/asm/mach-jazz
2251da177e4SLinus Torvaldsload-$(CONFIG_MACH_JAZZ)	+= 0xffffffff80080000
2261da177e4SLinus Torvalds
2271da177e4SLinus Torvalds#
2281da177e4SLinus Torvalds# Common Alchemy Au1x00 stuff
2291da177e4SLinus Torvalds#
230e8c7c482SRalf Baechlecore-$(CONFIG_SOC_AU1X00)	+= arch/mips/alchemy/common/
2311da177e4SLinus Torvalds
2321da177e4SLinus Torvalds#
2331da177e4SLinus Torvalds# AMD Alchemy Pb1000 eval board
2341da177e4SLinus Torvalds#
23558e75e86SManuel Lausscore-$(CONFIG_MIPS_PB1000)	+= arch/mips/alchemy/devboards/
236384740dcSRalf Baechlecflags-$(CONFIG_MIPS_PB1000)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
2371da177e4SLinus Torvaldsload-$(CONFIG_MIPS_PB1000)	+= 0xffffffff80100000
2381da177e4SLinus Torvalds
2391da177e4SLinus Torvalds#
2401da177e4SLinus Torvalds# AMD Alchemy Pb1100 eval board
2411da177e4SLinus Torvalds#
24258e75e86SManuel Lausscore-$(CONFIG_MIPS_PB1100)	+= arch/mips/alchemy/devboards/
243384740dcSRalf Baechlecflags-$(CONFIG_MIPS_PB1100)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
2441da177e4SLinus Torvaldsload-$(CONFIG_MIPS_PB1100)	+= 0xffffffff80100000
2451da177e4SLinus Torvalds
2461da177e4SLinus Torvalds#
2471da177e4SLinus Torvalds# AMD Alchemy Pb1500 eval board
2481da177e4SLinus Torvalds#
24958e75e86SManuel Lausscore-$(CONFIG_MIPS_PB1500)	+= arch/mips/alchemy/devboards/
250384740dcSRalf Baechlecflags-$(CONFIG_MIPS_PB1500)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
2511da177e4SLinus Torvaldsload-$(CONFIG_MIPS_PB1500)	+= 0xffffffff80100000
2521da177e4SLinus Torvalds
2531da177e4SLinus Torvalds#
2541da177e4SLinus Torvalds# AMD Alchemy Pb1550 eval board
2551da177e4SLinus Torvalds#
25658e75e86SManuel Lausscore-$(CONFIG_MIPS_PB1550)	+= arch/mips/alchemy/devboards/
257384740dcSRalf Baechlecflags-$(CONFIG_MIPS_PB1550)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
2581da177e4SLinus Torvaldsload-$(CONFIG_MIPS_PB1550)	+= 0xffffffff80100000
2591da177e4SLinus Torvalds
2601da177e4SLinus Torvalds#
261e3ad1c23SPete Popov# AMD Alchemy Pb1200 eval board
262e3ad1c23SPete Popov#
26358e75e86SManuel Lausscore-$(CONFIG_MIPS_PB1200)	+= arch/mips/alchemy/devboards/
264384740dcSRalf Baechlecflags-$(CONFIG_MIPS_PB1200)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
265e3ad1c23SPete Popovload-$(CONFIG_MIPS_PB1200)	+= 0xffffffff80100000
266e3ad1c23SPete Popov
267e3ad1c23SPete Popov#
2681da177e4SLinus Torvalds# AMD Alchemy Db1000 eval board
2691da177e4SLinus Torvalds#
27058e75e86SManuel Lausscore-$(CONFIG_MIPS_DB1000)	+= arch/mips/alchemy/devboards/
271384740dcSRalf Baechlecflags-$(CONFIG_MIPS_DB1000)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
2721da177e4SLinus Torvaldsload-$(CONFIG_MIPS_DB1000)	+= 0xffffffff80100000
2731da177e4SLinus Torvalds
2741da177e4SLinus Torvalds#
2751da177e4SLinus Torvalds# AMD Alchemy Db1100 eval board
2761da177e4SLinus Torvalds#
27758e75e86SManuel Lausscore-$(CONFIG_MIPS_DB1100)	+= arch/mips/alchemy/devboards/
278384740dcSRalf Baechlecflags-$(CONFIG_MIPS_DB1100)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
2791da177e4SLinus Torvaldsload-$(CONFIG_MIPS_DB1100)	+= 0xffffffff80100000
2801da177e4SLinus Torvalds
2811da177e4SLinus Torvalds#
2821da177e4SLinus Torvalds# AMD Alchemy Db1500 eval board
2831da177e4SLinus Torvalds#
28458e75e86SManuel Lausscore-$(CONFIG_MIPS_DB1500)	+= arch/mips/alchemy/devboards/
285384740dcSRalf Baechlecflags-$(CONFIG_MIPS_DB1500)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
2861da177e4SLinus Torvaldsload-$(CONFIG_MIPS_DB1500)	+= 0xffffffff80100000
2871da177e4SLinus Torvalds
2881da177e4SLinus Torvalds#
2891da177e4SLinus Torvalds# AMD Alchemy Db1550 eval board
2901da177e4SLinus Torvalds#
29158e75e86SManuel Lausscore-$(CONFIG_MIPS_DB1550)	+= arch/mips/alchemy/devboards/
292384740dcSRalf Baechlecflags-$(CONFIG_MIPS_DB1550)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
2931da177e4SLinus Torvaldsload-$(CONFIG_MIPS_DB1550)	+= 0xffffffff80100000
2941da177e4SLinus Torvalds
2951da177e4SLinus Torvalds#
296e3ad1c23SPete Popov# AMD Alchemy Db1200 eval board
297e3ad1c23SPete Popov#
29858e75e86SManuel Lausscore-$(CONFIG_MIPS_DB1200)	+= arch/mips/alchemy/devboards/
299384740dcSRalf Baechlecflags-$(CONFIG_MIPS_DB1200)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
300e3ad1c23SPete Popovload-$(CONFIG_MIPS_DB1200)	+= 0xffffffff80100000
301e3ad1c23SPete Popov
302e3ad1c23SPete Popov#
3031da177e4SLinus Torvalds# AMD Alchemy Bosporus eval board
3041da177e4SLinus Torvalds#
30558e75e86SManuel Lausscore-$(CONFIG_MIPS_BOSPORUS)	+= arch/mips/alchemy/devboards/
306384740dcSRalf Baechlecflags-$(CONFIG_MIPS_BOSPORUS)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
3071da177e4SLinus Torvaldsload-$(CONFIG_MIPS_BOSPORUS)	+= 0xffffffff80100000
3081da177e4SLinus Torvalds
3091da177e4SLinus Torvalds#
3101da177e4SLinus Torvalds# AMD Alchemy Mirage eval board
3111da177e4SLinus Torvalds#
31258e75e86SManuel Lausscore-$(CONFIG_MIPS_MIRAGE)	+= arch/mips/alchemy/devboards/
313384740dcSRalf Baechlecflags-$(CONFIG_MIPS_MIRAGE)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
3141da177e4SLinus Torvaldsload-$(CONFIG_MIPS_MIRAGE)	+= 0xffffffff80100000
3151da177e4SLinus Torvalds
3161da177e4SLinus Torvalds#
3171da177e4SLinus Torvalds# 4G-Systems eval board
3181da177e4SLinus Torvalds#
319e8c7c482SRalf Baechlelibs-$(CONFIG_MIPS_MTX1)	+= arch/mips/alchemy/mtx-1/
3201da177e4SLinus Torvaldsload-$(CONFIG_MIPS_MTX1)	+= 0xffffffff80100000
3211da177e4SLinus Torvalds
3221da177e4SLinus Torvalds#
3231da177e4SLinus Torvalds# MyCable eval board
3241da177e4SLinus Torvalds#
325e8c7c482SRalf Baechlelibs-$(CONFIG_MIPS_XXS1500)	+= arch/mips/alchemy/xxs1500/
3261da177e4SLinus Torvaldsload-$(CONFIG_MIPS_XXS1500)	+= 0xffffffff80100000
3271da177e4SLinus Torvalds
32851e02b02SManuel Lauss# must be last for Alchemy systems for GPIO to work properly
32951e02b02SManuel Lausscflags-$(CONFIG_SOC_AU1X00)	+= -I$(srctree)/arch/mips/include/asm/mach-au1x00
33051e02b02SManuel Lauss
33151e02b02SManuel Lauss
3321da177e4SLinus Torvalds#
3331da177e4SLinus Torvalds# Cobalt Server
3341da177e4SLinus Torvalds#
3351da177e4SLinus Torvaldscore-$(CONFIG_MIPS_COBALT)	+= arch/mips/cobalt/
336384740dcSRalf Baechlecflags-$(CONFIG_MIPS_COBALT)	+= -I$(srctree)/arch/mips/include/asm/mach-cobalt
3371da177e4SLinus Torvaldsload-$(CONFIG_MIPS_COBALT)	+= 0xffffffff80080000
3381da177e4SLinus Torvalds
3391da177e4SLinus Torvalds#
3401da177e4SLinus Torvalds# DECstation family
3411da177e4SLinus Torvalds#
3421da177e4SLinus Torvaldscore-$(CONFIG_MACH_DECSTATION)	+= arch/mips/dec/
343384740dcSRalf Baechlecflags-$(CONFIG_MACH_DECSTATION)+= -I$(srctree)/arch/mips/include/asm/mach-dec
3441da177e4SLinus Torvaldslibs-$(CONFIG_MACH_DECSTATION)	+= arch/mips/dec/prom/
3451da177e4SLinus Torvaldsload-$(CONFIG_MACH_DECSTATION)	+= 0xffffffff80040000
3461da177e4SLinus Torvalds
3471da177e4SLinus Torvalds#
348a240a469SMark.Zhan# Wind River PPMC Board (4KC + GT64120)
349a240a469SMark.Zhan#
350a240a469SMark.Zhancore-$(CONFIG_WR_PPMC)		+= arch/mips/gt64120/wrppmc/
351384740dcSRalf Baechlecflags-$(CONFIG_WR_PPMC)		+= -I$(srctree)/arch/mips/include/asm/mach-wrppmc
352a240a469SMark.Zhanload-$(CONFIG_WR_PPMC)		+= 0xffffffff80100000
353a240a469SMark.Zhan
354a240a469SMark.Zhan#
35585749d24SWu Zhangjin# Loongson family
35642d226c7SSongmao Tian#
35785749d24SWu Zhangjincore-$(CONFIG_MACH_LOONGSON) += arch/mips/loongson/
35885749d24SWu Zhangjincflags-$(CONFIG_MACH_LOONGSON) += -I$(srctree)/arch/mips/include/asm/mach-loongson \
35985749d24SWu Zhangjin                    -mno-branch-likely
3608e497117SWu Zhangjinload-$(CONFIG_LEMOTE_FULOONG2E) += 0xffffffff80100000
3617d32c6ddSWu Zhangjinload-$(CONFIG_LEMOTE_MACH2F) += 0xffffffff80200000
36242d226c7SSongmao Tian
36342d226c7SSongmao Tian#
3641da177e4SLinus Torvalds# MIPS Malta board
3651da177e4SLinus Torvalds#
366315806cbSRalf Baechlecore-$(CONFIG_MIPS_MALTA)	+= arch/mips/mti-malta/
367384740dcSRalf Baechlecflags-$(CONFIG_MIPS_MALTA)	+= -I$(srctree)/arch/mips/include/asm/mach-malta
3681da177e4SLinus Torvaldsload-$(CONFIG_MIPS_MALTA)	+= 0xffffffff80100000
369ebc89718SRalf Baechleall-$(CONFIG_MIPS_MALTA)	:= $(COMPRESSION_FNAME).bin
3701da177e4SLinus Torvalds
3711da177e4SLinus Torvalds#
372c78cbf49SRalf Baechle# MIPS SIM
373c78cbf49SRalf Baechle#
374f6e2373aSRalf Baechlecore-$(CONFIG_MIPS_SIM)		+= arch/mips/mipssim/
375384740dcSRalf Baechlecflags-$(CONFIG_MIPS_SIM)	+= -I$(srctree)/arch/mips/include/asm/mach-mipssim
376c78cbf49SRalf Baechleload-$(CONFIG_MIPS_SIM)		+= 0x80100000
377c78cbf49SRalf Baechle
378c78cbf49SRalf Baechle#
3799267a30dSMarc St-Jean# PMC-Sierra MSP SOCs
3809267a30dSMarc St-Jean#
3819267a30dSMarc St-Jeancore-$(CONFIG_PMC_MSP)		+= arch/mips/pmc-sierra/msp71xx/
382384740dcSRalf Baechlecflags-$(CONFIG_PMC_MSP)	+= -I$(srctree)/arch/mips/include/asm/pmc-sierra/msp71xx \
3839267a30dSMarc St-Jean					-mno-branch-likely
3849267a30dSMarc St-Jeanload-$(CONFIG_PMC_MSP)		+= 0xffffffff80100000
3859267a30dSMarc St-Jean
3869267a30dSMarc St-Jean#
3871da177e4SLinus Torvalds# PMC-Sierra Yosemite
3881da177e4SLinus Torvalds#
3891da177e4SLinus Torvaldscore-$(CONFIG_PMC_YOSEMITE)	+= arch/mips/pmc-sierra/yosemite/
390384740dcSRalf Baechlecflags-$(CONFIG_PMC_YOSEMITE)	+= -I$(srctree)/arch/mips/include/asm/mach-yosemite
3911da177e4SLinus Torvaldsload-$(CONFIG_PMC_YOSEMITE)	+= 0xffffffff80100000
3921da177e4SLinus Torvalds
39314cd8015SRalf Baechle#
3941f21d2bdSBrian Murphy# LASAT platforms
3951f21d2bdSBrian Murphy#
3961f21d2bdSBrian Murphycore-$(CONFIG_LASAT)		+= arch/mips/lasat/
397384740dcSRalf Baechlecflags-$(CONFIG_LASAT)		+= -I$(srctree)/arch/mips/include/asm/mach-lasat
3981f21d2bdSBrian Murphyload-$(CONFIG_LASAT)		+= 0xffffffff80000000
3991f21d2bdSBrian Murphy
4001f21d2bdSBrian Murphy#
4011da177e4SLinus Torvalds# Common VR41xx
4021da177e4SLinus Torvalds#
4031da177e4SLinus Torvaldscore-$(CONFIG_MACH_VR41XX)	+= arch/mips/vr41xx/common/
404384740dcSRalf Baechlecflags-$(CONFIG_MACH_VR41XX)	+= -I$(srctree)/arch/mips/include/asm/mach-vr41xx
4051da177e4SLinus Torvalds
4061da177e4SLinus Torvalds#
4071da177e4SLinus Torvalds# ZAO Networks Capcella (VR4131)
4081da177e4SLinus Torvalds#
4091da177e4SLinus Torvaldsload-$(CONFIG_ZAO_CAPCELLA)	+= 0xffffffff80000000
4101da177e4SLinus Torvalds
4111da177e4SLinus Torvalds#
4121da177e4SLinus Torvalds# Victor MP-C303/304 (VR4122)
4131da177e4SLinus Torvalds#
4141da177e4SLinus Torvaldsload-$(CONFIG_VICTOR_MPC30X)	+= 0xffffffff80001000
4151da177e4SLinus Torvalds
4161da177e4SLinus Torvalds#
4171da177e4SLinus Torvalds# IBM WorkPad z50 (VR4121)
4181da177e4SLinus Torvalds#
4191da177e4SLinus Torvaldscore-$(CONFIG_IBM_WORKPAD)	+= arch/mips/vr41xx/ibm-workpad/
4201da177e4SLinus Torvaldsload-$(CONFIG_IBM_WORKPAD)	+= 0xffffffff80004000
4211da177e4SLinus Torvalds
4221da177e4SLinus Torvalds#
4231da177e4SLinus Torvalds# CASIO CASSIPEIA E-55/65 (VR4111)
4241da177e4SLinus Torvalds#
4251da177e4SLinus Torvaldscore-$(CONFIG_CASIO_E55)	+= arch/mips/vr41xx/casio-e55/
4261da177e4SLinus Torvaldsload-$(CONFIG_CASIO_E55)	+= 0xffffffff80004000
4271da177e4SLinus Torvalds
4281da177e4SLinus Torvalds#
42963b799f9SYoichi Yuasa# TANBAC VR4131 multichip module(TB0225) and TANBAC VR4131DIMM(TB0229) (VR4131)
4301da177e4SLinus Torvalds#
43163b799f9SYoichi Yuasaload-$(CONFIG_TANBAC_TB022X)	+= 0xffffffff80000000
4321da177e4SLinus Torvalds
433edb6310aSDaniel Laird# NXP STB225
434edb6310aSDaniel Lairdcore-$(CONFIG_SOC_PNX833X)		+= arch/mips/nxp/pnx833x/common/
435edb6310aSDaniel Lairdcflags-$(CONFIG_SOC_PNX833X)	+= -Iarch/mips/include/asm/mach-pnx833x
436edb6310aSDaniel Lairdlibs-$(CONFIG_NXP_STB220)		+= arch/mips/nxp/pnx833x/stb22x/
437edb6310aSDaniel Lairdload-$(CONFIG_NXP_STB220)		+= 0xffffffff80001000
438edb6310aSDaniel Lairdlibs-$(CONFIG_NXP_STB225)		+= arch/mips/nxp/pnx833x/stb22x/
439edb6310aSDaniel Lairdload-$(CONFIG_NXP_STB225)		+= 0xffffffff80001000
440edb6310aSDaniel Laird
4411da177e4SLinus Torvalds#
442a92b0588SDaniel Laird# Common NXP PNX8550
443bdf21b18SPete Popov#
444a92b0588SDaniel Lairdcore-$(CONFIG_SOC_PNX8550)	+= arch/mips/nxp/pnx8550/common/
445384740dcSRalf Baechlecflags-$(CONFIG_SOC_PNX8550)	+= -I$(srctree)/arch/mips/include/asm/mach-pnx8550
446bdf21b18SPete Popov
447bdf21b18SPete Popov#
448a92b0588SDaniel Laird# NXP PNX8550 JBS board
449bdf21b18SPete Popov#
450a92b0588SDaniel Lairdlibs-$(CONFIG_PNX8550_JBS)	+= arch/mips/nxp/pnx8550/jbs/
451384740dcSRalf Baechle#cflags-$(CONFIG_PNX8550_JBS)	+= -I$(srctree)/arch/mips/include/asm/mach-pnx8550
452bdf21b18SPete Popovload-$(CONFIG_PNX8550_JBS)	+= 0xffffffff80060000
453bdf21b18SPete Popov
454a92b0588SDaniel Laird# NXP PNX8550 STB810 board
455f0647a52SVitaly Wool#
456a92b0588SDaniel Lairdlibs-$(CONFIG_PNX8550_STB810)	+= arch/mips/nxp/pnx8550/stb810/
457f0647a52SVitaly Woolload-$(CONFIG_PNX8550_STB810)	+= 0xffffffff80060000
458f0647a52SVitaly Wool
459cd741b60SShinya Kuribayashi#
460f27655e3SShinya Kuribayashi# Common NEC EMMAXXX
461355c471fSdmitry pervushin#
462a83860c2SRalf Baechlecore-$(CONFIG_SOC_EMMA2RH)	+= arch/mips/emma/common/
463cd741b60SShinya Kuribayashicflags-$(CONFIG_SOC_EMMA2RH)	+= -I$(srctree)/arch/mips/include/asm/mach-emma2rh
464355c471fSdmitry pervushin
465cd741b60SShinya Kuribayashi#
466355c471fSdmitry pervushin# NEC EMMA2RH Mark-eins
467cd741b60SShinya Kuribayashi#
468f27655e3SShinya Kuribayashicore-$(CONFIG_NEC_MARKEINS)	+= arch/mips/emma/markeins/
469cd741b60SShinya Kuribayashiload-$(CONFIG_NEC_MARKEINS)	+= 0xffffffff88100000
470355c471fSdmitry pervushin
471bdf21b18SPete Popov#
472a3a0f8c8SDavid VomLehn# Cisco PowerTV Platform
473a3a0f8c8SDavid VomLehn#
474a3a0f8c8SDavid VomLehncore-$(CONFIG_POWERTV)		+= arch/mips/powertv/
475a3a0f8c8SDavid VomLehncflags-$(CONFIG_POWERTV)        += -I$(srctree)/arch/mips/include/asm/mach-powertv
476a3a0f8c8SDavid VomLehnload-$(CONFIG_POWERTV)		+= 0xffffffff90800000
477a3a0f8c8SDavid VomLehn
478a3a0f8c8SDavid VomLehn#
4791da177e4SLinus Torvalds# SGI IP22 (Indy/Indigo2)
4801da177e4SLinus Torvalds#
4811da177e4SLinus Torvalds# Set the load address to >= 0xffffffff88069000 if you want to leave space for
4821da177e4SLinus Torvalds# symmon, 0xffffffff80002000 for production kernels.  Note that the value must
4831da177e4SLinus Torvalds# be aligned to a multiple of the kernel stack size or the handling of the
4841da177e4SLinus Torvalds# current variable will break so for 64-bit kernels we have to raise the start
4851da177e4SLinus Torvalds# address by 8kb.
4861da177e4SLinus Torvalds#
4871da177e4SLinus Torvaldscore-$(CONFIG_SGI_IP22)		+= arch/mips/sgi-ip22/
488384740dcSRalf Baechlecflags-$(CONFIG_SGI_IP22)	+= -I$(srctree)/arch/mips/include/asm/mach-ip22
489875d43e7SRalf Baechleifdef CONFIG_32BIT
4901da177e4SLinus Torvaldsload-$(CONFIG_SGI_IP22)		+= 0xffffffff88002000
4911da177e4SLinus Torvaldsendif
492875d43e7SRalf Baechleifdef CONFIG_64BIT
4931da177e4SLinus Torvaldsload-$(CONFIG_SGI_IP22)		+= 0xffffffff88004000
4941da177e4SLinus Torvaldsendif
4951da177e4SLinus Torvalds
4961da177e4SLinus Torvalds#
4971da177e4SLinus Torvalds# SGI-IP27 (Origin200/2000)
4981da177e4SLinus Torvalds#
4991da177e4SLinus Torvalds# Set the load address to >= 0xc000000000300000 if you want to leave space for
5001da177e4SLinus Torvalds# symmon, 0xc00000000001c000 for production kernels.  Note that the value must
5011da177e4SLinus Torvalds# be 16kb aligned or the handling of the current variable will break.
5021da177e4SLinus Torvalds#
5031da177e4SLinus Torvaldsifdef CONFIG_SGI_IP27
5041da177e4SLinus Torvaldscore-$(CONFIG_SGI_IP27)		+= arch/mips/sgi-ip27/
505384740dcSRalf Baechlecflags-$(CONFIG_SGI_IP27)	+= -I$(srctree)/arch/mips/include/asm/mach-ip27
5061da177e4SLinus Torvaldsifdef CONFIG_MAPPED_KERNEL
5071da177e4SLinus Torvaldsload-$(CONFIG_SGI_IP27)		+= 0xc00000004001c000
5081da177e4SLinus TorvaldsOBJCOPYFLAGS			:= --change-addresses=0x3fffffff80000000
5091da177e4SLinus Torvaldsdataoffset-$(CONFIG_SGI_IP27)	+= 0x01000000
5101da177e4SLinus Torvaldselse
5111da177e4SLinus Torvaldsload-$(CONFIG_SGI_IP27)		+= 0xa80000000001c000
5121da177e4SLinus TorvaldsOBJCOPYFLAGS			:= --change-addresses=0x57ffffff80000000
5131da177e4SLinus Torvaldsendif
5141da177e4SLinus Torvaldsendif
5151da177e4SLinus Torvalds
5161da177e4SLinus Torvalds#
517e2defae5SThomas Bogendoerfer# SGI IP28 (Indigo2 R10k)
518e2defae5SThomas Bogendoerfer#
519e2defae5SThomas Bogendoerfer# Set the load address to >= 0xa800000020080000 if you want to leave space for
520e2defae5SThomas Bogendoerfer# symmon, 0xa800000020004000 for production kernels ?  Note that the value must
521e2defae5SThomas Bogendoerfer# be 16kb aligned or the handling of the current variable will break.
522e2defae5SThomas Bogendoerfer# Simplified: what IP22 does at 128MB+ in ksegN, IP28 does at 512MB+ in xkphys
523e2defae5SThomas Bogendoerfer#
52482933342SThomas Bogendoerferifdef CONFIG_SGI_IP28
525195d1a96Speter fuerst  ifeq ($(call cc-option-yn,-mr10k-cache-barrier=store), n)
526195d1a96Speter fuerst      $(error gcc doesn't support needed option -mr10k-cache-barrier=store)
52782933342SThomas Bogendoerfer  endif
52882933342SThomas Bogendoerferendif
529e2defae5SThomas Bogendoerfercore-$(CONFIG_SGI_IP28)		+= arch/mips/sgi-ip22/
530195d1a96Speter fuerstcflags-$(CONFIG_SGI_IP28)	+= -mr10k-cache-barrier=store -I$(srctree)/arch/mips/include/asm/mach-ip28
531e2defae5SThomas Bogendoerferload-$(CONFIG_SGI_IP28)		+= 0xa800000020004000
532e2defae5SThomas Bogendoerfer
533e2defae5SThomas Bogendoerfer#
5341da177e4SLinus Torvalds# SGI-IP32 (O2)
5351da177e4SLinus Torvalds#
5361da177e4SLinus Torvalds# Set the load address to >= 80069000 if you want to leave space for symmon,
5371da177e4SLinus Torvalds# 0xffffffff80004000 for production kernels.  Note that the value must be aligned to
5381da177e4SLinus Torvalds# a multiple of the kernel stack size or the handling of the current variable
5391da177e4SLinus Torvalds# will break.
5401da177e4SLinus Torvalds#
5411da177e4SLinus Torvaldscore-$(CONFIG_SGI_IP32)		+= arch/mips/sgi-ip32/
542384740dcSRalf Baechlecflags-$(CONFIG_SGI_IP32)	+= -I$(srctree)/arch/mips/include/asm/mach-ip32
5431da177e4SLinus Torvaldsload-$(CONFIG_SGI_IP32)		+= 0xffffffff80004000
5441da177e4SLinus Torvalds
5451da177e4SLinus Torvalds#
546d619f38fSMark Mason# Sibyte SB1250/BCM1480 SOC
5471da177e4SLinus Torvalds#
5481da177e4SLinus Torvalds# This is a LIB so that it links at the end, and initcalls are later
5491da177e4SLinus Torvalds# the sequence; but it is built as an object so that modules don't get
5501da177e4SLinus Torvalds# removed (as happens, even if they have __initcall/module_init)
5511da177e4SLinus Torvalds#
5521da177e4SLinus Torvaldscore-$(CONFIG_SIBYTE_BCM112X)	+= arch/mips/sibyte/sb1250/
553d619f38fSMark Masoncore-$(CONFIG_SIBYTE_BCM112X)	+= arch/mips/sibyte/common/
554384740dcSRalf Baechlecflags-$(CONFIG_SIBYTE_BCM112X)	+= -I$(srctree)/arch/mips/include/asm/mach-sibyte \
555f137e463SAndrew Isaacson			-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
5561da177e4SLinus Torvalds
5571da177e4SLinus Torvaldscore-$(CONFIG_SIBYTE_SB1250)	+= arch/mips/sibyte/sb1250/
558d619f38fSMark Masoncore-$(CONFIG_SIBYTE_SB1250)	+= arch/mips/sibyte/common/
559384740dcSRalf Baechlecflags-$(CONFIG_SIBYTE_SB1250)	+= -I$(srctree)/arch/mips/include/asm/mach-sibyte \
560f137e463SAndrew Isaacson			-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
561f137e463SAndrew Isaacson
562f137e463SAndrew Isaacsoncore-$(CONFIG_SIBYTE_BCM1x55)	+= arch/mips/sibyte/bcm1480/
563d619f38fSMark Masoncore-$(CONFIG_SIBYTE_BCM1x55)	+= arch/mips/sibyte/common/
564384740dcSRalf Baechlecflags-$(CONFIG_SIBYTE_BCM1x55)	+= -I$(srctree)/arch/mips/include/asm/mach-sibyte \
565f137e463SAndrew Isaacson			-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
566f137e463SAndrew Isaacson
567f137e463SAndrew Isaacsoncore-$(CONFIG_SIBYTE_BCM1x80)	+= arch/mips/sibyte/bcm1480/
568d619f38fSMark Masoncore-$(CONFIG_SIBYTE_BCM1x80)	+= arch/mips/sibyte/common/
569384740dcSRalf Baechlecflags-$(CONFIG_SIBYTE_BCM1x80)	+= -I$(srctree)/arch/mips/include/asm/mach-sibyte \
570f137e463SAndrew Isaacson			-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
5711da177e4SLinus Torvalds
5721da177e4SLinus Torvalds#
5731da177e4SLinus Torvalds# Sibyte BCM91120x (Carmel) board
5741da177e4SLinus Torvalds# Sibyte BCM91120C (CRhine) board
5751da177e4SLinus Torvalds# Sibyte BCM91125C (CRhone) board
5761da177e4SLinus Torvalds# Sibyte BCM91125E (Rhone) board
5771da177e4SLinus Torvalds# Sibyte SWARM board
5789a6dcea1SAndrew Isaacson# Sibyte BCM91x80 (BigSur) board
5791da177e4SLinus Torvalds#
58063a4881aSMaciej W. Rozyckicore-$(CONFIG_SIBYTE_CARMEL)	+= arch/mips/sibyte/swarm/
5811da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_CARMEL)	:= 0xffffffff80100000
58263a4881aSMaciej W. Rozyckicore-$(CONFIG_SIBYTE_CRHINE)	+= arch/mips/sibyte/swarm/
5831da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_CRHINE)	:= 0xffffffff80100000
58463a4881aSMaciej W. Rozyckicore-$(CONFIG_SIBYTE_CRHONE)	+= arch/mips/sibyte/swarm/
5851da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_CRHONE)	:= 0xffffffff80100000
58663a4881aSMaciej W. Rozyckicore-$(CONFIG_SIBYTE_RHONE)	+= arch/mips/sibyte/swarm/
5871da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_RHONE)	:= 0xffffffff80100000
58863a4881aSMaciej W. Rozyckicore-$(CONFIG_SIBYTE_SENTOSA)	+= arch/mips/sibyte/swarm/
5891da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_SENTOSA)	:= 0xffffffff80100000
59063a4881aSMaciej W. Rozyckicore-$(CONFIG_SIBYTE_SWARM)	+= arch/mips/sibyte/swarm/
5911da177e4SLinus Torvaldsload-$(CONFIG_SIBYTE_SWARM)	:= 0xffffffff80100000
59263a4881aSMaciej W. Rozyckicore-$(CONFIG_SIBYTE_BIGSUR)	+= arch/mips/sibyte/swarm/
5939a6dcea1SAndrew Isaacsonload-$(CONFIG_SIBYTE_BIGSUR)	:= 0xffffffff80100000
5941da177e4SLinus Torvalds
5951da177e4SLinus Torvalds#
5961c0c13ebSAurelien Jarno# Broadcom BCM47XX boards
5971c0c13ebSAurelien Jarno#
5981c0c13ebSAurelien Jarnocore-$(CONFIG_BCM47XX)		+= arch/mips/bcm47xx/
599384740dcSRalf Baechlecflags-$(CONFIG_BCM47XX)	+= -I$(srctree)/arch/mips/include/asm/mach-bcm47xx
6001c0c13ebSAurelien Jarnoload-$(CONFIG_BCM47XX)		:= 0xffffffff80001000
6011c0c13ebSAurelien Jarno
6021c0c13ebSAurelien Jarno#
603e7300d04SMaxime Bizon# Broadcom BCM63XX boards
604e7300d04SMaxime Bizon#
605e7300d04SMaxime Bizoncore-$(CONFIG_BCM63XX)		+= arch/mips/bcm63xx/
606e7300d04SMaxime Bizoncflags-$(CONFIG_BCM63XX)	+= -I$(srctree)/arch/mips/include/asm/mach-bcm63xx/
607e7300d04SMaxime Bizonload-$(CONFIG_BCM63XX)		:= 0xffffffff80010000
608e7300d04SMaxime Bizon
609e7300d04SMaxime Bizon#
61014b36af4SThomas Bogendoerfer# SNI RM
6111da177e4SLinus Torvalds#
61214b36af4SThomas Bogendoerfercore-$(CONFIG_SNI_RM)		+= arch/mips/sni/
613384740dcSRalf Baechlecflags-$(CONFIG_SNI_RM)		+= -I$(srctree)/arch/mips/include/asm/mach-rm
6140e27d793SThomas Bogendoerferifdef CONFIG_CPU_LITTLE_ENDIAN
61514b36af4SThomas Bogendoerferload-$(CONFIG_SNI_RM)		+= 0xffffffff80600000
6160e27d793SThomas Bogendoerferelse
6170e27d793SThomas Bogendoerferload-$(CONFIG_SNI_RM)		+= 0xffffffff80030000
6180e27d793SThomas Bogendoerferendif
619ebc89718SRalf Baechleall-$(CONFIG_SNI_RM)		:= $(COMPRESSION_FNAME).ecoff
6201da177e4SLinus Torvalds
6211da177e4SLinus Torvalds#
622edcaf1a6SAtsushi Nemoto# Common TXx9
623edcaf1a6SAtsushi Nemoto#
624edcaf1a6SAtsushi Nemotocore-$(CONFIG_MACH_TX39XX)	+= arch/mips/txx9/generic/
625384740dcSRalf Baechlecflags-$(CONFIG_MACH_TX39XX) += -I$(srctree)/arch/mips/include/asm/mach-tx39xx
626edcaf1a6SAtsushi Nemotoload-$(CONFIG_MACH_TX39XX)	+= 0xffffffff80050000
627edcaf1a6SAtsushi Nemotocore-$(CONFIG_MACH_TX49XX)	+= arch/mips/txx9/generic/
628384740dcSRalf Baechlecflags-$(CONFIG_MACH_TX49XX) += -I$(srctree)/arch/mips/include/asm/mach-tx49xx
629edcaf1a6SAtsushi Nemotoload-$(CONFIG_MACH_TX49XX)	+= 0xffffffff80100000
630edcaf1a6SAtsushi Nemoto
631edcaf1a6SAtsushi Nemoto#
6321da177e4SLinus Torvalds# Toshiba JMR-TX3927 board
6331da177e4SLinus Torvalds#
634edcaf1a6SAtsushi Nemotocore-$(CONFIG_TOSHIBA_JMR3927)	+= arch/mips/txx9/jmr3927/
6351da177e4SLinus Torvalds
6361da177e4SLinus Torvalds#
63773b4390fSRalf Baechle# Routerboard 532 board
63873b4390fSRalf Baechle#
63973b4390fSRalf Baechlecore-$(CONFIG_MIKROTIK_RB532)	+= arch/mips/rb532/
640384740dcSRalf Baechlecflags-$(CONFIG_MIKROTIK_RB532) += -I$(srctree)/arch/mips/include/asm/mach-rc32434
64173b4390fSRalf Baechleload-$(CONFIG_MIKROTIK_RB532)	+= 0xffffffff80101000
64273b4390fSRalf Baechle
64373b4390fSRalf Baechle#
644b27311e1SAtsushi Nemoto# Toshiba RBTX49XX boards
6451da177e4SLinus Torvalds#
64622b1d707SAtsushi Nemotocore-$(CONFIG_TOSHIBA_RBTX4927)	+= arch/mips/txx9/rbtx4927/
64722b1d707SAtsushi Nemotocore-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/txx9/rbtx4938/
648b27311e1SAtsushi Nemotocore-$(CONFIG_TOSHIBA_RBTX4939) += arch/mips/txx9/rbtx4939/
64923fbee9dSRalf Baechle
6507e69deb8SDavid Daney#
6517e69deb8SDavid Daney# Cavium Octeon
6527e69deb8SDavid Daney#
6537e69deb8SDavid Daneycore-$(CONFIG_CPU_CAVIUM_OCTEON)	+= arch/mips/cavium-octeon/
6547e69deb8SDavid Daneycflags-$(CONFIG_CPU_CAVIUM_OCTEON)	+= -I$(srctree)/arch/mips/include/asm/mach-cavium-octeon
6557e69deb8SDavid Daneycore-$(CONFIG_CPU_CAVIUM_OCTEON)	+= arch/mips/cavium-octeon/executive/
6567e69deb8SDavid Daneyifdef CONFIG_CAVIUM_OCTEON_2ND_KERNEL
6577e69deb8SDavid Daneyload-$(CONFIG_CPU_CAVIUM_OCTEON)	+= 0xffffffff84100000
6587e69deb8SDavid Daneyelse
6597e69deb8SDavid Daneyload-$(CONFIG_CPU_CAVIUM_OCTEON) 	+= 0xffffffff81100000
6607e69deb8SDavid Daneyendif
6617e69deb8SDavid Daney
662384740dcSRalf Baechlecflags-y			+= -I$(srctree)/arch/mips/include/asm/mach-generic
6631da177e4SLinus Torvaldsdrivers-$(CONFIG_PCI)		+= arch/mips/pci/
6641da177e4SLinus Torvalds
665adff90a9SFranck Bui-Huu#
666adff90a9SFranck Bui-Huu# Automatically detect the build format. By default we choose
667adff90a9SFranck Bui-Huu# the elf format according to the load address.
668adff90a9SFranck Bui-Huu# We can always force a build with a 64-bits symbol format by
669054c51b4SFranck Bui-Huu# passing 'KBUILD_SYM32=no' option to the make's command line.
670adff90a9SFranck Bui-Huu#
671adff90a9SFranck Bui-Huuifdef CONFIG_64BIT
672054c51b4SFranck Bui-Huu  ifndef KBUILD_SYM32
673adff90a9SFranck Bui-Huu    ifeq ($(shell expr $(load-y) \< 0xffffffff80000000), 0)
674054c51b4SFranck Bui-Huu      KBUILD_SYM32 = y
675adff90a9SFranck Bui-Huu    endif
676adff90a9SFranck Bui-Huu  endif
677adff90a9SFranck Bui-Huu
67820d60d99SMaciej W. Rozycki  ifeq ($(KBUILD_SYM32)$(call cc-option-yn,-msym32), yy)
679054c51b4SFranck Bui-Huu    cflags-y += -msym32 -DKBUILD_64BIT_SYM32
68020d60d99SMaciej W. Rozycki  else
68120d60d99SMaciej W. Rozycki    ifeq ($(CONFIG_CPU_DADDI_WORKAROUNDS), y)
68220d60d99SMaciej W. Rozycki      $(error CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32)
683adff90a9SFranck Bui-Huu    endif
684adff90a9SFranck Bui-Huu  endif
685e58d95abSFranck Bui-Huuendif
686adff90a9SFranck Bui-Huu
687222d394dSSam RavnborgKBUILD_AFLAGS	+= $(cflags-y)
68851b563fcSSam RavnborgKBUILD_CFLAGS	+= $(cflags-y)
68951b563fcSSam RavnborgKBUILD_CPPFLAGS += -D"VMLINUX_LOAD_ADDRESS=$(load-y)"
69051b563fcSSam RavnborgKBUILD_CPPFLAGS += -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
6911da177e4SLinus Torvalds
6921da177e4SLinus TorvaldsLDFLAGS			+= -m $(ld-emul)
6931da177e4SLinus Torvalds
69459b3e8e9SRalf Baechleifdef CONFIG_MIPS
695a0f97e06SSam RavnborgCHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -xc /dev/null | \
69648c35b2dSAlexey Dobriyan	egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
6972a2c3e45SAtsushi Nemoto	sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/")
6982a2c3e45SAtsushi Nemotoifdef CONFIG_64BIT
6992a2c3e45SAtsushi NemotoCHECKFLAGS		+= -m64
7002a2c3e45SAtsushi Nemotoendif
70159b3e8e9SRalf Baechleendif
70259b3e8e9SRalf Baechle
7031da177e4SLinus TorvaldsOBJCOPYFLAGS		+= --remove-section=.reginfo
7041da177e4SLinus Torvalds
7051da177e4SLinus Torvaldshead-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
7061da177e4SLinus Torvalds
7071da177e4SLinus Torvaldslibs-y			+= arch/mips/lib/
7081da177e4SLinus Torvalds
7099aeb404bSSam Ravnborg# See arch/mips/Kbuild for content of core part of the kernel
7109aeb404bSSam Ravnborgcore-y += arch/mips/
7111da177e4SLinus Torvalds
7121da177e4SLinus Torvaldsdrivers-$(CONFIG_OPROFILE)	+= arch/mips/oprofile/
7131da177e4SLinus Torvalds
714363c55caSWu Zhangjin# suspend and hibernation support
715363c55caSWu Zhangjindrivers-$(CONFIG_PM)	+= arch/mips/power/
716363c55caSWu Zhangjin
7171f21d2bdSBrian Murphyifdef CONFIG_LASAT
7181f21d2bdSBrian Murphyrom.bin rom.sw: vmlinux
7191f21d2bdSBrian Murphy	$(Q)$(MAKE) $(build)=arch/mips/lasat/image $@
7201f21d2bdSBrian Murphyendif
7211f21d2bdSBrian Murphy
7221da177e4SLinus Torvalds#
7231da177e4SLinus Torvalds# Some machines like the Indy need 32-bit ELF binaries for booting purposes.
7241da177e4SLinus Torvalds# Other need ECOFF, so we build a 32-bit ELF binary for them which we then
7251da177e4SLinus Torvalds# convert to ECOFF using elf2ecoff.
7261da177e4SLinus Torvalds#
7271da177e4SLinus Torvaldsvmlinux.32: vmlinux
7281da177e4SLinus Torvalds	$(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@
7291da177e4SLinus Torvalds
7301da177e4SLinus Torvalds#
7311da177e4SLinus Torvalds# The 64-bit ELF tools are pretty broken so at this time we generate 64-bit
7321da177e4SLinus Torvalds# ELF files from 32-bit files by conversion.
7331da177e4SLinus Torvalds#
7341da177e4SLinus Torvaldsvmlinux.64: vmlinux
7351da177e4SLinus Torvalds	$(OBJCOPY) -O $(64bit-bfd) $(OBJCOPYFLAGS) $< $@
7361da177e4SLinus Torvalds
7371da177e4SLinus Torvaldsmakeboot =$(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) $(1)
7381b93b3c3SWu Zhangjinmakezboot =$(Q)$(MAKE) $(build)=arch/mips/boot/compressed \
7391b93b3c3SWu Zhangjin	   VMLINUX_LOAD_ADDRESS=$(load-y) 32bit-bfd=$(32bit-bfd) $(1)
7401da177e4SLinus Torvalds
7418496b401SRalf Baechleall:	$(all-y)
7421da177e4SLinus Torvalds
7431b93b3c3SWu Zhangjinvmlinuz: vmlinux FORCE
7441b93b3c3SWu Zhangjin	+@$(call makezboot,$@)
7451b93b3c3SWu Zhangjin
7461b93b3c3SWu Zhangjinvmlinuz.bin: vmlinux
7471b93b3c3SWu Zhangjin	+@$(call makezboot,$@)
7481b93b3c3SWu Zhangjin
7491b93b3c3SWu Zhangjinvmlinuz.ecoff: vmlinux
7501b93b3c3SWu Zhangjin	+@$(call makezboot,$@)
7511b93b3c3SWu Zhangjin
7521b93b3c3SWu Zhangjinvmlinuz.srec: vmlinux
7531b93b3c3SWu Zhangjin	+@$(call makezboot,$@)
7541b93b3c3SWu Zhangjin
755154b500bSRalf Baechlevmlinux.bin: $(vmlinux-32)
756154b500bSRalf Baechle	+@$(call makeboot,$@)
757154b500bSRalf Baechle
758b8828d3eSYoichi Yuasavmlinux.ecoff: $(vmlinux-32)
7591da177e4SLinus Torvalds	+@$(call makeboot,$@)
7601da177e4SLinus Torvalds
7611da177e4SLinus Torvaldsvmlinux.srec: $(vmlinux-32)
7621da177e4SLinus Torvalds	+@$(call makeboot,$@)
7631da177e4SLinus Torvalds
7641da177e4SLinus TorvaldsCLEAN_FILES += vmlinux.ecoff \
765b8828d3eSYoichi Yuasa	       vmlinux.srec
7661da177e4SLinus Torvalds
767e48ce6b8SAtsushi Nemotoarchprepare:
768e48ce6b8SAtsushi Nemotoifdef CONFIG_MIPS32_N32
769e48ce6b8SAtsushi Nemoto	@echo '  Checking missing-syscalls for N32'
770e48ce6b8SAtsushi Nemoto	$(Q)$(MAKE) $(build)=. missing-syscalls EXTRA_CFLAGS="-mabi=n32"
771e48ce6b8SAtsushi Nemotoendif
772e48ce6b8SAtsushi Nemotoifdef CONFIG_MIPS32_O32
773e48ce6b8SAtsushi Nemoto	@echo '  Checking missing-syscalls for O32'
774e48ce6b8SAtsushi Nemoto	$(Q)$(MAKE) $(build)=. missing-syscalls EXTRA_CFLAGS="-mabi=32"
775e48ce6b8SAtsushi Nemotoendif
776e48ce6b8SAtsushi Nemoto
77759968d3bSRalf Baechleinstall:
77859968d3bSRalf Baechle	$(Q)install -D -m 755 vmlinux $(INSTALL_PATH)/vmlinux-$(KERNELRELEASE)
7791b93b3c3SWu Zhangjin	$(Q)install -D -m 755 vmlinuz $(INSTALL_PATH)/vmlinuz-$(KERNELRELEASE)
78059968d3bSRalf Baechle	$(Q)install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE)
78159968d3bSRalf Baechle	$(Q)install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE)
78259968d3bSRalf Baechle
7831da177e4SLinus Torvaldsarchclean:
7841da177e4SLinus Torvalds	@$(MAKE) $(clean)=arch/mips/boot
7851b93b3c3SWu Zhangjin	@$(MAKE) $(clean)=arch/mips/boot/compressed
7861f21d2bdSBrian Murphy	@$(MAKE) $(clean)=arch/mips/lasat
7871da177e4SLinus Torvalds
788e7865765SRalf Baechledefine archhelp
78959968d3bSRalf Baechle	echo '  install              - install kernel into $(INSTALL_PATH)'
790e7865765SRalf Baechle	echo '  vmlinux.ecoff        - ECOFF boot image'
791e7865765SRalf Baechle	echo '  vmlinux.bin          - Raw binary boot image'
792e7865765SRalf Baechle	echo '  vmlinux.srec         - SREC boot image'
7931b93b3c3SWu Zhangjin	echo '  vmlinuz              - Compressed boot(zboot) image'
7941b93b3c3SWu Zhangjin	echo '  vmlinuz.ecoff        - ECOFF zboot image'
7951b93b3c3SWu Zhangjin	echo '  vmlinuz.bin          - Raw binary zboot image'
7961b93b3c3SWu Zhangjin	echo '  vmlinuz.srec         - SREC zboot image'
797e7865765SRalf Baechle	echo
798e7865765SRalf Baechle	echo '  These will be default as apropriate for a configured platform.'
799e7865765SRalf Baechleendef
800e7865765SRalf Baechle
801048eb582SSam RavnborgCLEAN_FILES += vmlinux.32 \
8021da177e4SLinus Torvalds	       vmlinux.64 \
8031b93b3c3SWu Zhangjin	       vmlinux.ecoff \
8041b93b3c3SWu Zhangjin	       vmlinuz \
8051b93b3c3SWu Zhangjin	       vmlinuz.ecoff \
8061b93b3c3SWu Zhangjin	       vmlinuz.bin \
8071b93b3c3SWu Zhangjin	       vmlinuz.srec
808