[Concept,19/20] efi: app: Add a simple-framebuffer node if enabled

Message ID 20250828020732.981415-20-sjg@u-boot.org
State New
Headers
Series efi: App and devicetree improvements |

Commit Message

Simon Glass Aug. 28, 2025, 2:07 a.m. UTC
  From: Simon Glass <sjg@chromium.org>

The EFI app cannot make the EFI GOP available to Linux directly, since
it calls exit-boot-services before booting Linux. The easiest way to
provide an early console is with the simple-framebuffer feature. Add
this node to the devicetree if the feature is enabled.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
---

 lib/efi_client/efi_app.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
  

Patch

diff --git a/lib/efi_client/efi_app.c b/lib/efi_client/efi_app.c
index f67973dbb85..33ed3f2a874 100644
--- a/lib/efi_client/efi_app.c
+++ b/lib/efi_client/efi_app.c
@@ -348,9 +348,11 @@  int ft_system_setup(void *fdt, struct bd_info *bd)
 		return ret;
 	}
 
-	ret = fdt_simplefb_add_node(fdt);
-	if (ret)
-		log_warning("failed to set up simplefb\n");
+	if (IS_ENABLED(CONFIG_FDT_SIMPLEFB)) {
+		ret = fdt_simplefb_add_node(fdt);
+		if (ret)
+			log_warning("failed to set up simplefb\n");
+	}
 
 	free(map);