diff options
Diffstat (limited to 'arch/mips/Makefile')
| -rw-r--r-- | arch/mips/Makefile | 57 |
1 files changed, 47 insertions, 10 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 77f5021218d3..1893efd43fca 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
| @@ -48,7 +48,16 @@ ifneq ($(SUBARCH),$(ARCH)) | |||
| 48 | endif | 48 | endif |
| 49 | endif | 49 | endif |
| 50 | 50 | ||
| 51 | ifndef CONFIG_FUNCTION_TRACER | ||
| 51 | cflags-y := -ffunction-sections | 52 | cflags-y := -ffunction-sections |
| 53 | endif | ||
| 54 | ifdef CONFIG_FUNCTION_GRAPH_TRACER | ||
| 55 | ifndef KBUILD_MCOUNT_RA_ADDRESS | ||
| 56 | ifeq ($(call cc-option-yn,-mmcount-ra-address), y) | ||
| 57 | cflags-y += -mmcount-ra-address -DKBUILD_MCOUNT_RA_ADDRESS | ||
| 58 | endif | ||
| 59 | endif | ||
| 60 | endif | ||
| 52 | cflags-y += $(call cc-option, -mno-check-zero-division) | 61 | cflags-y += $(call cc-option, -mno-check-zero-division) |
| 53 | 62 | ||
| 54 | ifdef CONFIG_32BIT | 63 | ifdef CONFIG_32BIT |
| @@ -69,6 +78,7 @@ endif | |||
| 69 | 78 | ||
| 70 | all-$(CONFIG_BOOT_ELF32) := $(vmlinux-32) | 79 | all-$(CONFIG_BOOT_ELF32) := $(vmlinux-32) |
| 71 | all-$(CONFIG_BOOT_ELF64) := $(vmlinux-64) | 80 | all-$(CONFIG_BOOT_ELF64) := $(vmlinux-64) |
| 81 | all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlinuz | ||
| 72 | 82 | ||
| 73 | # | 83 | # |
| 74 | # GCC uses -G 0 -mabicalls -fpic as default. We don't want PIC in the kernel | 84 | # GCC uses -G 0 -mabicalls -fpic as default. We don't want PIC in the kernel |
| @@ -124,6 +134,8 @@ cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap | |||
| 124 | cflags-$(CONFIG_CPU_LOONGSON2) += -Wa,--trap | 134 | cflags-$(CONFIG_CPU_LOONGSON2) += -Wa,--trap |
| 125 | cflags-$(CONFIG_CPU_LOONGSON2E) += \ | 135 | cflags-$(CONFIG_CPU_LOONGSON2E) += \ |
| 126 | $(call cc-option,-march=loongson2e,-march=r4600) | 136 | $(call cc-option,-march=loongson2e,-march=r4600) |
| 137 | cflags-$(CONFIG_CPU_LOONGSON2F) += \ | ||
| 138 | $(call cc-option,-march=loongson2f,-march=r4600) | ||
| 127 | 139 | ||
| 128 | cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ | 140 | cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ |
| 129 | -Wa,-mips32 -Wa,--trap | 141 | -Wa,-mips32 -Wa,--trap |
| @@ -324,6 +336,7 @@ core-$(CONFIG_MACH_LOONGSON) +=arch/mips/loongson/ | |||
| 324 | cflags-$(CONFIG_MACH_LOONGSON) += -I$(srctree)/arch/mips/include/asm/mach-loongson \ | 336 | cflags-$(CONFIG_MACH_LOONGSON) += -I$(srctree)/arch/mips/include/asm/mach-loongson \ |
| 325 | -mno-branch-likely | 337 | -mno-branch-likely |
| 326 | load-$(CONFIG_LEMOTE_FULOONG2E) +=0xffffffff80100000 | 338 | load-$(CONFIG_LEMOTE_FULOONG2E) +=0xffffffff80100000 |
| 339 | load-$(CONFIG_LEMOTE_MACH2F) +=0xffffffff80200000 | ||
| 327 | 340 | ||
| 328 | # | 341 | # |
| 329 | # MIPS Malta board | 342 | # MIPS Malta board |
| @@ -331,7 +344,7 @@ load-$(CONFIG_LEMOTE_FULOONG2E) +=0xffffffff80100000 | |||
| 331 | core-$(CONFIG_MIPS_MALTA) += arch/mips/mti-malta/ | 344 | core-$(CONFIG_MIPS_MALTA) += arch/mips/mti-malta/ |
| 332 | cflags-$(CONFIG_MIPS_MALTA) += -I$(srctree)/arch/mips/include/asm/mach-malta | 345 | cflags-$(CONFIG_MIPS_MALTA) += -I$(srctree)/arch/mips/include/asm/mach-malta |
| 333 | load-$(CONFIG_MIPS_MALTA) += 0xffffffff80100000 | 346 | load-$(CONFIG_MIPS_MALTA) += 0xffffffff80100000 |
| 334 | all-$(CONFIG_MIPS_MALTA) := vmlinux.bin | 347 | all-$(CONFIG_MIPS_MALTA) := vmlinuz.bin |
| 335 | 348 | ||
| 336 | # | 349 | # |
| 337 | # MIPS SIM | 350 | # MIPS SIM |
| @@ -356,13 +369,6 @@ cflags-$(CONFIG_PMC_YOSEMITE) += -I$(srctree)/arch/mips/include/asm/mach-yosemit | |||
| 356 | load-$(CONFIG_PMC_YOSEMITE) += 0xffffffff80100000 | 369 | load-$(CONFIG_PMC_YOSEMITE) += 0xffffffff80100000 |
| 357 | 370 | ||
| 358 | # | 371 | # |
| 359 | # Basler eXcite | ||
| 360 | # | ||
| 361 | core-$(CONFIG_BASLER_EXCITE) += arch/mips/basler/excite/ | ||
| 362 | cflags-$(CONFIG_BASLER_EXCITE) += -I$(srctree)/arch/mips/include/asm/mach-excite | ||
| 363 | load-$(CONFIG_BASLER_EXCITE) += 0x80100000 | ||
| 364 | |||
| 365 | # | ||
| 366 | # LASAT platforms | 372 | # LASAT platforms |
| 367 | # | 373 | # |
| 368 | core-$(CONFIG_LASAT) += arch/mips/lasat/ | 374 | core-$(CONFIG_LASAT) += arch/mips/lasat/ |
| @@ -441,6 +447,13 @@ core-$(CONFIG_NEC_MARKEINS) += arch/mips/emma/markeins/ | |||
| 441 | load-$(CONFIG_NEC_MARKEINS) += 0xffffffff88100000 | 447 | load-$(CONFIG_NEC_MARKEINS) += 0xffffffff88100000 |
| 442 | 448 | ||
| 443 | # | 449 | # |
| 450 | # Cisco PowerTV Platform | ||
| 451 | # | ||
| 452 | core-$(CONFIG_POWERTV) += arch/mips/powertv/ | ||
| 453 | cflags-$(CONFIG_POWERTV) += -I$(srctree)/arch/mips/include/asm/mach-powertv | ||
| 454 | load-$(CONFIG_POWERTV) += 0xffffffff90800000 | ||
| 455 | |||
| 456 | # | ||
| 444 | # SGI IP22 (Indy/Indigo2) | 457 | # SGI IP22 (Indy/Indigo2) |
| 445 | # | 458 | # |
| 446 | # Set the load address to >= 0xffffffff88069000 if you want to leave space for | 459 | # Set the load address to >= 0xffffffff88069000 if you want to leave space for |
| @@ -581,7 +594,7 @@ load-$(CONFIG_SNI_RM) += 0xffffffff80600000 | |||
| 581 | else | 594 | else |
| 582 | load-$(CONFIG_SNI_RM) += 0xffffffff80030000 | 595 | load-$(CONFIG_SNI_RM) += 0xffffffff80030000 |
| 583 | endif | 596 | endif |
| 584 | all-$(CONFIG_SNI_RM) := vmlinux.ecoff | 597 | all-$(CONFIG_SNI_RM) := vmlinuz.ecoff |
| 585 | 598 | ||
| 586 | # | 599 | # |
| 587 | # Common TXx9 | 600 | # Common TXx9 |
| @@ -699,9 +712,23 @@ vmlinux.64: vmlinux | |||
| 699 | $(OBJCOPY) -O $(64bit-bfd) $(OBJCOPYFLAGS) $< $@ | 712 | $(OBJCOPY) -O $(64bit-bfd) $(OBJCOPYFLAGS) $< $@ |
| 700 | 713 | ||
| 701 | makeboot =$(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) $(1) | 714 | makeboot =$(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) $(1) |
| 715 | makezboot =$(Q)$(MAKE) $(build)=arch/mips/boot/compressed \ | ||
| 716 | VMLINUX_LOAD_ADDRESS=$(load-y) 32bit-bfd=$(32bit-bfd) $(1) | ||
| 702 | 717 | ||
| 703 | all: $(all-y) | 718 | all: $(all-y) |
| 704 | 719 | ||
| 720 | vmlinuz: vmlinux FORCE | ||
| 721 | +@$(call makezboot,$@) | ||
| 722 | |||
| 723 | vmlinuz.bin: vmlinux | ||
| 724 | +@$(call makezboot,$@) | ||
| 725 | |||
| 726 | vmlinuz.ecoff: vmlinux | ||
| 727 | +@$(call makezboot,$@) | ||
| 728 | |||
| 729 | vmlinuz.srec: vmlinux | ||
| 730 | +@$(call makezboot,$@) | ||
| 731 | |||
| 705 | vmlinux.bin: $(vmlinux-32) | 732 | vmlinux.bin: $(vmlinux-32) |
| 706 | +@$(call makeboot,$@) | 733 | +@$(call makeboot,$@) |
| 707 | 734 | ||
| @@ -726,11 +753,13 @@ endif | |||
| 726 | 753 | ||
| 727 | install: | 754 | install: |
| 728 | $(Q)install -D -m 755 vmlinux $(INSTALL_PATH)/vmlinux-$(KERNELRELEASE) | 755 | $(Q)install -D -m 755 vmlinux $(INSTALL_PATH)/vmlinux-$(KERNELRELEASE) |
| 756 | $(Q)install -D -m 755 vmlinuz $(INSTALL_PATH)/vmlinuz-$(KERNELRELEASE) | ||
| 729 | $(Q)install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE) | 757 | $(Q)install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE) |
| 730 | $(Q)install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE) | 758 | $(Q)install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE) |
| 731 | 759 | ||
| 732 | archclean: | 760 | archclean: |
| 733 | @$(MAKE) $(clean)=arch/mips/boot | 761 | @$(MAKE) $(clean)=arch/mips/boot |
| 762 | @$(MAKE) $(clean)=arch/mips/boot/compressed | ||
| 734 | @$(MAKE) $(clean)=arch/mips/lasat | 763 | @$(MAKE) $(clean)=arch/mips/lasat |
| 735 | 764 | ||
| 736 | define archhelp | 765 | define archhelp |
| @@ -738,10 +767,18 @@ define archhelp | |||
| 738 | echo ' vmlinux.ecoff - ECOFF boot image' | 767 | echo ' vmlinux.ecoff - ECOFF boot image' |
| 739 | echo ' vmlinux.bin - Raw binary boot image' | 768 | echo ' vmlinux.bin - Raw binary boot image' |
| 740 | echo ' vmlinux.srec - SREC boot image' | 769 | echo ' vmlinux.srec - SREC boot image' |
| 770 | echo ' vmlinuz - Compressed boot(zboot) image' | ||
| 771 | echo ' vmlinuz.ecoff - ECOFF zboot image' | ||
| 772 | echo ' vmlinuz.bin - Raw binary zboot image' | ||
| 773 | echo ' vmlinuz.srec - SREC zboot image' | ||
| 741 | echo | 774 | echo |
| 742 | echo ' These will be default as apropriate for a configured platform.' | 775 | echo ' These will be default as apropriate for a configured platform.' |
| 743 | endef | 776 | endef |
| 744 | 777 | ||
| 745 | CLEAN_FILES += vmlinux.32 \ | 778 | CLEAN_FILES += vmlinux.32 \ |
| 746 | vmlinux.64 \ | 779 | vmlinux.64 \ |
| 747 | vmlinux.ecoff | 780 | vmlinux.ecoff \ |
| 781 | vmlinuz \ | ||
| 782 | vmlinuz.ecoff \ | ||
| 783 | vmlinuz.bin \ | ||
| 784 | vmlinuz.srec | ||
