[Uboot-stm32] [PATCH v2 0/2] Support board-selected raw partitions
Carlo Caione
ccaione at baylibre.com
Fri Sep 11 12:05:57 UTC 2026
Boards may need to read on-device metadata before choosing the raw MMC
partition containing the next boot stage. This series makes the existing
partition hook usable after MMC initialization and adds an explicit
runtime-selection option within raw partition mode.
The board hook owns hardware-area selection. A failed dynamic selection
stops the current MMC load attempt without filesystem fallback; other
configured boot devices may still be tried.
Out-of-tree spl_mmc_boot_partition() overrides must accept the added
struct mmc * argument; the in-tree STM32MP1 override is updated here.
Changes in v2:
- Reuse spl_mmc_boot_partition() instead of adding a second public hook.
- Pass the initialized MMC device and boot-device ID to the hook, and
defer selection until after any raw Falcon boot attempt.
- Keep explicit partition loads independent of next-stage selection,
without splitting the MMC loader into preparation and loading functions.
- Make dynamic selection an option within existing raw partition mode,
select its partition library and hide the unused fixed partition number.
- Restrict STM32's fixed hook and MMC2 partition setting to fixed mode.
- Keep a weak default and diagnose nonpositive dynamic selections before
filesystem fallback, while preserving fixed-mode behavior.
- Link to v1: https://patch.msgid.link/20260910-ccaione-upstream-part-dynamic-v1-1-381414ad9a34@baylibre.com
Signed-off-by: Carlo Caione <ccaione at baylibre.com>
---
Carlo Caione (2):
spl: mmc: select the boot partition after device initialization
spl: mmc: support dynamic selection in raw partition mode
arch/arm/mach-stm32mp/Kconfig | 1 +
arch/arm/mach-stm32mp/stm32mp1/spl.c | 4 ++--
common/spl/Kconfig | 9 +++++++++
common/spl/spl_mmc.c | 22 ++++++++++++++++------
include/spl.h | 21 ++++++++++++++-------
5 files changed, 42 insertions(+), 15 deletions(-)
---
base-commit: 527115ef6783cec49e5610c523c124b399011361
change-id: 20260909-ccaione-upstream-part-dynamic-4c192e2d4bb6
Best regards,
--
Carlo Caione <ccaione at baylibre.com>
More information about the Uboot-stm32
mailing list