efi_loader: hook up in build environment
authorAlexander Graf <agraf@suse.de>
Fri, 4 Mar 2016 00:10:07 +0000 (01:10 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 16 Mar 2016 01:30:11 +0000 (21:30 -0400)
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>
configs/colibri_pxa270_defconfig
configs/kwb_defconfig
lib/Kconfig
lib/Makefile
lib/efi_loader/Kconfig [new file with mode: 0644]
lib/efi_loader/Makefile [new file with mode: 0644]

index 7006e8a524b5beff463ff1be66028fe0dc65bcc3..d1de1167839cc10476184956817a6c3973ef5edd 100644 (file)
@@ -5,3 +5,4 @@ CONFIG_TARGET_COLIBRI_PXA270=y
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_LIBFDT=y
+# CONFIG_EFI_LOADER is not set
index ce66f762ea24bca57e2754ab0bb570ddb03345cd..a5602a0c6ed2d1e20d92fc342a6edc48f70bbb61 100644 (file)
@@ -30,3 +30,4 @@ CONFIG_OF_LIBFDT=y
 CONFIG_USB=y
 CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_STORAGE=y
+# CONFIG_EFI_LOADER is not set
index 078ef5c29e49e18a075b5f7c03519a6307470b6a..7a453362a1b27b19a38a7db6451ea769ba9fd7ea 100644 (file)
@@ -149,5 +149,6 @@ config SPL_OF_LIBFDT
          version of the device tree.
 
 source lib/efi/Kconfig
+source lib/efi_loader/Kconfig
 
 endmenu
index d49ee62a92c726b4bafb76581825e0a87b3336f6..02dfa2950730e45b00a550f1766bc7eb145c6a55 100644 (file)
@@ -8,6 +8,7 @@
 ifndef CONFIG_SPL_BUILD
 
 obj-$(CONFIG_EFI) += efi/
+obj-$(CONFIG_EFI_LOADER) += efi_loader/
 obj-$(CONFIG_RSA) += rsa/
 obj-$(CONFIG_LZMA) += lzma/
 obj-$(CONFIG_LZO) += lzo/
diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
new file mode 100644 (file)
index 0000000..14c99ec
--- /dev/null
@@ -0,0 +1,9 @@
+config EFI_LOADER
+       bool "Support running EFI Applications in U-Boot"
+       depends on (ARM64 || ARM) && OF_LIBFDT
+       default y
+       help
+         Select this option if you want to run EFI applications (like grub2)
+         on top of U-Boot. If this option is enabled, U-Boot will expose EFI
+         interfaces to a loaded EFI application, enabling it to reuse U-Boot's
+         device drivers.
diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile
new file mode 100644 (file)
index 0000000..28725a2
--- /dev/null
@@ -0,0 +1,12 @@
+#
+# (C) Copyright 2016 Alexander Graf
+#
+#  SPDX-License-Identifier:     GPL-2.0+
+#
+
+# This file only gets included with CONFIG_EFI_LOADER set, so all
+# object inclusion implicitly depends on it
+
+obj-y += efi_image_loader.o efi_boottime.o efi_runtime.o efi_console.o
+obj-y += efi_memory.o
+obj-$(CONFIG_PARTITIONS) += efi_disk.o