Test farms need to run successive U-Boot builds without rewriting boot storage. Add optional fastboot boot support to SPL so an already-running SPL can receive U-Boot over USB and hand off to it in RAM. U-Boot proper can then load the operating system using its usual boot methods.
The standard host command, fastboot boot u-boot.itb, accepts a FIT built for the target, including any firmware required by its SPL handoff. Uncompressed legacy U-Boot images and raw binaries are also supported when enabled by the board. Raw binaries use the board's configured load and entry addresses. Legacy and raw downloads are rejected when SPL FIT signature verification is enabled. The series reuses the SPL RAM loader and normal SPL handoff. It also fixes ignored errors when loading an explicitly requested FIT device tree and invalidates stale or incomplete fastboot downloads, so neither can be used to boot an unintended image. Signed-off-by: Carlo Caione <[email protected]> --- Carlo Caione (6): spl: fit: reject failures loading an explicitly requested FDT fastboot: invalidate stale and incomplete downloads spl: ram: allow loading FIT images from a supplied buffer spl: support booting FIT images downloaded with fastboot spl: fastboot: support legacy U-Boot images spl: fastboot: support raw U-Boot images MAINTAINERS | 3 + common/spl/Makefile | 1 + common/spl/spl_fastboot_boot.c | 76 +++++++++++++ common/spl/spl_fit.c | 14 ++- common/spl/spl_ram.c | 101 ++++++++++++++---- configs/sandbox_spl_defconfig | 1 + doc/android/fastboot.rst | 56 +++++++++- drivers/fastboot/Kconfig | 16 +++ drivers/fastboot/fb_command.c | 43 +++++++- drivers/fastboot/fb_common.c | 3 +- drivers/usb/gadget/f_fastboot.c | 9 +- include/fastboot-internal.h | 3 + include/fastboot.h | 8 ++ include/spl.h | 25 +++++ include/spl_load.h | 2 + test/image/Kconfig | 9 ++ test/image/Makefile | 2 + test/image/spl_fastboot.c | 230 ++++++++++++++++++++++++++++++++++++++++ test/image/spl_load.c | 46 +++++++- test/image/spl_ram.c | 48 +++++++++ 20 files changed, 666 insertions(+), 30 deletions(-) --- base-commit: fed92546960a92177d67c0b8d7b22385f50fed29 change-id: 20261014-ccaione-upstream-spl-fastboot-boot-5d8e28a700ad Best regards, -- Carlo Caione <[email protected]>
