<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://elinux.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;feed=atom&amp;action=history</id>
		<title>U-boot environment variables in linux - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;action=history"/>
		<updated>2013-05-18T19:52:32Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.21alpha</generator>

	<entry>
		<id>http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;diff=165890&amp;oldid=prev</id>
		<title>Peterll: Use correct application name in comment, fix typo in comment</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;diff=165890&amp;oldid=prev"/>
				<updated>2012-08-31T15:38:59Z</updated>
		
		<summary type="html">&lt;p&gt;Use correct application name in comment, fix typo in comment&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 15:38, 31 August 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 33:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 33:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;To create this file, you need to know information about where U-Boot stores its env variables.&amp;#160; Specifically, you need the mtd device name, the device offset, the env size and the flash sector size.&amp;#160; I found most of what I needed by looking in the file ''/proc/mtd''. Here is my ''fw_env.config'' file:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;To create this file, you need to know information about where U-Boot stores its env variables.&amp;#160; Specifically, you need the mtd device name, the device offset, the env size and the flash sector size.&amp;#160; I found most of what I needed by looking in the file ''/proc/mtd''. Here is my ''fw_env.config'' file:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  # Configuration file for fw_(printenv/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;saveenv&lt;/del&gt;) utility.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  # Configuration file for fw_(printenv/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;setenv&lt;/ins&gt;) utility.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  # Up to two entries are valid, in this case the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;redundand&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  # Up to two entries are valid, in this case the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;redundant&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  # environment sector is assumed present.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  # environment sector is assumed present.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  # MTD device name&amp;#160; &amp;#160; &amp;#160;  Device offset&amp;#160;  Env. size&amp;#160; &amp;#160; &amp;#160;  Flash sector size&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  # MTD device name&amp;#160; &amp;#160; &amp;#160;  Device offset&amp;#160;  Env. size&amp;#160; &amp;#160; &amp;#160;  Flash sector size&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Peterll</name></author>	</entry>

	<entry>
		<id>http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;diff=26695&amp;oldid=prev</id>
		<title>Markv: Added OpenWrt menuconfig location</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;diff=26695&amp;oldid=prev"/>
				<updated>2010-11-07T14:08:25Z</updated>
		
		<summary type="html">&lt;p&gt;Added OpenWrt menuconfig location&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 14:08, 7 November 2010&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Tools will be installed in ''/usr/sbin/'' of your target's rootfs.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Tools will be installed in ''/usr/sbin/'' of your target's rootfs.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;===OpenWrt===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Like Buildroot, OpenWrt can build these tools too but you will find them in a different location in the menu:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt; Utilities&amp;#160; ---&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160;  [*] uboot-envtools&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Tools will also be installed in ''/usr/sbin/''.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;===All distribs===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;===All distribs===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key elinux:diff:version:1.11a:oldid:17315:newid:26695 --&gt;
&lt;/table&gt;</summary>
		<author><name>Markv</name></author>	</entry>

	<entry>
		<id>http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;diff=17315&amp;oldid=prev</id>
		<title>JulienBoibessot: /* Setting and verifying an environment variable */</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;diff=17315&amp;oldid=prev"/>
				<updated>2010-02-11T09:48:41Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Setting and verifying an environment variable&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 09:48, 11 February 2010&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 54:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 54:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Setting and verifying an environment variable ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Setting and verifying an environment variable ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;WARNING!&amp;#160; If the ''fw_env.config'' does not point to U-Boot's env section in Flash, running ''fw_setenv'' could corrupt your &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;flash&lt;/del&gt;.&amp;#160; Make sure that ''fw_printenv'' works properly and does not return a message about &amp;quot;bad CRC&amp;quot; before running ''fw_setenv''.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;WARNING!&amp;#160; If the ''fw_env.config'' does not point to U-Boot's env section in Flash, running ''fw_setenv'' could corrupt your &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Flash&lt;/ins&gt;.&amp;#160; Make sure that ''fw_printenv'' works properly and does not return a message about &amp;quot;bad CRC&amp;quot; before running ''fw_setenv''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; # fw_setenv mytestvariable abcdefg&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; # fw_setenv mytestvariable abcdefg&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 61:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 61:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Care must be taken when changing env variables as a typo could easily render your &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;boot &lt;/del&gt;unbootable. Most problems can be fixed by connecting to the serial console and using U-Boot's command line to fix bad variable.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Care must be taken when changing env variables as a typo could easily render your &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;system &lt;/ins&gt;unbootable. Most problems can be fixed by connecting to the serial console and using U-Boot's command line to fix bad variable.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JulienBoibessot</name></author>	</entry>

	<entry>
		<id>http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;diff=17311&amp;oldid=prev</id>
		<title>JulienBoibessot at 09:36, 11 February 2010</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;diff=17311&amp;oldid=prev"/>
				<updated>2010-02-11T09:36:00Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 09:36, 11 February 2010&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category: U-Boot]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category: Linux]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category: Linux]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category: OMAP]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category: OMAP]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JulienBoibessot</name></author>	</entry>

	<entry>
		<id>http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;diff=17310&amp;oldid=prev</id>
		<title>JulienBoibessot: Correct minor typos + (try to) make it independant of OE + add infos for Buildroot</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;diff=17310&amp;oldid=prev"/>
				<updated>2010-02-11T09:27:38Z</updated>
		
		<summary type="html">&lt;p&gt;Correct minor typos + (try to) make it independant of OE + add infos for Buildroot&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 09:27, 11 February 2010&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category: Linux]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category: Linux]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category: OMAP]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category: OMAP]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;U-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;boot &lt;/del&gt;makes use of environment &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;variable &lt;/del&gt;which can be read and set from the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;boot &lt;/del&gt;command line with printenv and setenv.&amp;#160; It can be helpful to read and set these variables from &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;linux &lt;/del&gt;as well.&amp;#160; The &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;boot &lt;/del&gt;distribution has sources for these commands, named fw_printenv and fw_setenv&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, but the Angstrom OE distribution does not build the tools automatically.&amp;#160; I&lt;/del&gt;'&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;m a novice at OE and bitbake, so here are the instructions for building and installing the tools manually.&amp;#160; Theses instructions assume that you have already buillt the angstrom distribution for the beagle board.&amp;#160; Substitute directories and compiler locations to match your environment&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;U-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Boot &lt;/ins&gt;makes use of environment &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;variables &lt;/ins&gt;which can be read and set from the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;U&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Boot &lt;/ins&gt;command line with &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;printenv&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;setenv&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;.&amp;#160; It can be helpful to read and set these variables from &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Linux &lt;/ins&gt;as well.&amp;#160; The &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;U&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Boot &lt;/ins&gt;distribution has sources for these commands, named &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;fw_printenv&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;fw_setenv'&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#cd to the source for &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;boot &lt;/del&gt;in the OE tree.&amp;#160; For me, it is at &amp;quot;../oe/tmp/work/beagleboard-angstrom-linux-gnueabi/u-boot-git-r18.1/git&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;== Installation ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;===OpenEmbedded===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;The Angstrom OE distribution does not build the tools automatically.&amp;#160; I'm a novice at OE and bitbake, so here are the instructions for building and installing the tools manually.&amp;#160; Theses instructions assume that you have already built the angstrom distribution for the beagle board.&amp;#160; Substitute directories and compiler locations to match your environment.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#cd to the source for &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;U&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Boot &lt;/ins&gt;in the OE tree.&amp;#160; For me, it is at &amp;quot;../oe/tmp/work/beagleboard-angstrom-linux-gnueabi/u-boot-git-r18.1/git&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#manually build fw_printenv with make:&amp;#160; &amp;quot;make env ARCH=arm CROSS_COMPILE= /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnuabi-&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#manually build fw_printenv with make:&amp;#160; &amp;quot;make env ARCH=arm CROSS_COMPILE= /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnuabi-&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#if the compile succeeded, you should have fw_printenv in the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;boot &lt;/del&gt;directory tools/env.&amp;#160; Copy fw_printenv to /sbin on the root filesystem of your beagle board.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#if the compile succeeded, you should have fw_printenv in the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;U&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Boot &lt;/ins&gt;directory tools/env.&amp;#160; Copy fw_printenv to /sbin on the root filesystem of your beagle board.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#the fw_printenv binary also contains the code for fw_setenv.&amp;#160; the functions of fw_setenv are run when the program is invoked with the name &amp;quot;fw_setenv&amp;quot;.&amp;#160; this is most easily accomplished by creating a symbolic link from fw_printenv to fw_setenv, as in &amp;quot;ln -sf /sbin/fw_printenv /sbin/fw_setenv&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#the fw_printenv binary also contains the code for fw_setenv.&amp;#160; the functions of fw_setenv are run when the program is invoked with the name &amp;quot;fw_setenv&amp;quot;.&amp;#160; this is most easily accomplished by creating a symbolic link from fw_printenv to fw_setenv, as in &amp;quot;ln -sf /sbin/fw_printenv /sbin/fw_setenv&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;#&lt;/del&gt;the last and most important step is creating the config file for the utilities. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; the &lt;/del&gt;file name is fw_env.config and it lives in /etc.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to &lt;/del&gt;create this file, you need to know information about where &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;boot &lt;/del&gt;stores its env variables.&amp;#160; Specifically, you need the mtd device name, the device offset, the env size and the flash sector size.&amp;#160; I found most of what I needed by looking in the file /proc/mtd. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; here &lt;/del&gt;is my fw_env.config file:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;===Buildroot===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Buildroot can automatically build these tools for you. You just have to:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; make menuconfig&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and then select &lt;/ins&gt;the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;following option:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; Target filesystem options&amp;#160; ---&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160;  [*] Das U-Boot Boot Monitor&amp;#160; ---&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160;  [*]&amp;#160;  fw_printenv tool in target&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Tools will be installed in ''/usr/sbin/'' of your target's rootfs.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;===All distribs===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''The &lt;/ins&gt;last and most important step&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' &lt;/ins&gt;is creating the config file for the utilities. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;The &lt;/ins&gt;file name is &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;fw_env.config&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;and it lives in &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;/etc&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;To &lt;/ins&gt;create this file, you need to know information about where &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;U&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Boot &lt;/ins&gt;stores its env variables.&amp;#160; Specifically, you need the mtd device name, the device offset, the env size and the flash sector size.&amp;#160; I found most of what I needed by looking in the file &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;/proc/mtd&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Here &lt;/ins&gt;is my &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;fw_env.config&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;file:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  # Configuration file for fw_(printenv/saveenv) utility.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  # Configuration file for fw_(printenv/saveenv) utility.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 38:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 53:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Setting and verifying an environment variable ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Setting and verifying an environment variable ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;WARNING!&amp;#160; If the fw_env.config does not point to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;boots &lt;/del&gt;env section in &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;flash&lt;/del&gt;, running fw_setenv could corrupt your flash.&amp;#160; Make sure that fw_printenv works properly and does not return a message about &amp;quot;bad CRC&amp;quot; before running fw_setenv.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;WARNING!&amp;#160; If the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;fw_env.config&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;does not point to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;U&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Boot's &lt;/ins&gt;env section in &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Flash&lt;/ins&gt;, running &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;fw_setenv&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;could corrupt your flash.&amp;#160; Make sure that &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;fw_printenv&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;works properly and does not return a message about &amp;quot;bad CRC&amp;quot; before running &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;fw_setenv&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; # fw_setenv mytestvariable abcdefg&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; # fw_setenv mytestvariable abcdefg&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 45:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 60:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Care must be taken when changing env variables as a typo could easily render your boot unbootable. Most problems can be fixed by connecting to the serial console and using &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;boots &lt;/del&gt;command line to fix bad variable.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Care must be taken when changing env variables as a typo could easily render your boot unbootable. Most problems can be fixed by connecting to the serial console and using &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;U&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Boot's &lt;/ins&gt;command line to fix bad variable.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JulienBoibessot</name></author>	</entry>

	<entry>
		<id>http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;diff=7425&amp;oldid=prev</id>
		<title>RobertK: +cats</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;diff=7425&amp;oldid=prev"/>
				<updated>2008-10-27T12:14:38Z</updated>
		
		<summary type="html">&lt;p&gt;+cats&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:14, 27 October 2008&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category: Linux]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category: OMAP]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;U-boot makes use of environment variable which can be read and set from the u-boot command line with printenv and setenv.&amp;#160; It can be helpful to read and set these variables from linux as well.&amp;#160; The u-boot distribution has sources for these commands, named fw_printenv and fw_setenv, but the Angstrom OE distribution does not build the tools automatically.&amp;#160; I'm a novice at OE and bitbake, so here are the instructions for building and installing the tools manually.&amp;#160; Theses instructions assume that you have already buillt the angstrom distribution for the beagle board.&amp;#160; Substitute directories and compiler locations to match your environment.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;U-boot makes use of environment variable which can be read and set from the u-boot command line with printenv and setenv.&amp;#160; It can be helpful to read and set these variables from linux as well.&amp;#160; The u-boot distribution has sources for these commands, named fw_printenv and fw_setenv, but the Angstrom OE distribution does not build the tools automatically.&amp;#160; I'm a novice at OE and bitbake, so here are the instructions for building and installing the tools manually.&amp;#160; Theses instructions assume that you have already buillt the angstrom distribution for the beagle board.&amp;#160; Substitute directories and compiler locations to match your environment.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>RobertK</name></author>	</entry>

	<entry>
		<id>http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;diff=7424&amp;oldid=prev</id>
		<title>RobertK at 12:13, 27 October 2008</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=U-boot_environment_variables_in_linux&amp;diff=7424&amp;oldid=prev"/>
				<updated>2008-10-27T12:13:04Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;U-boot makes use of environment variable which can be read and set from the u-boot command line with printenv and setenv.  It can be helpful to read and set these variables from linux as well.  The u-boot distribution has sources for these commands, named fw_printenv and fw_setenv, but the Angstrom OE distribution does not build the tools automatically.  I'm a novice at OE and bitbake, so here are the instructions for building and installing the tools manually.  Theses instructions assume that you have already buillt the angstrom distribution for the beagle board.  Substitute directories and compiler locations to match your environment.&lt;br /&gt;
&lt;br /&gt;
#cd to the source for u-boot in the OE tree.  For me, it is at &amp;quot;../oe/tmp/work/beagleboard-angstrom-linux-gnueabi/u-boot-git-r18.1/git&amp;quot;&lt;br /&gt;
#manually build fw_printenv with make:  &amp;quot;make env ARCH=arm CROSS_COMPILE= /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnuabi-&amp;quot;&lt;br /&gt;
#if the compile succeeded, you should have fw_printenv in the u-boot directory tools/env.  Copy fw_printenv to /sbin on the root filesystem of your beagle board.&lt;br /&gt;
#the fw_printenv binary also contains the code for fw_setenv.  the functions of fw_setenv are run when the program is invoked with the name &amp;quot;fw_setenv&amp;quot;.  this is most easily accomplished by creating a symbolic link from fw_printenv to fw_setenv, as in &amp;quot;ln -sf /sbin/fw_printenv /sbin/fw_setenv&amp;quot;&lt;br /&gt;
#the last and most important step is creating the config file for the utilities.  the file name is fw_env.config and it lives in /etc.&lt;br /&gt;
to create this file, you need to know information about where u-boot stores its env variables.  Specifically, you need the mtd device name, the device offset, the env size and the flash sector size.  I found most of what I needed by looking in the file /proc/mtd.  here is my fw_env.config file:&lt;br /&gt;
&lt;br /&gt;
   # Configuration file for fw_(printenv/saveenv) utility.&lt;br /&gt;
   # Up to two entries are valid, in this case the redundand&lt;br /&gt;
   # environment sector is assumed present.&lt;br /&gt;
   # MTD device name       Device offset   Env. size       Flash sector size&lt;br /&gt;
          /dev/mtd2               0x0000          0x20000         0x20000&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
=== Printing all the environment variables===&lt;br /&gt;
&lt;br /&gt;
  # fw_printenv&lt;br /&gt;
  bootdelay=1&lt;br /&gt;
  baudrate=115200&lt;br /&gt;
  ipaddr=192.168.0.2&lt;br /&gt;
  serverip=192.168.0.1&lt;br /&gt;
  netmask=255.255.255.0&lt;br /&gt;
  bootfile=&amp;quot;uImage&amp;quot;&lt;br /&gt;
  filesize=B81A24&lt;br /&gt;
  bootcmd=nand read 80200000 280000 400000;bootm 80200000&lt;br /&gt;
  bootargs=console=ttyS2,115200n8 console=tty0 root=/dev/mtdblock4 rw rootfstyp=jffs2 nohz=off&lt;br /&gt;
  stdin=serial   &lt;br /&gt;
  stdout=serial&lt;br /&gt;
  stderr=serial&lt;br /&gt;
&lt;br /&gt;
=== Printing a single environment variable ===&lt;br /&gt;
   # fw_printenv stdin&lt;br /&gt;
   stdin=serial&lt;br /&gt;
&lt;br /&gt;
=== Setting and verifying an environment variable ===&lt;br /&gt;
WARNING!  If the fw_env.config does not point to u-boots env section in flash, running fw_setenv could corrupt your flash.  Make sure that fw_printenv works properly and does not return a message about &amp;quot;bad CRC&amp;quot; before running fw_setenv.&lt;br /&gt;
&lt;br /&gt;
  # fw_setenv mytestvariable abcdefg&lt;br /&gt;
  # fw_printenv mytestvariable&lt;br /&gt;
  mytestenv=abcdefg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Care must be taken when changing env variables as a typo could easily render your boot unbootable. Most problems can be fixed by connecting to the serial console and using u-boots command line to fix bad variable.&lt;/div&gt;</summary>
		<author><name>RobertK</name></author>	</entry>

	</feed>