1# SPDX-License-Identifier: GPL-2.0+ 2# 3# (C) Copyright 2016 Alexander Graf 4# 5 6# This file only gets included with CONFIG_EFI_LOADER set, so all 7# object inclusion implicitly depends on it 8 9asflags-y += -DHOST_ARCH="$(HOST_ARCH)" -I. 10ccflags-y += -DHOST_ARCH="$(HOST_ARCH)" 11 12CFLAGS_efi_boottime.o += \ 13 -DFW_VERSION="0x$(VERSION)" \ 14 -DFW_PATCHLEVEL="0x$(PATCHLEVEL)" 15CFLAGS_boothart.o := $(CFLAGS_EFI) -Os -ffreestanding 16CFLAGS_REMOVE_boothart.o := $(CFLAGS_NON_EFI) 17CFLAGS_helloworld.o := $(CFLAGS_EFI) -Os -ffreestanding 18CFLAGS_REMOVE_helloworld.o := $(CFLAGS_NON_EFI) 19CFLAGS_dtbdump.o := $(CFLAGS_EFI) -Os -ffreestanding 20CFLAGS_REMOVE_dtbdump.o := $(CFLAGS_NON_EFI) 21CFLAGS_initrddump.o := $(CFLAGS_EFI) -Os -ffreestanding 22CFLAGS_REMOVE_initrddump.o := $(CFLAGS_NON_EFI) 23 24ifdef CONFIG_RISCV 25always += boothart.efi 26endif 27 28ifneq ($(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),) 29always += helloworld.efi 30targets += helloworld.o 31endif 32 33ifeq ($(CONFIG_GENERATE_ACPI_TABLE),) 34always += dtbdump.efi 35endif 36 37ifdef CONFIG_EFI_LOAD_FILE2_INITRD 38always += initrddump.efi 39endif 40 41obj-$(CONFIG_CMD_BOOTEFI_HELLO) += helloworld_efi.o 42obj-$(CONFIG_CMD_BOOTEFI_BOOTMGR) += efi_bootmgr.o 43obj-y += efi_boottime.o 44obj-y += efi_helper.o 45obj-$(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) += efi_capsule.o 46obj-$(CONFIG_EFI_CAPSULE_FIRMWARE) += efi_firmware.o 47obj-y += efi_console.o 48obj-y += efi_device_path.o 49obj-$(CONFIG_EFI_DEVICE_PATH_TO_TEXT) += efi_device_path_to_text.o 50obj-$(CONFIG_EFI_DEVICE_PATH_UTIL) += efi_device_path_utilities.o 51ifeq ($(CONFIG_GENERATE_ACPI_TABLE),) 52obj-y += efi_dt_fixup.o 53endif 54obj-y += efi_file.o 55obj-$(CONFIG_EFI_LOADER_HII) += efi_hii.o 56obj-y += efi_image_loader.o 57obj-y += efi_load_options.o 58obj-y += efi_memory.o 59obj-y += efi_root_node.o 60obj-y += efi_runtime.o 61obj-y += efi_setup.o 62obj-y += efi_string.o 63obj-$(CONFIG_EFI_UNICODE_COLLATION_PROTOCOL2) += efi_unicode_collation.o 64obj-y += efi_var_common.o 65obj-y += efi_var_mem.o 66obj-y += efi_var_file.o 67ifeq ($(CONFIG_EFI_MM_COMM_TEE),y) 68obj-y += efi_variable_tee.o 69else 70obj-y += efi_variable.o 71obj-$(CONFIG_EFI_VARIABLES_PRESEED) += efi_var_seed.o 72endif 73obj-y += efi_watchdog.o 74obj-$(CONFIG_EFI_ESRT) += efi_esrt.o 75obj-$(CONFIG_VIDEO) += efi_gop.o 76obj-$(CONFIG_BLK) += efi_disk.o 77obj-$(CONFIG_NETDEVICES) += efi_net.o 78obj-$(CONFIG_GENERATE_ACPI_TABLE) += efi_acpi.o 79obj-$(CONFIG_GENERATE_SMBIOS_TABLE) += efi_smbios.o 80obj-$(CONFIG_EFI_RNG_PROTOCOL) += efi_rng.o 81obj-$(CONFIG_EFI_TCG2_PROTOCOL) += efi_tcg2.o 82obj-$(CONFIG_EFI_RISCV_BOOT_PROTOCOL) += efi_riscv.o 83obj-$(CONFIG_EFI_LOAD_FILE2_INITRD) += efi_load_initrd.o 84obj-$(CONFIG_EFI_SIGNATURE_SUPPORT) += efi_signature.o 85obj-$(CONFIG_EFI_ECPT) += efi_conformance.o 86 87EFI_VAR_SEED_FILE := $(subst $\",,$(CONFIG_EFI_VAR_SEED_FILE)) 88$(obj)/efi_var_seed.o: $(srctree)/$(EFI_VAR_SEED_FILE) 89