<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Mark's Blog</title>
	
	<link>http://mark.ossdl.de</link>
	<description>de arte technologiæ</description>
	<lastBuildDate>Wed, 11 Nov 2009 13:23:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/ossdl/mark" type="application/rss+xml" /><feedburner:emailServiceId>ossdl/mark</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fossdl%2Fmark" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fossdl%2Fmark" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/ossdl/mark" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fossdl%2Fmark" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fossdl%2Fmark" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fossdl%2Fmark" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Fossdl%2Fmark" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2Fossdl%2Fmark" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>How to build MySQL with SphinxSE under Windows</title>
		<link>http://feedproxy.google.com/~r/ossdl/mark/~3/eUW01-G_iHQ/</link>
		<comments>http://mark.ossdl.de/2009/11/how-to-build-mysql-with-sphinxse-under-windows/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 13:21:01 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[know-how]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Sphinx Search]]></category>

		<guid isPermaLink="false">http://mark.ossdl.de/?p=477</guid>
		<description><![CDATA[
Since around versions 5.1.40 and 5.4.3 CMake structure has changed in MySQL and the former instructions on how to build it with SphinxSE (aka Sphinx storage engine) are outdated. Compiling has become easier and requires fewer steps, for which I will provide a tutorial below.  But first check whether you installed these requirements:

Microsoft Visual [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-248" title="mysql-sphinx" src="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/05/mysql-sphinx.jpg" alt="mysql-sphinx" width="560" height="130" /></p>
<p>Since around versions 5.1.40 and 5.4.3 CMake structure has changed in MySQL and the former instructions on <strong>how to build it with SphinxSE</strong> (aka Sphinx storage engine) are outdated. Compiling has become easier and requires fewer steps, for which I will provide a <strong>tutorial below</strong>. <span id="more-477"></span> But first check whether you installed these <span style="text-decoration: underline;"><strong>requirements</strong></span>:</p>
<ol>
<li><a href="http://www.microsoft.com/germany/visualstudio/products/overview.aspx">Microsoft Visual Studio</a> &#8211; I will use version 2008 Professional.<br />
For you to compare, my cl.exe gets found in C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/amd64/cl.exe</li>
<li><a href="http://www.gnu.org/software/bison/">Bison</a> &#8211; mine is 2.1<br />
On the command line, bison &#8212;help should be successfull.</li>
<li><a href="http://www.cmake.org/">CMake</a><br />
Again, a call to cmake should not result in a &#8220;file not found&#8221; error but invoke cmake.</li>
<li>A text file editor.<br />
<a href="http://sourceforge.net/projects/notepad-plus/">Notepad++</a> will do the job, Windows&#8217; notepad not due to line breaks getting ignored.</li>
</ol>
<p>Then we can actually <span style="text-decoration: underline;"><strong>compile MySQL</strong></span>. For the example&#8217;s sake I will use MySQL 5.4.3 and Sphinx 0.9.9-rc2:</p>
<ol>
<li><strong>Download and extract</strong> MySQL sources somewhere, say in <code>E:\mysql-5.4.3-beta</code>.<br />
Do the same with Sphinx Search sources.</li>
<li><strong>Copy sphinx storage engine</strong> folder <code>sphinx-0.9.9-rc2\mysqlse</code> to <code>mysql-*\storage\sphinx</code><br />
Yes, &#8220;mysqlse&#8221; gets renamed to &#8220;sphinx&#8221; in that process, so that the latter destination folder contains <cite>CMakeLists.txt</cite>.</li>
<li>Open <cite>mysql-*\storage\sphinx\CMakeLists.txt</cite> and
<ol>
<li><strong>Remove</strong> this line:
<pre class="brush: text">ADD_LIBRARY(sphinx ha_sphinx.cc)</pre>
</li>
<li>In place of that, <strong>add these lines</strong>:
<pre class="brush: text">INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake")
MYSQL_STORAGE_ENGINE(SPHINX)</pre>
</li>
</ol>
</li>
<li>Launch the shell (hit Win+R and type in cmd.exe) and <strong>change into</strong> <code>E:\mysql-*</code></li>
<li>This command will <strong>generate a <cite>win\configure.data</cite></strong>.<br />
You could alter that line, but make sure  WITH_SPHINX_STORAGE_ENGINE is in the options, of course.</p>
<pre class="brush: text">win\configure WITH_PARTITION_STORAGE_ENGINE WITH_ARCHIVE_STORAGE_ENGINE WITH_BLACKHOLE_STORAGE_ENGINE WITH_SPHINX_STORAGE_ENGINE WITH_FEDERATED_STORAGE_ENGINE WITH_CSV_STORAGE_ENGINE WITH_INNOBASE_STORAGE_ENGINE __NT__ CYBOZU MYSQL_SERVER_SUFFIX=-Sphinx</pre>
</li>
<li>By following command you will <strong>run CMak</strong>e, which will create project files for Visual Studio.<br />
There are several <code>win\build-*.bat</code> batch files, so make sure you call the one which matches your Visual Studio version. For 2008 it is <code>build-v9.bat</code>, for a 64bit MySQL it is <code>build-v9_x64.bat</code> (you can change this in VS, too):</p>
<pre class="brush: text">win\build-v9_x64</pre>
</li>
<li><strong>Open <cite>ALL_BUILD.vcproj</cite> in Visual Studio</strong> (e.g., by double click).</li>
<li>Go to &#8220;build » configuration manager&#8221;, select &#8220;Release&#8221; in the upper left dropdown box and in the list below, check &#8220;build&#8221; of &#8220;ALL_BUILD&#8221;. See the screenshot for everything (<cite>Win32</cite> can be <cite>x64</cite>):<br />
<a href="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/11/vs2008-configuration-manager-for-mysql.png"><img class="alignnone size-thumbnail wp-image-478" src="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/11/vs2008-configuration-manager-for-mysql-150x150.png" alt="" width="150" height="150" /></a></li>
<li>Run &#8220;Build » Build Solution&#8221;, wait.</li>
<li><code>mysql-*\sql\Release</code> will contain executables, the remaining files can be found as usual.</li>
</ol>
<p>When at compiling I prefer to alter default settings of SphinxSE, e.g. increase <cite>max_matches</cite> or <cite>m_iMaxMatches</cite> as it is called in the source code. You can find the settings in <code>mysql-*/storage/sphinx/ha_sphinx.cc</code>.</p>
<p><span style="text-decoration: underline;"><strong>See also:</strong></span></p>
<ul>
<li><a href="http://mark.ossdl.de/2009/05/mysql-with-sphinx-storage-engine/">MySQL with Sphinx storage engine</a> &#8211; for the link to my pre-compiled <strong>binaries</strong></li>
<li><a rel="bookmark" href="../2009/07/mysql-fnv-murmur-hash-native-function-implementation/">MySQL native function implementation of FNV hash (and others) </a> &#8211; for the patch to MySQL to integrate <strong>hash functions</strong> <code>FNV1A_64</code>, <code>FNV1_64</code> and <code>MURMURHASH2</code></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://mark.ossdl.de/2009/11/how-to-build-mysql-with-sphinxse-under-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://mark.ossdl.de/2009/11/how-to-build-mysql-with-sphinxse-under-windows/</feedburner:origLink></item>
		<item>
		<title>Why I prefer Gentoo</title>
		<link>http://feedproxy.google.com/~r/ossdl/mark/~3/_PvDSGhQS6g/</link>
		<comments>http://mark.ossdl.de/2009/11/why-i-prefer-gentoo/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 17:02:23 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://mark.ossdl.de/?p=469</guid>
		<description><![CDATA[
When talking about Linux, most people really mean that-Linux-Kernel-with-userland-tools. And there are a lot of flavours of that as distrowatch shows. As being asked a lot what and why I use [it], here is the answer: Gentoo. And that&#8217;s why: 
I don&#8217;t use Gentoo because it gives me some percentile of more speed &#8211; taking [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-470" src="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/11/gentoo-island.jpg" alt="" width="560" height="118" /></p>
<p>When talking about <strong>Linux</strong>, most people really mean that-Linux-Kernel-with-userland-tools. And there are a lot of flavours of that as <a href="http://distrowatch.com/stats.php?section=popularity">distrowatch shows</a>. As being asked a lot <strong>what and why</strong> I use [it], here is the answer: Gentoo. And that&#8217;s why: <span id="more-469"></span></p>
<p>I don&#8217;t use Gentoo because it gives me some percentile of more speed &#8211; taking compile times into the math that tailoring won&#8217;t pay off.<br />
I do use it, because:</p>
<ul>
<li>It <strong>runs on every systems architecture</strong> I use or am to use. And that&#8217;s some: <a href="http://www.gentoo.org/proj/en/base/index.xml#doc_chap4">x86, amd64, arm, ppc</a>; on way too many different processors</li>
<li>It <a href="http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=3">can be tailored</a> to utilize or optionally utilize various command-sets (MMX, 3Dnow, SSE, SSE4, &#8230;) so it is possible e.g. to run a copy of one machine&#8217;s hdd as other&#8217;s system. Even dsitributed cross-compiling is no problem.</li>
<li>Like BSD&#8217;s portage, there is <strong>no searching for a suitable RPM, DEB, LZM, PET, PISI or whatever</strong> in the right combination for the arch, but with <a href="http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&amp;chap=1">Ebuilds</a> there are simply instructions on how the system shall obtain, compile and install the software run by a toolset called <strong>Portage</strong>.
<ul>
<li>Portage <strong>can install those packages as well</strong>.</li>
<li>You can instantly see what goes where and <strong>what patches</strong> are applied prior compilation.</li>
<li><strong>Files don&#8217;t get overwritten</strong>.</li>
<li><strong>Configuration files can be merged</strong> with new ones.</li>
<li>Ebuilds could contain even that non-tuned <code>configure; make; make install</code> run and you get <strong>software management for free</strong>.</li>
<li>For every package you could choose by what compiler it is created (gcc, icc to name two) and with what optimizations.</li>
</ul>
</li>
<li>Gentoo can handle those packages as well.
<ul>
<li>You can even create <strong>your own &#8220;<span style="text-decoration: underline;">binhosts</span>&#8220;</strong> and <strong>spare you compiling something more than once</strong>.<br />
Yes, that&#8217;s right: You don&#8217;t need to compile everything, you can use packages like in Fedora, Suse and friends.</li>
<li>ICC from RPM works.</li>
</ul>
</li>
<li>Unlike DEBs or RPMs you have the <strong>freedom to say with which options something has to be installed</strong>.<br />
Apache2 with threads? A compatible PHP for that? Without MySQL but SQLite and sablotron, XML and curl? You named it, Gentoo&#8217;s Portage will <strong>figure out the dependencies</strong> for you and you get<strong> your feature combination</strong>.</li>
<li>Gentoo leaves you the choice whether you want <strong>Linux as kernel or the <a href="http://www.gentoo.org/proj/en/gentoo-alt/bsd/index.xml">BSD</a> suite</strong>, and software management is the same on both.</li>
<li>Due to the mighty Ebuilds (and my sys-meta branch in <a href="http://git.ossdl.de/?p=ossdl-overlay.git;a=summary">OSSDL overlay</a>) I can <strong>clone and install a new machine by three commands</strong>, and it will always be the same installation no matter on which system I issued them.
<ul>
<li>An EC2 instance is created within minutes with exactly the tools you run on other machines.</li>
<li>Restoring a failed server is quite easy: emerge configuration files, emerge the system (by sys-meta), emerge the last backup. Voila!</li>
</ul>
</li>
</ul>
<p>Of course, with custom scripts (hints are welcome!) some of these points would be possible on any other distribution, but I found it nowhere easier and fitting the distributions culture than in Gentoo or its younger sister, Sabayon.</p>
<p>G&#8217;s fascination is that it stays out of your way and does not limit you, <strong>does what you want the way you want it</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mark.ossdl.de/2009/11/why-i-prefer-gentoo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://mark.ossdl.de/2009/11/why-i-prefer-gentoo/</feedburner:origLink></item>
		<item>
		<title>Monologe conference – Post SQL</title>
		<link>http://feedproxy.google.com/~r/ossdl/mark/~3/WvfO6wXwTT8/</link>
		<comments>http://mark.ossdl.de/2009/11/monologe-conference-post-sql/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 10:14:15 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[hanover]]></category>
		<category><![CDATA[Monologe]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[nosql]]></category>
		<category><![CDATA[scalable]]></category>
		<category><![CDATA[systems architecture]]></category>

		<guid isPermaLink="false">http://mark.ossdl.de/?p=462</guid>
		<description><![CDATA[
Last Thursday we&#8217;ve had a conference about innovativations in IT and systems design here in Hannover. And as its main organizer I held a rather long workshop and speech of about three hours about database (mis)use and which and for what purpose a certain DBMS or storage would fit. In case you missed it, here [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-465" src="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/11/californian_pioneers.jpg" alt="" width="560" height="135" /></p>
<p>Last Thursday we&#8217;ve had a <strong>conference about innovativations in IT and systems design here in Hannover</strong>. And as its main organizer I held a rather <strong>long workshop</strong> and speech of about three hours about database (mis)use and which and for what purpose a certain DBMS or storage would fit. In case you missed it, <strong><a href="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/11/Monologe-–-Vortag-2.1.pdf">here are the slides</a></strong> (in German). It is about: <span id="more-462"></span></p>
<ul>
<li>row-based vs. column-oriented vs. index-only DBMS and storages</li>
<li>key/value-stores, where SQL futile and where not</li>
<li>MySQL, MonetDB, BerkeleyDB, &#8230;</li>
<li><a href="http://1978th.net/tokyocabinet/">Tokyo Cabinet</a></li>
<li><a href="http://code.google.com/p/redis/">Redis</a></li>
<li><a href="http://www.danga.com/memcached/">Memcached</a></li>
</ul>
<p>Feedback was good, and most probably we will see and hear more about this. Next time I am going to add<strong> distributed systems</strong> to that and elaborate more on <a href="http://project-voldemort.com/">Valdemort</a>, <a href="http://hypertable.org/">Hypertable</a> (and MySQL cluster&#8230;) and friends;what they do wrong, what&#8217;s around in academia and my own breed, <strong>Project Orkan</strong> &#8211; <strong>distributed K/V storages and group communications</strong> in general.</p>
<p>And, I&#8217;d like to give out some <strong>tech-demos along with Gentoo</strong> and all necessary tools to compile in a <strong>virtual machine</strong>, on DVD.</p>
<p>If possible, I&#8217;d like the demos be able to compile under MacOS, too, therefore <strong>allow me to ask you to try out compiling</strong> and running this one: <a href="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/11/rdfimport.tbz2">Download RDFimport</a>. Please drop me a line if make demo does not work, and if so, what to accomplish for it.</p>
]]></content:encoded>
			<wfw:commentRss>http://mark.ossdl.de/2009/11/monologe-conference-post-sql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://mark.ossdl.de/2009/11/monologe-conference-post-sql/</feedburner:origLink></item>
		<item>
		<title>SheevaPlug Kernel and Gentoo binhost</title>
		<link>http://feedproxy.google.com/~r/ossdl/mark/~3/9l-fwDAm1C4/</link>
		<comments>http://mark.ossdl.de/2009/10/sheevaplug-kernel-and-gentoo-binhost/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 18:47:29 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[SCM]]></category>
		<category><![CDATA[SheevaPlug]]></category>

		<guid isPermaLink="false">http://mark.ossdl.de/?p=453</guid>
		<description><![CDATA[Yesterday I have played around with GIT and

merged the Linux kernel tree from Linus Torvalds
with the Orion sources from Marvell (i.e. patches for SheevaPlug and OpenRD)
added the Gentoo patches (distribution independent)
and those for USB displays and SDHC cards
and eliminated some harmless, but annoying warnings on ARM.

As I found the configurations of the other kernels for [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-455" title="geschenkbox" src="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/10/geschenkbox.jpg" alt="geschenkbox" width="160" height="135" style="margin:0 20px 60px 0" />Yesterday I have played around with GIT and</p>
<ul>
<li>merged the <strong>Linux kernel tree</strong> from Linus Torvalds</li>
<li>with the <strong>Orion sources</strong> from Marvell (i.e. patches for SheevaPlug and OpenRD)</li>
<li>added the <strong>Gentoo patches</strong> (distribution independent)</li>
<li>and those for <a href="http://www.cartft.com/catalog/gl/111">USB displays</a> and SDHC cards</li>
<li>and eliminated some harmless, but annoying warnings on ARM.</li>
</ul>
<p>As I found the configurations of the other kernels for the SheevaPlug on the net a bit unfortunate, you can <strong>download</strong> my latest kernel flavour here: <span id="more-453"></span><br />
<a href="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/10/sheevaplug-linux-2.6.32-rc5-mark.tbz2">sheevaplug-linux-2.6.32-rc5-mark</a>.</p>
<p>Please find the merged Linux kernel sources at <a href="http://git.ossdl.de/?p=linux/linux-2.6-gentoo-mark.git;a=shortlog;h=refs/heads/mark">git.ossdl.de</a>, along with the various <a href="http://git.ossdl.de/?p=linux/2.6-configurations.git;a=summary">configurations</a> I run them with.<br />
But, do me a favour and fetch the actual linux kernel from git.kernel.org and only the differences from my site &#8211; bandwidth.</p>
<p><strong>Binhost:</strong> If you run Gentoo you can use my binhost for the SheevaPlug. I recommend you pull portage configurations from <a href="http://git.ossdl.de/?p=portage.git;a=tree;h=refs/heads/wais-sheeva;hb=wais-sheeva">git.ossdl.de</a>, the &#8220;<strong>arm</strong>&#8221; (or &#8220;wais-sheeva&#8221;) <strong>branch</strong> and/or set this in your <code>/etc/portage/make.conf</code> and it will spare you long compile runs:</p>
<pre class="brush: bash">FEATURES="ccache parallel-fetch userfetch userpriv getbinpkg"
PORTAGE_BINHOST="http://binhost.ossdl.de/armv5tel-softfloat-linux-gnueabi/"</pre>
<p>I run a <strong>Gentoo overlay</strong> for all systems. You might consider using it, too. It contains <b>Nginx</b> with patches for the ARM (and MIPS, btw), <b>PHP-FPM</b> and Cyrus-IMAPd.<br />
See <a href="http://git.ossdl.de/?p=ossdl-overlay.git;a=summary">http://git.ossdl.de/?p=ossdl-overlay.git;a=summary</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mark.ossdl.de/2009/10/sheevaplug-kernel-and-gentoo-binhost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://mark.ossdl.de/2009/10/sheevaplug-kernel-and-gentoo-binhost/</feedburner:origLink></item>
		<item>
		<title>my BeQuiet power supply died</title>
		<link>http://feedproxy.google.com/~r/ossdl/mark/~3/-pBPQ41wv4E/</link>
		<comments>http://mark.ossdl.de/2009/10/my-bequiet-power-supply-died/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 15:18:57 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Private Observations]]></category>

		<guid isPermaLink="false">http://mark.ossdl.de/?p=447</guid>
		<description><![CDATA[Yesterday I&#8217;ve switched my workstation off. Happily, I must add, as all the data from a former webserver has been successfully transferred to my SheevaPlug. In a minute or two, after something to eat, I wanted to commit that modified paper of mine &#8211; but nada! The PSU has died. Again (the last time was [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I&#8217;ve switched my workstation off. Happily, I must add, as all the data from a former webserver has been successfully transferred to my SheevaPlug. In a minute or two, after something to eat, I wanted to commit that modified paper of mine &#8211; but nada! The PSU has died. Again (the last time was last December). So I currently have only my headless miniature server, a PDA and four harddrives along with a RAID card and my notebook, in which the former don&#8217;t fit in. </p>
<p>In case you didn&#8217;t know, today is German Unification Day and no store has opened. Great.<br />
And yes, I have backups. And spare parts, but no additional PSU.</p>
]]></content:encoded>
			<wfw:commentRss>http://mark.ossdl.de/2009/10/my-bequiet-power-supply-died/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://mark.ossdl.de/2009/10/my-bequiet-power-supply-died/</feedburner:origLink></item>
		<item>
		<title>Gentoo on the SheevaPlug</title>
		<link>http://feedproxy.google.com/~r/ossdl/mark/~3/bopt0pGbwUQ/</link>
		<comments>http://mark.ossdl.de/2009/09/gentoo-on-the-sheevaplug/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 10:00:59 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[know-how]]></category>
		<category><![CDATA[SheevaPlug]]></category>

		<guid isPermaLink="false">http://mark.ossdl.de/?p=431</guid>
		<description><![CDATA[
This is how I installed Gentoo on the SheevaPlug: 
First I&#8217;ve made some preparations to decrease overall installation time:

Setup a cross-compiling suite for the SheevaPlug.
You can compile the Linux kernel parallel to installing GNU/Gentoo.
Get an USB drive or SD flash card.
Although the Linux kernel will be written to flash we will install Gentoo on that [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-436" src="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/09/gentoo-on-the-sheevaplug.png" alt="" width="560" height="104" /></p>
<p>This is how I installed <strong>Gentoo on the SheevaPlug</strong>: <span id="more-431"></span></p>
<p>First I&#8217;ve made some preparations to decrease overall installation time:</p>
<ul>
<li><a href="http://mark.ossdl.de/2009/09/cross-compiling-for-the-sheevaplug-kernel-distcc/">Setup a cross-compiling suite for the SheevaPlug.</a><br />
You can compile the Linux kernel parallel to installing GNU/Gentoo.</li>
<li>Get an <strong>USB drive or SD flash card</strong>.<br />
Although the Linux kernel will be written to flash we will install Gentoo on that external device.<br />
Of course you could <strong>install the latter on flash, too</strong>. Just stop following the instructions when it says &#8220;eix-sync&#8221; or &#8220;emerge &#8211;sync&#8221; and use /dev/mtdblock2 (jffs2 filesystem, though) where it says /dev/sda2.<br />
Applies analogously to SD card installation.</li>
<li>Make sure you can <a href="http://mark.ossdl.de/2009/09/network-booting-linux-on-the-sheevaplug/">network boot the SheevaPlug</a>.<br />
You could boot the pre-installed Debian and even skip compiling a new kernel, though.</li>
</ul>
<h4>Step 0: boot an installation system</h4>
<p>Either boot the pre-installed Linux or network boot the SheevaPlug. I have done the latter.</p>
<p>Make sure you have access to the internet and <code>/dev/null</code> is writable by all:</p>
<pre class="brush: bash"># if eth0 doesn't work, try eth1
ifconfig eth0 192.168.1.13 up
# check whether the nameserver is correct
nano /etc/resolv.conf
# provide the IP of your router
route add default gw 192.168.1.1
chmod a+rw /dev/null</pre>
<h4>Step 1: prepare the destination medium</h4>
<p>x means press Enter, leave out what is behind the octothorpe (#):</p>
<pre class="brush: bash">fdisk /dev/sda
p
d
n 1 x +2GB   # /dev/sda1, SWAP
n 2 x +8GB   # /dev/sda2, ROOT
n 3 x +300MB # /dev/sda3, LOG
n 4 x x      # /dev/sda4, PORTAGE
t 1 85       # SWAP
a 2          # BOOT
w

mkswap /dev/sda1
swapon /dev/sda1

mkfs.ext3 -L ROOT /dev/sda2
mkfs.ext3 -L LOG /dev/sda3
mkfs.ext2 -j -N 2000000 -L PORTAGE /dev/sda4</pre>
<h4>Step 2: extract a Gentoo tarball</h4>
<p>You can find <strong>Gentoo tarballs with a basic system</strong> (called stage 3) at the <a href="http://www.gentoo.org/main/en/mirrors2.xml">Gentoo mirrors&#8217; page</a>, descending into <code>releases/arm/current-stage3/armv5tel-softfloat-linux-gnueabi/</code> e.g. <a href="http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/releases/arm/current-stage3/armv5tel-softfloat-linux-gnueabi/">here</a> or <a href="http://de-mirror.org/distro/gentoo/releases/arm/current-stage3/armv5tel-softfloat-linux-gnueabi/">there</a>. Select a tarball, copy its link.</p>
<pre class="brush: bash">mount /dev/sda2 /mnt/gentoo
cd /mnt/gentoo
wget -O - http://...the-link.../stage3-armv5tel-20090726.tar.bz2 | tar -xjp</pre>
<p>This will extract the tarball immediately, i.e. as it gets downloaded <strong>without storing it on the plug</strong>.</p>
<h4>Step 3: chroot into Gentoo</h4>
<p>Create folders for the remaining partitions (<em>sda1</em> is <strong>swap</strong>, <em>sda2</em> is <strong>root</strong>!) and insert their list into <code>/etc/fstab</code>:</p>
<pre class="brush: bash">mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
mount /dev/sda3 /mnt/gentoo/var/log
mkdir -p /mnt/gentoo/usr/portage
mount /dev/sda4 /mnt/gentoo/usr/portage
mkdir -p /mnt/gentoo/var/tmp
mount --bind /tmp /mnt/gentoo/var/tmp
mount --bind /tmp /mnt/gentoo/tmp

cp -L /etc/resolv.conf /mnt/gentoo/etc/

chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"

nano /etc/fstab</pre>
<p>You can see <a href="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/09/fstab">my fstab here</a>.<br />
After that we will select profile, the languages our system will run and chose <strong>suitable compile settings</strong> for the architecture:</p>
<pre class="brush: bash">cd /etc
ln -snf ../usr/portage/profiles/default/linux/arm/2008.0 /etc/make.profile
nano locale.gen

ln -s portage/make.conf
nano make.conf</pre>
<p>Here you can download my <a href="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/09/locale.gen">locale.gen</a> and <a href="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/09/make.conf">make.conf</a>. Just remember to <strong>remove feature distcc</strong> because we have <strong>not installed it yet</strong>.</p>
<h4>Step 4: kernel and preparations for first boot</h4>
<p>You should <strong>have already compiled an kernel by now</strong>. See <a href="http://mark.ossdl.de/2009/09/cross-compiling-for-the-sheevaplug-kernel-distcc/">this post</a> for configuration file and how to do it. Of course, you could use the pre-installed kernel, but I have not tested whether that will work.<br />
Compile and <strong>copy the Linux kernel as described</strong> to your SheevaPlug.</p>
<p>Unless you like the serial console, have<strong> SSH be run on system startup</strong>. Don&#8217;t forget to set a root password:</p>
<pre class="brush: bash">passwd
rc-update add sshd default
nano /etc/conf.d/local.start

nano -w /etc/inittab
# (Uncomment the line and change 9600 with 115200)
s0:12345:respawn:/sbin/agetty 115200 ttyS0 vt100
# (remove all conventional TTYs)

nano -w /etc/conf.d/hostname
cp /usr/share/zoneinfo/Europe/Berlin localtime</pre>
<h4>Step 5: fetch ebuilds and packages</h4>
<p>If you installed Gentoo on the system flash and if you have no dedicated device for portage, skip this step. You will have to install a DHCP client by hand or configure static IP. <strong>Else</strong>:</p>
<pre class="brush: bash">emerge --oneshot eix
eix-update
eix -cI
emerge udhcp
nano /etc/conf.d/net
# ...
cd /etc/init.d
ln -s net.lo net.eth1</pre>
<p>See my <a href="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/09/net">net</a> file. Remember to <strong>replace 192.168.1.2 by your nameserver</strong> in case it didn&#8217;t already get provided by DHCP.<br />
<strong>On some SheevaPlugs &#8211; even of the same revision &#8211; <em>eth0</em> is <em>eth1</em></strong>, therefore I make that additional softlink.</p>
<p>I tend to grab the <strong>portage overlays</strong> from my workstation. But you can also skip this:</p>
<pre class="brush: bash">mkdir -p /usr/local/overlays
cd /usr/local/overlays
rsync -azuv -e ssh 192.168.1.6://usr/local/overlays/* /usr/local/overlays/</pre>
<h4>Step 6: exit chroot environment and restart the SheevaPlug</h4>
<pre class="brush: bash">exit
cd /
umount /mnt/gentoo/usr/portage
umount /mnt/gentoo/var/log
umount /mnt/gentoo/var/tmp
umount /mnt/gentoo/tmp
umount /mnt/gentoo/proc
umount /mnt/gentoo/dev
umount /mnt/gentoo
exit</pre>
<h4>Step 7: set boot parameters</h4>
<p>You&#8217;re almost done. The last thing is to <strong>tell the SheevaPlug to boot Linux</strong> and the latter to use the correct root device. Therefore reset (or <code>shutdown -r now</code>) your plug and get into the u-boot shell:</p>
<pre class="brush: bash">setenv bootcmd usb start\;nand read 0x01000000 0x00100000 0x00400000\;setenv bootargs $(console) root=/dev/sda2 rootdelay=10\; bootm 0x01000000
saveenv
reset</pre>
<p>Keep yor fingers crossed. Linux <strong>kernel should boot into GNU/Gentoo</strong> on <code>/dev/sda2</code> (or your SD card, if you changed <code>/dev/sda</code>; or the vintage Debian if you changed it into <code>/dev/mtdblock2</code>).</p>
<p>Now you could <strong>install distcc</strong> for <a href="http://mark.ossdl.de/2009/09/cross-compiling-for-the-sheevaplug-kernel-distcc/">distributed cross-compiling</a> and <a href="http://www.gentoo.org/doc/en/handbook/">customize your Gentoo Linux</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://mark.ossdl.de/2009/09/gentoo-on-the-sheevaplug/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://mark.ossdl.de/2009/09/gentoo-on-the-sheevaplug/</feedburner:origLink></item>
		<item>
		<title>network booting Linux on the SheevaPlug</title>
		<link>http://feedproxy.google.com/~r/ossdl/mark/~3/ltyq_jpO_74/</link>
		<comments>http://mark.ossdl.de/2009/09/network-booting-linux-on-the-sheevaplug/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 03:11:53 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[SheevaPlug]]></category>

		<guid isPermaLink="false">http://mark.ossdl.de/?p=423</guid>
		<description><![CDATA[In case something goes horribly wrong or if you want install a new Linux kernel on your SheevaPlug it is handy to network boot it. The Gentoo documentation assumes you can install tftp-hpa under Linux, but I have Windows and TFTPd32 &#8211; which is no problem for the task at hand.
First of all, please see [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-427" src="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/09/kitten-bites-cable-150x150.jpg" alt="" width="150" height="150" />In case something goes horribly wrong or if you want install a new Linux kernel on your <strong>SheevaPlug</strong> it is handy to <strong>network boot</strong> it. The <a href="http://dev.gentoo.org/~armin76/arm/sheevaplug/install.xml">Gentoo documentation</a> assumes you can install tftp-hpa under Linux, but I have <strong>Windows and TFTPd32</strong> &#8211; which is <strong>no problem</strong> for the task at hand.</p>
<p>First of all, please see a former blog of mine <a href="http://mark.ossdl.de/2009/05/tftpd32-and-dhcp-server-windows-deployment-services-without-wds/">how to configure TFTPd32</a>. Most noticeably how to do so and still leaving your DHCP configuration (e.g. that of your router&#8217;s) in place. <span id="more-423"></span></p>
<p>Copy <a href="http://dev.gentoo.org/~armin76/arm/sheevaplug/install/uImage_kwplug">uImage_kwplug</a> (<a href="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/09/uImage_kwplug">mirror copy</a>) or any other <strong>kernel uImage</strong> to TFTPd&#8217;s <code>/boot</code> directory, as well as <a href="http://dev.gentoo.org/~armin76/arm/sheevaplug/install/sheevaplug.initramfs">sheevaplug.initramfs</a> (<a href="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/09/sheevaplug.initramfs">mirror copy</a>).</p>
<p>Then,</p>
<ol>
<li>Plug in the <strong>serial/USB converter</strong> cable.</li>
<li><strong>Reset</strong> your SheevaPlug.</li>
<li>Run <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">PuTTY</a>, select <code>COM5</code> at <code>115200</code> connection speed.</li>
<li>Hit any key when the countdown appears:
<pre class="brush: text">USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  1</pre>
<p>(If it doesn&#8217;t, reset the SheevaPlug with cables attached.)</li>
</ol>
<p>Now you&#8217;re in the <a href="http://sourceforge.net/projects/u-boot/">Das U-Boot bootloader</a> shell. For the fun of it we will <strong>update that bootloader</strong> by a version with SD-card support. <a href="http://www.cyrius.com/debian/kirkwood/sheevaplug/unpack.html#uboot">Download it here</a> (<a href="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/09/u-boot.bin">mirror</a>) to TFTPd32&#8217;s root folder:</p>
<pre class="brush: bash">setenv ipaddr 192.168.1.13 (replace with the IP you want the plug to have)
setenv serverip 192.168.1.2 (replace with the TFTP server IP)
bubt u-boot.bin
reset</pre>
<p>You can leave out the <em>bubt</em> command if you want skip updating.</p>
<p>After that procedure and a last reset enter this to <strong>restore settings for Linux</strong>:</p>
<pre class="brush: bash">setenv ipaddr 192.168.1.13
setenv serverip 192.168.1.2
setenv arcNumber 2097
setenv mainlineLinux yes
saveenv
reset</pre>
<p>Now <strong>the network booting</strong>:</p>
<pre class="brush: bash">tftpboot 0x8000000 boot/sheevaplug.initramfs
tftpboot 0x2000000 boot/uImage_kwplug
setenv bootargs console=ttyS0,115200 root=/dev/ram rw
bootm 0x2000000 0x8000000</pre>
<p>Linux kernel will load and you will find yourself at another shell. This time it will be the usual shell, with <code>/dev</code> folder, <code>mkfs.ext2</code> and <code>mount</code> commands. Have fun experimenting!</p>
]]></content:encoded>
			<wfw:commentRss>http://mark.ossdl.de/2009/09/network-booting-linux-on-the-sheevaplug/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://mark.ossdl.de/2009/09/network-booting-linux-on-the-sheevaplug/</feedburner:origLink></item>
		<item>
		<title>cross-compiling for the SheevaPlug (kernel, distcc)</title>
		<link>http://feedproxy.google.com/~r/ossdl/mark/~3/cVwvgbQ1hQc/</link>
		<comments>http://mark.ossdl.de/2009/09/cross-compiling-for-the-sheevaplug-kernel-distcc/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 18:47:14 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[SheevaPlug]]></category>

		<guid isPermaLink="false">http://mark.ossdl.de/?p=415</guid>
		<description><![CDATA[
Compiling on the SheevaPlug can take long but is not neccessary if you have already your desktop pc running (which will be referred to as &#8220;workstation&#8221;). Unfortunately it will most probably not being run by an ARM processor, therefore you have cross-compile for the plug.
In this post I describe how to install a recent GCC [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-416" src="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/09/cross-compiling-illustration.jpg" alt="" width="560" height="147" /></p>
<p><strong>Compiling on the SheevaPlug</strong> can take long but is not neccessary if you have already your desktop pc running (which will be referred to as &#8220;workstation&#8221;). Unfortunately it will most probably not being run by an ARM processor, therefore you have cross-compile for the plug.</p>
<p>In this post I describe <strong>how to install a recent GCC version for cross-compiling</strong>, how to <strong>compile the latest kernel for the plug</strong> and how to enable <strong>distributed cross-compiling</strong>. By the latter you invoke compiling commands on the SheevaPlug and they will be executed by another machine transparently. <span id="more-415"></span></p>
<p>My workstation runs <strong>Gentoo Linux</strong> and listens on <strong>192.168.1.6</strong>; the SheevaPlug runs Gentoo, too. By command emerge packages are installed, therefore if you used Debian you have to replace that call by apt-get and find out appropriate package names.</p>
<p>Install <strong>crossdev and setup a cross-compiling suite</strong> for the <code>armv5tel-softfloat-linux-gnueabi</code> architecture, which powers the SheevaPlug:</p>
<pre class="brush: bash">emerge portage-utils crossdev dev-embedded/u-boot-tools
crossdev armv5tel-softfloat-linux-gnueabi</pre>
<p>This will take long as the latest GCC, binutils and the such will be compiled from scratch for the SheevaPlug.</p>
<ol>
<li>After having done that <strong>fetch kernel sources and review the default configuration</strong> for the plug shipped with it:
<pre class="brush: bash">emerge --oneshot >=sys-kernel/gentoo-sources-2.6.31
# or >=sys-kernel/vanilla-sources-2.6.31
cd /usr/src/linux
make ARCH=arm kirkwood_defconfig menuconfig</pre>
<p>Starting from Linux 2.6.31 all patches for the SheevaPlug are included in the main tree, therefore you can virtually use every kernel flavour since that.</li>
<li>In a hurry? You can download <a href="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/09/config-2.6.31-gentoo-mark.gz">my kernel configuration file here</a>.</li>
<li>After configuration you will have to <strong>compile the kernel into an uImage</strong>:
<pre class="brush: bash">make -j4 ARCH=arm CROSS_COMPILE=armv5tel-softfloat-linux-gnueabi- uImage</pre>
</li>
<li>If you enabled dynamic module loading, you will have to <strong>compile modules</strong> as well. I did it, so here are the commands:
<pre class="brush: bash">make -j4 ARCH=arm CROSS_COMPILE=armv5tel-softfloat-linux-gnueabi- modules
make -j4 ARCH=arm CROSS_COMPILE=armv5tel-softfloat-linux-gnueabi- INSTALL_MOD_PATH=.. modules_install</pre>
<p>It is very important to set <code>INSTALL_MOD_PATH</code>, or modules will be installed at your workstation. We want them in a separate folder for they will be copied to where they belong &#8211; the SheevaPlug.</li>
</ol>
<p>The kernel should be compiled by now. Therefore <strong>log into your SheevaPlug and copy</strong> kernel and modules to it:</p>
<pre class="brush: bash">scp 192.168.1.6://usr/src/linux-2.6.31-gentoo/arch/arm/boot/uImage /boot/uImage-2.6.31-gentoo-mark
rsync -azuv -e ssh 192.168.1.6://usr/src/lib/modules /lib/
cat /boot/uImage-2.6.31-gentoo-mark > /dev/mtdblock1</pre>
<p>The latter command will write the new kernel into the plug&#8217;s flash. You could leave that command out and have the kernel loaded from SD card or external USB drive, but it supports more USB devices (such as hubs) than your plug&#8217;s booting system. Consequently <strong>loading it from flash means less trouble</strong> in future.</p>
<p><strong>Reboot</strong> your plug, smile. Cross-compiling has not been that hard. For your convenience, here&#8217;s <a href="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/09/sheevaplug-linux-2.6.31-gentoo-mark.tbz2">my compiled kernel and modules for download</a>. It includes <strong>iptables and samba</strong> support.</p>
<hr />
<p>Setting up <strong>distributed cross-compiling</strong> is even easier. Do this on your <strong>workstation</strong>:</p>
<pre class="brush: bash">emerge distcc
nano /etc/conf.d/distccd
# add allow=192.168.1.0/24
nano /etc/distcc/hosts
# add localhost, don't add the sheevaplug! no work shall be distributed to it
/etc/init.d/distccd start
rc-update add distccd default</pre>
<p><strong>That&#8217;s all</strong> for the workstation. We will make sure armv5tel-softfloat-linux-gnueabi-gcc and the such will be selected automatically.</p>
<ol>
<li>Repeat the above step <strong>on the SheevaPlug</strong>:
<pre class="brush: bash">emerge distcc
# last time we will compile something on the plug alone
nano /etc/conf.d/distccd
# same subnet, same allow string
nano /etc/distcc/hosts
# 192.168.1.6/4,lzo -- don't specify localhost here! everything shall be delegated
/etc/init.d/distccd start
rc-update add distccd default</pre>
<p>But wait, that&#8217;s not all or calls of gcc will be executed by the wrong compiler on your workstation.</li>
<li>We have redirect that calls by a <strong>wrapper script</strong> (copied from <a href="http://www.gentoo.org/doc/en/cross-compiling-distcc.xml" target="_blank">this manual</a>):
<pre class="brush: bash">cd /usr/lib/distcc/bin
nano /usr/lib/distcc/bin/arch-wrapper
    #!/bin/bash
    exec /usr/lib/distcc/bin/armv5tel-softfloat-linux-gnueabi-g${0:$[-2]} "$@"</pre>
</li>
<li>Now come the symlinks:
<pre class="brush: bash">chmod a+x /usr/lib/distcc/bin/arch-wrapper
ln -sf arch-wrapper c++
ln -sf arch-wrapper cc
ln -sf arch-wrapper gcc
ln -sf arch-wrapper g++</pre>
</li>
</ol>
<p>Voila! Compiling will happen at your workstation, <strong>even if you invoked emerge</strong> on the plug.<br />
Just make sure workstation and SheevaPlug use the <strong>same GCC version</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mark.ossdl.de/2009/09/cross-compiling-for-the-sheevaplug-kernel-distcc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://mark.ossdl.de/2009/09/cross-compiling-for-the-sheevaplug-kernel-distcc/</feedburner:origLink></item>
		<item>
		<title>nginx on SheevaPlug</title>
		<link>http://feedproxy.google.com/~r/ossdl/mark/~3/pls71smgEsc/</link>
		<comments>http://mark.ossdl.de/2009/09/nginx-on-sheevaplug/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 17:06:46 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[SheevaPlug]]></category>

		<guid isPermaLink="false">http://mark.ossdl.de/?p=411</guid>
		<description><![CDATA[
*Update: patch to support libatomic-ops for increased performance and no segfaults *
Last Friday, after about a week of order processing and five days in shipping, my SheevaPlug has arrived in Germany. It is revision 1.2 and came pre-installed with Kernel 2.6.30-rc5 and Debian &#8211; which surprised me as many sites made me expect Ubuntu.
Nevertheless, I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/09/SheevaPlug_with_external_drive_enclosure.jpg"><img class="alignnone size-full wp-image-412" title="SheevaPlug illustration" src="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/09/SheevaPlug_illustration.jpg" alt="SheevaPlug illustration" width="560" height="142" /></a></p>
<p><strong>*Update: patch to support libatomic-ops for increased performance and no segfaults *</strong></p>
<p>Last Friday, after about a week of order processing and five days in shipping, my <a href="http://www.marvell.com/products/embedded_processors/developer/kirkwood/sheevaplug.jsp">SheevaPlug</a> has arrived in Germany. It is revision 1.2 and came pre-installed with <strong>Kernel 2.6.30-rc5 and Debian</strong> &#8211; which surprised me as many sites made me expect Ubuntu.</p>
<p>Nevertheless, I have already installed Gentoo on it preserving that Debian as rescue system. But before having done that I have <strong>installed Nginx on the SheevaPlug</strong>. And this is how: <span id="more-411"></span></p>
<ol>
<li>Boot the SheevaPlug as usual, and log in as <code>root</code> (default password is <code>nosoup4u</code>).</li>
<li>Better set the current date and time correctly:
<pre class="brush: bash">ntpdate 130.75.1.32</pre>
</li>
<li>Mount /tmp into RAM. No need to download archives onto the flash and increase wear:
<pre class="brush: bash">nano /etc/fstab
# shm /tmp tmpfs defaults,noatime,nosuid 0 0
# ctrl+x, y
mount /tmp</pre>
</li>
<li>Check whether your nameservers are setup correctly. The pre-installed DHCP client didn&#8217;t set this for me, so I had to do that by hand:
<pre class="brush: bash">nano /etc/resolv.conf
# nameserver 192.168.1.1 -- most probably your router's IP
# ctrl+x, y</pre>
</li>
</ol>
<p>After these prerequisities you can finally compile Nginx:</p>
<ol>
<li>Install the bare minimum for compiling Nginx:
<pre class="brush: bash">apt-get install \
    gcc openssl libssl-dev make automake libpcre3 libpcre3-dev \
    libatomic-ops-dev</pre>
</li>
<li>Get and extract Nginx:
<pre class="brush: bash">cd /tmp
wget http://sysoev.ru/nginx/nginx-0.8.20.tar.gz -O - \
| tar -xz
cd nginx*</pre>
</li>
<li>Download the patch to support atomic operations on ARM: <a href="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/09/nginx-libatomic.patch">nginx-libatomic patch</a>
<pre class="brush: bash">patch -p1 --input=nginx-libatomic.patch</pre>
</li>
<li>Compile Nginx as follows for all paths and the users be set correctly:
<pre class="brush: bash">./configure \
    --pid-path=/var/run/nginx.pid \
    --conf-path=/etc/nginx/nginx.conf \
    --lock-path=/dev/shm \
    --prefix=/usr --user=www-data --group=www-data \
    --http-client-body-temp-path=/tmp \
    --http-proxy-temp-path=/tmp \
    --http-fastcgi-temp-path=/tmp \
    --with-md5-asm --with-sha1-asm \
    --http-log-path=/var/log/nginx/access.log \
    --error-log-path=/var/log/nginx/error.log \
    --with-http_ssl_module --with-http_realip_module \
    --with-libatomic \
    &amp;&amp; make \
    &amp;&amp; make install</pre>
</li>
</ol>
<p>You can get an <a href="http://snipplr.com/view/6125/ubuntudebian-nginx-initd-script/">init script here</a>. Remember to strip the <code>/local</code> from paths as nginx will be in <code>/usr/sbin/nginx</code>.</p>
<p>I have run <code>ab -c 5 -n 5000</code> <span style="text-decoration: line-through;">from another machine</span> to see how many requests the SheevaPlug can serve. It is <strong>about <span style="text-decoration: line-through;">280</span> 1350 requests per second</strong>, with an average serving time of <span style="text-decoration: line-through;">3.5ms</span><strong>0.8ms</strong>. That&#8217;s sufficiently enough for a personal home server.</p>
]]></content:encoded>
			<wfw:commentRss>http://mark.ossdl.de/2009/09/nginx-on-sheevaplug/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://mark.ossdl.de/2009/09/nginx-on-sheevaplug/</feedburner:origLink></item>
		<item>
		<title>why RewriteRules are contraproductive in decreasing load on your server</title>
		<link>http://feedproxy.google.com/~r/ossdl/mark/~3/hp_9Z8ym_dM/</link>
		<comments>http://mark.ossdl.de/2009/09/why-rewriterules-are-contraproductive-in-decreasing-load-on-your-server/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 15:42:07 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[CDN]]></category>
		<category><![CDATA[systems architecture]]></category>

		<guid isPermaLink="false">http://mark.ossdl.de/?p=402</guid>
		<description><![CDATA[The problem with RewriteRules and redirects is, that although you save bandwidth because files will be served from CDN, your server will still have to face all requests.
And Every one will result in another request &#8211; this time to CDN. In terms of latency you add yours to CDNs and even lose keep-alive transfers. I.e., [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_406" class="wp-caption alignnone" style="width: 551px"><img class="size-full wp-image-406" title="latency-with-redirects-compared" src="http://mark.cdn1.ossdl.de/wp-content/uploads/2009/09/latency-with-redirects-compared1.png" alt="latency-with-redirects-compared" width="541" height="136" /><p class="wp-caption-text">latency compared</p></div>
<p>The problem with <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule">RewriteRules</a> and <a href="http://blog.mudy.info/2009/02/i-wrote-a-wp-plugin/#comment-560">redirects</a> is, that although you save bandwidth because files will be served from CDN, <strong>your server will still have to face all requests</strong>.</p>
<p>And Every one will result in another request &#8211; this time to CDN. In terms of <strong>latency you add yours to CDNs</strong> and even <strong>lose keep-alive</strong> transfers. I.e., the browser won&#8217;t be able to combine several requests into a single HTTP connection.</p>
<p>The solution is to rewrite all the links at your blog or application so that they point directly to CDN omitting your server.</p>
]]></content:encoded>
			<wfw:commentRss>http://mark.ossdl.de/2009/09/why-rewriterules-are-contraproductive-in-decreasing-load-on-your-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://mark.ossdl.de/2009/09/why-rewriterules-are-contraproductive-in-decreasing-load-on-your-server/</feedburner:origLink></item>
	</channel>
</rss>
