diff options
Diffstat (limited to 'arch/mips/Makefile')
-rw-r--r-- | arch/mips/Makefile | 118 |
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 | |||
52 | CROSS_COMPILE := $(tool-prefix) | 52 | CROSS_COMPILE := $(tool-prefix) |
53 | endif | 53 | endif |
54 | 54 | ||
55 | CHECKFLAGS-y += -D__linux__ -D__mips__ \ | ||
56 | -D_ABIO32=1 \ | ||
57 | -D_ABIN32=2 \ | ||
58 | -D_ABI64=3 | ||
59 | CHECKFLAGS-$(CONFIG_32BIT) += -D_MIPS_SIM=_ABIO32 \ | ||
60 | -D_MIPS_SZLONG=32 \ | ||
61 | -D__PTRDIFF_TYPE__=int | ||
62 | CHECKFLAGS-$(CONFIG_64BIT) += -m64 -D_MIPS_SIM=_ABI64 \ | ||
63 | -D_MIPS_SZLONG=64 \ | ||
64 | -D__PTRDIFF_TYPE__="long int" | ||
65 | CHECKFLAGS-$(CONFIG_CPU_BIG_ENDIAN) += -D__MIPSEB__ | ||
66 | CHECKFLAGS-$(CONFIG_CPU_LITTLE_ENDIAN) += -D__MIPSEL__ | ||
67 | |||
68 | CHECKFLAGS = $(CHECKFLAGS-y) | ||
69 | |||
55 | ifdef CONFIG_BUILD_ELF64 | 70 | ifdef CONFIG_BUILD_ELF64 |
56 | gas-abi = 64 | 71 | gas-abi = 64 |
57 | ld-emul = $(64bit-emul) | 72 | ld-emul = $(64bit-emul) |
@@ -79,9 +94,18 @@ endif | |||
79 | cflags-y += -I $(TOPDIR)/include/asm/gcc | 94 | cflags-y += -I $(TOPDIR)/include/asm/gcc |
80 | cflags-y += -G 0 -mno-abicalls -fno-pic -pipe | 95 | cflags-y += -G 0 -mno-abicalls -fno-pic -pipe |
81 | cflags-y += $(call cc-option, -finline-limit=100000) | 96 | cflags-y += $(call cc-option, -finline-limit=100000) |
82 | LDFLAGS_vmlinux += -G 0 -static -n | 97 | LDFLAGS_vmlinux += -G 0 -static -n -nostdlib |
83 | MODFLAGS += -mlong-calls | 98 | MODFLAGS += -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 | # | ||
106 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB) | ||
107 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL) | ||
108 | |||
85 | cflags-$(CONFIG_SB1XXX_CORELIS) += -mno-sched-prolog -fno-omit-frame-pointer | 109 | cflags-$(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 | ||
170 | cflags-$(CONFIG_CPU_MIPS32) += \ | 194 | cflags-$(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 | ||
174 | cflags-$(CONFIG_CPU_MIPS64) += \ | 198 | cflags-$(CONFIG_CPU_MIPS32_R2) += \ |
199 | $(call set_gccflags,mips32r2,mips32r2,r4600,mips3,mips2) \ | ||
200 | -Wa,--trap | ||
201 | |||
202 | cflags-$(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 | ||
206 | cflags-$(CONFIG_CPU_MIPS64_R2) += \ | ||
207 | $(call set_gccflags,mips64r2,mips64r2,r4600,mips3,mips2) \ | ||
208 | -Wa,--trap | ||
209 | |||
178 | cflags-$(CONFIG_CPU_R5000) += \ | 210 | cflags-$(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 | |||
199 | cflags-$(CONFIG_CPU_SB1) += \ | 232 | cflags-$(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 | |||
266 | load-$(CONFIG_MIPS_PB1550) += 0xffffffff80100000 | 299 | load-$(CONFIG_MIPS_PB1550) += 0xffffffff80100000 |
267 | 300 | ||
268 | # | 301 | # |
302 | # AMD Alchemy Pb1200 eval board | ||
303 | # | ||
304 | libs-$(CONFIG_MIPS_PB1200) += arch/mips/au1000/pb1200/ | ||
305 | cflags-$(CONFIG_MIPS_PB1200) += -Iinclude/asm-mips/mach-pb1x00 | ||
306 | load-$(CONFIG_MIPS_PB1200) += 0xffffffff80100000 | ||
307 | |||
308 | # | ||
269 | # AMD Alchemy Db1000 eval board | 309 | # AMD Alchemy Db1000 eval board |
270 | # | 310 | # |
271 | libs-$(CONFIG_MIPS_DB1000) += arch/mips/au1000/db1x00/ | 311 | libs-$(CONFIG_MIPS_DB1000) += arch/mips/au1000/db1x00/ |
@@ -294,6 +334,13 @@ cflags-$(CONFIG_MIPS_DB1550) += -Iinclude/asm-mips/mach-db1x00 | |||
294 | load-$(CONFIG_MIPS_DB1550) += 0xffffffff80100000 | 334 | load-$(CONFIG_MIPS_DB1550) += 0xffffffff80100000 |
295 | 335 | ||
296 | # | 336 | # |
337 | # AMD Alchemy Db1200 eval board | ||
338 | # | ||
339 | libs-$(CONFIG_MIPS_DB1200) += arch/mips/au1000/pb1200/ | ||
340 | cflags-$(CONFIG_MIPS_DB1200) += -Iinclude/asm-mips/mach-db1x00 | ||
341 | load-$(CONFIG_MIPS_DB1200) += 0xffffffff80100000 | ||
342 | |||
343 | # | ||
297 | # AMD Alchemy Bosporus eval board | 344 | # AMD Alchemy Bosporus eval board |
298 | # | 345 | # |
299 | libs-$(CONFIG_MIPS_BOSPORUS) += arch/mips/au1000/db1x00/ | 346 | libs-$(CONFIG_MIPS_BOSPORUS) += arch/mips/au1000/db1x00/ |
@@ -323,6 +370,7 @@ load-$(CONFIG_MIPS_XXS1500) += 0xffffffff80100000 | |||
323 | # Cobalt Server | 370 | # Cobalt Server |
324 | # | 371 | # |
325 | core-$(CONFIG_MIPS_COBALT) += arch/mips/cobalt/ | 372 | core-$(CONFIG_MIPS_COBALT) += arch/mips/cobalt/ |
373 | cflags-$(CONFIG_MIPS_COBALT) += -Iinclude/asm-mips/cobalt | ||
326 | load-$(CONFIG_MIPS_COBALT) += 0xffffffff80080000 | 374 | load-$(CONFIG_MIPS_COBALT) += 0xffffffff80080000 |
327 | 375 | ||
328 | # | 376 | # |
@@ -389,6 +437,13 @@ core-$(CONFIG_MIPS_SEAD) += arch/mips/mips-boards/sead/ | |||
389 | load-$(CONFIG_MIPS_SEAD) += 0xffffffff80100000 | 437 | load-$(CONFIG_MIPS_SEAD) += 0xffffffff80100000 |
390 | 438 | ||
391 | # | 439 | # |
440 | # MIPS SIM | ||
441 | # | ||
442 | core-$(CONFIG_MIPS_SIM) += arch/mips/mips-boards/sim/ | ||
443 | cflags-$(CONFIG_MIPS_SIM) += -Iinclude/asm-mips/mach-sim | ||
444 | load-$(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 | |||
514 | load-$(CONFIG_TANBAC_TB022X) += 0xffffffff80000000 | 569 | load-$(CONFIG_TANBAC_TB022X) += 0xffffffff80000000 |
515 | 570 | ||
516 | # | 571 | # |
572 | # Common Philips PNX8550 | ||
573 | # | ||
574 | core-$(CONFIG_SOC_PNX8550) += arch/mips/philips/pnx8550/common/ | ||
575 | cflags-$(CONFIG_SOC_PNX8550) += -Iinclude/asm-mips/mach-pnx8550 | ||
576 | |||
577 | # | ||
578 | # Philips PNX8550 JBS board | ||
579 | # | ||
580 | libs-$(CONFIG_PNX8550_JBS) += arch/mips/philips/pnx8550/jbs/ | ||
581 | #cflags-$(CONFIG_PNX8550_JBS) += -Iinclude/asm-mips/mach-pnx8550 | ||
582 | load-$(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 | # |
584 | core-$(CONFIG_SIBYTE_BCM112X) += arch/mips/sibyte/sb1250/ | 652 | core-$(CONFIG_SIBYTE_BCM112X) += arch/mips/sibyte/sb1250/ |
585 | cflags-$(CONFIG_SIBYTE_BCM112X) += -Iinclude/asm-mips/mach-sibyte | 653 | cflags-$(CONFIG_SIBYTE_BCM112X) += -Iinclude/asm-mips/mach-sibyte \ |
654 | -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL | ||
586 | 655 | ||
587 | core-$(CONFIG_SIBYTE_SB1250) += arch/mips/sibyte/sb1250/ | 656 | core-$(CONFIG_SIBYTE_SB1250) += arch/mips/sibyte/sb1250/ |
588 | cflags-$(CONFIG_SIBYTE_SB1250) += -Iinclude/asm-mips/mach-sibyte | 657 | cflags-$(CONFIG_SIBYTE_SB1250) += -Iinclude/asm-mips/mach-sibyte \ |
658 | -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL | ||
659 | |||
660 | core-$(CONFIG_SIBYTE_BCM1x55) += arch/mips/sibyte/bcm1480/ | ||
661 | cflags-$(CONFIG_SIBYTE_BCM1x55) += -Iinclude/asm-mips/mach-sibyte \ | ||
662 | -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL | ||
663 | |||
664 | core-$(CONFIG_SIBYTE_BCM1x80) += arch/mips/sibyte/bcm1480/ | ||
665 | cflags-$(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 | # |
597 | libs-$(CONFIG_SIBYTE_CARMEL) += arch/mips/sibyte/swarm/ | 676 | libs-$(CONFIG_SIBYTE_CARMEL) += arch/mips/sibyte/swarm/ |
598 | load-$(CONFIG_SIBYTE_CARMEL) := 0xffffffff80100000 | 677 | load-$(CONFIG_SIBYTE_CARMEL) := 0xffffffff80100000 |
@@ -606,6 +685,8 @@ libs-$(CONFIG_SIBYTE_SENTOSA) += arch/mips/sibyte/swarm/ | |||
606 | load-$(CONFIG_SIBYTE_SENTOSA) := 0xffffffff80100000 | 685 | load-$(CONFIG_SIBYTE_SENTOSA) := 0xffffffff80100000 |
607 | libs-$(CONFIG_SIBYTE_SWARM) += arch/mips/sibyte/swarm/ | 686 | libs-$(CONFIG_SIBYTE_SWARM) += arch/mips/sibyte/swarm/ |
608 | load-$(CONFIG_SIBYTE_SWARM) := 0xffffffff80100000 | 687 | load-$(CONFIG_SIBYTE_SWARM) := 0xffffffff80100000 |
688 | libs-$(CONFIG_SIBYTE_BIGSUR) += arch/mips/sibyte/swarm/ | ||
689 | load-$(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/ | |||
629 | core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/common/ | 710 | core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/common/ |
630 | load-$(CONFIG_TOSHIBA_RBTX4927) += 0xffffffff80020000 | 711 | load-$(CONFIG_TOSHIBA_RBTX4927) += 0xffffffff80020000 |
631 | 712 | ||
713 | # | ||
714 | # Toshiba RBTX4938 board | ||
715 | # | ||
716 | core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/toshiba_rbtx4938/ | ||
717 | core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/common/ | ||
718 | load-$(CONFIG_TOSHIBA_RBTX4938) += 0xffffffff80100000 | ||
719 | |||
632 | cflags-y += -Iinclude/asm-mips/mach-generic | 720 | cflags-y += -Iinclude/asm-mips/mach-generic |
633 | drivers-$(CONFIG_PCI) += arch/mips/pci/ | 721 | drivers-$(CONFIG_PCI) += arch/mips/pci/ |
634 | 722 | ||
@@ -701,10 +789,29 @@ ifdef CONFIG_BOOT_ELF64 | |||
701 | all: $(vmlinux-64) | 789 | all: $(vmlinux-64) |
702 | endif | 790 | endif |
703 | 791 | ||
792 | ifdef CONFIG_MIPS_ATLAS | ||
793 | all: vmlinux.srec | ||
794 | endif | ||
795 | |||
796 | ifdef CONFIG_MIPS_MALTA | ||
797 | all: vmlinux.srec | ||
798 | endif | ||
799 | |||
800 | ifdef CONFIG_MIPS_SEAD | ||
801 | all: vmlinux.srec | ||
802 | endif | ||
803 | |||
804 | ifdef CONFIG_QEMU | ||
805 | all: vmlinux.bin | ||
806 | endif | ||
807 | |||
704 | ifdef CONFIG_SNI_RM200_PCI | 808 | ifdef CONFIG_SNI_RM200_PCI |
705 | all: vmlinux.ecoff | 809 | all: vmlinux.ecoff |
706 | endif | 810 | endif |
707 | 811 | ||
812 | vmlinux.bin: $(vmlinux-32) | ||
813 | +@$(call makeboot,$@) | ||
814 | |||
708 | vmlinux.ecoff vmlinux.rm200: $(vmlinux-32) | 815 | vmlinux.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 | |||
724 | CLEAN_FILES += vmlinux.32 \ | 830 | CLEAN_FILES += vmlinux.32 \ |
725 | vmlinux.64 \ | 831 | vmlinux.64 \ |
726 | vmlinux.ecoff | 832 | vmlinux.ecoff |