[PATCH 3/3] env: Add single to redundant environment upgrade path

Tom Rini trini at konsulko.com
Wed Dec 17 21:56:10 CET 2025


On Wed, Dec 17, 2025 at 09:12:33PM +0100, Marek Vasut wrote:

> Add support for converting single-copy environment to redundant environment.
> In case CRC checks on both redundant environment copies fail, try one more
> CRC check on the primary environment copy and treat it as single environment.
> If that check does pass, rewrite the single-copy environment into redundant
> environment format, indicate the environment is valid, and import that as
> usual primary copy of redundant environment. Follow up 'env save' will then
> store two environment copies and the system will continue to operate as
> regular redundant environment system.
> 
> Add test which validates this upgrade path. The test starts with spi.bin
> which is pre-populated as single-copy environment and then upgrades that
> environment to dual-copy environment.
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
> ---
> Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Cc: Jerome Forissier <jerome.forissier at linaro.org>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: u-boot at lists.denx.de

For merging, a cover letter makes things so much easier, please add one
for v2. And, I think this needs a Kconfig option. I'm sure you added
this because someone has a valid use case but it's going to grow too
many platforms where that feature isn't likely desired. Thanks.

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


More information about the U-Boot mailing list