1 # SPDX-License-Identifier: GPL-2.0
3 # Makefile for the linux kernel.
6 CPPFLAGS_vmlinux.lds
:= -DTEXT_OFFSET
=$(TEXT_OFFSET
)
7 AFLAGS_head.o
:= -DTEXT_OFFSET
=$(TEXT_OFFSET
)
9 ifdef CONFIG_FUNCTION_TRACER
10 CFLAGS_REMOVE_ftrace.o
= -pg
11 CFLAGS_REMOVE_insn.o
= -pg
12 CFLAGS_REMOVE_patch.o
= -pg
15 CFLAGS_REMOVE_return_address.o
= -pg
19 obj-y
:= elf.o entry-common.o irq.o opcodes.o \
20 process.o ptrace.o reboot.o io.o \
21 setup.o signal.o sigreturn_codes.o \
22 stacktrace.o sys_arm.o time.o traps.o
24 KASAN_SANITIZE_stacktrace.o
:= n
25 KASAN_SANITIZE_traps.o
:= n
27 ifneq ($(CONFIG_ARM_UNWIND
),y
)
28 obj-
$(CONFIG_FRAME_POINTER
) += return_address.o
31 obj-
$(CONFIG_ATAGS
) += atags_parse.o
32 obj-
$(CONFIG_ATAGS_PROC
) += atags_proc.o
33 obj-
$(CONFIG_DEPRECATED_PARAM_STRUCT
) += atags_compat.o
35 ifeq ($(CONFIG_CPU_V7M
),y
)
36 obj-y
+= entry-v7m.o v7m.o
41 obj-
$(CONFIG_MMU
) += bugs.o
42 obj-
$(CONFIG_CPU_IDLE
) += cpuidle.o
43 obj-
$(CONFIG_ISA_DMA_API
) += dma.o
44 obj-
$(CONFIG_FIQ
) += fiq.o fiqasm.o
45 obj-
$(CONFIG_MODULES
) += armksyms.o module.o
46 obj-
$(CONFIG_ARM_MODULE_PLTS
) += module-plts.o
47 obj-
$(CONFIG_ISA_DMA
) += dma-isa.o
48 obj-
$(CONFIG_PCI
) += bios32.o isa.o
49 obj-
$(CONFIG_ARM_CPU_SUSPEND
) += sleep.o suspend.o
50 obj-
$(CONFIG_HIBERNATION
) += hibernate.o
51 obj-
$(CONFIG_SMP
) += smp.o
53 obj-
$(CONFIG_SMP
) += smp_tlb.o
55 obj-
$(CONFIG_HAVE_ARM_SCU
) += smp_scu.o
56 obj-
$(CONFIG_HAVE_ARM_TWD
) += smp_twd.o
57 obj-
$(CONFIG_ARM_ARCH_TIMER
) += arch_timer.o
58 obj-
$(CONFIG_FUNCTION_TRACER
) += entry-ftrace.o
59 obj-
$(CONFIG_DYNAMIC_FTRACE
) += ftrace.o insn.o patch.o
60 obj-
$(CONFIG_FUNCTION_GRAPH_TRACER
) += ftrace.o insn.o patch.o
61 obj-
$(CONFIG_JUMP_LABEL
) += jump_label.o insn.o patch.o
62 obj-
$(CONFIG_KEXEC
) += machine_kexec.o relocate_kernel.o
63 # Main staffs in KPROBES are in arch/arm/probes/ .
64 obj-
$(CONFIG_KPROBES
) += patch.o insn.o
65 obj-
$(CONFIG_OABI_COMPAT
) += sys_oabi-compat.o
66 obj-
$(CONFIG_ARM_THUMBEE
) += thumbee.o
67 obj-
$(CONFIG_KGDB
) += kgdb.o patch.o
68 obj-
$(CONFIG_ARM_UNWIND
) += unwind.o
69 obj-
$(CONFIG_HAVE_TCM
) += tcm.o
70 obj-
$(CONFIG_OF
) += devtree.o
71 obj-
$(CONFIG_CRASH_DUMP
) += crash_dump.o
72 obj-
$(CONFIG_SWP_EMULATE
) += swp_emulate.o
73 CFLAGS_swp_emulate.o
:= -Wa
,-march
=armv7-a
74 obj-
$(CONFIG_HAVE_HW_BREAKPOINT
) += hw_breakpoint.o
76 obj-
$(CONFIG_CPU_XSCALE
) += xscale-cp0.o
77 obj-
$(CONFIG_CPU_XSC3
) += xscale-cp0.o
78 obj-
$(CONFIG_CPU_MOHAWK
) += xscale-cp0.o
79 obj-
$(CONFIG_CPU_PJ4
) += pj4-cp0.o
80 obj-
$(CONFIG_CPU_PJ4B
) += pj4-cp0.o
81 obj-
$(CONFIG_IWMMXT
) += iwmmxt.o
82 obj-
$(CONFIG_PERF_EVENTS
) += perf_regs.o perf_callchain.o
83 obj-
$(CONFIG_HW_PERF_EVENTS
) += perf_event_xscale.o perf_event_v6.o \
85 AFLAGS_iwmmxt.o
:= -Wa
,-mcpu
=iwmmxt
86 obj-
$(CONFIG_ARM_CPU_TOPOLOGY
) += topology.o
87 obj-
$(CONFIG_VDSO
) += vdso.o
88 obj-
$(CONFIG_EFI
) += efi.o
89 obj-
$(CONFIG_PARAVIRT
) += paravirt.o
91 head-y
:= head
$(MMUEXT
).o
92 obj-
$(CONFIG_DEBUG_LL
) += debug.o
93 obj-
$(CONFIG_EARLY_PRINTK
) += early_printk.o
94 obj-
$(CONFIG_ARM_PATCH_PHYS_VIRT
) += phys2virt.o
96 # This is executed very early using a temporary stack when no memory allocator
97 # nor global data is available. Everything has to be allocated on the stack.
98 CFLAGS_head-inflate-data.o
:= $(call cc-option
,-Wframe-larger-than
=10240)
99 obj-
$(CONFIG_XIP_DEFLATED_DATA
) += head-inflate-data.o
101 obj-
$(CONFIG_ARM_VIRT_EXT
) += hyp-stub.o
102 AFLAGS_hyp-stub.o
:=-Wa
,-march
=armv7-a
103 ifeq ($(CONFIG_ARM_PSCI
),y
)
104 obj-
$(CONFIG_SMP
) += psci_smp.o
107 obj-
$(CONFIG_HAVE_ARM_SMCCC
) += smccc-call.o
109 extra-y
:= $(head-y
) vmlinux.lds