mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 07:31:15 +00:00
ec80b4735a
Following kernel's proposal for an arch-agnostic initrd loading mechanism [1] let's implement the U-boot counterpart. This new approach has a number of advantages compared to what we did up to now. The file is loaded into memory only when requested limiting the area of TOCTOU attacks. Users will be allowed to place the initramfs file on any u-boot accessible partition instead of just the ESP one. Finally this is an attempt of a generic interface across architectures in the linux kernel so it makes sense to support that. The file location is intentionally only supported as a config option argument(CONFIG_EFI_INITRD_FILESPEC), in an effort to enhance security. Although U-boot is not responsible for verifying the integrity of the initramfs, we can enhance the offered security by only accepting a built-in option, which will be naturally verified by UEFI Secure Boot. This can easily change in the future if needed and configure that via ENV or UEFI variable. [1] https://lore.kernel.org/linux-efi/20200207202637.GA3464906@rani.riverdale.lan/T/#m4a25eb33112fab7a22faa0fd65d4d663209af32f Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
46 lines
1.4 KiB
Makefile
46 lines
1.4 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0+
|
|
#
|
|
# (C) Copyright 2016 Alexander Graf
|
|
#
|
|
|
|
# This file only gets included with CONFIG_EFI_LOADER set, so all
|
|
# object inclusion implicitly depends on it
|
|
|
|
asflags-y += -DHOST_ARCH="$(HOST_ARCH)"
|
|
ccflags-y += -DHOST_ARCH="$(HOST_ARCH)"
|
|
|
|
CFLAGS_efi_boottime.o += \
|
|
-DFW_VERSION="0x$(VERSION)" \
|
|
-DFW_PATCHLEVEL="0x$(PATCHLEVEL)"
|
|
CFLAGS_helloworld.o := $(CFLAGS_EFI) -Os -ffreestanding
|
|
CFLAGS_REMOVE_helloworld.o := $(CFLAGS_NON_EFI)
|
|
|
|
ifneq ($(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
|
|
always += helloworld.efi
|
|
endif
|
|
|
|
obj-$(CONFIG_CMD_BOOTEFI_HELLO) += helloworld_efi.o
|
|
obj-y += efi_bootmgr.o
|
|
obj-y += efi_boottime.o
|
|
obj-y += efi_console.o
|
|
obj-y += efi_device_path.o
|
|
obj-$(CONFIG_EFI_DEVICE_PATH_TO_TEXT) += efi_device_path_to_text.o
|
|
obj-y += efi_device_path_utilities.o
|
|
obj-y += efi_file.o
|
|
obj-$(CONFIG_EFI_LOADER_HII) += efi_hii.o efi_hii_config.o
|
|
obj-y += efi_image_loader.o
|
|
obj-y += efi_memory.o
|
|
obj-y += efi_root_node.o
|
|
obj-y += efi_runtime.o
|
|
obj-y += efi_setup.o
|
|
obj-$(CONFIG_EFI_UNICODE_COLLATION_PROTOCOL2) += efi_unicode_collation.o
|
|
obj-y += efi_variable.o
|
|
obj-y += efi_watchdog.o
|
|
obj-$(CONFIG_LCD) += efi_gop.o
|
|
obj-$(CONFIG_DM_VIDEO) += efi_gop.o
|
|
obj-$(CONFIG_PARTITIONS) += efi_disk.o
|
|
obj-$(CONFIG_NET) += efi_net.o
|
|
obj-$(CONFIG_GENERATE_ACPI_TABLE) += efi_acpi.o
|
|
obj-$(CONFIG_GENERATE_SMBIOS_TABLE) += efi_smbios.o
|
|
obj-$(CONFIG_EFI_RNG_PROTOCOL) += efi_rng.o
|
|
obj-$(CONFIG_EFI_LOAD_FILE2_INITRD) += efi_load_initrd.o
|