xref: /linux/arch/arm/kernel/Makefile (revision 5a735583b764750726621b0396d03e4782911b77)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
21da177e4SLinus Torvalds#
31da177e4SLinus Torvalds# Makefile for the linux kernel.
41da177e4SLinus Torvalds#
51da177e4SLinus Torvalds
651b563fcSSam RavnborgCPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET)
79d4f13e5SRussell KingAFLAGS_head.o        := -DTEXT_OFFSET=$(TEXT_OFFSET)
81da177e4SLinus Torvalds
9376cfa87STim Birdifdef CONFIG_FUNCTION_TRACER
10014c257cSAbhishek SagarCFLAGS_REMOVE_ftrace.o = -pg
11d82227cfSRabin VincentCFLAGS_REMOVE_insn.o = -pg
12b21d55e9SRabin VincentCFLAGS_REMOVE_patch.o = -pg
13014c257cSAbhishek Sagarendif
14014c257cSAbhishek Sagar
154bf1fa5aSUwe Kleine-KönigCFLAGS_REMOVE_return_address.o = -pg
164bf1fa5aSUwe Kleine-König
171da177e4SLinus Torvalds# Object file lists.
181da177e4SLinus Torvalds
194477ca45SUwe Kleine-Königobj-y		:= elf.o entry-common.o irq.o opcodes.o \
20045ab94eSRussell King		   process.o ptrace.o reboot.o return_address.o \
21574e2b51SVictor Kamensky		   setup.o signal.o sigreturn_codes.o \
22574e2b51SVictor Kamensky		   stacktrace.o sys_arm.o time.o traps.o
231da177e4SLinus Torvalds
24bd51e2f5SNicolas Pitreobj-$(CONFIG_ATAGS)		+= atags_parse.o
25bd51e2f5SNicolas Pitreobj-$(CONFIG_ATAGS_PROC)	+= atags_proc.o
26aa783b6fSNicolas Pitreobj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += atags_compat.o
2773a65b3fSUwe Kleine-König
284477ca45SUwe Kleine-Königifeq ($(CONFIG_CPU_V7M),y)
296a7d2c62SUwe Kleine-Königobj-y		+= entry-v7m.o v7m.o
304477ca45SUwe Kleine-Königelse
314477ca45SUwe Kleine-Königobj-y		+= entry-armv.o
324477ca45SUwe Kleine-Königendif
334477ca45SUwe Kleine-König
34a5b9177fSRussell Kingobj-$(CONFIG_MMU)		+= bugs.o
35e1689795SRobert Leeobj-$(CONFIG_CPU_IDLE)		+= cpuidle.o
36065909b9SRussell Kingobj-$(CONFIG_ISA_DMA_API)	+= dma.o
37dc2eb928SDave Martinobj-$(CONFIG_FIQ)		+= fiq.o fiqasm.o
388478132aSRussell Kingobj-$(CONFIG_MODULES)		+= armksyms.o module.o
397d485f64SArd Biesheuvelobj-$(CONFIG_ARM_MODULE_PLTS)	+= module-plts.o
401da177e4SLinus Torvaldsobj-$(CONFIG_ISA_DMA)		+= dma-isa.o
41863dab45SRussell Kingobj-$(CONFIG_PCI)		+= bios32.o isa.o
421fdb24e9SLinus Torvaldsobj-$(CONFIG_ARM_CPU_SUSPEND)	+= sleep.o suspend.o
43603fb42aSSebastian Capellaobj-$(CONFIG_HIBERNATION)	+= hibernate.o
448006b4d1SJonathan Austinobj-$(CONFIG_SMP)		+= smp.o
458006b4d1SJonathan Austinifdef CONFIG_MMU
468006b4d1SJonathan Austinobj-$(CONFIG_SMP)		+= smp_tlb.o
478006b4d1SJonathan Austinendif
48a8cbcd92SRussell Kingobj-$(CONFIG_HAVE_ARM_SCU)	+= smp_scu.o
49f32f4ce2SRussell Kingobj-$(CONFIG_HAVE_ARM_TWD)	+= smp_twd.o
50022c03a2SMarc Zyngierobj-$(CONFIG_ARM_ARCH_TIMER)	+= arch_timer.o
5182112379SRussell Kingobj-$(CONFIG_FUNCTION_TRACER)	+= entry-ftrace.o
52*5a735583SPeter Zijlstraobj-$(CONFIG_DYNAMIC_FTRACE)	+= ftrace.o insn.o patch.o
53*5a735583SPeter Zijlstraobj-$(CONFIG_FUNCTION_GRAPH_TRACER)	+= ftrace.o insn.o patch.o
5409f05d85SRabin Vincentobj-$(CONFIG_JUMP_LABEL)	+= jump_label.o insn.o patch.o
55c587e4a6SRichard Purdieobj-$(CONFIG_KEXEC)		+= machine_kexec.o relocate_kernel.o
56fca08f32SWang Nan# Main staffs in KPROBES are in arch/arm/probes/ .
570dc016dbSWang Nanobj-$(CONFIG_KPROBES)		+= patch.o insn.o
58687ad019SNicolas Pitreobj-$(CONFIG_OABI_COMPAT)	+= sys_oabi-compat.o
59d7f864beSCatalin Marinasobj-$(CONFIG_ARM_THUMBEE)	+= thumbee.o
6023a4e405SDoug Andersonobj-$(CONFIG_KGDB)		+= kgdb.o patch.o
61adf8b37bSCatalin Marinasobj-$(CONFIG_ARM_UNWIND)	+= unwind.o
62bc581770SLinus Walleijobj-$(CONFIG_HAVE_TCM)		+= tcm.o
639eb8f674SGrant Likelyobj-$(CONFIG_OF)		+= devtree.o
6467742c81SMika Westerbergobj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
6564d2dc38SLeif Lindholmobj-$(CONFIG_SWP_EMULATE)	+= swp_emulate.o
66283a1b92SRussell KingCFLAGS_swp_emulate.o		:= -Wa,-march=armv7-a
6719852e59SWill Deaconobj-$(CONFIG_HAVE_HW_BREAKPOINT)	+= hw_breakpoint.o
681da177e4SLinus Torvalds
69afe4b25eSLennert Buytenhekobj-$(CONFIG_CPU_XSCALE)	+= xscale-cp0.o
70afe4b25eSLennert Buytenhekobj-$(CONFIG_CPU_XSC3)		+= xscale-cp0.o
7140305a58SEric Miaoobj-$(CONFIG_CPU_MOHAWK)	+= xscale-cp0.o
72ef6c8445SHaojian Zhuangobj-$(CONFIG_CPU_PJ4)		+= pj4-cp0.o
73d93003e8SSebastian Hesselbarthobj-$(CONFIG_CPU_PJ4B)		+= pj4-cp0.o
74afe4b25eSLennert Buytenhekobj-$(CONFIG_IWMMXT)		+= iwmmxt.o
75d39976f0SMark Rutlandobj-$(CONFIG_PERF_EVENTS)	+= perf_regs.o perf_callchain.o
76fa8ad788SMark Rutlandobj-$(CONFIG_HW_PERF_EVENTS)	+= perf_event_xscale.o perf_event_v6.o \
7729ba0f37SMark Rutland				   perf_event_v7.o
781da177e4SLinus TorvaldsAFLAGS_iwmmxt.o			:= -Wa,-mcpu=iwmmxt
79c9018aabSVincent Guittotobj-$(CONFIG_ARM_CPU_TOPOLOGY)  += topology.o
80e5b61debSNathan Lynchobj-$(CONFIG_VDSO)		+= vdso.o
81da58fb65SArd Biesheuvelobj-$(CONFIG_EFI)		+= efi.o
821da177e4SLinus Torvalds
831da177e4SLinus Torvaldsifneq ($(CONFIG_ARCH_EBSA110),y)
841da177e4SLinus Torvalds  obj-y		+= io.o
851da177e4SLinus Torvaldsendif
8602c2433bSStefano Stabelliniobj-$(CONFIG_PARAVIRT)	+= paravirt.o
871da177e4SLinus Torvalds
883b920cefSHyok S. Choihead-y			:= head$(MMUEXT).o
891da177e4SLinus Torvaldsobj-$(CONFIG_DEBUG_LL)	+= debug.o
9093fd03a8SCatalin Marinasobj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
911da177e4SLinus Torvalds
92ca8b5d97SNicolas Pitre# This is executed very early using a temporary stack when no memory allocator
93ca8b5d97SNicolas Pitre# nor global data is available. Everything has to be allocated on the stack.
94ca8b5d97SNicolas PitreCFLAGS_head-inflate-data.o := $(call cc-option,-Wframe-larger-than=10240)
95ca8b5d97SNicolas Pitreobj-$(CONFIG_XIP_DEFLATED_DATA) += head-inflate-data.o
96ca8b5d97SNicolas Pitre
9780c59dafSDave Martinobj-$(CONFIG_ARM_VIRT_EXT)	+= hyp-stub.o
98c7edd7f9SJean-Philippe BruckerAFLAGS_hyp-stub.o		:=-Wa,-march=armv7-a
9905774088SStefano Stabelliniifeq ($(CONFIG_ARM_PSCI),y)
10005774088SStefano Stabelliniobj-$(CONFIG_SMP)		+= psci_smp.o
10105774088SStefano Stabelliniendif
10280c59dafSDave Martin
103b329f95dSJens Wiklanderobj-$(CONFIG_HAVE_ARM_SMCCC)	+= smccc-call.o
104b329f95dSJens Wiklander
1055290dc29SThomas Gleixnerextra-y := $(head-y) vmlinux.lds
106