[PATCH 0/3] env: mmc: fix use of two separate partitions with proper type GUID

Tom Rini trini at konsulko.com
Tue Oct 1 16:43:26 CEST 2024


On Tue, Oct 01, 2024 at 03:43:23PM +0200, Rasmus Villemoes wrote:
> Rasmus Villemoes <rasmus.villemoes at prevas.dk> writes:
> 
> > I always define a disk layout with two separate partitions for the two
> > copies of the U-Boot environment and, being the one who introduced the
> > type GUID for such partitions, of course also set those partitions'
> > type GUID appropriately.
> >
> > This has worked just fine, but, it turns out, only because I've never
> > had CONFIG_PARTITION_TYPE_GUID enabled on any of my boards; I've
> > always just set the offsets of the two partitions via the config
> > variables CONFIG_ENV_OFFSET(,_REDUND).
> >
> > I didn't even know that env/mmc.c had learnt to look for the env
> > partition based on the type GUID, or that that would overrule the
> > ENV_OFFSET config variables, until I experienced weird random
> > corruption while doing bringup for an stm32 board, where
> > PARTITION_TYPE_GUID is automatically set because it is select'ed by
> > CMD_STM32PROG.
> >
> > These patches try to fix the code to fit my scheme, while not changing
> > anything for existing setups that use the two-copies-one-partition
> > scheme, other than complaining loudly if the system is misconfigured
> > and avoiding such random corruption of neighbouring partitions.
> 
> Tom, any chance these could be picked up before 2024.10 release? And if
> not, at least be put in -next so I have some stable sha1s to refer to
> in my own branch.

I'll take this to next soon, thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20241001/50261def/attachment.sig>


More information about the U-Boot mailing list