[Concept,09/18] efi: Move some load-options handling into the common dir

Message ID 20250820004039.3920254-10-sjg@u-boot.org
State New
Headers
Series efi: Move towards the EFI app booting EFI applications |

Commit Message

Simon Glass Aug. 20, 2025, 12:40 a.m. UTC
  From: Simon Glass <sjg@chromium.org>

These functions are useful for the app as well as the loader.

For now, efi_set_load_options() calls efi_search_protocol() which is
still in the loader, but we can provide an 'app' version when needed. It
doesn't seem worth keeping that one function in a separate file.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 lib/efi/Makefile                                          | 1 +
 lib/{efi_loader/efi_load_options.c => efi/load_options.c} | 0
 lib/efi_loader/Makefile                                   | 1 -
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename lib/{efi_loader/efi_load_options.c => efi/load_options.c} (100%)
  

Patch

diff --git a/lib/efi/Makefile b/lib/efi/Makefile
index a31caf1fce9..9b65cbc0dc2 100644
--- a/lib/efi/Makefile
+++ b/lib/efi/Makefile
@@ -6,5 +6,6 @@ 
 obj-y += basename.o
 obj-y += device_path.o
 obj-y += helper.o
+obj-y += load_options.o
 obj-y += memory.o
 obj-y += run.o
diff --git a/lib/efi_loader/efi_load_options.c b/lib/efi/load_options.c
similarity index 100%
rename from lib/efi_loader/efi_load_options.c
rename to lib/efi/load_options.c
diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile
index 3158fc6da68..2b232940bc3 100644
--- a/lib/efi_loader/Makefile
+++ b/lib/efi_loader/Makefile
@@ -38,7 +38,6 @@  obj-y += efi_fdt.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_load_options.o
 obj-$(CONFIG_EFI_LOG) += efi_log.o
 obj-y += efi_memory.o
 obj-y += efi_root_node.o