From: Wolfgang Denk Date: Tue, 27 Apr 2010 12:24:10 +0200 Subject: [U-Boot] [PATCH] bootdelay can be an environemt variable In-Reply-To: <4BD6AEF4.7080107@arcor.de> References: <1272348834-30161-1-git-send-email-weisserm@arcor.de> <20100427081956.308F0AFC6A2@gemini.denx.de> <4BD6AEF4.7080107@arcor.de> Message-ID: <20100427102410.2E08AAFC6A2@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Matthias Wei?er, In message <4BD6AEF4.7080107@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?