aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/Makefile')
-rw-r--r--arch/mips/Makefile57
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
49endif 49endif
50 50
51ifndef CONFIG_FUNCTION_TRACER
51cflags-y := -ffunction-sections 52cflags-y := -ffunction-sections
53endif
54ifdef 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
60endif
52cflags-y += $(call cc-option, -mno-check-zero-division) 61cflags-y += $(call cc-option, -mno-check-zero-division)
53 62
54ifdef CONFIG_32BIT 63ifdef CONFIG_32BIT
@@ -69,6 +78,7 @@ endif
69 78
70all-$(CONFIG_BOOT_ELF32) := $(vmlinux-32) 79all-$(CONFIG_BOOT_ELF32) := $(vmlinux-32)
71all-$(CONFIG_BOOT_ELF64) := $(vmlinux-64) 80all-$(CONFIG_BOOT_ELF64) := $(vmlinux-64)
81all-$(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
124cflags-$(CONFIG_CPU_LOONGSON2) += -Wa,--trap 134cflags-$(CONFIG_CPU_LOONGSON2) += -Wa,--trap
125cflags-$(CONFIG_CPU_LOONGSON2E) += \ 135cflags-$(CONFIG_CPU_LOONGSON2E) += \
126 $(call cc-option,-march=loongson2e,-march=r4600) 136 $(call cc-option,-march=loongson2e,-march=r4600)
137cflags-$(CONFIG_CPU_LOONGSON2F) += \
138 $(call cc-option,-march=loongson2f,-march=r4600)
127 139
128cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ 140cflags-$(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/
324cflags-$(CONFIG_MACH_LOONGSON) += -I$(srctree)/arch/mips/include/asm/mach-loongson \ 336cflags-$(CONFIG_MACH_LOONGSON) += -I$(srctree)/arch/mips/include/asm/mach-loongson \
325 -mno-branch-likely 337 -mno-branch-likely
326load-$(CONFIG_LEMOTE_FULOONG2E) +=0xffffffff80100000 338load-$(CONFIG_LEMOTE_FULOONG2E) +=0xffffffff80100000
339load-$(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
331core-$(CONFIG_MIPS_MALTA) += arch/mips/mti-malta/ 344core-$(CONFIG_MIPS_MALTA) += arch/mips/mti-malta/
332cflags-$(CONFIG_MIPS_MALTA) += -I$(srctree)/arch/mips/include/asm/mach-malta 345cflags-$(CONFIG_MIPS_MALTA) += -I$(srctree)/arch/mips/include/asm/mach-malta
333load-$(CONFIG_MIPS_MALTA) += 0xffffffff80100000 346load-$(CONFIG_MIPS_MALTA) += 0xffffffff80100000
334all-$(CONFIG_MIPS_MALTA) := vmlinux.bin 347all-$(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
356load-$(CONFIG_PMC_YOSEMITE) += 0xffffffff80100000 369load-$(CONFIG_PMC_YOSEMITE) += 0xffffffff80100000
357 370
358# 371#
359# Basler eXcite
360#
361core-$(CONFIG_BASLER_EXCITE) += arch/mips/basler/excite/
362cflags-$(CONFIG_BASLER_EXCITE) += -I$(srctree)/arch/mips/include/asm/mach-excite
363load-$(CONFIG_BASLER_EXCITE) += 0x80100000
364
365#
366# LASAT platforms 372# LASAT platforms
367# 373#
368core-$(CONFIG_LASAT) += arch/mips/lasat/ 374core-$(CONFIG_LASAT) += arch/mips/lasat/
@@ -441,6 +447,13 @@ core-$(CONFIG_NEC_MARKEINS) += arch/mips/emma/markeins/
441load-$(CONFIG_NEC_MARKEINS) += 0xffffffff88100000 447load-$(CONFIG_NEC_MARKEINS) += 0xffffffff88100000
442 448
443# 449#
450# Cisco PowerTV Platform
451#
452core-$(CONFIG_POWERTV) += arch/mips/powertv/
453cflags-$(CONFIG_POWERTV) += -I$(srctree)/arch/mips/include/asm/mach-powertv
454load-$(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
581else 594else
582load-$(CONFIG_SNI_RM) += 0xffffffff80030000 595load-$(CONFIG_SNI_RM) += 0xffffffff80030000
583endif 596endif
584all-$(CONFIG_SNI_RM) := vmlinux.ecoff 597all-$(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
701makeboot =$(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) $(1) 714makeboot =$(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) $(1)
715makezboot =$(Q)$(MAKE) $(build)=arch/mips/boot/compressed \
716 VMLINUX_LOAD_ADDRESS=$(load-y) 32bit-bfd=$(32bit-bfd) $(1)
702 717
703all: $(all-y) 718all: $(all-y)
704 719
720vmlinuz: vmlinux FORCE
721 +@$(call makezboot,$@)
722
723vmlinuz.bin: vmlinux
724 +@$(call makezboot,$@)
725
726vmlinuz.ecoff: vmlinux
727 +@$(call makezboot,$@)
728
729vmlinuz.srec: vmlinux
730 +@$(call makezboot,$@)
731
705vmlinux.bin: $(vmlinux-32) 732vmlinux.bin: $(vmlinux-32)
706 +@$(call makeboot,$@) 733 +@$(call makeboot,$@)
707 734
@@ -726,11 +753,13 @@ endif
726 753
727install: 754install:
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
732archclean: 760archclean:
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
736define archhelp 765define 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.'
743endef 776endef
744 777
745CLEAN_FILES += vmlinux.32 \ 778CLEAN_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