aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/Makefile')
-rw-r--r--arch/mips/Makefile118
1 files changed, 112 insertions, 6 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 346e803f153b..02692027730a 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -52,6 +52,21 @@ ifdef CONFIG_CROSSCOMPILE
52CROSS_COMPILE := $(tool-prefix) 52CROSS_COMPILE := $(tool-prefix)
53endif 53endif
54 54
55CHECKFLAGS-y += -D__linux__ -D__mips__ \
56 -D_ABIO32=1 \
57 -D_ABIN32=2 \
58 -D_ABI64=3
59CHECKFLAGS-$(CONFIG_32BIT) += -D_MIPS_SIM=_ABIO32 \
60 -D_MIPS_SZLONG=32 \
61 -D__PTRDIFF_TYPE__=int
62CHECKFLAGS-$(CONFIG_64BIT) += -m64 -D_MIPS_SIM=_ABI64 \
63 -D_MIPS_SZLONG=64 \
64 -D__PTRDIFF_TYPE__="long int"
65CHECKFLAGS-$(CONFIG_CPU_BIG_ENDIAN) += -D__MIPSEB__
66CHECKFLAGS-$(CONFIG_CPU_LITTLE_ENDIAN) += -D__MIPSEL__
67
68CHECKFLAGS = $(CHECKFLAGS-y)
69
55ifdef CONFIG_BUILD_ELF64 70ifdef CONFIG_BUILD_ELF64
56gas-abi = 64 71gas-abi = 64
57ld-emul = $(64bit-emul) 72ld-emul = $(64bit-emul)
@@ -79,9 +94,18 @@ endif
79cflags-y += -I $(TOPDIR)/include/asm/gcc 94cflags-y += -I $(TOPDIR)/include/asm/gcc
80cflags-y += -G 0 -mno-abicalls -fno-pic -pipe 95cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
81cflags-y += $(call cc-option, -finline-limit=100000) 96cflags-y += $(call cc-option, -finline-limit=100000)
82LDFLAGS_vmlinux += -G 0 -static -n 97LDFLAGS_vmlinux += -G 0 -static -n -nostdlib
83MODFLAGS += -mlong-calls 98MODFLAGS += -mlong-calls
84 99
100#
101# We explicitly add the endianness specifier if needed, this allows
102# to compile kernels with a toolchain for the other endianness. We
103# carefully avoid to add it redundantly because gcc 3.3/3.4 complains
104# when fed the toolchain default!
105#
106cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB)
107cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL)
108
85cflags-$(CONFIG_SB1XXX_CORELIS) += -mno-sched-prolog -fno-omit-frame-pointer 109cflags-$(CONFIG_SB1XXX_CORELIS) += -mno-sched-prolog -fno-omit-frame-pointer
86 110
87# 111#
@@ -167,14 +191,22 @@ cflags-$(CONFIG_CPU_TX49XX) += \
167 $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \ 191 $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \
168 -Wa,--trap 192 -Wa,--trap
169 193
170cflags-$(CONFIG_CPU_MIPS32) += \ 194cflags-$(CONFIG_CPU_MIPS32_R1) += \
171 $(call set_gccflags,mips32,mips32,r4600,mips3,mips2) \ 195 $(call set_gccflags,mips32,mips32,r4600,mips3,mips2) \
172 -Wa,--trap 196 -Wa,--trap
173 197
174cflags-$(CONFIG_CPU_MIPS64) += \ 198cflags-$(CONFIG_CPU_MIPS32_R2) += \
199 $(call set_gccflags,mips32r2,mips32r2,r4600,mips3,mips2) \
200 -Wa,--trap
201
202cflags-$(CONFIG_CPU_MIPS64_R1) += \
175 $(call set_gccflags,mips64,mips64,r4600,mips3,mips2) \ 203 $(call set_gccflags,mips64,mips64,r4600,mips3,mips2) \
176 -Wa,--trap 204 -Wa,--trap
177 205
206cflags-$(CONFIG_CPU_MIPS64_R2) += \
207 $(call set_gccflags,mips64r2,mips64r2,r4600,mips3,mips2) \
208 -Wa,--trap
209
178cflags-$(CONFIG_CPU_R5000) += \ 210cflags-$(CONFIG_CPU_R5000) += \
179 $(call set_gccflags,r5000,mips4,r5000,mips4,mips2) \ 211 $(call set_gccflags,r5000,mips4,r5000,mips4,mips2) \
180 -Wa,--trap 212 -Wa,--trap
@@ -196,6 +228,7 @@ cflags-$(CONFIG_CPU_RM9000) += \
196 $(call set_gccflags,rm9000,mips4,r5000,mips4,mips2) \ 228 $(call set_gccflags,rm9000,mips4,r5000,mips4,mips2) \
197 -Wa,--trap 229 -Wa,--trap
198 230
231
199cflags-$(CONFIG_CPU_SB1) += \ 232cflags-$(CONFIG_CPU_SB1) += \
200 $(call set_gccflags,sb1,mips64,r5000,mips4,mips2) \ 233 $(call set_gccflags,sb1,mips64,r5000,mips4,mips2) \
201 -Wa,--trap 234 -Wa,--trap
@@ -266,6 +299,13 @@ cflags-$(CONFIG_MIPS_PB1550) += -Iinclude/asm-mips/mach-pb1x00
266load-$(CONFIG_MIPS_PB1550) += 0xffffffff80100000 299load-$(CONFIG_MIPS_PB1550) += 0xffffffff80100000
267 300
268# 301#
302# AMD Alchemy Pb1200 eval board
303#
304libs-$(CONFIG_MIPS_PB1200) += arch/mips/au1000/pb1200/
305cflags-$(CONFIG_MIPS_PB1200) += -Iinclude/asm-mips/mach-pb1x00
306load-$(CONFIG_MIPS_PB1200) += 0xffffffff80100000
307
308#
269# AMD Alchemy Db1000 eval board 309# AMD Alchemy Db1000 eval board
270# 310#
271libs-$(CONFIG_MIPS_DB1000) += arch/mips/au1000/db1x00/ 311libs-$(CONFIG_MIPS_DB1000) += arch/mips/au1000/db1x00/
@@ -294,6 +334,13 @@ cflags-$(CONFIG_MIPS_DB1550) += -Iinclude/asm-mips/mach-db1x00
294load-$(CONFIG_MIPS_DB1550) += 0xffffffff80100000 334load-$(CONFIG_MIPS_DB1550) += 0xffffffff80100000
295 335
296# 336#
337# AMD Alchemy Db1200 eval board
338#
339libs-$(CONFIG_MIPS_DB1200) += arch/mips/au1000/pb1200/
340cflags-$(CONFIG_MIPS_DB1200) += -Iinclude/asm-mips/mach-db1x00
341load-$(CONFIG_MIPS_DB1200) += 0xffffffff80100000
342
343#
297# AMD Alchemy Bosporus eval board 344# AMD Alchemy Bosporus eval board
298# 345#
299libs-$(CONFIG_MIPS_BOSPORUS) += arch/mips/au1000/db1x00/ 346libs-$(CONFIG_MIPS_BOSPORUS) += arch/mips/au1000/db1x00/
@@ -323,6 +370,7 @@ load-$(CONFIG_MIPS_XXS1500) += 0xffffffff80100000
323# Cobalt Server 370# Cobalt Server
324# 371#
325core-$(CONFIG_MIPS_COBALT) += arch/mips/cobalt/ 372core-$(CONFIG_MIPS_COBALT) += arch/mips/cobalt/
373cflags-$(CONFIG_MIPS_COBALT) += -Iinclude/asm-mips/cobalt
326load-$(CONFIG_MIPS_COBALT) += 0xffffffff80080000 374load-$(CONFIG_MIPS_COBALT) += 0xffffffff80080000
327 375
328# 376#
@@ -389,6 +437,13 @@ core-$(CONFIG_MIPS_SEAD) += arch/mips/mips-boards/sead/
389load-$(CONFIG_MIPS_SEAD) += 0xffffffff80100000 437load-$(CONFIG_MIPS_SEAD) += 0xffffffff80100000
390 438
391# 439#
440# MIPS SIM
441#
442core-$(CONFIG_MIPS_SIM) += arch/mips/mips-boards/sim/
443cflags-$(CONFIG_MIPS_SIM) += -Iinclude/asm-mips/mach-sim
444load-$(CONFIG_MIPS_SIM) += 0x80100000
445
446#
392# Momentum Ocelot board 447# Momentum Ocelot board
393# 448#
394# The Ocelot setup.o must be linked early - it does the ioremap() for the 449# The Ocelot setup.o must be linked early - it does the ioremap() for the
@@ -514,6 +569,19 @@ load-$(CONFIG_CASIO_E55) += 0xffffffff80004000
514load-$(CONFIG_TANBAC_TB022X) += 0xffffffff80000000 569load-$(CONFIG_TANBAC_TB022X) += 0xffffffff80000000
515 570
516# 571#
572# Common Philips PNX8550
573#
574core-$(CONFIG_SOC_PNX8550) += arch/mips/philips/pnx8550/common/
575cflags-$(CONFIG_SOC_PNX8550) += -Iinclude/asm-mips/mach-pnx8550
576
577#
578# Philips PNX8550 JBS board
579#
580libs-$(CONFIG_PNX8550_JBS) += arch/mips/philips/pnx8550/jbs/
581#cflags-$(CONFIG_PNX8550_JBS) += -Iinclude/asm-mips/mach-pnx8550
582load-$(CONFIG_PNX8550_JBS) += 0xffffffff80060000
583
584#
517# SGI IP22 (Indy/Indigo2) 585# SGI IP22 (Indy/Indigo2)
518# 586#
519# Set the load address to >= 0xffffffff88069000 if you want to leave space for 587# Set the load address to >= 0xffffffff88069000 if you want to leave space for
@@ -582,10 +650,20 @@ load-$(CONFIG_SGI_IP32) += 0xffffffff80004000
582# removed (as happens, even if they have __initcall/module_init) 650# removed (as happens, even if they have __initcall/module_init)
583# 651#
584core-$(CONFIG_SIBYTE_BCM112X) += arch/mips/sibyte/sb1250/ 652core-$(CONFIG_SIBYTE_BCM112X) += arch/mips/sibyte/sb1250/
585cflags-$(CONFIG_SIBYTE_BCM112X) += -Iinclude/asm-mips/mach-sibyte 653cflags-$(CONFIG_SIBYTE_BCM112X) += -Iinclude/asm-mips/mach-sibyte \
654 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
586 655
587core-$(CONFIG_SIBYTE_SB1250) += arch/mips/sibyte/sb1250/ 656core-$(CONFIG_SIBYTE_SB1250) += arch/mips/sibyte/sb1250/
588cflags-$(CONFIG_SIBYTE_SB1250) += -Iinclude/asm-mips/mach-sibyte 657cflags-$(CONFIG_SIBYTE_SB1250) += -Iinclude/asm-mips/mach-sibyte \
658 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
659
660core-$(CONFIG_SIBYTE_BCM1x55) += arch/mips/sibyte/bcm1480/
661cflags-$(CONFIG_SIBYTE_BCM1x55) += -Iinclude/asm-mips/mach-sibyte \
662 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
663
664core-$(CONFIG_SIBYTE_BCM1x80) += arch/mips/sibyte/bcm1480/
665cflags-$(CONFIG_SIBYTE_BCM1x80) += -Iinclude/asm-mips/mach-sibyte \
666 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
589 667
590# 668#
591# Sibyte BCM91120x (Carmel) board 669# Sibyte BCM91120x (Carmel) board
@@ -593,6 +671,7 @@ cflags-$(CONFIG_SIBYTE_SB1250) += -Iinclude/asm-mips/mach-sibyte
593# Sibyte BCM91125C (CRhone) board 671# Sibyte BCM91125C (CRhone) board
594# Sibyte BCM91125E (Rhone) board 672# Sibyte BCM91125E (Rhone) board
595# Sibyte SWARM board 673# Sibyte SWARM board
674# Sibyte BCM91x80 (BigSur) board
596# 675#
597libs-$(CONFIG_SIBYTE_CARMEL) += arch/mips/sibyte/swarm/ 676libs-$(CONFIG_SIBYTE_CARMEL) += arch/mips/sibyte/swarm/
598load-$(CONFIG_SIBYTE_CARMEL) := 0xffffffff80100000 677load-$(CONFIG_SIBYTE_CARMEL) := 0xffffffff80100000
@@ -606,6 +685,8 @@ libs-$(CONFIG_SIBYTE_SENTOSA) += arch/mips/sibyte/swarm/
606load-$(CONFIG_SIBYTE_SENTOSA) := 0xffffffff80100000 685load-$(CONFIG_SIBYTE_SENTOSA) := 0xffffffff80100000
607libs-$(CONFIG_SIBYTE_SWARM) += arch/mips/sibyte/swarm/ 686libs-$(CONFIG_SIBYTE_SWARM) += arch/mips/sibyte/swarm/
608load-$(CONFIG_SIBYTE_SWARM) := 0xffffffff80100000 687load-$(CONFIG_SIBYTE_SWARM) := 0xffffffff80100000
688libs-$(CONFIG_SIBYTE_BIGSUR) += arch/mips/sibyte/swarm/
689load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000
609 690
610# 691#
611# SNI RM200 PCI 692# SNI RM200 PCI
@@ -629,6 +710,13 @@ core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/toshiba_rbtx4927/
629core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/common/ 710core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/common/
630load-$(CONFIG_TOSHIBA_RBTX4927) += 0xffffffff80020000 711load-$(CONFIG_TOSHIBA_RBTX4927) += 0xffffffff80020000
631 712
713#
714# Toshiba RBTX4938 board
715#
716core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/toshiba_rbtx4938/
717core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/common/
718load-$(CONFIG_TOSHIBA_RBTX4938) += 0xffffffff80100000
719
632cflags-y += -Iinclude/asm-mips/mach-generic 720cflags-y += -Iinclude/asm-mips/mach-generic
633drivers-$(CONFIG_PCI) += arch/mips/pci/ 721drivers-$(CONFIG_PCI) += arch/mips/pci/
634 722
@@ -701,10 +789,29 @@ ifdef CONFIG_BOOT_ELF64
701all: $(vmlinux-64) 789all: $(vmlinux-64)
702endif 790endif
703 791
792ifdef CONFIG_MIPS_ATLAS
793all: vmlinux.srec
794endif
795
796ifdef CONFIG_MIPS_MALTA
797all: vmlinux.srec
798endif
799
800ifdef CONFIG_MIPS_SEAD
801all: vmlinux.srec
802endif
803
804ifdef CONFIG_QEMU
805all: vmlinux.bin
806endif
807
704ifdef CONFIG_SNI_RM200_PCI 808ifdef CONFIG_SNI_RM200_PCI
705all: vmlinux.ecoff 809all: vmlinux.ecoff
706endif 810endif
707 811
812vmlinux.bin: $(vmlinux-32)
813 +@$(call makeboot,$@)
814
708vmlinux.ecoff vmlinux.rm200: $(vmlinux-32) 815vmlinux.ecoff vmlinux.rm200: $(vmlinux-32)
709 +@$(call makeboot,$@) 816 +@$(call makeboot,$@)
710 817
@@ -720,7 +827,6 @@ archclean:
720 @$(MAKE) $(clean)=arch/mips/boot 827 @$(MAKE) $(clean)=arch/mips/boot
721 @$(MAKE) $(clean)=arch/mips/lasat 828 @$(MAKE) $(clean)=arch/mips/lasat
722 829
723
724CLEAN_FILES += vmlinux.32 \ 830CLEAN_FILES += vmlinux.32 \
725 vmlinux.64 \ 831 vmlinux.64 \
726 vmlinux.ecoff 832 vmlinux.ecoff