[U-Boot] Normal command line behavior?

Jerry Van Baren gerald.vanbaren at ge.com
Mon Aug 3 21:35:56 CEST 2009


J.C. Wren wrote:
> I notice that when I hit return at a U-Boot > prompt, it executes the last
> command again.  CONFIG_SYS_HUSH_PARSER is defined, from U-Boot
> 2009.08-rc1-00030-g56bdfa9-dirty.
> 
> It this is expected, it seems like a *really* bad idea.  It's cost me having
> to reload 6M images at 115200 twice now.
> 
> --jc

Hi JC,

It is a configuration/design decision: see include/command.h line 46ff, 
struct cmd_tbl_s, field "repeatable".  This is configured via the 
U_BOOT_CMD macro.

<http://git.denx.de/?p=u-boot.git;a=blob;f=include/command.h;h=55caa6eaf888cdb916d3937a5054ad862ec0e0ab;hb=HEAD#l46>

Sometimes it is nice (e.g. sequencing through memory dumps), sometimes 
it bites (you found one of those!).  IMHO, it is enabled in places where 
it would be better to rely on command line recall rather than the repeat 
function.

I think the repeat functionality predated the command line recall 
functionality, so it use to be more desirable to repeat the command 
because there wasn't an alternative way to repeat the command.

Best regards,
gvb


More information about the U-Boot mailing list