From: Wolfgang Denk Date: Fri, 16 Jun 2006 13:56:12 +0000 (+0200) Subject: Fix setting of environment variable "ver" on trab board X-Git-Tag: LABEL_2006_06_30_2020~5^2^2~9 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4bdb53cafb5cdfb13c3a1fc7a133ca36d1d5e00d;p=u-boot Fix setting of environment variable "ver" on trab board The environment variable "ver" is now set before do_auto_update() is called, so that "ver" can be used in USB update scripts. Patch by Martin Krause, 27 Oct 2005 --- diff --git a/CHANGELOG b/CHANGELOG index a79ec5314c..83069fe5f1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,12 @@ Changes since U-Boot 1.1.4: ====================================================================== +* Fix setting of environment variable "ver" on trab board + The environment variable "ver" is now set before + do_auto_update() is called, so that "ver" can be used + in USB update scripts. + Patch by Martin Krause, 27 Oct 2005 + * Fix wrong usage of udelay() in led_blink() on trab board Patch by Martin Krause, 27 Oct 2005 diff --git a/board/trab/trab.c b/board/trab/trab.c index 868a899ee9..346406eaad 100644 --- a/board/trab/trab.c +++ b/board/trab/trab.c @@ -161,6 +161,19 @@ int misc_init_r (void) uchar *str; int i; +#ifdef CONFIG_VERSION_VARIABLE + { + /* Set version variable. Please note, that this variable is + * also set in main_loop() later in the boot process. The + * version variable has to be set this early, because so it + * could be used in script files on an usb stick, which + * might be called during do_auto_update() */ + extern char version_string[]; + + setenv ("ver", version_string); + } +#endif /* CONFIG_VERSION_VARIABLE */ + #ifdef CONFIG_AUTO_UPDATE extern int do_auto_update(void); /* this has priority over all else */