From patchwork Fri Feb 13 21:17:36 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1860 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=1771017497; bh=DeVxIm2nDnoCyIll07sUXPFl6oGnpkDrwxjuowtmY40=; 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=vowMN0apgcsungcMC03GJARYjI874o0wsuXFHRRKwtmLWhEIoUG98n2oZxeBV4u4O /y+CilCyBcqNvMlwfaPoMGLysEVxqOuT4UlVQxB9CM0UFBwrAzY3xNzM1Z5a3LpK4v vidpT286o8JMoY/wAX6qBOHz4VbuxpTX6Mr+s6LaDET+ZzgbdntSB1bOaiX4e2v8Hq 4VSaj6AaQCQEw7bBw87PifGSeQx/kW2zSiNwYhOVaDsscULdsatvpXd3GEoS8hM2i6 Q1jH4waqnEOdTenh+AlrdRLCjgzVryYwsCPz/BitoXbpTAwcGNjoi7tp3dcOH4k3JE nScZGrBxUemJA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D27C269A62 for ; Fri, 13 Feb 2026 14:18:17 -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 hZrBHKui-9RX for ; Fri, 13 Feb 2026 14:18:17 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771017497; bh=DeVxIm2nDnoCyIll07sUXPFl6oGnpkDrwxjuowtmY40=; 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=vowMN0apgcsungcMC03GJARYjI874o0wsuXFHRRKwtmLWhEIoUG98n2oZxeBV4u4O /y+CilCyBcqNvMlwfaPoMGLysEVxqOuT4UlVQxB9CM0UFBwrAzY3xNzM1Z5a3LpK4v vidpT286o8JMoY/wAX6qBOHz4VbuxpTX6Mr+s6LaDET+ZzgbdntSB1bOaiX4e2v8Hq 4VSaj6AaQCQEw7bBw87PifGSeQx/kW2zSiNwYhOVaDsscULdsatvpXd3GEoS8hM2i6 Q1jH4waqnEOdTenh+AlrdRLCjgzVryYwsCPz/BitoXbpTAwcGNjoi7tp3dcOH4k3JE nScZGrBxUemJA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BBD3069B31 for ; Fri, 13 Feb 2026 14:18:17 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771017495; bh=y0IlteQaC+h/vFCMPPduZWFuZ45JMXZ8ZYxTBojtoGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aUHbT1qUZhiN+OC5G0TJku62JshkMkW+zeDdyEfUDT4jl1DoNA8gVpU8Gji3ulMLh hHz56rQEyXQpoje/XLAEaD6XhWHv9geMucsO0sVy56JSPIAGINPPATZQ4hkYCg7ydf E9vlgEeIxYRQ8vQGtsmYSxZTc2TrW5erG72vQhVknnIEx/gaOfdfndS5oqSgmUFuG1 qj7BYBj7SDrUhH35fUegM09JbawZAjCZv2NaLTxkDJqkKW/eEZQc24w/X7nf9yrHKg 97OBrvnxFthL7ER7thkyrEr684xpOkVYt55pEeLkoa783VpGBX79eclw7VvkFka4NA 2kweXkMmaZ+7A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5D2E069B3D; Fri, 13 Feb 2026 14:18:15 -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 13_2vhoXuvNa; Fri, 13 Feb 2026 14:18:15 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771017490; bh=I6p8JhcKmOIZrAnwG9A0KfLn+QDqFA4dP+zS5kNJ1R4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m9lNQMtZQaKj8FTpSX9mzetSB3kPr/5D8wIuVMMtGSKhpn3MUtxmx4HtGRsl6OKa6 QoKe0qCalNDSLHUyCdKBBZCkzYW9BZfkdx5bKNu6RlxOl2x38Pzy+4x2HmiZT6Roz5 oXs4W6jljTKyQKnbjf5SXnRME90JF0+qpeirf9WRWJHxkmLOLXXtzepgj0gnAVV3uR hFgMbDIf7N24dzH77lKjU5OdBcMWZ5/DR1jRsaHIoymmrOW7mmLEZdfXu2ZQaeNC9C MLGUoVsvmszuZUXL2/RJpfGroteUaSP4RqpVqcbxZliU4iSMdwYLt2F0+gSi1QLI4A 3rZwZke6AJTQQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 9EFA369B31; Fri, 13 Feb 2026 14:18:10 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 13 Feb 2026 14:17:36 -0700 Message-ID: <20260213211739.381127-6-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: 7J4AONJ5AAPKQQIGQN6FR7Z3EVVG4TPN X-Message-ID-Hash: 7J4AONJ5AAPKQQIGQN6FR7Z3EVVG4TPN 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 5/5] doc: bootstd: Add developer documentation for FEL 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 FEL bootmeth has no documentation at all. Add a developer page describing how it detects FEL-booted sunxi boards via environment variables and executes the pre-loaded script. Also add it to the toctree and overview list. Co-developed-by: Claude Opus 4.6 Signed-off-by: Simon Glass --- doc/board/allwinner/sunxi.rst | 3 +++ doc/develop/bootstd/fel.rst | 24 ++++++++++++++++++++++++ doc/develop/bootstd/index.rst | 1 + doc/develop/bootstd/overview.rst | 1 + 4 files changed, 29 insertions(+) create mode 100644 doc/develop/bootstd/fel.rst diff --git a/doc/board/allwinner/sunxi.rst b/doc/board/allwinner/sunxi.rst index d0c89b956b1..58e5848519e 100644 --- a/doc/board/allwinner/sunxi.rst +++ b/doc/board/allwinner/sunxi.rst @@ -306,6 +306,9 @@ bootstrap U-Boot by just providing our venerable u-boot-sunxi-with-spl.bin:: Additional binaries like a kernel, an initial ramdisk or a boot script, can also be uploaded via FEL, check the Wiki's `FEL page`_ for more details. +See :doc:`/develop/bootstd/fel` for details on how standard boot handles +FEL-booted boards. + .. _`Arm Trusted Firmware-A`: https://www.trustedfirmware.org/projects/tf-a/ .. _`docs/plat/allwinner.rst`: https://trustedfirmware-a.readthedocs.io/en/latest/plat/allwinner.html .. _`crust`: https://github.com/crust-firmware/crust diff --git a/doc/develop/bootstd/fel.rst b/doc/develop/bootstd/fel.rst new file mode 100644 index 00000000000..10001baeee5 --- /dev/null +++ b/doc/develop/bootstd/fel.rst @@ -0,0 +1,24 @@ +.. SPDX-License-Identifier: GPL-2.0+: + +FEL Bootmeth +============= + +The FEL bootmeth supports booting Allwinner (sunxi) boards that have been +started via the USB FEL protocol. The SPL places a boot script in memory and +records its address before jumping to U-Boot proper. + +This is a global bootmeth: it is not tied to a particular bootdev but is +invoked once during each scan. + +During discovery, ``fel_read_bootflow()`` checks for the ``fel_booted`` and +``fel_scriptaddr`` environment variables. These are set by SPL when the board +is FEL-booted. If either is missing the method is skipped. + +At boot time, ``fel_boot()`` reads the script address from ``fel_scriptaddr`` +and executes it with ``cmd_source_script()``. No files are loaded from a +filesystem; the script was already placed in memory by the FEL loader. + +The compatible string "u-boot,fel-bootmeth" is used for the driver. It is +present if `CONFIG_BOOTMETH_FEL` is enabled. + +See :doc:`/board/allwinner/sunxi` for general Allwinner board information. diff --git a/doc/develop/bootstd/index.rst b/doc/develop/bootstd/index.rst index 9f958da62de..5cbc020343f 100644 --- a/doc/develop/bootstd/index.rst +++ b/doc/develop/bootstd/index.rst @@ -12,6 +12,7 @@ Standard Boot bls efi efi_mgr + fel pxe_api qfw android diff --git a/doc/develop/bootstd/overview.rst b/doc/develop/bootstd/overview.rst index 0bcf988a458..f219eb3adf7 100644 --- a/doc/develop/bootstd/overview.rst +++ b/doc/develop/bootstd/overview.rst @@ -442,6 +442,7 @@ Bootmeth drivers are provided for booting from various media: - :doc:`ChromiumOS ` ChromiumOS boot from a disk - :doc:`EFI ` boot using bootefi from disk or network - :doc:`EFI boot manager ` using UEFI BootOrder variables + - :doc:`FEL ` boot over USB on Allwinner (sunxi) boards - :doc:`extlinux / syslinux ` boot from a storage device - :doc:`extlinux / syslinux ` boot from a network (PXE) - :doc:`sandbox ` used only for testing