Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Catalin Marinas | 8c2c3df | 2012-04-20 14:45:54 +0100 | [diff] [blame] | 2 | # |
| 3 | # Makefile for the linux kernel. |
| 4 | # |
| 5 | |
| 6 | CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET) |
| 7 | AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET) |
Punit Agrawal | d784e29 | 2014-11-18 11:41:27 +0000 | [diff] [blame] | 8 | CFLAGS_armv8_deprecated.o := -I$(src) |
Catalin Marinas | 8c2c3df | 2012-04-20 14:45:54 +0100 | [diff] [blame] | 9 | |
AKASHI Takahiro | 819e50e | 2014-04-30 18:54:33 +0900 | [diff] [blame] | 10 | CFLAGS_REMOVE_ftrace.o = -pg |
| 11 | CFLAGS_REMOVE_insn.o = -pg |
AKASHI Takahiro | 3711784 | 2014-04-30 10:54:35 +0100 | [diff] [blame] | 12 | CFLAGS_REMOVE_return_address.o = -pg |
AKASHI Takahiro | 819e50e | 2014-04-30 18:54:33 +0900 | [diff] [blame] | 13 | |
Catalin Marinas | 8c2c3df | 2012-04-20 14:45:54 +0100 | [diff] [blame] | 14 | # Object file lists. |
Marc Zyngier | a591ede | 2015-03-18 14:55:20 +0000 | [diff] [blame] | 15 | arm64-obj-y := debug-monitors.o entry.o irq.o fpsimd.o \ |
Catalin Marinas | 8c2c3df | 2012-04-20 14:45:54 +0100 | [diff] [blame] | 16 | entry-fpsimd.o process.o ptrace.o setup.o signal.o \ |
Marc Zyngier | 712c6ff | 2012-10-19 17:46:27 +0100 | [diff] [blame] | 17 | sys.o stacktrace.o time.o traps.o io.o vdso.o \ |
Jens Wiklander | e679660 | 2016-01-04 15:46:47 +0100 | [diff] [blame] | 18 | hyp-stub.o psci.o cpu_ops.o insn.o \ |
Will Deacon | f5e0a12 | 2015-02-25 12:10:35 +0000 | [diff] [blame] | 19 | return_address.o cpuinfo.o cpu_errata.o \ |
Will Deacon | 4b3dc96 | 2015-05-29 18:28:44 +0100 | [diff] [blame] | 20 | cpufeature.o alternative.o cacheinfo.o \ |
Mark Rutland | 4141c85 | 2018-07-11 14:56:43 +0100 | [diff] [blame] | 21 | smp.o smp_spin_table.o topology.o smccc-call.o \ |
| 22 | syscall.o |
Catalin Marinas | 8c2c3df | 2012-04-20 14:45:54 +0100 | [diff] [blame] | 23 | |
Ard Biesheuvel | bf45778 | 2015-10-23 16:48:14 +0200 | [diff] [blame] | 24 | extra-$(CONFIG_EFI) := efi-entry.o |
Ard Biesheuvel | e8f3010 | 2015-10-08 20:02:04 +0100 | [diff] [blame] | 25 | |
| 26 | OBJCOPYFLAGS := --prefix-symbols=__efistub_ |
| 27 | $(obj)/%.stub.o: $(obj)/%.o FORCE |
| 28 | $(call if_changed,objcopy) |
| 29 | |
Catalin Marinas | 8c2c3df | 2012-04-20 14:45:54 +0100 | [diff] [blame] | 30 | arm64-obj-$(CONFIG_COMPAT) += sys32.o kuser32.o signal32.o \ |
Mark Rutland | 55f8492 | 2018-07-11 14:56:55 +0100 | [diff] [blame] | 31 | sys_compat.o |
AKASHI Takahiro | 819e50e | 2014-04-30 18:54:33 +0900 | [diff] [blame] | 32 | arm64-obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o entry-ftrace.o |
Catalin Marinas | 8c2c3df | 2012-04-20 14:45:54 +0100 | [diff] [blame] | 33 | arm64-obj-$(CONFIG_MODULES) += arm64ksyms.o module.o |
Ard Biesheuvel | fd045f6 | 2015-11-24 12:37:35 +0100 | [diff] [blame] | 34 | arm64-obj-$(CONFIG_ARM64_MODULE_PLTS) += module-plts.o |
Will Deacon | 5166c20 | 2015-08-24 13:35:51 +0100 | [diff] [blame] | 35 | arm64-obj-$(CONFIG_PERF_EVENTS) += perf_regs.o perf_callchain.o |
| 36 | arm64-obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o |
Jean Pihet | 2ee0d7f | 2014-02-03 19:18:27 +0100 | [diff] [blame] | 37 | arm64-obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o |
Lorenzo Pieralisi | af3cfdb | 2015-01-26 18:33:44 +0000 | [diff] [blame] | 38 | arm64-obj-$(CONFIG_CPU_PM) += sleep.o suspend.o |
Lorenzo Pieralisi | d64f84f | 2014-07-17 10:30:07 +0100 | [diff] [blame] | 39 | arm64-obj-$(CONFIG_CPU_IDLE) += cpuidle.o |
Jiang Liu | 9732caf | 2014-01-07 22:17:13 +0800 | [diff] [blame] | 40 | arm64-obj-$(CONFIG_JUMP_LABEL) += jump_label.o |
Vijaya Kumar K | bcf5763 | 2014-01-28 16:50:18 +0530 | [diff] [blame] | 41 | arm64-obj-$(CONFIG_KGDB) += kgdb.o |
Ard Biesheuvel | 7e611e7 | 2018-03-08 08:00:13 +0000 | [diff] [blame] | 42 | arm64-obj-$(CONFIG_EFI) += efi.o efi-entry.stub.o \ |
| 43 | efi-rt-wrapper.o |
Liviu Dudau | d1e6dc9 | 2014-09-29 15:29:31 +0100 | [diff] [blame] | 44 | arm64-obj-$(CONFIG_PCI) += pci.o |
Punit Agrawal | 587064b | 2014-11-18 11:41:24 +0000 | [diff] [blame] | 45 | arm64-obj-$(CONFIG_ARMV8_DEPRECATED) += armv8_deprecated.o |
Al Stone | 3765516 | 2015-03-24 14:02:37 +0000 | [diff] [blame] | 46 | arm64-obj-$(CONFIG_ACPI) += acpi.o |
Hanjun Guo | d8b47fc | 2016-05-24 15:35:44 -0700 | [diff] [blame] | 47 | arm64-obj-$(CONFIG_ACPI_NUMA) += acpi_numa.o |
Lorenzo Pieralisi | 5e89c55 | 2016-01-26 11:10:38 +0000 | [diff] [blame] | 48 | arm64-obj-$(CONFIG_ARM64_ACPI_PARKING_PROTOCOL) += acpi_parking_protocol.o |
Stefano Stabellini | dfd57bc | 2015-11-23 10:33:49 +0000 | [diff] [blame] | 49 | arm64-obj-$(CONFIG_PARAVIRT) += paravirt.o |
Ard Biesheuvel | f80fb3a | 2016-01-26 14:12:01 +0100 | [diff] [blame] | 50 | arm64-obj-$(CONFIG_RANDOMIZE_BASE) += kaslr.o |
James Morse | 82869ac | 2016-04-27 17:47:12 +0100 | [diff] [blame] | 51 | arm64-obj-$(CONFIG_HIBERNATION) += hibernate.o hibernate-asm.o |
Geoff Levand | d28f6df | 2016-06-23 17:54:48 +0000 | [diff] [blame] | 52 | arm64-obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o \ |
| 53 | cpu-reset.o |
Ard Biesheuvel | 214fad5 | 2017-03-31 08:55:33 +0100 | [diff] [blame] | 54 | arm64-obj-$(CONFIG_ARM64_RELOC_TEST) += arm64-reloc-test.o |
| 55 | arm64-reloc-test-y := reloc_test_core.o reloc_test_syms.o |
AKASHI Takahiro | e62aaea | 2017-04-03 11:24:38 +0900 | [diff] [blame] | 56 | arm64-obj-$(CONFIG_CRASH_DUMP) += crash_dump.o |
James Morse | 84c57db | 2018-09-10 15:20:54 +0100 | [diff] [blame^] | 57 | arm64-obj-$(CONFIG_CRASH_CORE) += crash_core.o |
James Morse | f5df269 | 2018-01-08 15:38:12 +0000 | [diff] [blame] | 58 | arm64-obj-$(CONFIG_ARM_SDE_INTERFACE) += sdei.o |
Marc Zyngier | 9cdc010 | 2018-05-29 13:11:14 +0100 | [diff] [blame] | 59 | arm64-obj-$(CONFIG_ARM64_SSBD) += ssbd.o |
Catalin Marinas | 8c2c3df | 2012-04-20 14:45:54 +0100 | [diff] [blame] | 60 | |
Sandeepa Prabhu | 2dd0e8d | 2016-07-08 12:35:48 -0400 | [diff] [blame] | 61 | obj-y += $(arm64-obj-y) vdso/ probes/ |
Catalin Marinas | 8c2c3df | 2012-04-20 14:45:54 +0100 | [diff] [blame] | 62 | obj-m += $(arm64-obj-m) |
| 63 | head-y := head.o |
Ard Biesheuvel | e8f3010 | 2015-10-08 20:02:04 +0100 | [diff] [blame] | 64 | extra-y += $(head-y) vmlinux.lds |
Ard Biesheuvel | 757b435 | 2017-02-02 17:33:19 +0000 | [diff] [blame] | 65 | |
| 66 | ifeq ($(CONFIG_DEBUG_EFI),y) |
| 67 | AFLAGS_head.o += -DVMLINUX_PATH="\"$(realpath $(objtree)/vmlinux)\"" |
| 68 | endif |