[U-Boot-Users] RFC: hidden environment variables

Wolfgang Denk wd at denx.de
Mon Apr 23 21:22:21 CEST 2007


In message <462CE302.7030302 at freescale.com> you wrote:
> 
> I'd like to propose a new feature for U-Boot: hidden environment variables.  These are 
> variables that are stored in environment but are normally not visible to the user. 
> Specifically, a hidden environment variable would have these properties:

Why would you want to hide them?

> 1) Doesn't show up via "print" or "echo"
> 2) Can't be referenced via a $
> 3) Can't be set via setenv

I think you should explain in a bit more detail what you  would  like
to  use  this for; at the moment I think by hiding them you just lose
potential flexibility.

> The only drawback to this plan is that, after modifying a hidden environment variable, the 
> user would need to be told to issue "saveenv" if he wants his changes saved permanently.

There are other drawbacks:

* The environment  variable  data  structure  is  intentionally  very
  simple.  Any  such extension would probably break backward compati-
  bility.

* You cannot really "hide" information; for example, I often use the
  "md" command to dump the environmentsector(s).

* Your users would probably just change the code to unhide these
  variables. Speaking for me - if I was running such a system that
  would be one of the first things I'd change.

* The environment is also accessable from Linux user space tools.  No
  real "hiding" can be one there either.

> One advantage of this feature is that we can develop new commands that store data 
> permanently without having to add hooks into _do_setenv().

I'm not sure what you have in mind.

If you think about dynamically configuring U-Boot, there is  probably
another  route  to  go  -  device  trees.  Did you happen to read the
related discussion on #mklinux a few days ago?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It's a small world, but I wouldn't want to paint it.




More information about the U-Boot mailing list