| Message ID | 20260216013511.4079770-10-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> 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=UTZqlyE0zpA495N4h/7f6AxnncfFlQ7Gtn3bC9FCeUo=; 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=kh9diUa0w/QeLiNcOX9JWpnCA4PIethxTn7i5do8rK8lE32/pneEC++4uHHgkJRpX OQssLzP/g4RsgAosc3uJq98tCY/btvgdLhKnd5gA7OpWxMkSEwXDlRt908QfVoP2+/ kbXHKHETyR9iY6KZaPoNs/lG+i6TM8z+jB8Z+VA/ypLRppOfnpxYUFwyRz4Nj0IaSV SOWDJMH2p7CPNH7yn3/7ntKkW9R0QLV8sQf9XC2aI9EcmPhI9GB6OJB3oCRBeH9h5A VcSXiJSfR/d0niMXAKQzvU0OzZgysgs4/Rz/+VN2HJ1HleNZx8p7T0Cr7Rr3/2mf8u zTkqh6/0rqX1Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0C4F169AD9 for <u-boot-concept@u-boot.org>; 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 1cpjp1HuuZkz for <u-boot-concept@u-boot.org>; 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=1771205759; bh=UTZqlyE0zpA495N4h/7f6AxnncfFlQ7Gtn3bC9FCeUo=; 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=l1YCNI6ZXm/jNa2rX1QwYcew63Zn4CnaRSkwU1BHuPGbIrrD3aPwdMHu1DRR9Q2Dt wa6b27G3NqXOqzPvkU9CygRYpjaUTcyC6HPhcXNZBNY46JpPIl6D8r3UnN2kQnpIMc NeyO8I7i0WndU0PY+qF1kzO4G6o3MNR82v+qV6k5G9VV2s1pB2eEd0CE+ydPUU5XoC U1rr3/qGPQrS0oR2IR0u52eC7U8UjDYPCIJQxLz4/TiyR47GVKnT0sKGHFSiKtD4TX 5k6kmoPayNbqRmGi44nmf9af5gP+ysGJmk9IysaTGGkim16ytivpLYU9VUOotMg3nc D2moKi20KTw3g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1E11669BE5 for <u-boot-concept@u-boot.org>; Sun, 15 Feb 2026 18:35:59 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771205755; bh=RNhzgwUarEoxbwYROEC22IZ/g6d+9mGDyOLqT5GgOjQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iS2b0bGUrYvmEjPA53Fod+f2hwHpx9vLHKLQM0VrAPjglJsRHvke0w7AtAc+FTceX xeMYNkeONi2snKDsT70Mv2klR0VSjd4dCl0oCI5//RLx0m2NNjEQwhvYgTJoFBGdNQ 8Z9JLYV1+Ftn6xvhbCKF7MDM0MnT9PGlpXl4HZ0gQ4T0TnNVLW89mSlyFvHWiGstym iPGjGOZ7YfGf7blDOaCHxYla1kzgzp4JeHLcSqaIjlzQztvIHDC5qoYubeQMHx2V+f vfhe6SM5naVKaxLJFbY7tqwtO11fGdlpBmt3oZD/aEJvPqJezyH7/L5Md8+ZwuPVXw rZ/aKkNspHCNA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BA81F69AD9; Sun, 15 Feb 2026 18:35:55 -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 VKlMcQuTAVNj; Sun, 15 Feb 2026 18:35:55 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771205755; bh=Dy9O0eKWwRwjg9rckvsoxAoE9HfyodiyMfan763lOb0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cShAdxOHJ6+YdfAFMim/7F0FPH8I3LCj1HvpSuN0h77w/6YVVjNdotiQzzzMZNJw4 /CqrHoXU4patXxXB9ylqJURgZdC6BP8z9EOL8eALPWTTuCcl9FFqYlR4atE0iSFukM qvvwG721S1vRo/1XKyICuocF7P+ZKtOzuUqkEBL0vN+4HfljY2MVT8DtVxOMZkQ0EM Ny+d2BZX/Ii7BOBs7cOSOM33q7zSvhaWCwSc8xwBbEcW2QiCuKczWFKsxfpSU1XJku 5ak56z805o9hTJiUB9WWn5Jma1bplLg53Gi8De4oayb2UiIQQ8ei9OY4ymiiwUsYG/ 3LM4uY6ryoyAg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 2E09A69B01; Sun, 15 Feb 2026 18:35:55 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Sun, 15 Feb 2026 18:34:57 -0700 Message-ID: <20260216013511.4079770-10-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: UMIFGBFD3RMGPS43B2TDIJTAYGEBS3YR X-Message-ID-Hash: UMIFGBFD3RMGPS43B2TDIJTAYGEBS3YR 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 <simon.glass@canonical.com>, "Claude Opus 4 . 6" <noreply@anthropic.com> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 09/17] ulib: efi: Use ulib_has_main() in efi_main() List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/UMIFGBFD3RMGPS43B2TDIJTAYGEBS3YR/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
ulib: Add multi-arch demo and EFI app support
|
|
Commit Message
Simon Glass
Feb. 16, 2026, 1:34 a.m. UTC
From: Simon Glass <simon.glass@canonical.com> The EFI entry point currently hardcodes is_ulib to false when calling efi_startup(). This means EFI app builds cannot run ulib demo binaries, since the GD_FLG_ULIB flag is never set. Use ulib_has_main() instead, which returns false by default (weak symbol) but returns true when a demo's strong version is linked in. This allows the same efi_main.o to work for both normal U-Boot and ulib demo EFI binaries without needing a separate source file. Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- lib/efi_client/efi_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/efi_client/efi_main.c b/lib/efi_client/efi_main.c index e94460c86e1..dfd44695227 100644 --- a/lib/efi_client/efi_main.c +++ b/lib/efi_client/efi_main.c @@ -8,13 +8,14 @@ #include <efi.h> #include <efi_api.h> +#include <init.h> efi_status_t EFIAPI efi_main(efi_handle_t image, struct efi_system_table *sys_table) { efi_status_t ret; - ret = efi_startup(image, sys_table, false); + ret = efi_startup(image, sys_table, ulib_has_main()); if (ret) return ret;