From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] Add option -r to env import to allow import of text files with CRLF as line endings
Date: Thu, 14 Aug 2014 13:50:31 -0600 [thread overview]
Message-ID: <53ED1307.9020207@wwwdotorg.org> (raw)
In-Reply-To: <CAOCHtYjXXcuaqTPt29U-qiZQEVebG84DX=OrOcjCEotgGZdv_Q@mail.gmail.com>
On 08/14/2014 12:41 PM, Robert Nelson wrote:
> On Thu, Aug 14, 2014 at 10:49 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 08/14/2014 02:25 AM, Alexander Holler wrote:
>>>
>>> Am 31.07.2014 21:57, schrieb Stephen Warren:
>>>
>>>> Huh, I do see that now. I must have been looking at the content of
>>>> common/cmd_nvedit.c from the wrong branch, which didn't include that
>>>> patch. I could have sworn I checked git history too, but evidently not.
>>>> It is indeed clearly there right before the patches which use it. Sorry
>>>> for the noise.
>>>
>>>
>>> As I've just remembered where I did see your name before, the config for
>>> the rpi (as found in 2004.04) misses the uenvcmd. That's necessary to
>>> execute commands when using uEnv.txt.
>>>
>>> It's easily done with something like the following:
>>>
>>> "env import -t -r $loadaddr $filesize;" \
>>> "if test -n \"$uenvcmd\"; then " \
>>> "echo \"Running uenvcmd ...\";" \
>>> "run uenvcmd;" \
>>> "fi;" \
>>
>>
>> My intention was that uEnv.txt be used to set up environment variables, not
>> to allow its use for custom scripts.
>
> The check for if uenvcmd is set then run uenvcmd syntax, should really
> be pushed into the distro default stuff. As that syntax is used by
> default for a lot of different targets in u-boot. Most users who deal
> with u-boot (even if they don't want to) seem to understand it.
I don't think this is anything to do with distro defaults.
Distro defaults are intended to provide a single common interface
between the bootloader and Linux/... distro. As such, locating and
loading extlinux.conf fits the bill there. The whole idea is that
distros/OSs wouldn't have to know anything about the bootloader at all;
command script formats, etc.
uenv.txt is the opposite; it's very U-Boot specific, and more about
internal implementation details of U-Boot. In particular, I only see a
use-case for uenv.txt on systems that have nowhere to store the U-Boot
environment other than in some filesystem. That's the reason the RPi
port loads uenv.txt, so the environment can be modified somehow. Perhaps
there's an ENV_IS_IN_FAT that could be used instead on the Pi? For
example, none of the Tegra boards use uEnv.txt since "saveenv" to flash
works there.
So, perhaps I could see providing include/common_bootenv.h to make the
definition you wrote above common between boards, but I certainly would
not expect that opting in to distro defaults automatically added support
for uEnv.txt.
next prev parent reply other threads:[~2014-08-14 19:50 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 15:49 [U-Boot] [PATCH 0/4] Add option -r to env import to allow import of text files with CRLF as line endings Alexander Holler
2014-07-14 15:49 ` [U-Boot] [PATCH 1/4] " Alexander Holler
2014-07-22 19:23 ` [U-Boot] [U-Boot, " Tom Rini
2014-07-30 22:47 ` [U-Boot] [PATCH " Stephen Warren
2014-07-31 19:51 ` Tom Rini
2014-07-31 19:57 ` Stephen Warren
2014-08-14 8:25 ` Alexander Holler
2014-08-14 15:49 ` Stephen Warren
2014-08-14 18:41 ` Robert Nelson
2014-08-14 19:38 ` Tom Rini
2014-08-14 19:50 ` Stephen Warren [this message]
2014-08-14 20:53 ` Tom Rini
2014-08-14 21:05 ` Alexander Holler
2014-08-14 21:35 ` Stephen Warren
2014-08-14 21:44 ` Alexander Holler
2014-08-14 19:38 ` Alexander Holler
2014-08-14 19:51 ` Stephen Warren
2014-08-14 19:59 ` Alexander Holler
2014-08-14 20:08 ` Stephen Warren
2014-08-14 20:39 ` Alexander Holler
2014-08-01 12:08 ` Wolfgang Denk
2014-08-02 21:09 ` Alexander Holler
2014-08-03 16:38 ` Alexander Holler
2014-08-03 17:51 ` Wolfgang Denk
2014-08-04 6:47 ` Alexander Holler
2014-08-04 7:00 ` Alexander Holler
2014-08-04 10:00 ` Måns Rullgård
2014-08-04 19:18 ` Alexander Holler
2014-08-06 6:43 ` Wolfgang Denk
2014-08-06 10:02 ` Alexander Holler
2014-08-06 10:28 ` Alexander Holler
2014-08-06 10:44 ` Måns Rullgård
2014-08-06 11:18 ` Alexander Holler
2014-08-06 11:48 ` Alexander Holler
2014-08-03 17:47 ` Wolfgang Denk
2014-07-14 15:49 ` [U-Boot] [PATCH 2/4] omap3_beagle: handle import of environments in " Alexander Holler
2014-07-22 19:23 ` [U-Boot] [U-Boot, " Tom Rini
2014-07-14 15:49 ` [U-Boot] [PATCH 3/4] am335x_evm: " Alexander Holler
2014-07-22 19:23 ` [U-Boot] [U-Boot, " Tom Rini
2014-07-14 15:49 ` [U-Boot] [PATCH 4/4] rpi_b: " Alexander Holler
2014-07-22 19:23 ` [U-Boot] [U-Boot, " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53ED1307.9020207@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox