summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorWolfgang Denk <wd@fifi.denx.de>2006-06-16 15:56:12 +0200
committerWolfgang Denk <wd@fifi.denx.de>2006-06-16 15:56:12 +0200
commit4bdb53cafb5cdfb13c3a1fc7a133ca36d1d5e00d (patch)
treef1753bdf6fd6b15568733326a9ed4e0725024a2f /board
parentb9fff8ee83170da1160e0665c7027e6744823d49 (diff)
downloadu-boot-imx-4bdb53cafb5cdfb13c3a1fc7a133ca36d1d5e00d.zip
u-boot-imx-4bdb53cafb5cdfb13c3a1fc7a133ca36d1d5e00d.tar.gz
u-boot-imx-4bdb53cafb5cdfb13c3a1fc7a133ca36d1d5e00d.tar.bz2
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
Diffstat (limited to 'board')
-rw-r--r--board/trab/trab.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/board/trab/trab.c b/board/trab/trab.c
index 868a899..346406e 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 */