blob: 4c8b13bede80f98195ba1090fea11601a6d3df22 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Catalin Marinas8c2c3df2012-04-20 14:45:54 +01002#
3# Makefile for the linux kernel.
4#
5
6CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET)
7AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET)
Punit Agrawald784e292014-11-18 11:41:27 +00008CFLAGS_armv8_deprecated.o := -I$(src)
Catalin Marinas8c2c3df2012-04-20 14:45:54 +01009
AKASHI Takahiro819e50e2014-04-30 18:54:33 +090010CFLAGS_REMOVE_ftrace.o = -pg
11CFLAGS_REMOVE_insn.o = -pg
AKASHI Takahiro37117842014-04-30 10:54:35 +010012CFLAGS_REMOVE_return_address.o = -pg
AKASHI Takahiro819e50e2014-04-30 18:54:33 +090013
Catalin Marinas8c2c3df2012-04-20 14:45:54 +010014# Object file lists.
Marc Zyngiera591ede2015-03-18 14:55:20 +000015arm64-obj-y := debug-monitors.o entry.o irq.o fpsimd.o \
Catalin Marinas8c2c3df2012-04-20 14:45:54 +010016 entry-fpsimd.o process.o ptrace.o setup.o signal.o \
Marc Zyngier712c6ff2012-10-19 17:46:27 +010017 sys.o stacktrace.o time.o traps.o io.o vdso.o \
Jens Wiklandere6796602016-01-04 15:46:47 +010018 hyp-stub.o psci.o cpu_ops.o insn.o \
Will Deaconf5e0a122015-02-25 12:10:35 +000019 return_address.o cpuinfo.o cpu_errata.o \
Will Deacon4b3dc962015-05-29 18:28:44 +010020 cpufeature.o alternative.o cacheinfo.o \
Mark Rutland4141c852018-07-11 14:56:43 +010021 smp.o smp_spin_table.o topology.o smccc-call.o \
22 syscall.o
Catalin Marinas8c2c3df2012-04-20 14:45:54 +010023
Ard Biesheuvelbf457782015-10-23 16:48:14 +020024extra-$(CONFIG_EFI) := efi-entry.o
Ard Biesheuvele8f30102015-10-08 20:02:04 +010025
26OBJCOPYFLAGS := --prefix-symbols=__efistub_
27$(obj)/%.stub.o: $(obj)/%.o FORCE
28 $(call if_changed,objcopy)
29
Catalin Marinas8c2c3df2012-04-20 14:45:54 +010030arm64-obj-$(CONFIG_COMPAT) += sys32.o kuser32.o signal32.o \
Mark Rutland55f84922018-07-11 14:56:55 +010031 sys_compat.o
AKASHI Takahiro819e50e2014-04-30 18:54:33 +090032arm64-obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o entry-ftrace.o
Catalin Marinas8c2c3df2012-04-20 14:45:54 +010033arm64-obj-$(CONFIG_MODULES) += arm64ksyms.o module.o
Ard Biesheuvelfd045f62015-11-24 12:37:35 +010034arm64-obj-$(CONFIG_ARM64_MODULE_PLTS) += module-plts.o
Will Deacon5166c202015-08-24 13:35:51 +010035arm64-obj-$(CONFIG_PERF_EVENTS) += perf_regs.o perf_callchain.o
36arm64-obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o
Jean Pihet2ee0d7f2014-02-03 19:18:27 +010037arm64-obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o
Lorenzo Pieralisiaf3cfdb2015-01-26 18:33:44 +000038arm64-obj-$(CONFIG_CPU_PM) += sleep.o suspend.o
Lorenzo Pieralisid64f84f2014-07-17 10:30:07 +010039arm64-obj-$(CONFIG_CPU_IDLE) += cpuidle.o
Jiang Liu9732caf2014-01-07 22:17:13 +080040arm64-obj-$(CONFIG_JUMP_LABEL) += jump_label.o
Vijaya Kumar Kbcf57632014-01-28 16:50:18 +053041arm64-obj-$(CONFIG_KGDB) += kgdb.o
Ard Biesheuvel7e611e72018-03-08 08:00:13 +000042arm64-obj-$(CONFIG_EFI) += efi.o efi-entry.stub.o \
43 efi-rt-wrapper.o
Liviu Dudaud1e6dc92014-09-29 15:29:31 +010044arm64-obj-$(CONFIG_PCI) += pci.o
Punit Agrawal587064b2014-11-18 11:41:24 +000045arm64-obj-$(CONFIG_ARMV8_DEPRECATED) += armv8_deprecated.o
Al Stone37655162015-03-24 14:02:37 +000046arm64-obj-$(CONFIG_ACPI) += acpi.o
Hanjun Guod8b47fc2016-05-24 15:35:44 -070047arm64-obj-$(CONFIG_ACPI_NUMA) += acpi_numa.o
Lorenzo Pieralisi5e89c552016-01-26 11:10:38 +000048arm64-obj-$(CONFIG_ARM64_ACPI_PARKING_PROTOCOL) += acpi_parking_protocol.o
Stefano Stabellinidfd57bc2015-11-23 10:33:49 +000049arm64-obj-$(CONFIG_PARAVIRT) += paravirt.o
Ard Biesheuvelf80fb3a2016-01-26 14:12:01 +010050arm64-obj-$(CONFIG_RANDOMIZE_BASE) += kaslr.o
James Morse82869ac2016-04-27 17:47:12 +010051arm64-obj-$(CONFIG_HIBERNATION) += hibernate.o hibernate-asm.o
Geoff Levandd28f6df2016-06-23 17:54:48 +000052arm64-obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o \
53 cpu-reset.o
Ard Biesheuvel214fad52017-03-31 08:55:33 +010054arm64-obj-$(CONFIG_ARM64_RELOC_TEST) += arm64-reloc-test.o
55arm64-reloc-test-y := reloc_test_core.o reloc_test_syms.o
AKASHI Takahiroe62aaea2017-04-03 11:24:38 +090056arm64-obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
James Morse84c57db2018-09-10 15:20:54 +010057arm64-obj-$(CONFIG_CRASH_CORE) += crash_core.o
James Morsef5df2692018-01-08 15:38:12 +000058arm64-obj-$(CONFIG_ARM_SDE_INTERFACE) += sdei.o
Marc Zyngier9cdc0102018-05-29 13:11:14 +010059arm64-obj-$(CONFIG_ARM64_SSBD) += ssbd.o
Catalin Marinas8c2c3df2012-04-20 14:45:54 +010060
Sandeepa Prabhu2dd0e8d2016-07-08 12:35:48 -040061obj-y += $(arm64-obj-y) vdso/ probes/
Catalin Marinas8c2c3df2012-04-20 14:45:54 +010062obj-m += $(arm64-obj-m)
63head-y := head.o
Ard Biesheuvele8f30102015-10-08 20:02:04 +010064extra-y += $(head-y) vmlinux.lds
Ard Biesheuvel757b4352017-02-02 17:33:19 +000065
66ifeq ($(CONFIG_DEBUG_EFI),y)
67AFLAGS_head.o += -DVMLINUX_PATH="\"$(realpath $(objtree)/vmlinux)\""
68endif