From: Ben Warren Date: Mon, 23 Apr 2007 15:28:12 -0400 Subject: [U-Boot-Users] RFC: hidden environment variables In-Reply-To: <462CE302.7030302@freescale.com> References: <462CE302.7030302@freescale.com> Message-ID: <1177356492.3904.78.camel@saruman.qstreams.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, 2007-04-23 at 11:46 -0500, Timur Tabi wrote: > WD et al: > > 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: > > 1) Doesn't show up via "print" or "echo" > 2) Can't be referenced via a $ > 3) Can't be set via setenv > > Only internal U-Boot code can modify/query these variables. This way, internal code can > use the existing environment data structure without having to expose this data to the user > (and giving him the impression that he can access/manipulate this data directly). > > 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. > This is a pretty serious drawback. If you really want to have persistent storage for autonomous code, maybe we should look at a way of allocating a block of persistent storage (either flash or serial EEPROM) outside of ENV that gets saved when modified. > 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 guess I don't see why anything needs to be hidden. If somebody has access to the U-boot prompt, they control the board anyway. From my perspective, it's for expert use only. Anything going to 'the field' as an end product should have the countdown disabled, booting straight to OS. Of course, that's the perspective from my point of view. Over the last few days it's become clear to me that people here have a wide variety of use cases and expectations regarding U-boot. regards, Ben