From: Tom Rini Date: Tue, 23 Apr 2013 19:33:51 -0400 Subject: [U-Boot] [PATCH] Allow U-Boot scripts to be placed in a .env file In-Reply-To: References: <1366155414-6525-1-git-send-email-sjg@chromium.org> <20130417054435.3E4612001AD@gemini.denx.de> Message-ID: <20130423233351.GL14952@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Apr 23, 2013 at 02:32:00PM -0700, Simon Glass wrote: > Hi Wolfgang, > > On Tue, Apr 16, 2013 at 10:44 PM, Wolfgang Denk wrote: > > Dear Simon Glass, > > > > In message <1366155414-6525-1-git-send-email-sjg@chromium.org> you wrote: > >> At present U-Boot environment variables, and thus scripts, are defined > >> by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text > >> to this file and dealing with quoting and newlines is harder than it > >> should be. It would be better if we could just type the script into a > >> text file and have it included by U-Boot. > >> > >> Add a feature that brings in a .env file associated with the board > >> config, if present. To use it, create a file in include/configs > >> with the same name as you could board config file, except with a > >> .env extension instead of a .h extension. The variables should be > >> separated by \0. Comments are permitted, using # as the first character > >> in a line. > > > > Please do not litter the include/configs/ directory with such stuff. > > It's more than big enough already. Please put such files into the > > respective board directories. > > OK. > > > > > And if you do something like this, then please go the way to the end. > > Forget about the \0 termination, make it a plain text file instead, > > something that can be used with "env import -t" as well (or created > > with "env export -t"). > > I'm not sure how to do this. Doesn't this mean that we cannot add > multi-line scripts to the environment? That was part of my aim. But if > I put a 0x0a in the script then it will think we are starting a new > variable. The first thing that pops to mind is: 1) embedded the text file into a linker-known spot 2) Make part of the default env setup process be to env import -t that location in memory. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: