[U-Boot] tftp "command" in default environments
Wolfgang Denk
wd at denx.de
Wed Jun 22 19:32:12 CEST 2011
Dear "Luca Ceresoli",
In message <4E01FC2B.3010402 at comelit.it> you wrote:
>
> since 7a83af07aef3c (TFTP: add tftpsrv command) U-Boot has a new "tftpsrv"
> command, which can be enabled by defining CONFIG_CMD_TFTPSRV.
Right.
> Unfortunately, activating it causes some boards to stop working correctly.
I think this is not quite correct. I don't see any broken board.
> This is because they use the tftp "command" in their environment, but tftp is
> has never been a real command, just the prefix for tftpboot.
> tftpboot used to be the sole completion for the tftp prefix, and this is still
> true unless one activates tftpsrv.
Correct. So only those board maintainers that use "tftp" as
abbreviation _and_ now changing their board configuration to include
the "tftpsrv" need to pay attention.
> This is of course a bug in many boards (and the docs too).
It is not a bug. It is a pretty normal situation that people use
abbreviations as long as they work. When working interactively, I
used to use "set" for a long, long time instead of "setenv", until it
stopped working. Then I used to use "sete" (and still do this) except
for boards that enable for example the "setexpr" command.
We just should try not to use such abbreviations in the environment,
and/or pay special attention to check the environment when changing
the board configuration to include new, additional commands.
> It's obviously to be fixed for boards that define CONFIG_CMD_TFTPSRV:
> currently none, but soon I'll update dig297 in this sense.
Then make sure to check the default env.
> What I'm not sure about is if the default environment for all boards should be
> fixed as well.
No. Most of them will never enable the "tftpsrv" command.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
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
In C we had to code our own bugs, in C++ we can inherit them.
More information about the U-Boot
mailing list