diff options
Diffstat (limited to 'arch/mips/Makefile')
-rw-r--r-- | arch/mips/Makefile | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 32c1c8fb6f98..ebd5d02a7d78 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -60,11 +60,6 @@ vmlinux-32 = vmlinux.32 | |||
60 | vmlinux-64 = vmlinux | 60 | vmlinux-64 = vmlinux |
61 | 61 | ||
62 | cflags-y += -mabi=64 | 62 | cflags-y += -mabi=64 |
63 | ifdef CONFIG_BUILD_ELF64 | ||
64 | cflags-y += $(call cc-option,-mno-explicit-relocs) | ||
65 | else | ||
66 | cflags-y += $(call cc-option,-msym32) | ||
67 | endif | ||
68 | endif | 63 | endif |
69 | 64 | ||
70 | all-$(CONFIG_BOOT_ELF32) := $(vmlinux-32) | 65 | all-$(CONFIG_BOOT_ELF32) := $(vmlinux-32) |
@@ -153,7 +148,8 @@ endif | |||
153 | # | 148 | # |
154 | # Firmware support | 149 | # Firmware support |
155 | # | 150 | # |
156 | libs-$(CONFIG_ARC) += arch/mips/arc/ | 151 | libs-$(CONFIG_ARC) += arch/mips/fw/arc/ |
152 | libs-$(CONFIG_CFE) += arch/mips/fw/cfe/ | ||
157 | libs-$(CONFIG_SIBYTE_CFE) += arch/mips/sibyte/cfe/ | 153 | libs-$(CONFIG_SIBYTE_CFE) += arch/mips/sibyte/cfe/ |
158 | 154 | ||
159 | # | 155 | # |
@@ -367,6 +363,13 @@ cflags-$(CONFIG_BASLER_EXCITE) += -Iinclude/asm-mips/mach-excite | |||
367 | load-$(CONFIG_BASLER_EXCITE) += 0x80100000 | 363 | load-$(CONFIG_BASLER_EXCITE) += 0x80100000 |
368 | 364 | ||
369 | # | 365 | # |
366 | # LASAT platforms | ||
367 | # | ||
368 | core-$(CONFIG_LASAT) += arch/mips/lasat/ | ||
369 | cflags-$(CONFIG_LASAT) += -Iinclude/asm-mips/mach-lasat | ||
370 | load-$(CONFIG_LASAT) += 0xffffffff80000000 | ||
371 | |||
372 | # | ||
370 | # Common VR41xx | 373 | # Common VR41xx |
371 | # | 374 | # |
372 | core-$(CONFIG_MACH_VR41XX) += arch/mips/vr41xx/common/ | 375 | core-$(CONFIG_MACH_VR41XX) += arch/mips/vr41xx/common/ |
@@ -533,6 +536,13 @@ libs-$(CONFIG_SIBYTE_BIGSUR) += arch/mips/sibyte/swarm/ | |||
533 | load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000 | 536 | load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000 |
534 | 537 | ||
535 | # | 538 | # |
539 | # Broadcom BCM47XX boards | ||
540 | # | ||
541 | core-$(CONFIG_BCM47XX) += arch/mips/bcm47xx/ | ||
542 | cflags-$(CONFIG_BCM47XX) += -Iinclude/asm-mips/mach-bcm47xx | ||
543 | load-$(CONFIG_BCM47XX) := 0xffffffff80001000 | ||
544 | |||
545 | # | ||
536 | # SNI RM | 546 | # SNI RM |
537 | # | 547 | # |
538 | core-$(CONFIG_SNI_RM) += arch/mips/sni/ | 548 | core-$(CONFIG_SNI_RM) += arch/mips/sni/ |
@@ -578,6 +588,26 @@ else | |||
578 | JIFFIES = jiffies_64 | 588 | JIFFIES = jiffies_64 |
579 | endif | 589 | endif |
580 | 590 | ||
591 | # | ||
592 | # Automatically detect the build format. By default we choose | ||
593 | # the elf format according to the load address. | ||
594 | # We can always force a build with a 64-bits symbol format by | ||
595 | # passing 'KBUILD_SYM32=no' option to the make's command line. | ||
596 | # | ||
597 | ifdef CONFIG_64BIT | ||
598 | ifndef KBUILD_SYM32 | ||
599 | ifeq ($(shell expr $(load-y) \< 0xffffffff80000000), 0) | ||
600 | KBUILD_SYM32 = y | ||
601 | endif | ||
602 | endif | ||
603 | |||
604 | ifeq ($(KBUILD_SYM32), y) | ||
605 | ifeq ($(call cc-option-yn,-msym32), y) | ||
606 | cflags-y += -msym32 -DKBUILD_64BIT_SYM32 | ||
607 | endif | ||
608 | endif | ||
609 | endif | ||
610 | |||
581 | AFLAGS += $(cflags-y) | 611 | AFLAGS += $(cflags-y) |
582 | CFLAGS += $(cflags-y) \ | 612 | CFLAGS += $(cflags-y) \ |
583 | -D"VMLINUX_LOAD_ADDRESS=$(load-y)" | 613 | -D"VMLINUX_LOAD_ADDRESS=$(load-y)" |
@@ -615,6 +645,11 @@ core-y += arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/ | |||
615 | 645 | ||
616 | drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/ | 646 | drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/ |
617 | 647 | ||
648 | ifdef CONFIG_LASAT | ||
649 | rom.bin rom.sw: vmlinux | ||
650 | $(Q)$(MAKE) $(build)=arch/mips/lasat/image $@ | ||
651 | endif | ||
652 | |||
618 | # | 653 | # |
619 | # Some machines like the Indy need 32-bit ELF binaries for booting purposes. | 654 | # Some machines like the Indy need 32-bit ELF binaries for booting purposes. |
620 | # Other need ECOFF, so we build a 32-bit ELF binary for them which we then | 655 | # Other need ECOFF, so we build a 32-bit ELF binary for them which we then |
@@ -658,6 +693,7 @@ endif | |||
658 | 693 | ||
659 | archclean: | 694 | archclean: |
660 | @$(MAKE) $(clean)=arch/mips/boot | 695 | @$(MAKE) $(clean)=arch/mips/boot |
696 | @$(MAKE) $(clean)=arch/mips/lasat | ||
661 | 697 | ||
662 | define archhelp | 698 | define archhelp |
663 | echo ' vmlinux.ecoff - ECOFF boot image' | 699 | echo ' vmlinux.ecoff - ECOFF boot image' |