From patchwork Mon Feb 16 01:34:58 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1890 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771205761; bh=ZGPffVSkY2mm0RetqAPzPqvolQ3+hQj9A3OSba+sRmU=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=v/npHZngUNTcAFoMKsj5eqe9x+RJIod/uyHM3MbpmPFlOg/hn51zeuOPoKf9QKE7S a+FfCDe0SKnrl53a8/Va7w6Uo7HcdxPlonHhxvkevI5H3ulUaHstojNR6CRnOcHd0F YYbgUO8VihS39jIK+rdK4p3hwoBmPHS1DSSr7i+QA2+mseZvDkh2bo6VVHh2eVsgNO QKEYZsdX3niNA5hsOZCFZTN8wJZPberom3fwW4vbKcWgYVa7NfrbIz9X7w1tcG7M7H gjKJO/TsVGApaIHitWyGno7uLXTEjdqefNJ/vxRQhmr5obdH17QwCKlog+lMSrKQZr jP/XEKgiXtagw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4979B69BFB for ; Sun, 15 Feb 2026 18:36:01 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 0-uQxNm458zT for ; Sun, 15 Feb 2026 18:36:01 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771205760; bh=ZGPffVSkY2mm0RetqAPzPqvolQ3+hQj9A3OSba+sRmU=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=LYLdjw111yrAv2YHUyw/6czXCnhNzQgNNi8Nk7aaLFDztRLrYk3kiuRv9KYq690Bt AdhDPccwQj7223D45Z6znT+aKO7xh10hTCoY1KJAD+YfkS8mHNPe+K+GHUbDvbpKBj c3fL6IC8kmJaJgx3LPOzLvp3/x5kp6KG5CmgO5LJMtMB1n2lkrTXfxcL3ZejKXREMN B7UHqiGQ0B/TG5gxgincne3oA8hQkYpdo6fyvpaTNLSkc4dooo4t3rHodhhfzKYSTB rp3SiJoPdYhXzbo+WybOKxKKReMIb27RilWTMmQN/gVsvnxiriY8ODRB2jQqGwLw6j gIA8Onv76MlDw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3B8C969BEB for ; Sun, 15 Feb 2026 18:36:00 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771205756; bh=/QkljqKmwpUYbyvcLW62xkXcxzNzLYCwnrHjpYxCtaU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LcoGJR/FJzRmu7lbVOATqHkq2hJR/Raaq7jmDXp/6uLqicQbgofgJW1SFQGFwmbWb 7G1vECqYbE2yskyfg/piN5ulBorSnfIXKRJuP3WFFe0ADLoA6bVk+rYhf0VjMJO21O l/ILAoXbyLvs0oKuu+ILE2viVHQ6/UnK1rXMLtI1t1lV+wETVHMYYT0o6lfXLRYgqN tMRW7+Jh21PXMBwuSFjRY8AUNTgNp/nFUlBXJudb0D86mL1H8IdhIgrotcCJ/1BgKz ct7Na48KPReDKyJ3z/yRAKoBtk55JDMu7KbySts1w5JfHntXAxnnzk3+CyiA5ee9Y2 roCLFN+fdZ6lQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8589C69AD9; Sun, 15 Feb 2026 18:35:56 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id QbuSZ8xTxrUn; Sun, 15 Feb 2026 18:35:56 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771205756; bh=pRL4uo7mDyiJyiGKLRUGpOimNUR765Q/Il+xPS7WQ/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d2oAPbmHTt6N8C9ERfs264kKEV4fD/UB62RiiL+lIRZpRKUXeJtsQIvSUyy0Sp4I/ rMmygMQozkLmgp4t7ZcTNFSJgnF8MOriVLgygCeg9fAVxXfUiIdkROsHJgRgN1BHeO TFAvYgM78YR5QbLHOZ5aI4dEoEII+WZXR8O1xFzXlu3DqCb/ie7mIEwAW51yJDNdMB TWo3Ee7rnNLrAzKmoUxf5udtDZuqy8l4TCSmPbggDFrRhKQYOJL71D8jYnHQAEMdKD 29/X8xA56HkWvV+eIe+hS1OPr8OcLx1yh+TNbtbHzqiDTswjod+s78leRB4eledLrQ 3ebFimUEi0irA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 0422F69B01; Sun, 15 Feb 2026 18:35:55 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sun, 15 Feb 2026 18:34:58 -0700 Message-ID: <20260216013511.4079770-11-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260216013511.4079770-1-sjg@u-boot.org> References: <20260216013511.4079770-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 53OBCLDKIL6IHNFMLOTTS4D3RWYI3BVM X-Message-ID-Hash: 53OBCLDKIL6IHNFMLOTTS4D3RWYI3BVM X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 6" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 10/17] ulib: x86: Add demo-app.efi target for EFI app builds List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass The x86 example targets currently only produce raw binaries (demo-nodtb.bin), which do not work for EFI app builds that need PE format output. Add an EFI-specific path that embeds the DTB and converts the demo ELF to a PE binary (demo-app.efi), following the same flow as u-boot-app.efi. Non-EFI builds continue to produce demo-nodtb.bin as before. Co-developed-by: Claude Opus 4.6 Signed-off-by: Simon Glass --- scripts/Makefile.ulib-example | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/Makefile.ulib-example b/scripts/Makefile.ulib-example index fd7c60e4483..575dedcfbf2 100644 --- a/scripts/Makefile.ulib-example +++ b/scripts/Makefile.ulib-example @@ -31,6 +31,17 @@ examples/ulib/demo: $(example-demo-objs) u-boot FORCE $(call if_changed,u-boot-example) $(EXAMPLE_POST_LINK) +ifeq ($(CONFIG_EFI_APP),y) +# EFI: embed DTB and convert to PE binary +OBJCOPYFLAGS_demo-app.efi := $(OBJCOPYFLAGS_EFI) +examples/ulib/demo-app.efi: examples/ulib/demo dts/dt.dtb FORCE + $(if $(CONFIG_OF_SEPARATE),$(call if_changed,embeddtb)) + $(call if_changed,zobjcopy) + +examples_$(EXAMPLE_ARCH): \ + $(foreach e,$(ULIB_EXAMPLES),examples/ulib/$(e)-app.efi) FORCE + @: +else # Binary target (without DTB) OBJCOPYFLAGS_demo-nodtb.bin = $(OBJCOPYFLAGS_u-boot-nodtb.bin) examples/ulib/demo-nodtb.bin: examples/ulib/demo FORCE @@ -49,3 +60,4 @@ examples_$(EXAMPLE_ARCH): \ $(foreach e,$(ULIB_EXAMPLES),examples/ulib/$(e)-nodtb.bin) FORCE @: endif +endif # CONFIG_EFI_APP