From patchwork Fri Feb 13 21:17:34 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1858 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=1771017488; bh=Pu/aPhgkgy0oix1VfZKKxPZ29vihZZJwA1rM9LHuPKE=; 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=tne3aLuBwgj26aQqsGJUkUi3nCSWW/hCfTpqlimCp6wKT+amWv3c6G6G1vuklsp/5 4AlSXV7NgZNvDO2ZmZBvwlNUwF33svIGvoMhSZ+DpfJYUFCnHEcyXqm6lcfiNzcHJz OYa6/E52/e9KfOREuIFw9VoIwy8RBdQlOiTPORw1i+J8KfcH6Id8eeJsURnlpmtHol l/9zaal4tnfjiXp/6SKkqZB1yXkAajhTEWtP73ax4qumRc0e4H3R2EUQx+ZqBcwdYK tSljrxh2QAIdKFfxqDKe0KhaZywLQthV9AlMfqLQ8ATitwGsxUgXgGS0waf1+YSfM8 rGlrs3xpD//9g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9054469B45 for ; Fri, 13 Feb 2026 14:18:08 -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 5elpWGdixQ1O for ; Fri, 13 Feb 2026 14:18:08 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771017488; bh=Pu/aPhgkgy0oix1VfZKKxPZ29vihZZJwA1rM9LHuPKE=; 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=tne3aLuBwgj26aQqsGJUkUi3nCSWW/hCfTpqlimCp6wKT+amWv3c6G6G1vuklsp/5 4AlSXV7NgZNvDO2ZmZBvwlNUwF33svIGvoMhSZ+DpfJYUFCnHEcyXqm6lcfiNzcHJz OYa6/E52/e9KfOREuIFw9VoIwy8RBdQlOiTPORw1i+J8KfcH6Id8eeJsURnlpmtHol l/9zaal4tnfjiXp/6SKkqZB1yXkAajhTEWtP73ax4qumRc0e4H3R2EUQx+ZqBcwdYK tSljrxh2QAIdKFfxqDKe0KhaZywLQthV9AlMfqLQ8ATitwGsxUgXgGS0waf1+YSfM8 rGlrs3xpD//9g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8101769B31 for ; Fri, 13 Feb 2026 14:18:08 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771017485; bh=wUzv6PE86pnr61FIzCm2shyzuFTFZR/YHGg+WLvW0uU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WUvHNP+PSk4G/81Uut2VO+HfG1ojoB0cgE4WwJWa4EdDGXc0XfoYZ5xtr8QZ46pSq mrklhmi8kAI1ndefQ2oda4C9eDdLGVcyjQBeSAB5O5ucJkUhzZTWRQjpyGoMaKvXCS h0ullsbvvYRC12lsw09Zl8Z52oWixxZDNNIBV3VEprMoQCXcR7rvlyYFOZIu9IhyCJ En4xAYa3OzZsZP3gibGGOZK4iEwFdpM9tqy0VlxNUEjFPAbXOI8zh2KY471RbbBGuw RPlUndvlivRH/qbEVxwFpW4Lpz2tlc7Olw/NjhqW1RdbltOobyscamGPXjLqLH5bTR S4i72NlObDQOw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BF90969B3D; Fri, 13 Feb 2026 14:18:05 -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 oxU2ff1lLInT; Fri, 13 Feb 2026 14:18:05 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771017481; bh=g/yH9W1dnZGaHqN50FRbjE5TPbdhdRe83hZrrX85RYI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E7oCz9//6Ly8NtewTC0N0N5IrpiEI0WXpiL9HhkseB9NkveDAAn2Fz60IpCsdV9M4 r21y6WzXGGep1XrIKkPULF9NWHbWO51+uLnqZrGQYn4cSSTNKmLyCkYWtS8lcbE0q/ kIZlIn9ZxTr2oUdu3vpklT6cfEKu+MIlRth0vNS89AJ/2pWFiW6bToDkzJAfYMjjC9 Fu8/Evg1BqgORyxX83+rA8nJMiu0PxMQOBVZJtRrB5+SDHEEp1PGFV0CscvyihPrBl j185RTeuJWePys30egcV69zwyoGSSd9YtAeTotouDACvPYJ3uP5Hx6DSmEUbfgi+h1 wxK39VmZaHhAA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 71B2669B31; Fri, 13 Feb 2026 14:18:01 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 13 Feb 2026 14:17:34 -0700 Message-ID: <20260213211739.381127-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260213211739.381127-1-sjg@u-boot.org> References: <20260213211739.381127-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: MVFUS46XV37CU3P54LW6KQVW5EIQYV5F X-Message-ID-Hash: MVFUS46XV37CU3P54LW6KQVW5EIQYV5F 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 3/5] doc: bootstd: Add developer docs for the EFI bootmeth 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 bootstd developer docs are missing a page for the EFI bootmeth. Add one describing the discovery and boot phases for both block and network devices, and link it from the toctree and overview. Co-developed-by: Claude Opus 4.6 Signed-off-by: Simon Glass --- doc/develop/bootstd/efi.rst | 25 +++++++++++++++++++++++++ doc/develop/bootstd/index.rst | 1 + doc/develop/bootstd/overview.rst | 2 +- doc/develop/uefi/uefi.rst | 3 +++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 doc/develop/bootstd/efi.rst diff --git a/doc/develop/bootstd/efi.rst b/doc/develop/bootstd/efi.rst new file mode 100644 index 00000000000..abd1ab158aa --- /dev/null +++ b/doc/develop/bootstd/efi.rst @@ -0,0 +1,25 @@ +.. SPDX-License-Identifier: GPL-2.0+: + +EFI Bootmeth +============= + +The EFI bootmeth allows U-Boot to boot an operating system by loading and +running an EFI application from a disk or network device. This follows the +approach used by many Linux distributions to provide a standard boot path. + +When invoked on a block device, ``distro_efi_try_bootflow_files()`` searches for +the architecture-specific EFI binary in ``/EFI/BOOT/`` (e.g. +``bootaa64.efi``). If found, the bootflow is marked as ready. The function also +tries to locate a matching device tree using ``efi_get_distro_fdt_name()``. + +When invoked on a network device, ``distro_efi_read_bootflow_net()`` performs a +DHCP request with PXE vendor-class and architecture identifiers, then retrieves +the EFI binary via TFTP. A device tree is also fetched if available. + +At boot time, ``distro_efi_boot()`` loads the EFI binary into memory (for block +devices) and calls ``efi_bootflow_run()`` to execute it via the EFI loader. + +The compatible string "u-boot,distro-efi" is used for the driver. It is present +if `CONFIG_BOOTMETH_EFI` is enabled. + +See :doc:`/develop/uefi/uefi` for general UEFI implementation details. diff --git a/doc/develop/bootstd/index.rst b/doc/develop/bootstd/index.rst index cee792ffc98..bbdcb154724 100644 --- a/doc/develop/bootstd/index.rst +++ b/doc/develop/bootstd/index.rst @@ -10,6 +10,7 @@ Standard Boot extlinux pxelinux bls + efi pxe_api qfw android diff --git a/doc/develop/bootstd/overview.rst b/doc/develop/bootstd/overview.rst index 34ee42c79e0..60ba247e005 100644 --- a/doc/develop/bootstd/overview.rst +++ b/doc/develop/bootstd/overview.rst @@ -440,7 +440,7 @@ Bootmeth drivers are provided for booting from various media: - :doc:`Android ` bootflow (boot image v4) - :doc:`BLS ` Boot Loader Specification Type #1 entries - :doc:`ChromiumOS ` ChromiumOS boot from a disk - - EFI boot using bootefi from disk + - :doc:`EFI ` boot using bootefi from disk or network - EFI boot using boot manager - :doc:`extlinux / syslinux ` boot from a storage device - :doc:`extlinux / syslinux ` boot from a network (PXE) diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst index ef53c4c35dd..a5131fa2d49 100644 --- a/doc/develop/uefi/uefi.rst +++ b/doc/develop/uefi/uefi.rst @@ -64,6 +64,9 @@ Therefore the bootefi command uses the device path of the block device partition or the network adapter and the file name of the most recently loaded PE-COFF file when setting up the loaded image protocol. +See :doc:`/develop/bootstd/efi` for how standard boot discovers and launches +EFI binaries automatically. + Launching a UEFI binary from a FIT image ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~