Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1LDFLAGS_vmlinux := --no-undefined -X
2OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -S
3
4KBUILD_DEFCONFIG := defconfig
5
6ifdef CONFIG_FUNCTION_TRACER
7arch-y += -malways-save-lp -mno-relax
8endif
9
10# Avoid generating FPU instructions
11arch-y += -mno-ext-fpu-sp -mno-ext-fpu-dp -mfloat-abi=soft
12
13KBUILD_CFLAGS += $(call cc-option, -mno-sched-prolog-epilog)
14KBUILD_CFLAGS += -mcmodel=large
15
16KBUILD_CFLAGS +=$(arch-y) $(tune-y)
17KBUILD_AFLAGS +=$(arch-y) $(tune-y)
18
19#Default value
20head-y := arch/nds32/kernel/head.o
21textaddr-y := $(CONFIG_PAGE_OFFSET)+0xc000
22
23TEXTADDR := $(textaddr-y)
24
25export TEXTADDR
26
27
28# If we have a machine-specific directory, then include it in the build.
29core-y += arch/nds32/kernel/ arch/nds32/mm/
30core-$(CONFIG_FPU) += arch/nds32/math-emu/
31libs-y += arch/nds32/lib/
32
33ifneq '$(CONFIG_NDS32_BUILTIN_DTB)' '""'
34BUILTIN_DTB := y
35else
36BUILTIN_DTB := n
37endif
38
39ifdef CONFIG_CPU_LITTLE_ENDIAN
40KBUILD_CFLAGS += $(call cc-option, -EL)
41KBUILD_AFLAGS += $(call cc-option, -EL)
42KBUILD_LDFLAGS += $(call cc-option, -EL)
43CHECKFLAGS += -D__NDS32_EL__
44else
45KBUILD_CFLAGS += $(call cc-option, -EB)
46KBUILD_AFLAGS += $(call cc-option, -EB)
47KBUILD_LDFLAGS += $(call cc-option, -EB)
48CHECKFLAGS += -D__NDS32_EB__
49endif
50
51boot := arch/nds32/boot
52core-y += $(boot)/dts/
53
54Image: vmlinux
55 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
56
57
58PHONY += vdso_install
59vdso_install:
60 $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso $@
61
62prepare: vdso_prepare
63vdso_prepare: prepare0
64 $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso include/generated/vdso-offsets.h
65
66archclean:
67 $(Q)$(MAKE) $(clean)=$(boot)
68
69define archhelp
70 echo ' Image - kernel image (arch/$(ARCH)/boot/Image)'
71endef