From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Meier Date: Wed, 16 Apr 2014 13:02:40 +0200 Subject: [U-Boot] Interrupt autoboot by GPIO In-Reply-To: <20140415221252.C123638034A@gemini.denx.de> References: <534D798A.9050303@koalo.de> <20140415221252.C123638034A@gemini.denx.de> Message-ID: <534E6350.5030603@koalo.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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