On Thu, Sep 10, 2026 at 22:50:07 +0100, Carlo Caione wrote: > On Thu, Sep 10, 2026 at 12:37:28 +0100, Tom Rini wrote: > > On Thu, Sep 10, 2026 at 07:49:29AM +0200, Carlo Caione wrote: > > > > > Boards may need to select the boot partition using on-device metadata, > > > such as A/B slot state. The existing partition hook runs before MMC > > > initialization, so it cannot read that metadata. > > > > > > A separate dynamic-partition mode makes this policy explicit while > > > preserving fixed-partition selection and explicit requests to load other > > > firmware. > > [...] > > This seems interesting. But, looking at the resulting code, it was > > already a little bit of a mess for > > CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION vs > > CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE and it doesn't make > > sense I assume to enable both at once, and now a 3rd option. So, can you > > please think about if any of these would help? > > - Turn the current two options in to a choice, then see about > > simplifying / clarifying the code. Then add your new option, and > > hopefully keep the newly gained clarity. > > - Restructure things so that we can have a __weak function and override > > it already, as I imagine the metadata here will end up being fairly > > implementation-specific. > > - Move up the mmc initialization to be earlier. > > Agree. I have an half cooked version of a version that moves the mmc > init at the beginning. I'll polish it up for V2.
I stand corrected: it turned out that moving up the mmc init opened a pandora vase, so in V2 I'm pushing toward having a single __weak function that simplify a bit the things. Ciao, -- Carlo Caione
