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

Marek Vasut marek.vasut at mailbox.org
Wed Dec 17 23:58:15 CET 2025


On 12/17/25 9:56 PM, Tom Rini wrote:
> 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.
Do you actually observe growth ? Because this is calling existing 
functions, so the growth has to be in units of bytes tops.


More information about the U-Boot mailing list