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
6comma = ,
7
8KBUILD_CFLAGS += $(call cc-option, -mno-sched-prolog-epilog)
9KBUILD_CFLAGS += -mcmodel=large
10
11KBUILD_CFLAGS +=$(arch-y) $(tune-y)
12KBUILD_AFLAGS +=$(arch-y) $(tune-y)
13
14#Default value
15head-y := arch/nds32/kernel/head.o
16textaddr-y := $(CONFIG_PAGE_OFFSET)+0xc000
17
18TEXTADDR := $(textaddr-y)
19
20export TEXTADDR
21
22
23# If we have a machine-specific directory, then include it in the build.
24core-y += arch/nds32/kernel/ arch/nds32/mm/
25libs-y += arch/nds32/lib/
26
27ifneq '$(CONFIG_NDS32_BUILTIN_DTB)' '""'
28BUILTIN_DTB := y
29else
30BUILTIN_DTB := n
31endif
32
33ifdef CONFIG_CPU_LITTLE_ENDIAN
34KBUILD_CFLAGS += $(call cc-option, -EL)
35KBUILD_AFLAGS += $(call cc-option, -EL)
36LDFLAGS += $(call cc-option, -EL)
37CHECKFLAGS += -D__NDS32_EL__
38else
39KBUILD_CFLAGS += $(call cc-option, -EB)
40KBUILD_AFLAGS += $(call cc-option, -EB)
41LDFLAGS += $(call cc-option, -EB)
42CHECKFLAGS += -D__NDS32_EB__
43endif
44
45boot := arch/nds32/boot
46core-$(BUILTIN_DTB) += $(boot)/dts/
47
48.PHONY: FORCE
49
50Image: vmlinux
51 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
52
53
54PHONY += vdso_install
55vdso_install:
56 $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso $@
57
58prepare: vdso_prepare
59vdso_prepare: prepare0
60 $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso include/generated/vdso-offsets.h
61
62CLEAN_FILES += include/asm-nds32/constants.h*
63
64# We use MRPROPER_FILES and CLEAN_FILES now
65archclean:
66 $(Q)$(MAKE) $(clean)=$(boot)
67
68define archhelp
69 echo ' Image - kernel image (arch/$(ARCH)/boot/Image)'
70endef