<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [U-Boot-Users] PATCH: save 'ver' env var on update</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Let's try this again, with a signed off by line.<BR>
<BR>
Signed-off-by: Zach Sadecki <zach.sadecki@ripcode.com><BR>
<BR>
<BR>
diff --git a/common/main.c b/common/main.c<BR>
index 379695c..429d367 100644<BR>
--- a/common/main.c<BR>
+++ b/common/main.c<BR>
@@ -326,10 +326,11 @@ void main_loop (void)<BR>
#endif /* CONFIG_MODEM_SUPPORT */<BR>
<BR>
#ifdef CONFIG_VERSION_VARIABLE<BR>
+ extern char version_string[];<BR>
+ if (strcmp(getenv("ver"), version_string))<BR>
{<BR>
- extern char version_string[];<BR>
-<BR>
setenv ("ver", version_string); /* set version variable*/<BR>
+ run_command("saveenv", 0);<BR>
}<BR>
#endif /* CONFIG_VERSION_VARIABLE */<BR>
<BR>
<BR>
<BR>
> -----Original Message-----<BR>
> From: u-boot-users-bounces@lists.sourceforge.net<BR>
> [<A HREF="mailto:u-boot-users-bounces@lists.sourceforge.net">mailto:u-boot-users-bounces@lists.sourceforge.net</A>] On Behalf<BR>
> Of Zach Sadecki<BR>
> Sent: Monday, August 13, 2007 4:25 PM<BR>
> To: ulf@atmel.com<BR>
> Cc: u-boot-users@lists.sourceforge.net; wd@denx.de<BR>
> Subject: Re: [U-Boot-Users] Using 'ver' env var<BR>
><BR>
> Ulf,<BR>
> I was thinking this already.. I just thought that I was missing<BR>
> something which is why I asked the questions. I'll send a patch to<BR>
> the group for review later.<BR>
><BR>
> Zach<BR>
><BR>
> > > If you don't explicitly 'saveenv' there is no 'ver'<BR>
> variable to read<BR>
> > > from linux...<BR>
> > > And it can't be good for the flash to force u-boot to<BR>
> save on every<BR>
> > > boot.<BR>
> > ><BR>
> > > So if I update (from linux for example) 'ver' doesn't get<BR>
> > updated unless<BR>
> > > u-boot is<BR>
> > > doing a saveenv on every boot...<BR>
> ><BR>
> > Maybe saving the environment (with ver) should be forced if<BR>
> > "ver" is not<BR>
> > the same as the U-Boot version.<BR>
> ><BR>
> > Best Regards<BR>
> > Ulf Samuelsson<BR>
> ><BR>
> ><BR>
> ><BR>
> ><BR>
> ><BR>
><BR>
> --------------------------------------------------------------<BR>
> -----------<BR>
> This SF.net email is sponsored by: Splunk Inc.<BR>
> Still grepping through log files to find problems? Stop.<BR>
> Now Search log events and configuration files using AJAX and<BR>
> a browser.<BR>
> Download your FREE copy of Splunk now >> <A HREF="http://get.splunk.com/">http://get.splunk.com/</A><BR>
> _______________________________________________<BR>
> U-Boot-Users mailing list<BR>
> U-Boot-Users@lists.sourceforge.net<BR>
> <A HREF="https://lists.sourceforge.net/lists/listinfo/u-boot-users">https://lists.sourceforge.net/lists/listinfo/u-boot-users</A><BR>
><BR>
<BR>
-------------------------------------------------------------------------<BR>
This SF.net email is sponsored by: Splunk Inc.<BR>
Still grepping through log files to find problems? Stop.<BR>
Now Search log events and configuration files using AJAX and a browser.<BR>
Download your FREE copy of Splunk now >> <A HREF="http://get.splunk.com/">http://get.splunk.com/</A><BR>
_______________________________________________<BR>
U-Boot-Users mailing list<BR>
U-Boot-Users@lists.sourceforge.net<BR>
<A HREF="https://lists.sourceforge.net/lists/listinfo/u-boot-users">https://lists.sourceforge.net/lists/listinfo/u-boot-users</A><BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>