<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.mios.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.mios.com/index.php?action=history&amp;feed=atom&amp;title=Toolchain</id>
		<title>Toolchain - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.mios.com/index.php?action=history&amp;feed=atom&amp;title=Toolchain"/>
		<link rel="alternate" type="text/html" href="http://wiki.mios.com/index.php?title=Toolchain&amp;action=history"/>
		<updated>2026-06-03T08:07:00Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.8</generator>

	<entry>
		<id>http://wiki.mios.com/index.php?title=Toolchain&amp;diff=6511&amp;oldid=prev</id>
		<title>A-lurker at 03:22, 15 June 2013</title>
		<link rel="alternate" type="text/html" href="http://wiki.mios.com/index.php?title=Toolchain&amp;diff=6511&amp;oldid=prev"/>
				<updated>2013-06-15T03:22:08Z</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 valign='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 03:22, 15 June 2013&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:How_To]][[Category:Development]]&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;Source: http://forum.micasaverde.com/index.php/topic,8910.msg71562.html#msg71562&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;Source: http://forum.micasaverde.com/index.php/topic,8910.msg71562.html#msg71562&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;!-- diff cache key micasaverde_wiki:diff:version:1.11a:oldid:4233:newid:6511 --&gt;
&lt;/table&gt;</summary>
		<author><name>A-lurker</name></author>	</entry>

	<entry>
		<id>http://wiki.mios.com/index.php?title=Toolchain&amp;diff=4233&amp;oldid=prev</id>
		<title>Ap15e: Created page with &quot;Source: http://forum.micasaverde.com/index.php/topic,8910.msg71562.html#msg71562  ==Toolchain for Vera V2==  By far, the easiest way is to let OpenWRT build one.  That is ultimat...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.mios.com/index.php?title=Toolchain&amp;diff=4233&amp;oldid=prev"/>
				<updated>2012-04-30T08:58:52Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;Source: http://forum.micasaverde.com/index.php/topic,8910.msg71562.html#msg71562  ==Toolchain for Vera V2==  By far, the easiest way is to let OpenWRT build one.  That is ultimat...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Source: http://forum.micasaverde.com/index.php/topic,8910.msg71562.html#msg71562&lt;br /&gt;
&lt;br /&gt;
==Toolchain for Vera V2==&lt;br /&gt;
&lt;br /&gt;
By far, the easiest way is to let OpenWRT build one.  That is ultimately what I had to do for the Vera 2 toolchain.  There are some really good instructions on how to build OpenWRT here: http://wiki.openwrt.org/doc/howto/build&lt;br /&gt;
&lt;br /&gt;
There is one change that you need to make to the instructions to get a proper build for the Vera 2.  When you are told to run:&lt;br /&gt;
&lt;br /&gt;
   svn co svn://svn.openwrt.org/openwrt/trunk/&lt;br /&gt;
&lt;br /&gt;
You actually want to run:&lt;br /&gt;
&lt;br /&gt;
   svn co -r 21639 svn://svn.openwrt.org/openwrt/trunk/&lt;br /&gt;
&lt;br /&gt;
You will want to double check the revision number.  It is either 21639 or 21638.   If you SSH in to a Vera 2, in the banner screen you will see a version line indicating it is running OpenWRT Backfire 10.3 (rXXXXX).  Where the XXXXX is the number you want.&lt;br /&gt;
&lt;br /&gt;
Then, when you get to the &amp;quot;make menuconfig&amp;quot; command, under &amp;quot;Target System&amp;quot; you want to select &amp;quot;Broadcom BCM947xx/953xx [2.4]&amp;quot;.   That should be the only change you need to make.   Then, run &amp;quot;make&amp;quot; and go take a nap.  It will take some time to compile.&lt;br /&gt;
&lt;br /&gt;
The instructions from OpenWRT on how to use the newly created tool-chain are really only useful if your project only uses a standard Makefile.   If you are using an autoconf project, you need to just change the way you call configure.  In a nutshell, you need to tell configure where to find the cross compiler(s) and linker.   To do that, I pass arguments to ./configure.  I believe you can also set environment variables, but I have not tried that.   The ugly command line that I use is:&lt;br /&gt;
&lt;br /&gt;
   ./configure CC=/home/chris/openwrt/trunk/staging_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.30.1/usr/bin/mipsel-openwrt-linux-uclibc-gcc CXX=/home/chris/openwrt/trunk/staging_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.30.1/usr/bin/mipsel-openwrt-linux-uclibc-g++ --host=x86_64-unknown-linux LD=/home/chris/openwrt/trunk/staging_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.30.1/usr/bin/mipsel-openwrt-linux-uclibc-ld&lt;br /&gt;
&lt;br /&gt;
Buried in there is a --host option.  You will want to change that if your host machine isn't an x86_64.  If you are only doing C code, you can skip using the CXX parameter, or if you are only doing C++ code, you can skip the CC parameter.  I include both in case I mix some code later on.    Also, you will want to make sure that you change the paths that are used, unless you home directory is also /home/chris.&lt;br /&gt;
&lt;br /&gt;
After running that ugly configure command, running &amp;quot;make&amp;quot; will kick off the build with the cross-compiler chain.   Keep in mind that if you have previously built the program to run on a different type of CPU, you will want to run a &amp;quot;make distclean&amp;quot; and rerun the autotools to get a clean build.   As part of my build process, I have a shell script that handles all of this for me.  It looks like this:&lt;br /&gt;
&lt;br /&gt;
   make distclean&lt;br /&gt;
   autoconf;automake&lt;br /&gt;
   ./configure CC=/home/chris/openwrt/trunk/staging_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.30.1/usr/bin/mipsel-openwrt-linux-uclibc-gcc CXX=/home/chris/openwrt/trunk/staging_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.30.1/usr/bin/mipsel-openwrt-linux-uclibc-g++ --host=x86_64-unknown-linux LD=/home/chris/openwrt/trunk/staging_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.30.1/usr/bin/mipsel-openwrt-linux-uclibc-ld&lt;br /&gt;
   make -j8&lt;br /&gt;
&lt;br /&gt;
You may want to change the -j8 option on &amp;quot;make&amp;quot;.  Usually a good number is the number of cores in your machine *2.   Since I build on a quad core machine, I use -j8.    When your build is done, you can verify that it built for the MIPS platform by running &amp;quot;file &amp;lt;your_binary_name&amp;gt;&amp;quot;.   It should return that the file is a MIPS file.&lt;br /&gt;
&lt;br /&gt;
My code doesn't use any libraries beyond uClibc.  If you do, then you will probably need to set LD_LIBRARY_PATH to the directory that contains the cross compiled libraries you use.   You will probably have to hack up your makefile a bit to point to the proper includes directory.&lt;br /&gt;
&lt;br /&gt;
==Toolchain for Vera V3==&lt;br /&gt;
&lt;br /&gt;
The easiest way to get a toolchain for the Vera 3 is basically the same thing as the 2.   The one difference is we don't know the SVN revision that is being used by MCV to develop their stuff.   However, I suspect that using the trunk version of OpenWRT will allow you to get builds for the Vera 3.   However, I ended up using ct-ng to get my Vera 3 toolchain.   I went through the tutorial on the ct-ng site, but tweaked the kernel version to be the closest one to the kernel on the Vera 3, and set it up to build uClibc.   Then, in my build system I link everything as static, so I shouldn't hit any weirdness with library revisions on the Vera 3.  (At the expense of a little bit more space used on the flash.)&lt;/div&gt;</summary>
		<author><name>Ap15e</name></author>	</entry>

	</feed>