[U-Boot] [PATCH] bootdelay can be an environemt variable

Wolfgang Denk wd at denx.de
Tue Apr 27 12:24:10 CEST 2010


Dear Matthias Weißer,

In message <4BD6AEF4.7080107 at arcor.de> you wrote:
>
> It was an attempt to get the bootdelay in an environment variable which
> can be overridden by board specific code.

You can #define BOOTDELAY in your board config file ? 

> With this I tried to follow your suggestion in
> http://lists.denx.de/pipermail/u-boot/2010-April/070431.html where you
> NAKed the direct override of bootdelay in board_late_init. So, currently
> my setup is:

Please re-read the thread. What I NAKed was changes that introduce
unexpected behaviour that cannot even be undone by the end user.

> bootdelay=gs_bootdelay
>
> and in board.c I set gs_bootdelay according to some GPIO states. Another
> user of the board could simply change bootdelay to an integer and get
> rid of the boards behavior.
>
> I don't see a way to achieve this with a PREBOOT command.

Define for example

	setenv short_delay 'setenv bootdelay 1'
	setenv long_delay  'setenv bootdelay 10'

In your board code you can for example

	setenv preboot run long_delay
or
	setenv preboot run short_delay

or similar.

Of course you could even generalize this approach and make it fully
flexible; see for example the code to handle programmable keyboard
commands descrived in board/lwmon/README.keybd

> Is there a way that you accept the patch if I add a sentence or two to
> the README?

No chance, sorry.

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
Backed up the system lately?


More information about the U-Boot mailing list