From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 06/16] efi: handle: build for both EFI payload and loader
Date: Thu, 11 Dec 2025 21:29:57 +0100 [thread overview]
Message-ID: <20251211203056.2014710-7-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20251211203056.2014710-1-a.fatoum@pengutronix.de>
Since commit 387d6f9ed9a1 ("commands: provide efi_handle_dump in both
payload and loader"), drivers/efi/efi-handle.c is usable outside payload
as well, so move it into the efi/ directory.
While at it, drop the common.h header as it's only included header you
actually needed.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/efi/Makefile | 2 +-
efi/Makefile | 2 +-
drivers/efi/efi-handle.c => efi/handle.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
rename drivers/efi/efi-handle.c => efi/handle.c (97%)
diff --git a/drivers/efi/Makefile b/drivers/efi/Makefile
index 4e3c39e14486..8f0b43e70e45 100644
--- a/drivers/efi/Makefile
+++ b/drivers/efi/Makefile
@@ -1,3 +1,3 @@
# SPDX-License-Identifier: GPL-2.0-only
-obj-y += efi-handle.o
+
obj-$(CONFIG_EFI_PAYLOAD) += efi-device.o
diff --git a/efi/Makefile b/efi/Makefile
index 508c07c9b536..6693564f7071 100644
--- a/efi/Makefile
+++ b/efi/Makefile
@@ -3,4 +3,4 @@
obj-$(CONFIG_EFI_PAYLOAD) += payload/
obj-$(CONFIG_EFI_GUID) += guid.o
obj-$(CONFIG_EFI_DEVICEPATH) += devicepath.o
-obj-y += errno.o efivar.o efivar-filename.o
+obj-y += errno.o handle.o efivar.o efivar-filename.o
diff --git a/drivers/efi/efi-handle.c b/efi/handle.c
similarity index 97%
rename from drivers/efi/efi-handle.c
rename to efi/handle.c
index 6485e97ded3f..d091d9e16514 100644
--- a/drivers/efi/efi-handle.c
+++ b/efi/handle.c
@@ -3,11 +3,11 @@
* Copyright (c) 2014 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*/
-#include <common.h>
#include <efi.h>
#include <efi/efi-util.h>
#include <efi/efi-device.h>
#include <efi/efi-mode.h>
+#include <malloc.h>
int __efi_locate_handle(struct efi_boot_services *bs,
enum efi_locate_search_type search_type,
--
2.47.3
next prev parent reply other threads:[~2025-12-11 20:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-11 20:29 [PATCH 00/16] efi: restructure for reuse from loader code Ahmad Fatoum
2025-12-11 20:29 ` [PATCH 01/16] efi: payload: restructure Kconfig Ahmad Fatoum
2025-12-11 20:29 ` [PATCH 02/16] efi: payload: populate $global.efi.payload variable Ahmad Fatoum
2025-12-11 20:29 ` [PATCH 03/16] efi: mode: add efi_get_runtime_services helper Ahmad Fatoum
2025-12-11 20:29 ` [PATCH 04/16] efi: payload: make EFI variable helpers usable for loader as well Ahmad Fatoum
2025-12-11 20:29 ` [PATCH 05/16] fs: efivarfs: prepare for use with barebox as EFI loader Ahmad Fatoum
2025-12-11 20:29 ` Ahmad Fatoum [this message]
2025-12-11 20:29 ` [PATCH 07/16] efi: provide populate $efi.payload_default_path depending on arch Ahmad Fatoum
2025-12-11 20:29 ` [PATCH 08/16] efi: tidy up header includes for reuse Ahmad Fatoum
2025-12-11 20:30 ` [PATCH 09/16] efi: types: add efi_intn_t/efi_uintn_t definition Ahmad Fatoum
2025-12-11 20:30 ` [PATCH 10/16] efi: devicepath: make fully usable for loader Ahmad Fatoum
2025-12-11 20:30 ` [PATCH 11/16] efi: guid: don't interleave protocol and event GUIDs Ahmad Fatoum
2025-12-11 20:30 ` [PATCH 12/16] efi: guid: add some more GUIDs Ahmad Fatoum
2025-12-15 8:30 ` [PATCH] fixup! " Ahmad Fatoum
2025-12-15 9:03 ` Sascha Hauer
2025-12-11 20:30 ` [PATCH 13/16] efi: guid: move static GUIDs out of drivers Ahmad Fatoum
2025-12-11 20:30 ` [PATCH 14/16] efi: gop: flesh out efi_graphics_output_protocol::blt definition Ahmad Fatoum
2025-12-11 20:30 ` [PATCH 15/16] efi: payload: initrd: move into common efi code Ahmad Fatoum
2025-12-11 20:30 ` [PATCH 16/16] efi: add missing EFIAPI to functions Ahmad Fatoum
2025-12-13 10:42 ` [PATCH] fixup! efi: payload: restructure Kconfig Ahmad Fatoum
2025-12-15 9:03 ` (subset) " Sascha Hauer
2025-12-15 9:03 ` [PATCH 00/16] efi: restructure for reuse from loader code Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251211203056.2014710-7-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox