From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] Inconsistencies in commands regarding load_addr
Date: Fri, 9 Oct 2015 09:36:35 -0600 [thread overview]
Message-ID: <5617DF03.3050306@wwwdotorg.org> (raw)
In-Reply-To: <56177AC8.1020707@wsystem.com>
On 10/09/2015 02:28 AM, Beno?t Th?baudeau wrote:
> Dear Wolfgang,
>
> On 08/10/2015 23:29, Wolfgang Denk wrote:
>> Dear Stephen,
>>
>> In message <56167DB6.3000508@wwwdotorg.org> you wrote:
>>>
>>>>> What's the expected correct behavior here?
>>>>
>>>> After successful loading the data to memory, load_addr should be set
>>>> correctly, for all commands. In the error case, the value of
>>>> load_addr is undefined.
>>>
>>> Is this documented anywhere? If not, I'm not convinced that there's a
>>> contract to be followed; it "just happens" that some filesystem-related
>>> commands work(ed) that way (and as Beno?t pointed out, apparently some
>>> don't irrespective of the mentioned patch).
>>
>> I'm afraid it's not documented, but it is what I would consider a sane
>> and consistent behaviour. If we intend to implement POLA [1] (and I
>> very much think we should), this is how U-Boot should behave.
>>
>>
>> [1] https://en.wikipedia.org/wiki/Principle_of_least_astonishment
>
> I'm not certain that this would be the least astonishing behavior. When I read
> the documentation, I rather expect the loadaddr environment variable to be used
> whenever the address is omitted in a command invocation. Moreover, one may have
> to read/load several data pieces before booting, and the last loaded piece would
> not necessarily be the one containing the kernel to be booted. This should at
> least be documented.
>
> Another approach would be to compel users to pass an address for all commands.
> Implicit behaviors are always dangerous, all the more if they are undocumented.
> But of course, this would break some existing configurations.
I tend to agree with all of the above; U-Boot's
implicit/automatic/hidden/undocumented usage of variables that I didn't
specify on the command-line, and setting of variables as a side-effect
of executing commands, has always been quite astonishing (rather than
the opposite of astonishing) to me:-(
prev parent reply other threads:[~2015-10-09 15:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 15:00 [U-Boot] Inconsistencies in commands regarding load_addr Benoît Thébaudeau
2015-10-06 18:09 ` Stephen Warren
2015-10-06 19:07 ` Benoît Thébaudeau
2015-10-08 4:40 ` Wolfgang Denk
2015-10-08 14:29 ` Stephen Warren
2015-10-08 21:29 ` Wolfgang Denk
2015-10-09 8:28 ` Benoît Thébaudeau
2015-10-09 13:18 ` Wolfgang Denk
2015-10-09 14:01 ` Benoît Thébaudeau
2015-10-09 14:55 ` Wolfgang Denk
2015-10-09 15:36 ` Stephen Warren [this message]
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=5617DF03.3050306@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