From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Fri, 25 Oct 2013 16:34:37 +0100 Subject: [U-Boot] [PATCH v2 3/5] Allow U-Boot scripts to be placed in a .env file In-Reply-To: References: <1372106765-18401-1-git-send-email-sjg@chromium.org> <1372106765-18401-4-git-send-email-sjg@chromium.org> <51CB4787.1070302@wwwdotorg.org> Message-ID: <526A8F8D.200@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/20/2013 09:47 PM, Simon Glass wrote: > Hi Stephen, > > On Wed, Jun 26, 2013 at 1:56 PM, Stephen Warren wrote: >> On 06/24/2013 02:46 PM, Simon Glass 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 a board//env >>> directory called .env (or common.env if you want the same >>> environment for all boards). > > [well perhaps it is time to get back to this] > >> I'm not entirely sure how useful common.env is. >> >> Consider that many different Tegra boards, from different vendors, all >> share the same environment. For example boards/compulab/trimslice shares >> the core environment with boards/nvidia/*. IIUC, common.env wouldn't >> work in this case, since the vendor is different. To solve that, we >> could easily symlink board/compulab/env/trimslice.env -> >> board/nvidia/env/something.env. But in that case, why not always rely on >> creating symlinks, instead of having the common.env fallback work too? >> Also consider that compulab makes a ton of boards only some of which use >> Tegra, so even a common.env in board/compulab/env wouldn't be that useful. > > I find symlinks a pain in the source tree. I think they should be the > exception rather than the rule. This feature here mirrors the current > board//common directory which is fairly widely used. Well, we use includes rather than symlinks, e.g. put the following into boards/compulab/env/trimslice.env: #include > $ ls board/*/common -d |wc -l > 21 > > I feel that Compulab can do their own common file if they want it I'd rather as many board worked the same way as possible; that makes it much easier for distros, and even developers. We shouldn't go out of our way to make that hard. > A file common to all Tegra perhaps belongs in arch/arm/.. somewhere? That might be a better location, yes.