All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] teach 'env default' to optionally keep runtime variables
@ 2024-10-30 21:34 Rasmus Villemoes
  2024-10-30 21:34 ` [PATCH 1/3] cmd/nvedit.c: " Rasmus Villemoes
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Rasmus Villemoes @ 2024-10-30 21:34 UTC (permalink / raw)
  To: u-boot; +Cc: Tom Rini, Joe Hershberger, Ravi Minnikanti, Rasmus Villemoes

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.

Rasmus Villemoes (3):
  cmd/nvedit.c: teach 'env default' to optionally keep runtime variables
  test: env: check that non-mentioned variables to "env default" are
    preserved
  test: env: add some test cases for new "env default -k" flag

 cmd/nvedit.c          |  8 ++++++--
 test/env/cmd_ut_env.c | 45 ++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 48 insertions(+), 5 deletions(-)

-- 
2.47.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-11-16  3:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-30 21:34 [PATCH 0/3] teach 'env default' to optionally keep runtime variables Rasmus Villemoes
2024-10-30 21:34 ` [PATCH 1/3] cmd/nvedit.c: " Rasmus Villemoes
2024-10-30 21:34 ` [PATCH 2/3] test: env: check that non-mentioned variables to "env default" are preserved Rasmus Villemoes
2024-10-30 21:34 ` [PATCH 3/3] test: env: add some test cases for new "env default -k" flag Rasmus Villemoes
2024-11-13 22:32 ` [PATCH 0/3] teach 'env default' to optionally keep runtime variables Rasmus Villemoes
2024-11-15 14:21   ` Simon Glass
2024-11-15 15:22     ` Rasmus Villemoes
2024-11-16  3:41 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.