From patchwork Wed Oct 29 06:16:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 645 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=1761718639; bh=TPd5R51DYy7COM7yXUq/DoP5jWzaPwsRcJ+LxQs5Z58=; 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=BuJQY3dX6HzkwfFTOYv2O6tDhvIjAqND20UTCYLNSoFG7k01+nB9dhtZaQqWY64yA 0hHoj5FHR5bHv1VpCHNiDe8RFyASzVnnxFdki5ddf7kllTrNG+Sn1nnDxKLhdbePjv 6oxua9/DB0EDxa68sGK8cyixfMLsKSCxu++fHO5ZbSujYqMXn4++VcTSKQ9DZulkJA /b+9Ovnfg7ulEMEcQZDE27MB12+RAMLKivBXQ4Bj4N+6XMVK6Gm3A+uLf7OIQE4L+8 N9UmjnFgWA57oYQght2tu/ff2O/bQ6OSwCdWoC3X2yxeNCkhPRr9HJW1D79JxGzls5 Oze6MJ7T5BXpg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7849968303 for ; Wed, 29 Oct 2025 00:17:19 -0600 (MDT) 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 4dNwNeFim3OS for ; Wed, 29 Oct 2025 00:17:19 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718639; bh=TPd5R51DYy7COM7yXUq/DoP5jWzaPwsRcJ+LxQs5Z58=; 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=BuJQY3dX6HzkwfFTOYv2O6tDhvIjAqND20UTCYLNSoFG7k01+nB9dhtZaQqWY64yA 0hHoj5FHR5bHv1VpCHNiDe8RFyASzVnnxFdki5ddf7kllTrNG+Sn1nnDxKLhdbePjv 6oxua9/DB0EDxa68sGK8cyixfMLsKSCxu++fHO5ZbSujYqMXn4++VcTSKQ9DZulkJA /b+9Ovnfg7ulEMEcQZDE27MB12+RAMLKivBXQ4Bj4N+6XMVK6Gm3A+uLf7OIQE4L+8 N9UmjnFgWA57oYQght2tu/ff2O/bQ6OSwCdWoC3X2yxeNCkhPRr9HJW1D79JxGzls5 Oze6MJ7T5BXpg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 670E86830C for ; Wed, 29 Oct 2025 00:17:19 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718637; bh=ix/FfVYS0pw6mR5l0kOTxD/lBQfKgOIDGREYQSreXgk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BMrGpgRyiXbkrLsI4hx1rj8lWfn4BPblsfqVbzHzKWjJbT1V3+MmSzx2NSAH3eQQz mwBmeXgDqFmnxrRPbgF3kgtZl15H0uEPTE1cX49VTJ+lojSLRP4GwZFvBe7Me+byNH 2ZhANOW9ad7Ltfat8xCVUFk+oMaNB+EAGhlv6iB7wAHsC1iBMpjmqSuqcMJs4Du6pH jDV73P2KjWM32Vlxdi6HGSUkp6cy2YDUT8A9iQmRVXuY0bNZA9B1Ctj0g4Z//Rxg/R dt1zcYOF2UVLhvuYUh8XC+8nJthU3278ly+KahgPLz3tSGsD1Veltl4ApzZH8zkSAX a6laM1lBs5G0w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6E45368303; Wed, 29 Oct 2025 00:17:17 -0600 (MDT) 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 WTwMh2ohRrBX; Wed, 29 Oct 2025 00:17:17 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718633; bh=/4x2kwfdcKSesiM17NggA46beUmg+2havIpg8x5l1Wg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lCoFQA0mgox9btrpicKAL8MegtFg0pVib6ybPJ3mEfxeUvQMlOPrSjHtLaYedNPLz hpJ3isY4bftS+hthadFnqT1eU6oo7Suf3MJqLUba/hqSxdYQreUb8tai/ZBIrmxIgp fCzDQ7D3INbY96572IhAS1DCFCAELAQhsfkwefft9KGCAiple/OUoknJQXO46SjbVo pCkYhONlWlaX9/2oPrBMRwMjx+HL5vjE9bqKppOsmQhqO4ULPbhJknCc/CyrQfkD5B miyuLym/iThVX88grboPqGegSaCnyWpq17ivx4pmfnw+lFK7gy1pCqBdqu3nH1XpVE kEoPz+41UIyiw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 15EA4682D9; Wed, 29 Oct 2025 00:17:13 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 29 Oct 2025 00:16:43 -0600 Message-ID: <20251029061657.1456910-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251029061657.1456910-1-sjg@u-boot.org> References: <20251029061657.1456910-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 7WRHJPQJK633ECAPJJNH2LY5XXGPH3KK X-Message-ID-Hash: 7WRHJPQJK633ECAPJJNH2LY5XXGPH3KK 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 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 1/7] acpi: qfw: Add FPDT support for QEMU 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 QEMU creates ACPI tables but doesn't include FPDT (Firmware Performance Data Table). Add FPDT generation in qfw_acpi.c following the same pattern as BGRT. Move the acpi_write_fpdt() function from acpi_table.c to acpi_extra.c so that is available even when CONFIG_ACPIGEN is disabled. This allows QEMU x86_64 builds to provide firmware boot timing information to the operating system. Disable this for qemu-riscv64_smode_acpi as it is near the code-size limit. Co-developed-by: Claude Signed-off-by: Simon Glass --- drivers/qfw/qfw_acpi.c | 10 +++++ lib/acpi/acpi_extra.c | 92 ++++++++++++++++++++++++++++++++++++++++++ lib/acpi/acpi_table.c | 90 ----------------------------------------- 3 files changed, 102 insertions(+), 90 deletions(-) diff --git a/drivers/qfw/qfw_acpi.c b/drivers/qfw/qfw_acpi.c index 916a59be7fb..7f7dba73155 100644 --- a/drivers/qfw/qfw_acpi.c +++ b/drivers/qfw/qfw_acpi.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -256,6 +257,15 @@ out: return addr; } + if (!IS_ENABLED(CONFIG_TARGET_QEMU_VIRT)) { + ret = acpi_write_fpdt(ctx, + bootstage_get_time(BOOTSTAGE_ID_START_UBOOT_F)); + if (ret) { + printf("error: failed to write FPDT (err=%dE)\n", ret); + return addr; + } + } + return addr; } diff --git a/lib/acpi/acpi_extra.c b/lib/acpi/acpi_extra.c index 709f64305b5..09b8a251ca2 100644 --- a/lib/acpi/acpi_extra.c +++ b/lib/acpi/acpi_extra.c @@ -7,9 +7,11 @@ #define LOG_CATEGORY LOGC_ACPI +#include #include #include #include +#include #include #include @@ -87,3 +89,93 @@ int acpi_write_bgrt(struct acpi_ctx *ctx) return 0; } + +int acpi_write_fpdt(struct acpi_ctx *ctx, u64 uboot_start) +{ + struct acpi_fpdt *fpdt; + struct acpi_fpdt_boot *rec; + struct acpi_table_header *header; + u64 current_time; + int size; + + fpdt = ctx->current; + header = &fpdt->header; + + /* Calculate total size: FPDT header + boot performance record */ + size = sizeof(struct acpi_fpdt) + sizeof(struct acpi_fpdt_boot); + + memset(fpdt, '\0', size); + + /* Fill out FPDT header */ + acpi_fill_header(header, "FPDT"); + header->length = size; + header->revision = 1; /* ACPI 6.4+: 1 */ + + /* Add boot performance record right after FPDT header */ + rec = (struct acpi_fpdt_boot *)(fpdt + 1); + + /* Fill in record header */ + rec->hdr.type = FPDT_REC_BOOT; + rec->hdr.length = sizeof(struct acpi_fpdt_boot); + rec->hdr.revision = 2; /* FPDT Boot Performance Record revision */ + + /* Fill in timing data */ + current_time = timer_get_boot_us(); + rec->reset_end = uboot_start; + rec->loader_start = current_time; + rec->loader_exec = current_time; + rec->ebs_entry = current_time; + rec->ebs_exit = current_time; + + header->checksum = table_compute_checksum(fpdt, header->length); + + acpi_inc_align(ctx, size); + acpi_add_table(ctx, fpdt); + + return 0; +} + +struct acpi_fpdt_boot *acpi_get_fpdt_boot(void) +{ + struct acpi_table_header *header; + struct acpi_fpdt *fpdt; + + header = acpi_find_table("FPDT"); + if (!header) + return NULL; + + fpdt = (struct acpi_fpdt *)header; + return (struct acpi_fpdt_boot *)(fpdt + 1); +} + +int acpi_fix_fpdt_checksum(void) +{ + struct acpi_table_header *header; + + header = acpi_find_table("FPDT"); + if (!header) + return -ENOENT; + + header->checksum = 0; + header->checksum = table_compute_checksum(header, header->length); + + return 0; +} + +void acpi_final_fpdt(void) +{ + struct acpi_fpdt_boot *fpdt; + + if (IS_ENABLED(CONFIG_TARGET_QEMU_VIRT)) + return; + + fpdt = acpi_get_fpdt_boot(); + if (fpdt) { + u64 time; + + time = timer_get_boot_us(); + fpdt->ebs_entry = time; + fpdt->ebs_exit = time; + acpi_fix_fpdt_checksum(); + } +} diff --git a/lib/acpi/acpi_table.c b/lib/acpi/acpi_table.c index 99251176d09..94e6647b666 100644 --- a/lib/acpi/acpi_table.c +++ b/lib/acpi/acpi_table.c @@ -715,96 +715,6 @@ static int acpi_create_bgrt(struct acpi_ctx *ctx, ACPI_WRITER(6bgrt, "BGRT", acpi_create_bgrt, 0); #endif -int acpi_write_fpdt(struct acpi_ctx *ctx, u64 uboot_start) -{ - struct acpi_fpdt *fpdt; - struct acpi_fpdt_boot *rec; - struct acpi_table_header *header; - u64 current_time; - int size; - - fpdt = ctx->current; - header = &fpdt->header; - - /* Calculate total size: FPDT header + boot performance record */ - size = sizeof(struct acpi_fpdt) + sizeof(struct acpi_fpdt_boot); - - memset(fpdt, '\0', size); - - /* Fill out FPDT header */ - acpi_fill_header(header, "FPDT"); - header->length = size; - header->revision = acpi_get_table_revision(ACPITAB_FPDT); - - /* Add boot performance record right after FPDT header */ - rec = (struct acpi_fpdt_boot *)(fpdt + 1); - - /* Fill in record header */ - rec->hdr.type = FPDT_REC_BOOT; - rec->hdr.length = sizeof(struct acpi_fpdt_boot); - rec->hdr.revision = 2; /* FPDT Boot Performance Record revision */ - - /* Fill in timing data */ - current_time = timer_get_boot_us(); - rec->reset_end = uboot_start; - rec->loader_start = current_time; - rec->loader_exec = current_time; - rec->ebs_entry = current_time; - rec->ebs_exit = current_time; - - header->checksum = table_compute_checksum(fpdt, header->length); - - acpi_inc_align(ctx, size); - acpi_add_table(ctx, fpdt); - - return 0; -} - -struct acpi_fpdt_boot *acpi_get_fpdt_boot(void) -{ - struct acpi_table_header *header; - struct acpi_fpdt *fpdt; - - header = acpi_find_table("FPDT"); - if (!header) - return NULL; - - fpdt = (struct acpi_fpdt *)header; - return (struct acpi_fpdt_boot *)(fpdt + 1); -} - -int acpi_fix_fpdt_checksum(void) -{ - struct acpi_table_header *header; - - header = acpi_find_table("FPDT"); - if (!header) - return -ENOENT; - - header->checksum = 0; - header->checksum = table_compute_checksum(header, header->length); - - return 0; -} - -void acpi_final_fpdt(void) -{ - struct acpi_fpdt_boot *fpdt; - - if (IS_ENABLED(CONFIG_TARGET_QEMU_VIRT)) - return; - - fpdt = acpi_get_fpdt_boot(); - if (fpdt) { - u64 time; - - time = timer_get_boot_us(); - fpdt->ebs_entry = time; - fpdt->ebs_exit = time; - acpi_fix_fpdt_checksum(); - } -} - /* this board lacks the bootstage timer */ #ifndef CONFIG_TARGET_QEMU_VIRT From patchwork Wed Oct 29 06:16:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 646 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=1761718643; bh=8z8LjT2bWFrG9pJZcciUQJpqhji9vYP92XmKr+O7VMA=; 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=Nlukr+4pdnd8pRJzOQEx0BJ0EKPf3eB2+8a3zvnSmQ3+xiZgHLWV7w3p2JKdHDXT1 hG5V8zZufpWc6MArXfh4mWgUWHBoFUTzxlgBiD5SlFRvXaVWiwyiLijxa6U7MxiqYV mEJAEHTWlhyZcxzZddDp2B/p+jxDFUmyMq3uwWS1hRJuXyLkSfWt1ffuWpgjLAxQ0P Fm10tj3zXKVavSpOdHfotuM4kEvniqBmTpJefSdwGgPjcle7AjrTohTLgV+agDG3ve hA6EQdTPoED0HvtoNSLHZgJwbE+5q6Hjfvj3JpmFXkEIKfKz1vVLvZQZGeMBxu56L1 30eHqecpFqYEw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DDE496824C for ; Wed, 29 Oct 2025 00:17:23 -0600 (MDT) 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 WGXBQbmEM2AO for ; Wed, 29 Oct 2025 00:17:23 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718643; bh=8z8LjT2bWFrG9pJZcciUQJpqhji9vYP92XmKr+O7VMA=; 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=Nlukr+4pdnd8pRJzOQEx0BJ0EKPf3eB2+8a3zvnSmQ3+xiZgHLWV7w3p2JKdHDXT1 hG5V8zZufpWc6MArXfh4mWgUWHBoFUTzxlgBiD5SlFRvXaVWiwyiLijxa6U7MxiqYV mEJAEHTWlhyZcxzZddDp2B/p+jxDFUmyMq3uwWS1hRJuXyLkSfWt1ffuWpgjLAxQ0P Fm10tj3zXKVavSpOdHfotuM4kEvniqBmTpJefSdwGgPjcle7AjrTohTLgV+agDG3ve hA6EQdTPoED0HvtoNSLHZgJwbE+5q6Hjfvj3JpmFXkEIKfKz1vVLvZQZGeMBxu56L1 30eHqecpFqYEw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CDCE2682B7 for ; Wed, 29 Oct 2025 00:17:23 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718642; bh=XUnLw7WkZfm2btsOCFOxxdDRjED7PvLX0YptHOTLHvk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ljBW+5S5IbDwISSWXwTfqluM1xmGcy0M+1UM/g1Q1K1tk9v1RZIiEFJZ9M9WiEBVG L/l7cfHHP1G6VY3rhbyzTzSDh0NPz5cL7VzzbEvDg0tBuP0rq9ovSkakRHZhxk4Zqu W59blwv9Hjesj25C3h1aqU0IK2DQIA+XgHM7zF7R6zfmR8o/nv7ebX6QqpbMQgOOGI pTC991qfLNPo3Lw30tmfWBAmgdtqzWO33mZ9qTCPQBOm2C42S78Qu9iv3YSIN7d0Xl iqx+TlXfP2hMl8UvbKxohDesFLZO46QqGachdE0vpoA9T/L3y6EMsEBxMXb6WDdLfP GaXAbzWaHkc8w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0521968303; Wed, 29 Oct 2025 00:17:22 -0600 (MDT) 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 g1wwhGk8A65o; Wed, 29 Oct 2025 00:17:21 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718638; bh=uCT/wQ0g1xCM+z6DyX5lgwLtrkGJs6QV3DazkmdFQ2M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TYyupsEGxUvsX+AIzqOZv5vK57tx6x/k9w7T0oPAaMhY9nstv6BNSfGitnVs4LMtT AUlmC7oJ80arOKbZFtchBTzJOx/hs/EM9YODXWds6HaA4oBucKyICqlLZTavnefGFN 03wo9JM8ZJYIbTBwyTA5s96VN99eFO/Z6XDZ4vh7T//sORYeuLjgfiGU/mdOAsePWs YohnQhsJRLHOZTswefqtlcP0PwG/PWW5q4KMtnGZw/uBH0sJGrR9G9+32JRcv4zylC STl1H9RAC06N/A31M+DFfuo8+YM2cQA+PtJV1D8ZA15LiHia0IJqDshvA9rmnKZ6f/ 7e6jKDHTpcsEA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id AFE5D682D9; Wed, 29 Oct 2025 00:17:17 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 29 Oct 2025 00:16:44 -0600 Message-ID: <20251029061657.1456910-3-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251029061657.1456910-1-sjg@u-boot.org> References: <20251029061657.1456910-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: ZCM4DQC5S57T2IOY7VAX2FJGKQW5LZHH X-Message-ID-Hash: ZCM4DQC5S57T2IOY7VAX2FJGKQW5LZHH 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 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 2/7] qfw: Silence the message when opt/u-boot/bootcmd is not found 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 Currently qfw_locate_file() always prints error messages when it can't find a file. This causes unwanted error output in qemu_get_bootcmd() when the optional "opt/u-boot/bootcmd" file doesn't exist. Adjust qfw_locate_file() to be silent, with a new qfw_locate_file_msg() that shows messages. This allows callers to choose whether missing files should generate error messages. Co-developed-by: Claude Signed-off-by: Simon Glass --- drivers/qfw/qfw.c | 26 ++++++++++++++++++-------- include/qfw.h | 20 +++++++++++++++++++- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/drivers/qfw/qfw.c b/drivers/qfw/qfw.c index 2e260d60449..51f25b9ff0b 100644 --- a/drivers/qfw/qfw.c +++ b/drivers/qfw/qfw.c @@ -220,16 +220,12 @@ int qfw_locate_file(struct udevice *dev, const char *fname, /* make sure fw_list is loaded */ ret = qfw_read_firmware_list(dev); - if (ret) { - printf("error: can't read firmware file list\n"); + if (ret) return -EINVAL; - } file = qfw_find_file(dev, fname); - if (!file) { - printf("error: can't find %s\n", fname); + if (!file) return -ENOENT; - } *selectp = be16_to_cpu(file->cfg.select); *sizep = be32_to_cpu(file->cfg.size); @@ -237,13 +233,27 @@ int qfw_locate_file(struct udevice *dev, const char *fname, return 0; } +int qfw_locate_file_msg(struct udevice *dev, const char *fname, + enum fw_cfg_selector *selectp, ulong *sizep) +{ + int ret; + + ret = qfw_locate_file(dev, fname, selectp, sizep); + if (ret == -EINVAL) + printf("error: can't read firmware file list\n"); + else if (ret == -ENOENT) + printf("error: can't find %s\n", fname); + + return ret; +} + int qfw_load_file(struct udevice *dev, const char *fname, ulong addr) { enum fw_cfg_selector select; ulong size; int ret; - ret = qfw_locate_file(dev, fname, &select, &size); + ret = qfw_locate_file_msg(dev, fname, &select, &size); if (ret) return ret; @@ -258,7 +268,7 @@ int qfw_get_file(struct udevice *dev, const char *fname, struct abuf *loader) ulong size; int ret; - ret = qfw_locate_file(dev, fname, &select, &size); + ret = qfw_locate_file_msg(dev, fname, &select, &size); if (ret) return ret; diff --git a/include/qfw.h b/include/qfw.h index 75aada09206..1a634d7ed5d 100644 --- a/include/qfw.h +++ b/include/qfw.h @@ -467,15 +467,33 @@ int qfw_get_file(struct udevice *dev, const char *fname, struct abuf *loader); /** * qfw_locate_file() - Locate a file in the QEMU firmware config * + * This is the silent version that doesn't print error messages + * * @dev: UCLASS_QFW device * @fname: Filename to locate * @selectp: Returns the selector for the file * @sizep: Returns the size of the file - * Return: 0 on success, -EINVAL if firmware list cannot be read or file not found + * Return: 0 on success, -EINVAL if firmware list cannot be read, -ENOENT if + * file not found */ int qfw_locate_file(struct udevice *dev, const char *fname, enum fw_cfg_selector *selectp, ulong *sizep); +/** + * qfw_locate_file_msg() - Locate a file in the QEMU firmware config + * + * This version prints error messages on failure + * + * @dev: UCLASS_QFW device + * @fname: Filename to locate + * @selectp: Returns the selector for the file + * @sizep: Returns the size of the file + * Return: 0 on success, -EINVAL if firmware list cannot be read, -ENOENT if + * file not found + */ +int qfw_locate_file_msg(struct udevice *dev, const char *fname, + enum fw_cfg_selector *selectp, ulong *sizep); + /** * cmd_qfw_e820() - Execute the 'qfw e820' command for x86 * From patchwork Wed Oct 29 06:16:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 647 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=1761718655; bh=yQI0JZO9x2/H8nk3eTD225h2Z55PAzjrG1uQuMwpBHk=; 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=dmfdvseqjUIpVHCxJrgqXdA9GjIQHn7KmaX04GRI63v1RoRAqFecagZ2d8lG/zdCs Z66YFe3HxFK412wXHFXMBAWtwwGvXKSiNH5ixOVaUf18O6upVGiRVMmfMg6jTz0KbX sIDn1uogwKgBVFnFrnp4VK8j5hsvJIQUXUqzQk65H638QXmQAt2EfpIwUcH16kKVDl pBciykfeKFlrvPr9tzmWlj0OuZSLZ3ilXVi0pgmLOKk2alhhzRM6ATEDXpvLCMtt8Y niM3Q+iolUXhA1+cIZ5sjiVSZ28lMEJFiWogJI55ARC1WJc0SHVt4oNM6RDPoLgX4A m+TU+2NxM60kA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id EE15C6824C for ; Wed, 29 Oct 2025 00:17:35 -0600 (MDT) 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 6q9yRxQNv1YH for ; Wed, 29 Oct 2025 00:17:35 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718655; bh=yQI0JZO9x2/H8nk3eTD225h2Z55PAzjrG1uQuMwpBHk=; 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=dmfdvseqjUIpVHCxJrgqXdA9GjIQHn7KmaX04GRI63v1RoRAqFecagZ2d8lG/zdCs Z66YFe3HxFK412wXHFXMBAWtwwGvXKSiNH5ixOVaUf18O6upVGiRVMmfMg6jTz0KbX sIDn1uogwKgBVFnFrnp4VK8j5hsvJIQUXUqzQk65H638QXmQAt2EfpIwUcH16kKVDl pBciykfeKFlrvPr9tzmWlj0OuZSLZ3ilXVi0pgmLOKk2alhhzRM6ATEDXpvLCMtt8Y niM3Q+iolUXhA1+cIZ5sjiVSZ28lMEJFiWogJI55ARC1WJc0SHVt4oNM6RDPoLgX4A m+TU+2NxM60kA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CF1EC68303 for ; Wed, 29 Oct 2025 00:17:35 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718653; bh=O9CwRDnMwCWsxNVpKa2eRwMUe0k3inYNtMyT1IjfQzk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BFdCLRImRyiMlAFxungBCzZfjct+936QJ3Fh7D/lIsp9Rc9+u1YH9GHcpOFV3MwGT jKHmzwVDO4SA/Wkotn6lQKSQt+W5DMC2xJXCt5ij2QLf4zJFN3xlw/2SW0KXk2Y94Q 2ZokRl2zAEJY7UwQEI0Toh+s8ddzYCrPcTaUv4DWEudgkEoaaCbsU34y2WBWHgy+Oa lnzMPDqHO+5OAqXoQIPasQNx9+Fi0PgkgcfzL+KUIIbYcVUAsrNHDgQzHSl+sqBASj KTM7jRwU64uQSfmXy7f7ZDXAT+KT48ZkdoLd7G9O+I4qH40oI7PzLYKC9WNNtmQFnA DJKeQ+bTTGK1Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1B5D06824C; Wed, 29 Oct 2025 00:17:33 -0600 (MDT) 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 IasJfC1ofxYA; Wed, 29 Oct 2025 00:17:33 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718647; bh=q2WnNT9x8xihFRy2SSZ72W5tzgSZ51tVPDvWhHX8Vh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C8it65N9+oDoOChUhcVjuTOQbG1in5q/wktcbdG/vrL5n90BLX8jJO/11+g2AhLSP ZmViPqhL3X8KPy9WQHjXvlPeVx2IyXs/iXO01W4GefhUNprZfLhu5cBi7RKuloY6BS TL472jfZKxuvu+mrG8zFNPxUdy3htxKBjFjO5RkjCWyhf/NaUNGZGrZ2rHV3Cfvvkg RQQ0mpKwSKIAUjJ42RxNGs3J12NVExhgSuq3I3QX5Q2MsAF26vJoZzgjjR/74eWHZo ul95Cs8LVKdU1SHVrupi5vi2+Uiaim9Pv7zj3sBfzYF/7jJCD2WFjKiIsA4+gFQEho piGtrcmxt+mDw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 0CC05682B7; Wed, 29 Oct 2025 00:17:26 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 29 Oct 2025 00:16:46 -0600 Message-ID: <20251029061657.1456910-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251029061657.1456910-1-sjg@u-boot.org> References: <20251029061657.1456910-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: B2M3W6VEHYL7AMI4ROQHJ6NVQ5HOFKAI X-Message-ID-Hash: B2M3W6VEHYL7AMI4ROQHJ6NVQ5HOFKAI 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 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 4/7] scripts: Support --bootcmd more generally 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 Add -b as a short alias for --bootcmd to build_helper so it is available in both build-qemu and build-efi Move the fw_cfg bootcmd logic to build_helper as well. Co-developed-by: Claude Signed-off-by: Simon Glass --- scripts/build-qemu | 7 ------- scripts/build_helper.py | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/build-qemu b/scripts/build-qemu index 70dfe968f66..3d59012ed5e 100755 --- a/scripts/build-qemu +++ b/scripts/build-qemu @@ -41,8 +41,6 @@ def parse_args(): description='Build and/or run U-Boot with QEMU', formatter_class=argparse.RawTextHelpFormatter) build_helper.add_common_args(parser) - parser.add_argument('--bootcmd', type=str, - help='U-Boot bootcmd to pass via fw_cfg') parser.add_argument('-e', '--sct-run', action='store_true', help='Run UEFI Self-Certification Test (SCT)') parser.add_argument('-E', '--use-tianocore', action='store_true', @@ -297,11 +295,6 @@ class BuildQemu: # Add other parameters gathered from options qemu_cmd.extend(self.qemu_extra) - # Add bootcmd via fw_cfg if specified - if self.args.bootcmd: - qemu_cmd.extend(['-fw_cfg', - f'name=opt/u-boot/bootcmd,string={self.args.bootcmd}']) - self.helper.setup_share(qemu_cmd) self.helper.run(qemu_cmd) diff --git a/scripts/build_helper.py b/scripts/build_helper.py index d401da0215c..8bce9a6183c 100644 --- a/scripts/build_helper.py +++ b/scripts/build_helper.py @@ -189,6 +189,11 @@ sct_mnt = /mnt/sct cmd.extend(['-object', 'rng-random,filename=/dev/urandom,id=rng0', '-device', 'virtio-rng-pci,rng=rng0']) + # Add bootcmd via fw_cfg if specified + if args.bootcmd: + cmd.extend(['-fw_cfg', + f'name=opt/u-boot/bootcmd,string={args.bootcmd}']) + def setup_share(self, qemu_cmd): sock = Path('/tmp/virtiofs.sock') proc = None @@ -285,6 +290,8 @@ def add_common_args(parser): """ parser.add_argument('-a', '--arch', default='arm', choices=['arm', 'x86'], help='Select architecture (arm, x86) Default: arm') + parser.add_argument('-b', '--bootcmd', type=str, + help='U-Boot bootcmd to pass via fw_cfg') parser.add_argument('-B', '--no-build', action='store_true', help="Don't build; assume a build exists") parser.add_argument('--build-dir', help='Directory to use for the build') From patchwork Wed Oct 29 06:16:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 648 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=1761718660; bh=uwywFB+7h6MfBxcLVoccLpqIz1eMO6pwlJWyJhmrr/g=; 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=W1izcvurotX8NeyQvFmRf7yGCrXlAsfsaotWuCStQDRXHhnZss0YBhQ2yL9f1I7EC HmcS0l+1fOEHaWf7/Ew1dlzveCG1lnPSXBBabPDK9O8Mvs15/l0lhRkF9AzxDlUfAQ 2Aqelen8Xmmwf22qlqrDX7eayO1gH/nRvAM8E/yBF76oFgPfIMW+6WNZYGsL3TH2qG a842AdV6yxqUPTefJqQMLUTzI++uAR4mjG88PyiUV7sGPguOJU6TUJcpKuWhbK3cdo o5G6y2AYueVDw/U4eijg8WNXnRclUqSn3urddWEdDM79DS9Ewh559lnsQljZl6KuEg yBJG8V1Bmgzfg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id EAB1468318 for ; Wed, 29 Oct 2025 00:17:40 -0600 (MDT) 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 WG7s6gGt_owf for ; Wed, 29 Oct 2025 00:17:40 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718660; bh=uwywFB+7h6MfBxcLVoccLpqIz1eMO6pwlJWyJhmrr/g=; 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=W1izcvurotX8NeyQvFmRf7yGCrXlAsfsaotWuCStQDRXHhnZss0YBhQ2yL9f1I7EC HmcS0l+1fOEHaWf7/Ew1dlzveCG1lnPSXBBabPDK9O8Mvs15/l0lhRkF9AzxDlUfAQ 2Aqelen8Xmmwf22qlqrDX7eayO1gH/nRvAM8E/yBF76oFgPfIMW+6WNZYGsL3TH2qG a842AdV6yxqUPTefJqQMLUTzI++uAR4mjG88PyiUV7sGPguOJU6TUJcpKuWhbK3cdo o5G6y2AYueVDw/U4eijg8WNXnRclUqSn3urddWEdDM79DS9Ewh559lnsQljZl6KuEg yBJG8V1Bmgzfg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CD8936830C for ; Wed, 29 Oct 2025 00:17:40 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718658; bh=Oyd9ZhCFdM735UENOyzyCVQtPQR2F87V24rHsCfqRGA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ewLeA1OdZBbxW9jGmDYy9xzS2p6k6sQVFxQ1bH3EYuf9VlY+x28k161lWke5Cuz/E NCxezqEbxzfH8pbjuOQBbwSESqYvFBn/Q6oW4nr80QC5UuXqm0e2c1jvsOydpOuYqJ yR4rdy+FFZAtEr7/n6T5XLDOst/d/2vZiAI4nlkEQEghtuG308dT6EdmDoWBzb65Zk QbOMD6uNWJWE9xCz2yA/e8G9riqRwsjhwCmpZaJs5bb5pJw0ifVKdPJDtlnB88GKFJ ysrifOjstXxcn44vjHmtqR3LXpu7w69O4FQXg4iAj0xHJqqOKrsM57jkju0O9reohh BNH6x/JrrP2HA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AECED682B7; Wed, 29 Oct 2025 00:17:38 -0600 (MDT) 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 rI_y8HhqyMHc; Wed, 29 Oct 2025 00:17:38 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718653; bh=9ADWNEookD1SSkIMe8MiUHtxpI71XCwsm03Cd0r3iUA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nSstT4dk3Z/BMNVUWOhQXEjjKYWZjqp/wxS9gtaJ+URtfaNQ3DRi6MLGEdIUcu5P5 737r52cdAmyTObSyx+qh02qf9HisQvZHlHju8DUXNHQ+VWl+cSnqnsu9RpW4n51C2g mhcv0tEIXiwNidOzzCvJirqMcPEIa9Gxi/uQcy8f0vjTyg9RvBPE6OMbxVRWjwnIV9 CwFHqtmCU0EXL7doL0Eg81fBiWNz4JBIaTBUXDEKveY5LrU+62Gs9lGfEjYaQaWKfJ 2cxwVr80HpZFHznRSRDqJ4Vm1dj+rzYoF6wPnt0WPKQwpeOo340sTizAVajCOjaEC/ MHdufzyqWlO9A== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 60D416826B; Wed, 29 Oct 2025 00:17:33 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 29 Oct 2025 00:16:47 -0600 Message-ID: <20251029061657.1456910-6-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251029061657.1456910-1-sjg@u-boot.org> References: <20251029061657.1456910-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: OLWBA23NE5H4GRQDJJAJMXWLPONLBQGC X-Message-ID-Hash: OLWBA23NE5H4GRQDJJAJMXWLPONLBQGC 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 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 5/7] scripts: build-efi: Write uboot.env file for bootcmd support 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 When running U-Boot as an EFI application under EDK2/OVMF, U-Boot doesn't have direct access to QEMU's fw_cfg interface. To support the --bootcmd option, write a uboot.env file to the EFI partition containing the boot command. Co-developed-by: Claude Signed-off-by: Simon Glass --- scripts/build-efi | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/scripts/build-efi b/scripts/build-efi index 95a8f456097..6c3b7a274f3 100755 --- a/scripts/build-efi +++ b/scripts/build-efi @@ -13,6 +13,13 @@ OVMF-pure-efi.x64.fd at https://drive.google.com/file/d/1c39YI9QtpByGQ4V0UNNQtGqttEzS-eFV/view?usp=sharing Use ~/.build-efi to configure the various paths used by this script. + +When --bootcmd is specified, a uboot.env file is created on the EFI partition +containing the boot command. U-Boot needs to be configured to import this file +on startup, for example by adding to CONFIG_PREBOOT or the default bootcmd: + + load ${devtype} ${devnum}:${distro_bootpart} ${loadaddr} uboot.env; \ + env import -t ${loadaddr} ${filesize} """ from argparse import ArgumentParser @@ -20,6 +27,7 @@ import os from pathlib import Path import shutil import sys +import tempfile import build_helper @@ -169,6 +177,32 @@ class BuildEfi: tools.write_file(f'{dst}/startup.nsh', f'fs0:{fname}', binary=False) shutil.copy(f'{self.build_dir}/{fname}', dst) + # Write U-Boot environment file if bootcmd is specified + if self.args.bootcmd: + # Check if mkenvimage is available (local build or system-wide) + mkenvimage = 'tools/mkenvimage' + if not os.path.exists(mkenvimage): + mkenvimage = 'mkenvimage' + if not shutil.which(mkenvimage): + tout.error('Please install u-boot-tools package:') + tout.error(' sudo apt install u-boot-tools') + raise FileNotFoundError('mkenvimage not found') + + # Create text environment file + env_content = f'bootcmd={self.args.bootcmd}\n' + with tempfile.NamedTemporaryFile(mode='w', delete=False, + suffix='.txt') as outf: + outf.write(env_content) + env_fname = outf.name + + try: + # Convert to binary format with CRC using mkenvimage + command.run(mkenvimage, '-s', '0x1000', + '-o', f'{dst}/uboot.env', env_fname) + print(f'Created uboot.env with bootcmd: {self.args.bootcmd}') + finally: + os.unlink(env_fname) + def do_build(self, build): """Build U-Boot for the selected board""" extra = ['-a', '~CONSOLE_PAGER'] if self.args.no_pager else [] From patchwork Wed Oct 29 06:16:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 649 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=1761718666; bh=DPHfvUcxq5/Zy3JyoguwxWPovwaOESR7Tkh6wBwTVTc=; 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=aji9ORQE4E9VpISBVRKIzXpUGgMcwP5h3xL0ZTi2TbNCddHa6smno/ax0i/tvWeRT uWPlm7WWPUdB6TxDBhZYhe5DR48AEcXx4jHxzF2BtY7EtbLUAz1aNxkCPD3FjAbMm2 aSHQMMtJNb+Od1KmgejZ0k6ZlmPmrtoZPDY84BksokLQE1hqNzCzIdvrrV0FTlFoss UnzK4sPBQjY6JTprwA+R0RcADQHuU6x5g+ruN3OnByYV96F7Rz7u/drZbCcwzJ7j+i L/vj/q8j/okcRc9G6Rt2Zqk3ZBvhESteNJEJj2vCV7MwG2CLYFwuJV2aZ/oDjXtdJh /SMOY9Cp99kAQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8AE4E682B7 for ; Wed, 29 Oct 2025 00:17:46 -0600 (MDT) 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 yrNsVafD55gk for ; Wed, 29 Oct 2025 00:17:46 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718666; bh=DPHfvUcxq5/Zy3JyoguwxWPovwaOESR7Tkh6wBwTVTc=; 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=aji9ORQE4E9VpISBVRKIzXpUGgMcwP5h3xL0ZTi2TbNCddHa6smno/ax0i/tvWeRT uWPlm7WWPUdB6TxDBhZYhe5DR48AEcXx4jHxzF2BtY7EtbLUAz1aNxkCPD3FjAbMm2 aSHQMMtJNb+Od1KmgejZ0k6ZlmPmrtoZPDY84BksokLQE1hqNzCzIdvrrV0FTlFoss UnzK4sPBQjY6JTprwA+R0RcADQHuU6x5g+ruN3OnByYV96F7Rz7u/drZbCcwzJ7j+i L/vj/q8j/okcRc9G6Rt2Zqk3ZBvhESteNJEJj2vCV7MwG2CLYFwuJV2aZ/oDjXtdJh /SMOY9Cp99kAQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 69C0D682D9 for ; Wed, 29 Oct 2025 00:17:46 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718663; bh=X//e5fkLYC/86lVyzHVhZgJ+xVFcYPJipyNHv/PLNyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mGZ9xKBP1174h43j6revzUDKsVOxad6Bv1JWaMHzuiZFxRVy4J65eNlwQ0dA8Gr0y SpDbUPtKnkJlLGu0TcFbzchDa9H0JqWS2zNCXI55KC42hSrRcPuyT4NzxP58+9gjbO AH940uJxOEbM5JKS+jCiVzgklyfjEHVe6rj8kwxy+FtydpHv9XYpefKphmFcmHEME8 yIotaAbgTAhdpMknZbTGESjiy/jY8ffVV9z777LKKlScw1wNRYj2+5r9tSUWKf3hsl Kw+Lrw2l29G0Cw/y2GldySrax0jwC33Kic2Vl5e0KYZaxrrdoM8B8VF3j+1oChAQ+0 asB3Vk6aacRuQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 93C126830C; Wed, 29 Oct 2025 00:17:43 -0600 (MDT) 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 DHiExKUgiLJZ; Wed, 29 Oct 2025 00:17:43 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718658; bh=fd9ZLys/a7zt+0kQ0wBegz9Fo74WVfChPqfRFqk8pk8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KnQlYNtS18Vahix5tihNEVF4FzKVXYzUu9+stlCODaTLhmQRZY6UcSpxXA2qOtyhM Z4f5dyFRPyeK2+hlsD1xKcd63sTctLHgMy9h4oeWtJWf75ICYSdXKgsATj78Gwtp+e TIMbSlPUZIfWaq9n4EXwaRAuYQ9znGViEwpYY9tK4bkKR9ukDdT11u08o6/9A/VVWT MGsd4oj8G9BgcgmDozPs4JpEoYf/CQUYfZdmjwtDHICdXtL3GvXRl5fnB3RwmDXMqi o5aXSeeQibW5FXTT/lhFowW3glW/yUljgjKRpSQcjr0RF2PtnAMLUor85MePE4+QUB fFm6PRyw4Temg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 5E708682D9; Wed, 29 Oct 2025 00:17:38 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 29 Oct 2025 00:16:48 -0600 Message-ID: <20251029061657.1456910-7-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251029061657.1456910-1-sjg@u-boot.org> References: <20251029061657.1456910-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: H5NUI2KNG3CTVK2WVAGIJFB2ZPV2ZRY5 X-Message-ID-Hash: H5NUI2KNG3CTVK2WVAGIJFB2ZPV2ZRY5 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 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 6/7] efi-x86_app64: Use bootflow scan for boot command 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 Switch back to the normal boot command for this app. Signed-off-by: Simon Glass --- configs/efi-x86_app64_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/efi-x86_app64_defconfig b/configs/efi-x86_app64_defconfig index 63a53361688..d50c8ac4f2c 100644 --- a/configs/efi-x86_app64_defconfig +++ b/configs/efi-x86_app64_defconfig @@ -17,7 +17,7 @@ CONFIG_BOOTSTD_FULL=y CONFIG_SHOW_BOOT_PROGRESS=y CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="root=/dev/sdb3 init=/sbin/init rootwait ro" -CONFIG_BOOTCOMMAND="bootctl run" +CONFIG_BOOTCOMMAND="bootflow scan -lb" CONFIG_SYS_PBSIZE=532 CONFIG_SYS_CONSOLE_INFO_QUIET=y # CONFIG_CONSOLE_PAGER is not set From patchwork Wed Oct 29 06:16:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 650 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=1761718671; bh=v0a07Y06jEuqIPJup57jZmZNQU0CeCZHs8a3RSBilB4=; 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=urk4lmJWm+y+gDFm24TgNHA4R53nLtRzDbjpcHC3GUJ0wm4yQwEOPpCztiVH3+5nU IESWbSHQE0lVdmjoUofDPFRez+HRw4+CdJXjwGZX82njUnSZ06vgfuPkSOGkMKJGTl yXBvX/XqBDRpCWdQNWCd0VP202euBTcgC/UZq/TqUoT6cHwuRA/ho/UZMkkyRVa2/i 8ZD0LBux32kFszkLAL3vRSK19P42bqMHrcgXYtElVk9+VuadeIxXMK5AWPWhIt64k1 BPoFDklVj0pp0Qf7i6QVBmBukJVRQxAHbqY3k0AIEE8hd9KfaNJvr5DI8N5LSsf+3c M2/BxhduACBdQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6F0E76830C for ; Wed, 29 Oct 2025 00:17:51 -0600 (MDT) 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 dAu4prBlNFyJ for ; Wed, 29 Oct 2025 00:17:51 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718671; bh=v0a07Y06jEuqIPJup57jZmZNQU0CeCZHs8a3RSBilB4=; 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=urk4lmJWm+y+gDFm24TgNHA4R53nLtRzDbjpcHC3GUJ0wm4yQwEOPpCztiVH3+5nU IESWbSHQE0lVdmjoUofDPFRez+HRw4+CdJXjwGZX82njUnSZ06vgfuPkSOGkMKJGTl yXBvX/XqBDRpCWdQNWCd0VP202euBTcgC/UZq/TqUoT6cHwuRA/ho/UZMkkyRVa2/i 8ZD0LBux32kFszkLAL3vRSK19P42bqMHrcgXYtElVk9+VuadeIxXMK5AWPWhIt64k1 BPoFDklVj0pp0Qf7i6QVBmBukJVRQxAHbqY3k0AIEE8hd9KfaNJvr5DI8N5LSsf+3c M2/BxhduACBdQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4FD0F682B7 for ; Wed, 29 Oct 2025 00:17:51 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718669; bh=2CMhQbxcE0EyPAcf+gY46V3f/Tzc0VMo9j2cnANwBTA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RPyG9kSQJtVWnWZv56R55CqX4vBSRGNtfXnFeVwPSPFCELr9p8sykjqIheGcOe1r5 d5NdGfbFUnWXwjtNHUPEypMppULNk1unTMdyToX8bGOzg3IJfHLOquhxIKIOjUwROi t7bWSKdvRop2jxWolWdtyhqHV8Y5rAtdQjFSYavTYZQ6FzQOJDwhkbNTXrzeWjwMMl 8CPVI1EkzRg6mLZqF0N8w1/cCpxGZhiDEkvtDr/KyYzL01T40+NJrF0s8aLi7O5qHp WxpqhFp4FOCG6D6ofQUW95Jx3dDIWFnw6WeBS9h9MYB2YmWonX0F7gQUmgnLLNoR/U ix5Kp+eBmoL0g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3E972682B7; Wed, 29 Oct 2025 00:17:49 -0600 (MDT) 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 dKgMk_GaBQoe; Wed, 29 Oct 2025 00:17:49 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1761718663; bh=nzXSViFJC2P4g1uT78jsCxSy0rXHAByZR7irvbB603w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kXGr65pgwa+zxEm9yBa0zs2Cg8ZmfC892ev1JUsN1SF5VKdmdFUTJztsBEParZzxP WpbYmLO7+7+afG11l+FOAbrEJZUz7ImvwAjmCFyPecBliivWnpJB125dQmlZZuOlw2 NiSxODbY7+XaIaShO08cj03KmOH7JBWbftYud6Ju0pFTCLb11xMNO42VEJir+rE3tf 8TDBfi0D7q2Nkkhluv78X3O6/TLCniErm2s7wUk112PiRJ6NixwaNJQfmNtpKumuu8 ZLi3eqBKRtUFqbmE0FL4KFyGl8mshiW1uJXh5bVgAK++vmDKbRFkJPZ4xI6IYclSNd 2ar4LQXZM74pA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 266F96824C; Wed, 29 Oct 2025 00:17:43 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 29 Oct 2025 00:16:49 -0600 Message-ID: <20251029061657.1456910-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251029061657.1456910-1-sjg@u-boot.org> References: <20251029061657.1456910-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 2HY4F6G47VD4TWVJW2DZ55N6CXG7WRIX X-Message-ID-Hash: 2HY4F6G47VD4TWVJW2DZ55N6CXG7WRIX 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 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 7/7] efi-x86_app64: Enable environment in FAT filesystem 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 Enable CONFIG_ENV_IS_IN_FAT to automatically load the environment from the uboot.env file on the FAT filesystem. This makes the build-efi script's --bootcmd option work correctly. Co-developed-by: Claude Signed-off-by: Simon Glass --- configs/efi-x86_app64_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/efi-x86_app64_defconfig b/configs/efi-x86_app64_defconfig index d50c8ac4f2c..6f038c102b4 100644 --- a/configs/efi-x86_app64_defconfig +++ b/configs/efi-x86_app64_defconfig @@ -30,6 +30,9 @@ CONFIG_CMD_TIME=y CONFIG_CMD_EXT4_WRITE=y CONFIG_MAC_PARTITION=y CONFIG_ENV_OVERWRITE=y +CONFIG_ENV_IS_IN_FAT=y +CONFIG_ENV_FAT_INTERFACE="efi" +CONFIG_ENV_FAT_DEVICE_AND_PART="0:0" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="bzImage"