blob: 13a35eae6c067b76eac207c996fdbb047379838d [file] [log] [blame]
Tom Rinif739fcd2018-05-07 17:02:21 -04001# SPDX-License-Identifier: GPL-2.0+
Alexander Grafed980b82016-03-04 01:10:07 +01002#
3# (C) Copyright 2016 Alexander Graf
4#
Alexander Grafed980b82016-03-04 01:10:07 +01005
6# This file only gets included with CONFIG_EFI_LOADER set, so all
7# object inclusion implicitly depends on it
8
Heinrich Schuchardt7dda1632020-07-14 21:25:28 +02009asflags-y += -DHOST_ARCH="$(HOST_ARCH)" -I.
Heinrich Schuchardt3b4847c2019-11-07 08:05:17 +010010ccflags-y += -DHOST_ARCH="$(HOST_ARCH)"
11
Heinrich Schuchardt0b386532018-06-28 12:45:30 +020012CFLAGS_efi_boottime.o += \
13 -DFW_VERSION="0x$(VERSION)" \
14 -DFW_PATCHLEVEL="0x$(PATCHLEVEL)"
Heinrich Schuchardtf2d60f62022-12-01 19:07:57 +010015CFLAGS_boothart.o := $(CFLAGS_EFI) -Os -ffreestanding
16CFLAGS_REMOVE_boothart.o := $(CFLAGS_NON_EFI)
Alexander Graf3bb74f92017-12-01 22:09:50 +010017CFLAGS_helloworld.o := $(CFLAGS_EFI) -Os -ffreestanding
Heinrich Schuchardt0e3dc012019-01-12 15:32:06 +010018CFLAGS_REMOVE_helloworld.o := $(CFLAGS_NON_EFI)
Heinrich Schuchardt9c045a42022-03-03 08:13:53 +010019CFLAGS_dtbdump.o := $(CFLAGS_EFI) -Os -ffreestanding
20CFLAGS_REMOVE_dtbdump.o := $(CFLAGS_NON_EFI)
Andy Shevchenkob6370ac2022-03-30 12:14:43 +030021CFLAGS_initrddump.o := $(CFLAGS_EFI) -Os -ffreestanding
Heinrich Schuchardt9c045a42022-03-03 08:13:53 +010022CFLAGS_REMOVE_initrddump.o := $(CFLAGS_NON_EFI)
Simon Glassc7ae3df2016-11-07 08:47:08 -070023
Heinrich Schuchardtf2d60f62022-12-01 19:07:57 +010024ifdef CONFIG_RISCV
25always += boothart.efi
26endif
27
Heinrich Schuchardtc96967e2017-09-05 03:19:39 +020028ifneq ($(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
29always += helloworld.efi
Jan Kiszkab37a0b52020-05-04 14:38:29 +020030targets += helloworld.o
Heinrich Schuchardtc96967e2017-09-05 03:19:39 +020031endif
Alexander Graf95b62b22016-11-17 22:40:10 +010032
Heinrich Schuchardt9c045a42022-03-03 08:13:53 +010033ifeq ($(CONFIG_GENERATE_ACPI_TABLE),)
34always += dtbdump.efi
35endif
36
37ifdef CONFIG_EFI_LOAD_FILE2_INITRD
38always += initrddump.efi
39endif
40
Simon Glassc7ae3df2016-11-07 08:47:08 -070041obj-$(CONFIG_CMD_BOOTEFI_HELLO) += helloworld_efi.o
Heinrich Schuchardtff2f5322021-01-15 19:02:50 +010042obj-$(CONFIG_CMD_BOOTEFI_BOOTMGR) += efi_bootmgr.o
Heinrich Schuchardt0bc4b0d2018-09-04 19:34:58 +020043obj-y += efi_boottime.o
Ilias Apalodimas37c3ca52021-03-17 21:54:59 +020044obj-y += efi_helper.o
AKASHI Takahiro2bc27ca2020-11-17 09:27:55 +090045obj-$(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) += efi_capsule.o
AKASHI Takahirobb7e71d2020-11-17 09:28:00 +090046obj-$(CONFIG_EFI_CAPSULE_FIRMWARE) += efi_firmware.o
Heinrich Schuchardt0bc4b0d2018-09-04 19:34:58 +020047obj-y += efi_console.o
48obj-y += efi_device_path.o
Heinrich Schuchardt64b5ba42019-05-11 09:53:33 +020049obj-$(CONFIG_EFI_DEVICE_PATH_TO_TEXT) += efi_device_path_to_text.o
Heinrich Schuchardt59593a52021-01-16 09:44:25 +010050obj-$(CONFIG_EFI_DEVICE_PATH_UTIL) += efi_device_path_utilities.o
Heinrich Schuchardt94686f62020-12-13 10:30:24 +010051ifeq ($(CONFIG_GENERATE_ACPI_TABLE),)
52obj-y += efi_dt_fixup.o
53endif
Heinrich Schuchardt0bc4b0d2018-09-04 19:34:58 +020054obj-y += efi_file.o
Heinrich Schuchardt861072b2020-12-07 18:20:57 +010055obj-$(CONFIG_EFI_LOADER_HII) += efi_hii.o
Heinrich Schuchardt0bc4b0d2018-09-04 19:34:58 +020056obj-y += efi_image_loader.o
Heinrich Schuchardt2363eff2021-01-15 19:02:49 +010057obj-y += efi_load_options.o
Heinrich Schuchardt0bc4b0d2018-09-04 19:34:58 +020058obj-y += efi_memory.o
Heinrich Schuchardt4e6b5d62018-09-20 21:58:23 +020059obj-y += efi_root_node.o
Heinrich Schuchardt0bc4b0d2018-09-04 19:34:58 +020060obj-y += efi_runtime.o
AKASHI Takahiro056b45b2018-12-30 15:16:55 +010061obj-y += efi_setup.o
AKASHI Takahiro077153e2020-10-29 13:47:46 +090062obj-y += efi_string.o
Heinrich Schuchardt95ab3812019-05-16 07:52:58 +020063obj-$(CONFIG_EFI_UNICODE_COLLATION_PROTOCOL2) += efi_unicode_collation.o
Heinrich Schuchardtf2d2b3a2020-06-22 18:10:27 +020064obj-y += efi_var_common.o
Heinrich Schuchardtf1f990a2020-03-22 09:07:50 +010065obj-y += efi_var_mem.o
Ilias Apalodimase01aed42020-07-23 15:49:49 +030066obj-y += efi_var_file.o
Ilias Apalodimasf042e472020-05-17 22:25:44 +030067ifeq ($(CONFIG_EFI_MM_COMM_TEE),y)
68obj-y += efi_variable_tee.o
69else
Heinrich Schuchardt0bc4b0d2018-09-04 19:34:58 +020070obj-y += efi_variable.o
Heinrich Schuchardt7dda1632020-07-14 21:25:28 +020071obj-$(CONFIG_EFI_VARIABLES_PRESEED) += efi_var_seed.o
Ilias Apalodimasf042e472020-05-17 22:25:44 +030072endif
Leif Lindholme70f8df2018-03-09 17:43:21 +010073obj-y += efi_watchdog.o
Jose Marinho64a8aae2021-03-02 17:26:38 +000074obj-$(CONFIG_EFI_ESRT) += efi_esrt.o
Simon Glassb86986c2022-10-18 07:46:31 -060075obj-$(CONFIG_VIDEO) += efi_gop.o
AKASHI Takahiro38f255b2022-04-19 10:01:57 +090076obj-$(CONFIG_BLK) += efi_disk.o
Jan Kiszka77b5c4a2022-10-14 18:10:06 +020077obj-$(CONFIG_NETDEVICES) += efi_net.o
Bin Meng86df34d2018-06-27 20:38:03 -070078obj-$(CONFIG_GENERATE_ACPI_TABLE) += efi_acpi.o
Alexander Grafe663b352016-08-19 01:23:29 +020079obj-$(CONFIG_GENERATE_SMBIOS_TABLE) += efi_smbios.o
Sughosh Ganuf552fa42019-12-29 00:01:05 +053080obj-$(CONFIG_EFI_RNG_PROTOCOL) += efi_rng.o
Ilias Apalodimasc1c02102020-11-11 11:18:11 +020081obj-$(CONFIG_EFI_TCG2_PROTOCOL) += efi_tcg2.o
Sunil V L1ccf8712022-01-28 20:48:44 +053082obj-$(CONFIG_EFI_RISCV_BOOT_PROTOCOL) += efi_riscv.o
Ilias Apalodimasec80b472020-02-21 09:55:45 +020083obj-$(CONFIG_EFI_LOAD_FILE2_INITRD) += efi_load_initrd.o
Masahisa Kojimaf6081a82021-05-14 09:53:36 +090084obj-$(CONFIG_EFI_SIGNATURE_SUPPORT) += efi_signature.o
Jose Marinho6b92c172021-12-23 14:51:07 +000085obj-$(CONFIG_EFI_ECPT) += efi_conformance.o
Heinrich Schuchardt7dda1632020-07-14 21:25:28 +020086
87EFI_VAR_SEED_FILE := $(subst $\",,$(CONFIG_EFI_VAR_SEED_FILE))
88$(obj)/efi_var_seed.o: $(srctree)/$(EFI_VAR_SEED_FILE)