浏览代码

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>
Alexander Graf 8 年之前
父节点
当前提交
ed980b8c62
共有 6 个文件被更改,包括 25 次插入0 次删除
  1. 1 0
      configs/colibri_pxa270_defconfig
  2. 1 0
      configs/kwb_defconfig
  3. 1 0
      lib/Kconfig
  4. 1 0
      lib/Makefile
  5. 9 0
      lib/efi_loader/Kconfig
  6. 12 0
      lib/efi_loader/Makefile

+ 1 - 0
configs/colibri_pxa270_defconfig

@@ -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

+ 1 - 0
configs/kwb_defconfig

@@ -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

+ 1 - 0
lib/Kconfig

@@ -149,5 +149,6 @@ config SPL_OF_LIBFDT
 	  version of the device tree.
 
 source lib/efi/Kconfig
+source lib/efi_loader/Kconfig
 
 endmenu

+ 1 - 0
lib/Makefile

@@ -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/

+ 9 - 0
lib/efi_loader/Kconfig

@@ -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.

+ 12 - 0
lib/efi_loader/Makefile

@@ -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