Makefile (4c805fb704fc7890ec6615b286f09aeb5e2603d4) Makefile (37809df4b1c88927fe944eb766e0553811c51f64)
1# This file is included by the global makefile so that you can add your own
2# architecture-specific flags and dependencies. Remember to do have actions
3# for "archclean" and "archdep" for cleaning up and making dependencies for
4# this architecture
5#
6# This file is subject to the terms and conditions of the GNU General Public
7# License. See the file "COPYING" in the main directory of this archive
8# for more details.
9#
10
11OBJCOPYFLAGS := -O binary
12LDFLAGS_vmlinux :=
13ifeq ($(CONFIG_DYNAMIC_FTRACE),y)
14 LDFLAGS_vmlinux := --no-relax
15endif
1# This file is included by the global makefile so that you can add your own
2# architecture-specific flags and dependencies. Remember to do have actions
3# for "archclean" and "archdep" for cleaning up and making dependencies for
4# this architecture
5#
6# This file is subject to the terms and conditions of the GNU General Public
7# License. See the file "COPYING" in the main directory of this archive
8# for more details.
9#
10
11OBJCOPYFLAGS := -O binary
12LDFLAGS_vmlinux :=
13ifeq ($(CONFIG_DYNAMIC_FTRACE),y)
14 LDFLAGS_vmlinux := --no-relax
15endif
16KBUILD_AFLAGS_MODULE += -fPIC
17KBUILD_CFLAGS_MODULE += -fPIC
16
18
17ifeq ($(CONFIG_64BIT)$(CONFIG_CMODEL_MEDLOW),yy)
18KBUILD_CFLAGS_MODULE += -mcmodel=medany
19endif
20
21export BITS
22ifeq ($(CONFIG_ARCH_RV64I),y)
23 BITS := 64
24 UTS_MACHINE := riscv64
25
26 KBUILD_CFLAGS += -mabi=lp64
27 KBUILD_AFLAGS += -mabi=lp64
28

--- 51 unchanged lines hidden (view full) ---

80core-y += arch/riscv/
81
82libs-y += arch/riscv/lib/
83
84PHONY += vdso_install
85vdso_install:
86 $(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso $@
87
19export BITS
20ifeq ($(CONFIG_ARCH_RV64I),y)
21 BITS := 64
22 UTS_MACHINE := riscv64
23
24 KBUILD_CFLAGS += -mabi=lp64
25 KBUILD_AFLAGS += -mabi=lp64
26

--- 51 unchanged lines hidden (view full) ---

78core-y += arch/riscv/
79
80libs-y += arch/riscv/lib/
81
82PHONY += vdso_install
83vdso_install:
84 $(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso $@
85
88ifeq ($(CONFIG_RISCV_M_MODE),y)
89KBUILD_IMAGE := $(boot)/loader
86ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_SOC_KENDRYTE),yy)
87KBUILD_IMAGE := $(boot)/loader.bin
90else
91KBUILD_IMAGE := $(boot)/Image.gz
92endif
88else
89KBUILD_IMAGE := $(boot)/Image.gz
90endif
93BOOT_TARGETS := Image Image.gz loader
91BOOT_TARGETS := Image Image.gz loader loader.bin
94
95all: $(notdir $(KBUILD_IMAGE))
96
97$(BOOT_TARGETS): vmlinux
98 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
99 @$(kecho) ' Kernel: $(boot)/$@ is ready'
100
101zinstall install:
102 $(Q)$(MAKE) $(build)=$(boot) $@
92
93all: $(notdir $(KBUILD_IMAGE))
94
95$(BOOT_TARGETS): vmlinux
96 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
97 @$(kecho) ' Kernel: $(boot)/$@ is ready'
98
99zinstall install:
100 $(Q)$(MAKE) $(build)=$(boot) $@