[PATCH 0/3] teach 'env default' to optionally keep runtime variables
Rasmus Villemoes
ravi at prevas.dk
Fri Nov 15 16:22:38 CET 2024
On Fri, Nov 15 2024, Simon Glass <sjg at chromium.org> wrote:
> Hi Rasmus,
>
> On Wed, 13 Nov 2024 at 15:32, Rasmus Villemoes <ravi at prevas.dk> wrote:
>>
>> On Wed, Oct 30 2024, Rasmus Villemoes <ravi at prevas.dk> wrote:
>>
>> > Doing bringup of a board, part of my bootstrap logic is in U-Boot. So
>> > when tweaking that logic, I was bitten by a previous completed
>> > bootstrap having left a copy of the environment on the device, which
>> > was imported and thus overrided the new logic.
>> >
>> > So I thought, "ok, I'll just make sure to put 'env default -a' as the
>> > first part of the bootstrap logic so I'm not bitten again". Alas, my
>> > logic also relies on certain variables that are set by C code
>> > (e.g. for detecting board variant), and doing 'env default -a' also
>> > eliminates those.
>> >
>> > Looking around, the hashtab code already supports a flag that does
>> > exactly what I need, and exposing that is (morally) a one-liner.
>> >
>
> I didn't see the patch, but can you add a test?
That's literally patch 3/3.
Rasmus
More information about the U-Boot
mailing list