[U-Boot] Inconsistencies in commands regarding load_addr
Wolfgang Denk
wd at denx.de
Fri Oct 9 15:18:26 CEST 2015
Dear Benoît Thébaudeau,
In message <56177AC8.1020707 at wsystem.com> you wrote:
>
> 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.
I agree about the need for documentation part.
Regarding the "load address" topic, be careful, as there has always
been a lot of confusion (due to unfortunate historic choice of names).
There is the "load address" as part of the image formates (uImage, FIT
image), which means the address where the image (OS code) gets loaded
(or even uncompressed) _to_. This is recorded in the image itself,
and has nothing to do woth the "loadaddr" variable, which states where
the image is located in system memory.
A command, that _loads_ an image to memory, should either use the
current setting of "loadaddr" (if no argument is given), of, if the
argument is given, set "loadaddr" to that value, so that further
commands can refer to that address by default.
> Another approach would be to compel users to pass an address for all commands.
That would break a ton of existing scripts, and is just cumbersome.
It is so easy to type for example just
tftp 400000 filename
imi
bootm
without having to care about the "loadaddr" setting.
> Implicit behaviors are always dangerous, all the more if they are undocumented.
I agree that documentation could be a lot better. But then, while many
people tend to critizise the exising documentation, very few actually
contribute to improving it.
> But of course, this would break some existing configurations.
True.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Great teachers have small audiences while they are still alive.
More information about the U-Boot
mailing list