<!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 &lt;zach.sadecki@ripcode.com&gt;<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>
&nbsp;#endif&nbsp; /* CONFIG_MODEM_SUPPORT */<BR>
<BR>
&nbsp;#ifdef CONFIG_VERSION_VARIABLE<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extern char version_string[];<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (strcmp(getenv(&quot;ver&quot;), version_string))<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extern char version_string[];<BR>
-<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setenv (&quot;ver&quot;, version_string);&nbsp; /* set version variable*/<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; run_command(&quot;saveenv&quot;, 0);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;#endif /* CONFIG_VERSION_VARIABLE */<BR>
<BR>
<BR>
<BR>
&gt; -----Original Message-----<BR>
&gt; From: u-boot-users-bounces@lists.sourceforge.net<BR>
&gt; [<A HREF="mailto:u-boot-users-bounces@lists.sourceforge.net">mailto:u-boot-users-bounces@lists.sourceforge.net</A>] On Behalf<BR>
&gt; Of Zach Sadecki<BR>
&gt; Sent: Monday, August 13, 2007 4:25 PM<BR>
&gt; To: ulf@atmel.com<BR>
&gt; Cc: u-boot-users@lists.sourceforge.net; wd@denx.de<BR>
&gt; Subject: Re: [U-Boot-Users] Using 'ver' env var<BR>
&gt;<BR>
&gt; Ulf,<BR>
&gt;&nbsp;&nbsp; I was thinking this already..&nbsp; I just thought that I was missing<BR>
&gt; something which is why I asked the questions.&nbsp; I'll send a patch to<BR>
&gt; the group for review later.<BR>
&gt;<BR>
&gt; Zach<BR>
&gt;<BR>
&gt; &gt; &gt; If you don't explicitly 'saveenv' there is no 'ver'<BR>
&gt; variable to read<BR>
&gt; &gt; &gt; from linux...<BR>
&gt; &gt; &gt; And it can't be good for the flash to force u-boot to<BR>
&gt; save on every<BR>
&gt; &gt; &gt; boot.<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; So if I update (from linux for example) 'ver' doesn't get<BR>
&gt; &gt; updated unless<BR>
&gt; &gt; &gt; u-boot is<BR>
&gt; &gt; &gt; doing a saveenv on every boot...<BR>
&gt; &gt;<BR>
&gt; &gt; Maybe saving the environment (with ver) should be forced if<BR>
&gt; &gt; &quot;ver&quot; is not<BR>
&gt; &gt; the same as the U-Boot version.<BR>
&gt; &gt;<BR>
&gt; &gt; Best Regards<BR>
&gt; &gt; Ulf Samuelsson<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt;<BR>
&gt; --------------------------------------------------------------<BR>
&gt; -----------<BR>
&gt; This SF.net email is sponsored by: Splunk Inc.<BR>
&gt; Still grepping through log files to find problems?&nbsp; Stop.<BR>
&gt; Now Search log events and configuration files using AJAX and<BR>
&gt; a browser.<BR>
&gt; Download your FREE copy of Splunk now &gt;&gt;&nbsp; <A HREF="http://get.splunk.com/">http://get.splunk.com/</A><BR>
&gt; _______________________________________________<BR>
&gt; U-Boot-Users mailing list<BR>
&gt; U-Boot-Users@lists.sourceforge.net<BR>
&gt; <A HREF="https://lists.sourceforge.net/lists/listinfo/u-boot-users">https://lists.sourceforge.net/lists/listinfo/u-boot-users</A><BR>
&gt;<BR>
<BR>
-------------------------------------------------------------------------<BR>
This SF.net email is sponsored by: Splunk Inc.<BR>
Still grepping through log files to find problems?&nbsp; Stop.<BR>
Now Search log events and configuration files using AJAX and a browser.<BR>
Download your FREE copy of Splunk now &gt;&gt;&nbsp; <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>