From: He Yong <hyyoxhk@163.com>
To: u-boot@lists.u-boot-project.org
Cc: Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>
Subject: [PATCH v3 0/4] bootstd: Support scripts in raw partitions
Date: Mon, 26 Oct 2026 22:02:14 +0800 [thread overview]
Message-ID: <cover.1793020986.git.hyyoxhk@163.com> (raw)
This series adds a script_raw bootmeth for U-Boot script images stored
at the start of a named partition, without a filesystem or a board-specific
bootcmd. It supports legacy scripts and FIT scripts with embedded data.
Image reads are bounded by the partition size and a configurable limit.
The raw and filesystem script bootmeths share the execution handler and
script parser. For known-size FIT scripts, the parser passes the buffer
size to fit_check_format() and rejects external data before verification.
The existing FIT_FULL_CHECK configuration controls full structural checks.
Changes since v2:
- Split the series into shared FIT validation, execution-handler export,
the raw bootmeth, and sandbox tests.
- Drop the legacy parser bounds-check changes from this series.
- Move known-size FIT validation and external-data rejection into the
shared script parser, with tests for both verify settings and source.
- Bind script_raw inside its C test, following bootflow_rauc(), so existing
bootmeth lists and bootflow tests stay unchanged, including -G coverage.
- Label each expected C error with its corresponding Python case name.
- Reuse fs_helper.setup_image() with an sfdisk partition specification and
generate the disk from test_ut_dm_init_bootstd(), avoiding sgdisk and a
separate initialization test.
- Preserve the CONFIG_SANDBOX comment and clear verify on helper failure.
Validation on this revision:
- Sandbox build: make O=build-sandbox -j8
- Sandbox pytest: 3 passed (bootstd image initialization,
image_fit_script_bounds and bootflow_script_raw)
Previous version:
https://www.mail-archive.com/u-boot@lists.u-boot-project.org/msg09207.html
He Yong (4):
image: Bound FIT script checks by the image size
bootstd: Export the script bootflow execution handler
bootstd: Add a bootmeth for scripts in raw partitions
test: bootstd: Cover scripts in raw partitions on sandbox
MAINTAINERS | 1 +
arch/sandbox/dts/test.dts | 8 ++
boot/Kconfig | 26 +++++
boot/Makefile | 1 +
boot/bootmeth_script.c | 4 +-
boot/bootmeth_script_raw.c | 152 ++++++++++++++++++++++++++
boot/image-board.c | 19 +++-
configs/sandbox_defconfig | 1 +
doc/develop/bootstd/index.rst | 1 +
doc/develop/bootstd/script_raw.rst | 51 +++++++++
doc/device-tree-bindings/bootmeth.txt | 1 +
include/bootmeth.h | 12 ++
test/boot/bootflow.c | 81 ++++++++++++++
test/boot/image.c | 118 ++++++++++++++++++++
test/py/img/__init__.py | 2 +
test/py/img/script_raw.py | 98 +++++++++++++++++
test/py/tests/fs_helper.py | 19 ++--
test/py/tests/test_ut.py | 3 +
18 files changed, 588 insertions(+), 10 deletions(-)
create mode 100644 boot/bootmeth_script_raw.c
create mode 100644 doc/develop/bootstd/script_raw.rst
create mode 100644 test/py/img/__init__.py
create mode 100644 test/py/img/script_raw.py
base-commit: 0a55b098d6f5f6bafa84fc2f18b433dd167bf729
--
2.43.0
next reply other threads:[~2026-10-26 14:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 14:02 He Yong [this message]
2026-10-26 14:02 ` [PATCH v3 1/4] image: Bound FIT script checks by the image size He Yong
2026-10-26 16:14 ` Simon Glass
2026-10-26 14:02 ` [PATCH v3 2/4] bootstd: Export the script bootflow execution handler He Yong
2026-10-26 16:14 ` Simon Glass
2026-10-26 14:02 ` [PATCH v3 3/4] bootstd: Add a bootmeth for scripts in raw partitions He Yong
2026-10-26 16:14 ` Simon Glass
2026-10-26 14:02 ` [PATCH v3 4/4] test: bootstd: Cover scripts in raw partitions on sandbox He Yong
2026-10-26 16:14 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1793020986.git.hyyoxhk@163.com \
--to=hyyoxhk@163.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.