Commit ed980b8c62fbe17052ec6151a68b5b0be3809485

Authored by Alexander Graf
Committed by Tom Rini
1 parent 649829157e

efi_loader: hook up in build environment

Now that we have all the bits and pieces ready for EFI payload loading
support, hook them up in Makefiles and KConfigs so that we can build.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
[trini: Enable only when we of OF_LIBFDT, disable on kwb and colibri_pxa270]
Signed-off-by: Tom Rini <trini@konsulko.com>

Showing 6 changed files with 25 additions and 0 deletions Side-by-side Diff

configs/colibri_pxa270_defconfig
... ... @@ -5,4 +5,5 @@
5 5 # CONFIG_CMD_LOADS is not set
6 6 # CONFIG_CMD_SETEXPR is not set
7 7 CONFIG_OF_LIBFDT=y
  8 +# CONFIG_EFI_LOADER is not set
configs/kwb_defconfig
... ... @@ -30,4 +30,5 @@
30 30 CONFIG_USB=y
31 31 CONFIG_USB_MUSB_HOST=y
32 32 CONFIG_USB_STORAGE=y
  33 +# CONFIG_EFI_LOADER is not set
... ... @@ -149,6 +149,7 @@
149 149 version of the device tree.
150 150  
151 151 source lib/efi/Kconfig
  152 +source lib/efi_loader/Kconfig
152 153  
153 154 endmenu
... ... @@ -8,6 +8,7 @@
8 8 ifndef CONFIG_SPL_BUILD
9 9  
10 10 obj-$(CONFIG_EFI) += efi/
  11 +obj-$(CONFIG_EFI_LOADER) += efi_loader/
11 12 obj-$(CONFIG_RSA) += rsa/
12 13 obj-$(CONFIG_LZMA) += lzma/
13 14 obj-$(CONFIG_LZO) += lzo/
lib/efi_loader/Kconfig
  1 +config EFI_LOADER
  2 + bool "Support running EFI Applications in U-Boot"
  3 + depends on (ARM64 || ARM) && OF_LIBFDT
  4 + default y
  5 + help
  6 + Select this option if you want to run EFI applications (like grub2)
  7 + on top of U-Boot. If this option is enabled, U-Boot will expose EFI
  8 + interfaces to a loaded EFI application, enabling it to reuse U-Boot's
  9 + device drivers.
lib/efi_loader/Makefile
  1 +#
  2 +# (C) Copyright 2016 Alexander Graf
  3 +#
  4 +# SPDX-License-Identifier: GPL-2.0+
  5 +#
  6 +
  7 +# This file only gets included with CONFIG_EFI_LOADER set, so all
  8 +# object inclusion implicitly depends on it
  9 +
  10 +obj-y += efi_image_loader.o efi_boottime.o efi_runtime.o efi_console.o
  11 +obj-y += efi_memory.o
  12 +obj-$(CONFIG_PARTITIONS) += efi_disk.o