U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@mailbox.org>
To: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de, Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Jerome Forissier <jerome.forissier@linaro.org>,
	Simon Glass <sjg@chromium.org>
Subject: Re: [PATCH 3/3] env: Add single to redundant environment upgrade path
Date: Fri, 19 Dec 2025 00:09:28 +0100	[thread overview]
Message-ID: <0af71280-1b23-4439-9f85-89f4341b084e@mailbox.org> (raw)
In-Reply-To: <20251218135853.GG303283@bill-the-cat>

On 12/18/25 2:58 PM, Tom Rini wrote:
> On Wed, Dec 17, 2025 at 11:58:15PM +0100, Marek Vasut wrote:
>> 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@mailbox.org>
>>>> ---
>>>> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
>>>> Cc: Jerome Forissier <jerome.forissier@linaro.org>
>>>> Cc: Simon Glass <sjg@chromium.org>
>>>> Cc: Tom Rini <trini@konsulko.com>
>>>> Cc: u-boot@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.
> 
> A good question, I was assuming so but checking xilinx_versal_virt (a
> platform with redundant env) shows yes, it does:
> 01: Merge patch series "fit: print conf node compatibles + use property string constants"
> 05: env: Add single to redundant environment upgrade path
>     aarch64: (for 1/1 boards) all +96.0 text +96.0
>              xilinx_versal_virt: all +96 text +96
>                 u-boot: add: 0/0, grow: 1/0 bytes: 84/0 (84)
>                   function                                   old     new   delta
>                   env_check_redund                           316     400     +84
Correct, and the growth is minimal and gated by ENV_REDUND already.

I think it would still be good not to confuse users with too many 
additional Kconfig symbols, but if you insist, I will add one ?

  reply	other threads:[~2025-12-18 23:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-17 20:12 [PATCH 1/3] configs: sandbox: Enable environment in SPI NOR support Marek Vasut
2025-12-17 20:12 ` [PATCH 2/3] test: env: Add test for environment storage in SPI NOR Marek Vasut
2025-12-17 20:12 ` [PATCH 3/3] env: Add single to redundant environment upgrade path Marek Vasut
2025-12-17 20:56   ` Tom Rini
2025-12-17 22:58     ` Marek Vasut
2025-12-18 13:58       ` Tom Rini
2025-12-18 23:09         ` Marek Vasut [this message]
2025-12-18 23:22           ` Tom Rini
2025-12-31 15:17             ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0af71280-1b23-4439-9f85-89f4341b084e@mailbox.org \
    --to=marek.vasut@mailbox.org \
    --cc=jerome.forissier@linaro.org \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox