[U-Boot] [RFC PATCH 0/7] "Transient" (= export-restricted) environment vars

Bernhard Nortmann bernhard.nortmann at web.de
Mon Jul 11 20:14:47 CEST 2016


This series evolved around the idea of introducing a new env_op
type to control (and possibly restrict) the export of variables.
This is especially useful if one wants to prevent dynamic
configuration information from ending up in a saved environment -
the 'classic' example being network setup with "dhcp" followed
by the "saveenv" command.

(The networking case is even further complicated by the fact
that users may actually wish to setup and save a static IP
configuration manually, which means that "locking up" the
corresponding variables right away isn't a viable solution.)

See also:
http://lists.denx.de/pipermail/u-boot/2015-September/227611.html
http://lists.denx.de/pipermail/u-boot/2016-April/250237.html

Regards, B. Nortmann

BTW: What the correct 'subsystem'/prefix for the "core" changes
related to env vars? patman isn't happy with my "env:" choice...


Bernhard Nortmann (7):
  env: Allow unconditional access if H_PROGRAMMATIC is set
  net: dm: Ignore unknown env_op_* constants
  env: Introduce "export" operation and (access flag) restriction
  env: Introduce "transient" and "system" access flags
  sunxi: env: flag fel_* environment vars as "system"
  env: Introduce setenv_transient() helper function
  env: Automatically mark dynamic configuration info as "do not export"

 cmd/net.c                      | 34 +++++++++++++++++-----------------
 cmd/nvedit.c                   | 24 +++++++++++++++++++++++-
 common/env_flags.c             | 21 ++++++++++++++++++---
 include/common.h               |  1 +
 include/configs/sunxi-common.h |  8 ++++++++
 include/env_flags.h            |  5 ++++-
 include/search.h               |  1 +
 lib/hashtable.c                |  4 ++++
 net/eth-uclass.c               |  2 ++
 9 files changed, 78 insertions(+), 22 deletions(-)

-- 
2.7.3



More information about the U-Boot mailing list