[U-Boot] Interrupt autoboot by GPIO

Florian Meier florian.meier at koalo.de
Wed Apr 16 13:02:40 CEST 2014


Hi Wolfgang,

On 04/16/2014 12:12 AM, Wolfgang Denk wrote:
> What I don't understand is wether you actually want to use this radio
> transceiver as console interface device in U-Boot, or not.  If you
> want to use it, then just do, and spend thoughts on restricting access
> to legitimate users and uses.

I do not want to use the radio transceiver as console interface, but
maintain the possibility to connect a serial cable to the same UART when
I messed it up.

> You could implement somewhere in the init code a test that checks the
> state of the GPIO,and then modifies environment settings (say,
> bootdelay, or even bootcnt - so you could auto-switch between bootcmd
> and altbootcmd) to behave one way of the other. Actually this could
> even be scripted - say in "preboot", so you don't even write a single
> line of code.

That is a great idea. The following line works fine:

#define CONFIG_PREBOOT "if gpio input 8; then setenv bootdelay 0; else
setenv bootdelay -1; fi"

Thank you very much!

Greetings,
Florian


More information about the U-Boot mailing list