| Message ID | 20260109231151.4056804-1-sjg@u-boot.org |
|---|---|
| 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=1768000334; bh=hxLgynS45C+2r2xXG0vThEchgXCqhF9/R5UeZW+zzbA=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=NgbKTnzLYI3LLaedWONlbUQfagOZZhg210yj+qsfZKHXKP8ZraDXyTkXrezA4ItRT aheRj0Yg5eYKVelnZJp4zThfgd2aE3X5O6DRpd3geiFnsqqZHKJbv7cgju/GeQ7zLu 81mDDBsEc+Pgv8yZudWtWupJ7SeA5+zHYdo2gon1sIZpypxqOtALRn3ZIQZ5UQhTKK lZTW5GakpjMg/bnRLFcMC7gJTaXyHFkQirPbpZav1lep4BV5dW0137WhXwGTcZKsE1 STLFaKJU6pGnBIYodMA/YHhiHyYCf2vEvAW9as69H1ud1NGEUYPlcq1qpMU2AvQCk9 QkDrPR2Ggl3tg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 31FFA69238 for <u-boot-concept@u-boot.org>; Fri, 9 Jan 2026 16:12:14 -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 v4nlSaBiqh-f for <u-boot-concept@u-boot.org>; Fri, 9 Jan 2026 16:12:14 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768000334; bh=hxLgynS45C+2r2xXG0vThEchgXCqhF9/R5UeZW+zzbA=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=NgbKTnzLYI3LLaedWONlbUQfagOZZhg210yj+qsfZKHXKP8ZraDXyTkXrezA4ItRT aheRj0Yg5eYKVelnZJp4zThfgd2aE3X5O6DRpd3geiFnsqqZHKJbv7cgju/GeQ7zLu 81mDDBsEc+Pgv8yZudWtWupJ7SeA5+zHYdo2gon1sIZpypxqOtALRn3ZIQZ5UQhTKK lZTW5GakpjMg/bnRLFcMC7gJTaXyHFkQirPbpZav1lep4BV5dW0137WhXwGTcZKsE1 STLFaKJU6pGnBIYodMA/YHhiHyYCf2vEvAW9as69H1ud1NGEUYPlcq1qpMU2AvQCk9 QkDrPR2Ggl3tg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1EDEC69218 for <u-boot-concept@u-boot.org>; Fri, 9 Jan 2026 16:12:14 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768000332; bh=RBwMQlRM7JtDkk09lK173eeSPrPww1EMzVwc/g1svIY=; h=From:To:Cc:Subject:Date:From; b=XrcdfPha4e5JK//Swn/VAVWbtY0EegnekqFhdZo789SxeGDSCys066heOH8IVxcpe 3oC9hdskC8xSOIlNChVuKW7iPGIUY+JEfDr0gT6uqIGSYXuRWP7WZhR166dIONzXJ2 xd2q19KZk6IqQ5W8Bo/GUF91vCqmq6PBWc+uHMmKyJ9fclAWOOqM4HLHqpzC1thvaE qm/gQUNSCzVtO36eMlouQjXeY8RddAnE94VA0z7zE7CGAwlSnEBZC0cUxU1HuN4AaY Qfq+R8bHOEF9a95FF1J6Lw13aYrmwT+4i0G72fwgW4MWY0yVjjZtgmiQUtt7ZC27XD C/wjFDzg3ruYw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id ADCB169206; Fri, 9 Jan 2026 16:12:12 -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 XJnOkJ-Wj_xe; Fri, 9 Jan 2026 16:12:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768000328; bh=HZh4lNJVdsiJG8m2mSsXbEjXQET6zke3wVqdauSqwAM=; h=From:To:Cc:Subject:Date:From; b=nZ2uC23selrTLCUMT7yZKDgybd4O0Nizxe0K8ihMDfMSWnYcG3u9jiTsjJ2ZNJui/ PRIODV/Sv3T4A2InQyVIg0RWqWuFnay2iYgYkGR/bagHZ2kIUdBc/Bd5InAorH35f7 7svZShAPjNeieuuzrTJSTXEC/DEiRa4TW0u2srO5aw6PlZ9c9xOX9+QU5VBFNxt/Tw TtdtOxT6EjkAltOsg7aibvSNB5IcpriEAazi8Z22oGJMCif/HS139oB2/+V8o7MFMQ YdtyJA+NEh2eecYIOH8SmFazKASmKyotCkpQ7J3N2dPKWt67WgETsilHVuJeRRgpwW zbafNZhjynY5A== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 505456915D; Fri, 9 Jan 2026 16:12:08 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Fri, 9 Jan 2026 16:11:09 -0700 Message-ID: <20260109231151.4056804-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: IYHGNBYEJ4BF2IVPDPAPGFAXF44Y2UY7 X-Message-ID-Hash: IYHGNBYEJ4BF2IVPDPAPGFAXF44Y2UY7 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: Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <simon.glass@canonical.com> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 00/32] boot: pxe: Refactor into separate load/setup phases 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/IYHGNBYEJ4BF2IVPDPAPGFAXF44Y2UY7/> 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 |
boot: pxe: Refactor into separate load/setup phases
|
|
Message
Simon Glass
Jan. 9, 2026, 11:11 p.m. UTC
From: Simon Glass <simon.glass@canonical.com>
This series refactors the PXE/extlinux boot path to separate
file-loading from boot-setup. This is working toward a clean
three-phase API: parse, load, boot.
The refactoring makes the code more modular and testable, and allows
callers to inspect loaded files before committing to boot.
It builds on the previous series which added tests. This one adds
a few more tests but mostly focuses on reorganising the code without
changing behaviour.
Key changes:
- Split pxe_load_label() into load and setup phases, allowing flexible
use by callers that need to load files without immediate boot setup
- Improve FDT overlay handling: convert from string to alist, load to
sequential addresses, and split loading from applying overlays
- Move all file loading (kernel, initrd, FDT, overlays) into
pxe_load_files() for better organisation
- Add test for FIT images with embedded FDT (documents a pre-existing
limitation where conf_fdt_str is NULL in this case)
- Add comprehensive tests for the new APIs and overlay loading
- Various cleanups: use IS_ENABLED(), use global working_fdt, export
set_working_fdt_addr_quiet()
Simon Glass (32):
test: pxe: Preserve filesystem images when persist is enabled
sandbox: bootz: Fix incorrect pointer passed to unmap_sysmem()
test: pxe: Add helper to check menu output lines
test: pxe: Test devicetree alias keywords
boot: pxe: Add separate APIs for label selection and file loading
boot: pxe: Update tests to use the new API
test: pxe: Add a test for missing fdtoverlay_addr_r
test: pxe: Add test for FIT images with embedded FDT
boot: pxe: Add a flag to suppress file-retrieval messages
boot: pxe: Print 'say' message when label is booted
boot: pxe: Rename destroy_pxe_menu() to pxe_menu_uninit()
boot: pxe: Add pxe_menu_init() function
boot: pxe: Defer processing of include files
boot: pxe: Extract pxe_load_files() from pxe_load_label()
boot: pxe: Split filename handling from label_process_fdt()
boot: pxe: Add FDT pointer to context for kaslrseed
boot: pxe: Move FIT handling from label_process_fdt() to caller
boot: pxe: Move fdt_addr_r check to caller of label_load_fdt()
boot: pxe: Use early return in label_load_fdt()
boot: pxe: Use ctx->fdt in label_boot_fdtoverlay()
boot: pxe: Move label_get_fdt_path() call to pxe_load_label()
boot: pxe: Load FDT files in pxe_load_files()
boot: pxe: Use IS_ENABLED() for CONFIG_OF_LIBFDT_OVERLAY
boot: pxe: Drop fdtoverlay_addr_r check in label_boot_fdtoverlay()
boot: pxe: Convert fdtoverlays from string to alist
boot: pxe: Load overlays to sequential addresses
boot: pxe: Split overlay loading and applying into two passes
boot: pxe: Split label_boot_fdtoverlay() into load and apply functions
boot: pxe: Move overlay loading to pxe_load_files()
boot: pxe: Add test for FDT overlay loading
boot: pxe: Split pxe_load_label() into load and setup phases
boot: pxe: Extract boot preparation into separate function
arch/sandbox/lib/bootm.c | 2 +-
boot/pxe_parse.c | 98 ++--
boot/pxe_utils.c | 859 +++++++++++++++++++------------
include/pxe_utils.h | 152 +++++-
test/boot/pxe.c | 559 ++++++++++++++++----
test/py/tests/test_pxe_parser.py | 107 +++-
6 files changed, 1300 insertions(+), 477 deletions(-)