Re: [PATCH v4 0/5] Add fastboot to SPL
"Carlo Caione" <[email protected]>
| Newsgroups | org.u-boot-project.lists.u-boot |
|---|---|
| Message-ID | <[email protected]> |
On Thu Aug 20, 2026 at 8:50 PM CEST, Stefan Monnier wrote: > Carlo Caione [2026-08-20 20:08:24] wrote: >> 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. > > I'm curious. In my limited exposure to U-Boot, I got the impression that > the split between SPL and U-Boot proper is mostly a "technical detail", > usually mostly hidden from those who install it onto a device: you just > take the combined U-Boot + SPL image and write it at the appropriate > offset on the relevant device. And usually if SPL works, U-Boot > also works. > > So a bit like Jonas in the recent "hotkey in SPL" patch for rockchip > SoCs, I'm curious why/when we'd want to add to SPL functionality already > supported from U-Boot. Hi Stefan, Thanks for the question. E Shattow's reply describes the general SPL constraints well. The detail specific to this series is that "if SPL works, U-Boot proper also works" assumes that U-Boot proper is already available from storage that SPL can read and this is not always true. More specifically the use case we are trying to tackle here is initial provisioning or recovery of blank or corrupted persistent storage: Boot ROM -> host-loaded bootstrap -> fastboot -> provision storage At that point U-Boot proper may not exist on the device yet; it may be one of the images that fastboot is expected to write on the storage (through SPL indeed). It is possible to include U-Boot proper in the host-loaded bootstrap and use its existing fastboot implementation. That is a valid approach and is preferable where the Boot ROM download limit and memory budget allow it. But it is not always possible: some platforms (like the one we are enabling) impose a strict size limit on the bootstrap, or only provide enough early memory for the DDR initialization code and (small) SPL-sized payload. Fastboot in SPL provides the smaller alternative for those platforms. It is intended as a provisioning endpoint, not as part of the normal installed boot path. Once storage has been provisioned, the usual SPL- to-U-Boot-proper flow remains unchanged. Hope this clarify the background of this work, Cheers! -- Carlo Caione