All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/5] Add fastboot to SPL
@ 2026-09-06 20:01 Carlo Caione
  2026-09-06 20:01 ` [PATCH v5 1/5] fastboot: factor out the USB session runner Carlo Caione
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Carlo Caione @ 2026-09-06 20:01 UTC (permalink / raw)
  To: u-boot, GSS_MTK_Uboot_upstream
  Cc: Suhrid Subramaniam, Macpaul Lin (林智斌),
	Pablo Sun (孫毓翔), Arnaud Ferraris,
	Mattijs Korpershoek, Tom Rini, Simon Glass, Sam Day,
	Quentin Schulz, Carlo Caione, David Lechner, Vitor Sato Eschholz,
	Lukasz Majewski, Marek Vasut, Peng Fan, Jaehoon Chung,
	Neil Armstrong, Julien Masson, Alexey Charkov, Adrian Freihofer,
	Francois Berder, Ilias Apalodimas, Marek Vasut, Vincent Jardin,
	Peter Robinson

Some recovery and initial-provisioning flows need a standard host protocol
before usable firmware is available in persistent storage. U-Boot already
provides fastboot, but the implementation can currently be started only
from the U-Boot-proper command line.

This series makes USB fastboot available as an opt-in SPL service,
including MMC partition flashing and Android sparse images. The interface
is kept deliberately narrower in SPL: it does not support the boot command
or filesystem probing, and reboot support remains platform-dependent.

The first four patches separate the generic preparation from SPL
enablement. They factor out the USB session runner, route USB reboot
through the common handler, make shared fastboot configuration phase-aware,
and add phase-aware sparse-image support. The final patch then contains the
SPL-specific Kconfig, gadget behavior, documentation, and sandbox_spl build
coverage.

Boards which leave SPL_FASTBOOT disabled add no fastboot code or supporting
library to SPL. The sandbox_spl defconfig enables the core service so that
the SPL build remains covered by CI.

---
Changes in v5:
- Preserve the command-line USB diagnostics and document teardown behavior.
- Finish converting shared fastboot configuration checks for build phases.
- Require reclaiming malloc for SPL sparse writes and use a 64 KiB fill buffer.
- Make environment-backed fastboot features optional in SPL.
- Document SPL command, buffer, allocator, printf and reset requirements.
- Build the core SPL fastboot service with sandbox_spl for CI coverage.
- Link to v4: https://patch.msgid.link/20260820-ccaione-upstream-spl-fastboot-v4-0-57e5ef71c74d@baylibre.com

Changes in v4:
- Drop RFC status.
- Make the USB fastboot helper and gadget build rules phase-aware.
- Use a separate command table for the SPL-supported command subset.
- Document the commands available in SPL.
- Apply the requested Makefile, annotation and preprocessor cleanups.
- Link to v3: https://patch.msgid.link/20260731-ccaione-upstream-spl-fastboot-v3-0-dbea3ff4529e@baylibre.com

Changes in v3:
- Rename the USB session helper to fastboot_usb_run().
- Initialize UDP and TCP sessions in their transport helpers.
- Remove a redundant USB session return assignment.
- Collect the Reviewed-by tag.
- Link to v2: https://patch.msgid.link/20260722-ccaione-upstream-spl-fastboot-v2-0-2ba3f71c42bc@baylibre.com

Changes in v2:
- Split the common USB session runner into a prerequisite patch.
- Route USB reboot through the common fastboot handler separately.
- Split phase-aware fastboot configuration and build rules.
- Split phase-aware Android sparse-image support.
- Keep SPL-specific behavior in the final patch.
- No functional change from v1.
- Link to v1: https://patch.msgid.link/20260719-ccaione-upstream-spl-fastboot-v1-1-c9bab5b0ba72@baylibre.com

---
Carlo Caione (5):
      fastboot: factor out the USB session runner
      fastboot: use the common handler for USB reboot
      fastboot: make shared configuration checks phase-aware
      image: sparse: add phase-aware SPL support
      fastboot: add SPL support

 cmd/fastboot.c                  |  53 ++------------------
 configs/sandbox_spl_defconfig   |   4 ++
 doc/android/fastboot.rst        |  48 +++++++++++++++++++
 drivers/Makefile                |   2 +-
 drivers/fastboot/Kconfig        | 104 ++++++++++++++++++++++++++++++++++++++--
 drivers/fastboot/Makefile       |   9 ++--
 drivers/fastboot/fb_block.c     |  11 +++--
 drivers/fastboot/fb_command.c   |  99 ++++++++++++++++++++++++++++++--------
 drivers/fastboot/fb_common.c    |  36 ++++++++++----
 drivers/fastboot/fb_getvar.c    |  30 +++++++-----
 drivers/fastboot/fb_mmc.c       |  49 +++++++++++--------
 drivers/fastboot/fb_nand.c      |   2 +-
 drivers/fastboot/fb_usb.c       |  69 ++++++++++++++++++++++++++
 drivers/usb/gadget/Makefile     |   2 +-
 drivers/usb/gadget/f_fastboot.c |   9 ++--
 include/fastboot.h              |  10 ++++
 lib/Kconfig                     |  13 +++++
 lib/Makefile                    |   3 +-
 lib/image-sparse.c              |   2 +-
 19 files changed, 425 insertions(+), 130 deletions(-)
---
base-commit: 527115ef6783cec49e5610c523c124b399011361
change-id: 20260718-ccaione-upstream-spl-fastboot-14fa2b6b2b64

Best regards,
--  
Carlo Caione <ccaione@baylibre.com>


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2026-09-11 14:49 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-06 20:01 [PATCH v5 0/5] Add fastboot to SPL Carlo Caione
2026-09-06 20:01 ` [PATCH v5 1/5] fastboot: factor out the USB session runner Carlo Caione
2026-09-09 20:31   ` David Lechner
2026-09-11 12:34   ` Mattijs Korpershoek
2026-09-11 13:33     ` Carlo Caione
2026-09-11 14:49       ` Mattijs Korpershoek
2026-09-06 20:02 ` [PATCH v5 2/5] fastboot: use the common handler for USB reboot Carlo Caione
2026-09-06 20:02 ` [PATCH v5 3/5] fastboot: make shared configuration checks phase-aware Carlo Caione
2026-09-11 12:38   ` Mattijs Korpershoek
2026-09-06 20:02 ` [PATCH v5 4/5] image: sparse: add phase-aware SPL support Carlo Caione
2026-09-06 20:02 ` [PATCH v5 5/5] fastboot: add " Carlo Caione
2026-09-09 21:16   ` David Lechner
2026-09-09 21:23     ` Carlo Caione
2026-09-09 21:57       ` David Lechner
2026-09-11 12:26         ` Mattijs Korpershoek
2026-09-11 13:30   ` Mattijs Korpershoek

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.