<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>/contrib/famzah &#187; Bifferboard</title>
	<atom:link href="http://blog.famzah.net/category/bifferboard/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.famzah.net</link>
	<description>Enthusiasm never stops</description>
	<lastBuildDate>Tue, 07 Sep 2010 11:33:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.famzah.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/927def57f5a97d59e700bb7603b9a1f8?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>/contrib/famzah &#187; Bifferboard</title>
		<link>http://blog.famzah.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.famzah.net/osd.xml" title="/contrib/famzah" />
	<atom:link rel='hub' href='http://blog.famzah.net/?pushpress=hub'/>
		<item>
		<title>USB: rejected 1 configuration due to insufficient available bus power</title>
		<link>http://blog.famzah.net/2010/08/11/usb-rejected-1-configuration-due-to-insufficient-available-bus-power/</link>
		<comments>http://blog.famzah.net/2010/08/11/usb-rejected-1-configuration-due-to-insufficient-available-bus-power/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 09:10:10 +0000</pubDate>
		<dc:creator>Ivan Zahariev</dc:creator>
				<category><![CDATA[Bifferboard]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[usb external power]]></category>

		<guid isPermaLink="false">http://blog.famzah.net/?p=851</guid>
		<description><![CDATA[If your USB device is not being recognized, execute the command &#8220;dmesg&#8221; and check if the following output is there: usb 1-1.4: rejected 1 configuration due to insufficient available bus power The &#8220;1-1.4&#8243; ID may be different for your configuration. If, and only if, you are absolutely sure that your USB hub and/or hardware configuration [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=851&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If your USB device is not being recognized, execute the command &#8220;<a href="http://en.wikipedia.org/wiki/Dmesg">dmesg</a>&#8221; and check if the following output is there:</p>
<blockquote><p>usb 1-1.4: rejected 1 configuration due to insufficient available bus power</p></blockquote>
<p>The &#8220;1-1.4&#8243; ID may be different for your configuration.</p>
<p>If, and only if, you are absolutely sure that your USB hub and/or hardware configuration have a safe way to actually supply enough power, you can override this barrier and force the device to be activated despite of the error message. A possible situation is where you manually applied 5V external power on your USB device and/or USB hub, like I did on my <a href="http://bifferos.bizhat.com/">Bifferboard</a>.</p>
<p>Here is how you can override the power safety mechanism:</p>
<blockquote><p>echo 1 &gt; /sys/bus/usb/devices/1-1.4/bConfigurationValue</p></blockquote>
<p>Replace &#8220;1-1.4&#8243; with your USB device ID. Be careful and have fun!</p>
<hr />
<p>Resources:</p>
<ul>
<li><a href="http://rt2x00.serialmonkey.com/phpBB/viewtopic.php?f=5&amp;t=5459">Error insufficient available bus power RT2573</a>.</li>
</ul>
<br />Filed under: <a href='http://blog.famzah.net/category/bifferboard/'>Bifferboard</a>, <a href='http://blog.famzah.net/category/hardware/'>Hardware</a>, <a href='http://blog.famzah.net/category/linux/'>Linux</a> Tagged: <a href='http://blog.famzah.net/tag/linux/'>Linux</a>, <a href='http://blog.famzah.net/tag/usb/'>usb</a>, <a href='http://blog.famzah.net/tag/usb-external-power/'>usb external power</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/famzah.wordpress.com/851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/famzah.wordpress.com/851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/famzah.wordpress.com/851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/famzah.wordpress.com/851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/famzah.wordpress.com/851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/famzah.wordpress.com/851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/famzah.wordpress.com/851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/famzah.wordpress.com/851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/famzah.wordpress.com/851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/famzah.wordpress.com/851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/famzah.wordpress.com/851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/famzah.wordpress.com/851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/famzah.wordpress.com/851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/famzah.wordpress.com/851/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=851&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.famzah.net/2010/08/11/usb-rejected-1-configuration-due-to-insufficient-available-bus-power/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e354dbace6659e6cfc6ec6f01d7d962d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">famzah</media:title>
		</media:content>
	</item>
		<item>
		<title>Secure NAS on Bifferboard running Debian</title>
		<link>http://blog.famzah.net/2010/08/08/secure-nas-on-bifferboard-running-debian/</link>
		<comments>http://blog.famzah.net/2010/08/08/secure-nas-on-bifferboard-running-debian/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 12:39:06 +0000</pubDate>
		<dc:creator>Ivan Zahariev</dc:creator>
				<category><![CDATA[Bifferboard]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[nas]]></category>
		<category><![CDATA[NFS over SSH]]></category>
		<category><![CDATA[rsnapshot]]></category>

		<guid isPermaLink="false">http://blog.famzah.net/?p=841</guid>
		<description><![CDATA[This NAS solution uses OpenSSH for secure transport over a TCP connection, and NFS to mount the volume on your local computer. The hardware of the NAS server is the low-cost Bifferboard. I&#8217;m using an external hard disk via USB which is partitioned in two parts &#8211; /dev/sda1 (1GB) and the rest in /dev/sda2. Once [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=841&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This <a href="http://en.wikipedia.org/wiki/Network-attached_storage">NAS</a> solution uses <a href="http://www.openssh.com/">OpenSSH</a> for secure transport over a TCP connection, and <a href="http://en.wikipedia.org/wiki/Network_File_System_%28protocol%29">NFS</a> to mount the volume on your local computer. The hardware of the NAS server is the low-cost <a href="http://bifferos.bizhat.com/">Bifferboard</a>.</p>
<p>I&#8217;m using an external hard disk via USB which is partitioned in two parts &#8211; /dev/sda1 (1GB) and the rest in /dev/sda2. Once you have installed <a href="http://blog.famzah.net/2009/11/20/running-debian-on-bifferboard/">Debian on Bifferboard</a>, here are the commands which further transform your Bifferboard into a secure NAS:</p>
<pre class="brush: bash;">
apt-get update
apt-get -y install nfs-kernel-server

vi /etc/default/nfs-common
  # update: STATDOPTS='--port 2231'
vi /etc/default/nfs-kernel-server
  # update: RPCMOUNTDOPTS='-p 2233'

mkdir -m 700 /root/.ssh
  # add your public key for &quot;root&quot; in /root/.ssh/authorized_keys

echo '/mnt/storage 127.0.0.1(rw,no_root_squash,no_subtree_check,insecure)' &gt;&gt; /etc/exports
mkdir /mnt/storage
chattr +i /mnt/storage # so that we don't accidentally write there without a mounted volume

cat &gt; /etc/rc.local &lt;&lt;EOF
#!/bin/bash

# allow only SSH access via the network
/sbin/iptables -P FORWARD DROP
/sbin/iptables -P INPUT DROP
/sbin/iptables -A INPUT -i lo -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 22 -j ACCEPT
/sbin/iptables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT # TCP initiated by server
/sbin/iptables -A INPUT -p udp -m state --state ESTABLISHED -j ACCEPT # DNS traffic

# mount the storage volume here, so that any errors with it don't interfere with the system startup
/bin/mount /dev/sda2 /mnt/storage
/etc/init.d/nfs-kernel-server restart
EOF

# allow only public key authentication
fgrep -i -v PasswordAuthentication /etc/ssh/sshd_config &gt; /tmp/sshd_config &amp;&amp; \
  mv -f /tmp/sshd_config /etc/ssh/sshd_config &amp;&amp; \
  echo 'PasswordAuthentication no' &gt;&gt; /etc/ssh/sshd_config

reboot
</pre>
<p>There are two things you should consider with this setup:</p>
<ol>
<li>You must trust the &#8220;root&#8221; user who mounts the directory! They have full shell access to your NAS.</li>
<li>A not-so-strong SSH encryption cipher is used, in order to improve the <a href="http://blog.famzah.net/2010/06/11/openssh-ciphers-performance-benchmark/">performance of the SSH transfer</a>.</li>
</ol>
<p>On the machine which is being backed up, I use the following script which mounts the NAS volume, starts the <a href="http://www.rsnapshot.org/">rsnapshot</a> backup process and finally unmounts the NAS volume:</p>
<pre class="brush: bash;">
#!/bin/bash
set -u

HOST='192.168.100.102'
REMOTEPORT='22'
REMOTEDIR='/mnt/storage'
LOCALDIR='/mnt/storage'
SSHKEY='/home/famzah/.ssh/id_rsa-home-backups'

echo &quot;Mounting NFS volume on $HOST:$REMOTEPORT (SSH-key='$SSHKEY').&quot;
N=0
for port in 2049 2233 ; do
	N=$(($N + 1))
	LPORT=$((61000 + $N))
	ssh -f -i &quot;$SSHKEY&quot; -c arcfour128 -L 127.0.0.1:&quot;$LPORT&quot;:127.0.0.1:&quot;$port&quot; -p &quot;$REMOTEPORT&quot; &quot;root@$HOST&quot; sleep 600d
	echo &quot;Forwarding: $HOST: Local port: $LPORT -&gt; Remote port: $port&quot;
done
sudo mount -t nfs -o nfsvers=2,proto=tcp,rsize=8192,wsize=8192,intr,rw,bg,port=61001,mountport=61002 &quot;127.0.0.1:$REMOTEDIR&quot; &quot;$LOCALDIR&quot;

echo &quot;Doing backup.&quot;
time sudo /usr/bin/rsnapshot weekly

echo &quot;Unmounting NFS volume and closing SSH tunnels.&quot;
sudo umount &quot;$LOCALDIR&quot;
for pid in $(ps axuww|grep ssh|grep 6100|grep arcfour|grep -v grep|awk '{print $2}') ; do
	kill &quot;$pid&quot; # possibly dangerous...
done
</pre>
<hr />
<p>Resources:</p>
<ul>
<li><a href="http://www.howtoforge.com/nfs_ssh_tunneling">Tunneling NFS over SSH &laquo; HowtoForge</a>.</li>
</ul>
<br />Filed under: <a href='http://blog.famzah.net/category/bifferboard/'>Bifferboard</a>, <a href='http://blog.famzah.net/category/linux/'>Linux</a> Tagged: <a href='http://blog.famzah.net/tag/bifferboard/'>Bifferboard</a>, <a href='http://blog.famzah.net/tag/debian/'>debian</a>, <a href='http://blog.famzah.net/tag/nas/'>nas</a>, <a href='http://blog.famzah.net/tag/nfs-over-ssh/'>NFS over SSH</a>, <a href='http://blog.famzah.net/tag/openssh/'>openssh</a>, <a href='http://blog.famzah.net/tag/rsnapshot/'>rsnapshot</a>, <a href='http://blog.famzah.net/tag/ssh/'>ssh</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/famzah.wordpress.com/841/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/famzah.wordpress.com/841/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/famzah.wordpress.com/841/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/famzah.wordpress.com/841/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/famzah.wordpress.com/841/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/famzah.wordpress.com/841/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/famzah.wordpress.com/841/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/famzah.wordpress.com/841/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/famzah.wordpress.com/841/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/famzah.wordpress.com/841/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/famzah.wordpress.com/841/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/famzah.wordpress.com/841/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/famzah.wordpress.com/841/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/famzah.wordpress.com/841/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=841&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.famzah.net/2010/08/08/secure-nas-on-bifferboard-running-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e354dbace6659e6cfc6ec6f01d7d962d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">famzah</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenSSH ciphers performance benchmark</title>
		<link>http://blog.famzah.net/2010/06/11/openssh-ciphers-performance-benchmark/</link>
		<comments>http://blog.famzah.net/2010/06/11/openssh-ciphers-performance-benchmark/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 07:58:07 +0000</pubDate>
		<dc:creator>Ivan Zahariev</dc:creator>
				<category><![CDATA[Bifferboard]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[openssh]]></category>

		<guid isPermaLink="false">http://blog.famzah.net/?p=701</guid>
		<description><![CDATA[Ever wondered how to save some CPU cycles on a very busy or slow x86 system when it comes to SSH/SCP transfers? Here is how we performed the benchmarks, in order to answer the above question: 41 MB test file with random data, which cannot be compressed &#8211; GZip makes it only 1% smaller. A [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=701&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ever wondered how to save some CPU cycles on a very busy or slow <a href="http://en.wikipedia.org/wiki/X86">x86</a> system when it comes to SSH/SCP transfers?</p>
<p>Here is how we performed the benchmarks, in order to answer the above question:</p>
<ul>
<li>41 MB test file with random data, which cannot be compressed &#8211; <a href="http://en.wikipedia.org/wiki/Gzip">GZip</a> makes it only 1% smaller.</li>
<li>A slow enough system &#8211; <a href="http://bifferos.bizhat.com/">Bifferboard</a>. <a href="http://blog.famzah.net/2009/11/25/bifferboard-performance-benchmarks/">Bifferboard CPU power</a> is similar to a Pentium @ 100Mhz.</li>
<li>The other system is using a dual-core Core2 Duo @ 2.26GHz, so we consider it fast enough, in order not to influence the results.</li>
<li>SCP file transfer over SSH using OpenSSH as server and client.</li>
</ul>
<p>As stated at the Ubuntu <a href="http://manpages.ubuntu.com/manpages/lucid/en/man5/ssh_config.5.html">man page of ssh_config</a>, the OpenSSH client is using the following Ciphers (most preferred go first):</p>
<blockquote><p>aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,<br />
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,<br />
aes256-cbc,arcfour</p></blockquote>
<p>In order to examine their performance, we will transfer the test file twice using each of the ciphers and note the transfer speed and delta. Here are the shell commands that we used:</p>
<div class="sourcecode">
<pre class="brush: bash; light: true;">
for cipher in aes128-ctr aes192-ctr aes256-ctr arcfour256 arcfour128 aes128-cbc 3des-cbc blowfish-cbc cast128-cbc aes192-cbc aes256-cbc arcfour ; do
        echo &quot;$cipher&quot;
        for try in 1 2 ; do
                scp -c &quot;$cipher&quot; test-file root@192.168.100.102:
        done
done
</pre>
</div>
<p>You can review the raw results in the &#8220;<a href="http://www.famzah.net/download/openssh-performance/ssh-cipher-speed-results.txt">ssh-cipher-speed-results.txt</a>&#8221; file. The delta difference between the one and same benchmark test is within 16%-20%. Not perfect, but still enough for our tests.</p>
<p>Here is a chart which visualizes the results:<br />
<a href="http://famzah.files.wordpress.com/2010/06/ssh-cipher-speed-chart.png"><img src="http://famzah.files.wordpress.com/2010/06/ssh-cipher-speed-chart.png?w=450&#038;h=315" alt="" title="SSH Cipher speed benchmark results" width="450" height="315" class="aligncenter size-full wp-image-702" /></a></p>
<p>The clear winner is <a href="http://en.wikipedia.org/wiki/RC4">Arcfour</a>, while the slowest are <a href="http://en.wikipedia.org/wiki/Triple_DES">3DES</a> and <a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">AES</a>. Still the question if all <a href="http://www.openssh.org/features.html">OpenSSH ciphers</a> are strong enough to protect your data remains.</p>
<p>It&#8217;s worth mentioning that the results may be architecture dependent, so test for your platform accordingly.</p>
<hr />
<p>Resources:</p>
<ul>
<li><a href="http://bbs.archlinux.org/viewtopic.php?id=9107">Arch Linux forums / Fastest ssh cipher</a></li>
</ul>
<br />Filed under: <a href='http://blog.famzah.net/category/bifferboard/'>Bifferboard</a>, <a href='http://blog.famzah.net/category/linux/'>Linux</a> Tagged: <a href='http://blog.famzah.net/tag/benchmark/'>benchmark</a>, <a href='http://blog.famzah.net/tag/openssh/'>openssh</a>, <a href='http://blog.famzah.net/tag/ssh/'>ssh</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/famzah.wordpress.com/701/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/famzah.wordpress.com/701/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/famzah.wordpress.com/701/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/famzah.wordpress.com/701/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/famzah.wordpress.com/701/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/famzah.wordpress.com/701/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/famzah.wordpress.com/701/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/famzah.wordpress.com/701/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/famzah.wordpress.com/701/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/famzah.wordpress.com/701/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/famzah.wordpress.com/701/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/famzah.wordpress.com/701/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/famzah.wordpress.com/701/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/famzah.wordpress.com/701/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=701&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.famzah.net/2010/06/11/openssh-ciphers-performance-benchmark/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e354dbace6659e6cfc6ec6f01d7d962d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">famzah</media:title>
		</media:content>

		<media:content url="http://famzah.files.wordpress.com/2010/06/ssh-cipher-speed-chart.png" medium="image">
			<media:title type="html">SSH Cipher speed benchmark results</media:title>
		</media:content>
	</item>
		<item>
		<title>AVR programmer using Bifferboard as a GPIO hardware interface</title>
		<link>http://blog.famzah.net/2010/04/22/avr-programmer-using-bifferboard-as-a-gpio-hardware-interface/</link>
		<comments>http://blog.famzah.net/2010/04/22/avr-programmer-using-bifferboard-as-a-gpio-hardware-interface/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 14:03:03 +0000</pubDate>
		<dc:creator>Ivan Zahariev</dc:creator>
				<category><![CDATA[Bifferboard]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[atmel avr]]></category>
		<category><![CDATA[avr programmer]]></category>
		<category><![CDATA[avrdude]]></category>
		<category><![CDATA[biffavrprog]]></category>
		<category><![CDATA[bifferboard gpio]]></category>
		<category><![CDATA[microchip]]></category>
		<category><![CDATA[sysfs]]></category>

		<guid isPermaLink="false">http://blog.famzah.net/?p=588</guid>
		<description><![CDATA[If you don&#8217;t have time to read on, here are the solutions which I&#8217;m aware of: biffavrprog (slow and you probably need to manually add your AVR chip&#8217;s definitions to its database). avrdude 5.10 via sysfs patched by Radoslav Kolev (very fast and supports everything by avrdude, not tested by me yet) &#8211; look at [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=588&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you don&#8217;t have time to read on, here are the solutions which I&#8217;m aware of:</p>
<ul>
<li><a href="http://code.google.com/p/biffavrprog/">biffavrprog</a> (slow and you probably need to manually add your AVR chip&#8217;s definitions to its database).</li>
<li><a href="http://savannah.nongnu.org/projects/avrdude">avrdude</a> 5.10 via sysfs patched by <a href="http://www.kolev.info/">Radoslav Kolev</a> (very fast and supports everything by avrdude, not tested by me yet) &#8211; look at <a href="http://groups.google.com/group/bifferboard/browse_thread/thread/7c4835cb1773b5d4">the Bifferboard AVR discussion article</a> for more info.</li>
<li><a href="http://savannah.nongnu.org/projects/avrdude">avrdude</a> 5.10 via sysfs patched by <a href="http://bifferos.bizhat.com/">Biff</a> (even faster but there is a caveat with &#8220;rdc321x_gpio&#8221;, not tested by me yet) &#8211; look at <a href="http://groups.google.com/group/bifferboard/browse_thread/thread/7c4835cb1773b5d4">the Bifferboard AVR discussion article</a> for more info.</li>
</ul>
<hr />
<p>&#8230;read on if you are interested in the story of the above solutions and how they came to the world.</p>
<p>The open-source community is very strange by its nature. Motivating people to work for free is not a straightforward task, as you&#8217;ll see from the following story.</p>
<p>I needed an AVR programmer as I&#8217;m switching from <a href="http://www.microchip.com/">Microchip</a> to <a href="http://www.atmel.com/products/AVR/">Atmel AVR</a> microcontrollers, because their toolchain is free and open-source. And they also match the price and features of <a href="http://www.microchip.com/">Microchip</a> in general, at least for my needs. I didn&#8217;t want to buy any hardware programmers, as I already had the Bifferboard which supports GPIO.</p>
<p>So I decided to code an AVR programmer in Perl myself, for fun and education, and because the C code of <a href="http://savannah.nongnu.org/projects/avrdude">avrdude</a> seems too unclean and lacks documentation. That&#8217;s how <a href="http://code.google.com/p/biffavrprog/">biffavrprog</a> was &#8220;born&#8221; and I offered it to the Bifferboard mailing list. You can <a href="http://groups.google.com/group/bifferboard/browse_thread/thread/7c4835cb1773b5d4">review the thread</a> about it.</p>
<p>You&#8217;ll notice that shortly after that, like about an hour later, I was criticized about why I re-implemented it all in Perl from scratch. Many valid arguments were mentioned, I explained my reasons too, but the most important lesson here is that&#8230; After a day, <a href="http://www.kolev.info/">Radoslav Kolev</a> developed a patch for <a href="http://savannah.nongnu.org/projects/avrdude">avrdude</a>, later on <a href="http://bifferos.bizhat.com/">Biff</a> made it faster, and in the end I managed to get the community involved in something of which they were only thinking doing &#8220;some day&#8221;.</p>
<p>An interesting way to inspire the open-source community&#8230; <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />Filed under: <a href='http://blog.famzah.net/category/bifferboard/'>Bifferboard</a>, <a href='http://blog.famzah.net/category/hardware/'>Hardware</a>, <a href='http://blog.famzah.net/category/personal/'>Personal</a> Tagged: <a href='http://blog.famzah.net/tag/atmel-avr/'>atmel avr</a>, <a href='http://blog.famzah.net/tag/avr-programmer/'>avr programmer</a>, <a href='http://blog.famzah.net/tag/avrdude/'>avrdude</a>, <a href='http://blog.famzah.net/tag/biffavrprog/'>biffavrprog</a>, <a href='http://blog.famzah.net/tag/bifferboard-gpio/'>bifferboard gpio</a>, <a href='http://blog.famzah.net/tag/microchip/'>microchip</a>, <a href='http://blog.famzah.net/tag/sysfs/'>sysfs</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/famzah.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/famzah.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/famzah.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/famzah.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/famzah.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/famzah.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/famzah.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/famzah.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/famzah.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/famzah.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/famzah.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/famzah.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/famzah.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/famzah.wordpress.com/588/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=588&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.famzah.net/2010/04/22/avr-programmer-using-bifferboard-as-a-gpio-hardware-interface/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e354dbace6659e6cfc6ec6f01d7d962d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">famzah</media:title>
		</media:content>
	</item>
		<item>
		<title>I2C via GPIO on Bifferboard running Debian</title>
		<link>http://blog.famzah.net/2009/12/05/i2c-via-gpio-on-bifferboard-running-debian/</link>
		<comments>http://blog.famzah.net/2009/12/05/i2c-via-gpio-on-bifferboard-running-debian/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 13:47:38 +0000</pubDate>
		<dc:creator>Ivan Zahariev</dc:creator>
				<category><![CDATA[Bifferboard]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[i2c bifferboard]]></category>
		<category><![CDATA[i2c gpio]]></category>
		<category><![CDATA[TCN75 linux]]></category>

		<guid isPermaLink="false">http://blog.famzah.net/?p=253</guid>
		<description><![CDATA[This is a Debian remake of the great article about how to interface a Microchip TCN75 Temperature sensor via I2C on Slackware. You have to read it first. Here I&#8217;ll post only brief notes and the differences with Debian on Bifferboard. Required Software You can install the required software by the following command, no need [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=253&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a Debian remake of the <a href="http://sites.google.com/site/bifferboard/Home/desktop-linux-distributions/slackware/i2c">great article about how to interface a Microchip TCN75 Temperature sensor via I2C on Slackware</a>. You have to read it first. Here I&#8217;ll post only brief notes and the differences with <a href="http://blog.famzah.net/2009/11/20/running-debian-on-bifferboard/">Debian on Bifferboard</a>.</p>
<p><u>Required Software</u><br />
You can install the required software by the following command, no need to compile anything:</p>
<blockquote><p><code>apt-get install i2c-tools</code></p></blockquote>
<p><u>Kernel modules</u><br />
The instructions are fairly the same here, except that there is no module &#8220;i2c-core&#8221; and you don&#8217;t need to load it:</p>
<blockquote><p><code>modprobe rdc321x_gpio<br />
modprobe i2c-algo-bit<br />
modprobe i2c-gpio<br />
</code></p></blockquote>
<p>You have two options on where to connect the I2C pins (SDA and SCL):</p>
<ul>
<li>The difficult one &#8211; connect them to the JTAG pins by <a href="http://bifferos.bizhat.com/pinouts/">disabling the JTAG</a> first. You will need to solder on the Bifferboard which may void your warranty.</li>
<li>The easy one &#8211; connect them to the <a href="http://sites.google.com/site/bifferboard/Home/howto/use-serial-tx-rx-pins-as-gpio">Serial console pins</a>. There is no soldering involved here but the trade-off is that you cannot use these pins for your Serial RS-232 console which you may need for debugging or for other purposes. But you could always attach another serial console via USB by using an <a href="http://www.ftdichip.com/Products/FT232R.htm">FT232R</a> chip, for example. This option is my personal favorite here.</li>
</ul>
<p>Both options work fine, I&#8217;ve tried them myself. Here are the corresponding commands:</p>
<blockquote><p><code># using the JTAG pins #11 and #13, soldering required to enable them<br />
modprobe i2c-gpio-custom bus0=0,11,13</p>
<p># using the Serial console pins #7 and #8, no soldering involved here<br />
modprobe i2c-gpio-custom bus0=0,8,7<br />
</code></p></blockquote>
<p>Finally, you need to load one more additional module and you are done:</p>
<blockquote><p><code>modprobe i2c-dev</code></p></blockquote>
<p><u>Application software</u><br />
The <a href="http://sites.google.com/site/bifferboard/Home/desktop-linux-distributions/slackware/i2c">original Slackware article</a> gives an example on how to query your I2C temperature sensor.</p>
<hr />

<a href='http://blog.famzah.net/2009/12/05/i2c-via-gpio-on-bifferboard-running-debian/i2c-tiny-smd/' title='TCN75 tiny SMD soldered'><img width="150" height="112" src="http://famzah.files.wordpress.com/2009/12/i2c-tiny-smd.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="TCN75 tiny SMD soldered" title="TCN75 tiny SMD soldered" /></a>
<a href='http://blog.famzah.net/2009/12/05/i2c-via-gpio-on-bifferboard-running-debian/i2c-tiny-smd-3rd-pin-not-used/' title='The third pin of TCN75 is not used here'><img width="150" height="112" src="http://famzah.files.wordpress.com/2009/12/i2c-tiny-smd-3rd-pin-not-used.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="The third pin of TCN75 is not used here" title="The third pin of TCN75 is not used here" /></a>
<a href='http://blog.famzah.net/2009/12/05/i2c-via-gpio-on-bifferboard-running-debian/i2c-tiny-smd-done/' title='TCN75 tiny SMD soldered completely, with cables'><img width="150" height="112" src="http://famzah.files.wordpress.com/2009/12/i2c-tiny-smd-done.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="TCN75 tiny SMD soldered completely, with cables" title="TCN75 tiny SMD soldered completely, with cables" /></a>
<a href='http://blog.famzah.net/2009/12/05/i2c-via-gpio-on-bifferboard-running-debian/i2c-using-jtag-pins-and-additional-resistor/' title='I2C using the JTAG pins; note the additional resistor soldered on Bifferboard'><img width="150" height="112" src="http://famzah.files.wordpress.com/2009/12/i2c-using-jtag-pins-and-additional-resistor.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="I2C using the JTAG pins; note the additional resistor soldered on Bifferboard" title="I2C using the JTAG pins; note the additional resistor soldered on Bifferboard" /></a>
<a href='http://blog.famzah.net/2009/12/05/i2c-via-gpio-on-bifferboard-running-debian/i2c-using-serial-console-pins-easy/' title='I2C using the Serial console pins'><img width="150" height="112" src="http://famzah.files.wordpress.com/2009/12/i2c-using-serial-console-pins-easy.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="I2C using the Serial console pins" title="I2C using the Serial console pins" /></a>

<br />Posted in Bifferboard, Linux Tagged: i2c bifferboard, i2c gpio, TCN75 linux <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/famzah.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/famzah.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/famzah.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/famzah.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/famzah.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/famzah.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/famzah.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/famzah.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/famzah.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/famzah.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/famzah.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/famzah.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/famzah.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/famzah.wordpress.com/253/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=253&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.famzah.net/2009/12/05/i2c-via-gpio-on-bifferboard-running-debian/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e354dbace6659e6cfc6ec6f01d7d962d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">famzah</media:title>
		</media:content>
	</item>
		<item>
		<title>Bifferboard performance benchmarks</title>
		<link>http://blog.famzah.net/2009/11/25/bifferboard-performance-benchmarks/</link>
		<comments>http://blog.famzah.net/2009/11/25/bifferboard-performance-benchmarks/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 09:41:24 +0000</pubDate>
		<dc:creator>Ivan Zahariev</dc:creator>
				<category><![CDATA[Bifferboard]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://blog.famzah.net/?p=215</guid>
		<description><![CDATA[The benchmarks were done while Bifferboard was running Linux kernel 2.6.30.5 and Debian Lenny. Boot time Total boot time: 1 minute 11 seconds (standard Debian Lenny base installation) The boot process goes like this: Initial boot. Mounted root device (5 seconds wasted on waiting for the USB mass storage to be initialized). Executing INIT. [+21 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=215&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The benchmarks were done while Bifferboard was <a href="http://blog.famzah.net/2009/11/20/running-debian-on-bifferboard/">running Linux kernel 2.6.30.5 and Debian Lenny</a>.</p>
<p><u>Boot time</u><br />
Total boot time: <strong>1 minute 11 seconds</strong> (standard Debian Lenny base installation)</p>
<p>The boot process goes like this:</p>
<ul>
<li>Initial boot. Mounted root device (5 seconds wasted on waiting for the USB mass storage to be initialized). Executing INIT. [+21 seconds elapsed]</li>
<li>Waiting for udev to be initialized (most of the time spent here), configuring some misc settings, no dhcp network, entering Runlevel 2. [+41 seconds elapsed]</li>
<li>Started &#8220;rsyslogd&#8221;, &#8220;sshd&#8221;, &#8220;crond&#8221;. Got prompt on the serial console. [+9 seconds elapsed]</li>
</ul>
<p>Therefore, if a very limited and custom Linux installation is used, the total boot time could be reduced almost twice.</p>
<p><u>CPU speed</u><br />
Calculated <a href="http://en.wikipedia.org/wiki/BogoMips">BogoMips</a>: <strong>56.32</strong><br />
According to <a href="http://www.clifton.nl/bogo-list.html">a quite complete BogoMips list table</a>, this is an equivalent of <strong>Pentium@133MHz</strong> or <strong>486DX4@100MHz</strong>.</p>
<p>According to another <a href="http://www.anime.net/~goemon/benchmarks.html">CPU benchmarks comparison table for Linux</a>, Bifferboard falls into the category of <strong>Pentium@100Mhz</strong>.</p>
<p><u>Memory speed</u><br />
A &#8220;dd&#8221; write to &#8220;<strong>/dev/shm</strong>&#8221; performs with a speed of <strong>6.3 MB/s</strong>.<br />
The <a href="http://ahorvath.web.cern.ch/ahorvath/mbw/">MBW memory bandwidth benchmark</a> shows the following results:</p>
<blockquote><p><code>bifferboard:/tmp# wget</p>
<p>http://de.archive.ubuntu.com/ubuntu/pool/universe/m/mbw/mbw_1.1.1-1_i386.deb</p>
<p>bifferboard:/tmp# dpkg -i mbw_1.1.1-1_i386.deb<br />
bifferboard:/tmp# mbw 4 -n 20|egrep ^AVG<br />
AVG     Method: MEMCPY  Elapsed: 0.15602        MiB: 4.00000    Copy:<br />
25.637 MiB/s<br />
AVG     Method: DUMB    Elapsed: 0.06611        MiB: 4.00000    Copy:<br />
60.502 MiB/s<br />
AVG     Method: MCBLOCK Elapsed: 0.06619        MiB: 4.00000    Copy:<br />
<strong>60.431 MiB/s</strong></code></p></blockquote>
<p>For comparison, my Pentium Dual-Core @ 2.50GHz with DDR2 @ 800 MHz (1.2 ns) shows a &#8220;dd&#8221; copy speed to &#8220;/dev/shm&#8221; of 271 MB/s, while the MBW test shows a maximum average speed of 7670.954 MiB/s. Bifferboard is an embedded device after all&#8230; <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><u>Available memory for applications</u><br />
My base Debian installation with &#8220;udevd&#8221;, &#8220;dhclient3&#8243;, &#8220;rsyslogd&#8221;, &#8220;sshd&#8221;, &#8220;getty&#8221; and one tty session running shows <strong>24908 kbytes free memory</strong>. You surely cannot put CNN.com on this little machine, but compared to the PIC16F877A which has 368 bytes (yes, bytes) total RAM memory, Bifferboard is a monster.</p>
<p><u>Disk system</u><br />
All tests are done on an Ext3 file-system and a very fast USB Flash 8GB A-Data Xupreme 200X.<br />
A &#8220;dd&#8221; copy to a file completes with a <strong>write speed of 6.1 MB/s</strong>.<br />
The <a href="http://www.coker.com.au/bonnie++/">Bonnie++</a> benchmark test shows the following results:</p>
<blockquote><pre>Version 1.03d       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
bifferboard.lo 300M   822  96  <strong>5524</strong>  61  4305  42   855  99 <strong>16576</strong>  67 143.2  12
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP /sec %CP
                 16  1274  94 14830 100  1965  85  1235  90 22519 100 2015  87

bifferboard.localdomain,300M,822,96,5524,61,4305,42,855,99,16576,67,143.2,12,16,1274,94,14830,100,1965,85,1235,90,22519,100,2015,87</pre>
</blockquote>
<p>Therefore, the sequential <strong>write speed is about 5.5 MB/s</strong>, while the sequential <strong>read speed is about 16.5 MB/s</strong>.</p>
<p>It&#8217;s worth mentioning that while the write tests were running, there was a very high CPU System load (not CPU I/O waiting) which indicates that the write throughput of Bifferboard may be a bit better if the file-system is not a journaling one. However, the tests for &#8220;Memory speed&#8221; above show that writing to &#8220;/dev/shm&#8221; (a memory-based file-system) completes with a rate of 6.3 MB/s. Therefore, this is probably the limit with this configuration.</p>
<p><u>Network</u><br />
Both Netperf and Wget show a throughput of <strong>6.5 MB/s</strong>.<br />
The <a href="http://blog.famzah.net/2009/11/24/benchmark-the-packets-per-second-performance-of-a-network-device/">packets-per-second tests</a> complete at a rate of <strong>8000 packets/second</strong>.<br />
Modern systems can handle several hundred thousand packets-per-second without an issue. However, the measured network performance of Bifferboard is more than enough for trivial network communication with the device. During the network benchmark tests, there was very high CPU System usage, but that was expected.</p>
<p><u>Encryption and SSH transfers</u><br />
The maximum encryption rate for an <a href="https://launchpad.net/ecryptfs">eCryptfs</a> mount with AES cipher and 16 bytes key length is <strong>536 KB/s</strong>. The standard SSH Protocol 2 transfer rate using the <a href="http://www.openssh.com/">OpenSSH</a> server is about the same &#8211; <strong>587.1 KB/s</strong>. If you try to transfer a file over SSH and store it on an eCryptfs mounted volume, the transfer rate is <strong>272.2 KB/s</strong>, which is logical, as the processing power is split between the SSH transfer and the eCryptfs encryption.<br />
You can try to tweak your OpenSSH ciphers, in order to get much better performance. The <a href="http://blog.famzah.net/2010/06/11/openssh-ciphers-performance-benchmark/">OpenSSH ciphers performance benchmark</a> page will give you a starting point.</p>
<p><u>Conclusion</u><br />
Bifferboard performs pretty well for its price. It&#8217;s my personal choice over the 8-bit 16F877A and the other 16-bit Microchip / ARM microcontrollers, when a project does not require very fast I/O.</p>
<br />Posted in Bifferboard, Linux Tagged: benchmark, Bifferboard, Linux, performance <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/famzah.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/famzah.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/famzah.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/famzah.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/famzah.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/famzah.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/famzah.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/famzah.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/famzah.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/famzah.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/famzah.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/famzah.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/famzah.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/famzah.wordpress.com/215/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=215&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.famzah.net/2009/11/25/bifferboard-performance-benchmarks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e354dbace6659e6cfc6ec6f01d7d962d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">famzah</media:title>
		</media:content>
	</item>
		<item>
		<title>Running Debian on Bifferboard</title>
		<link>http://blog.famzah.net/2009/11/20/running-debian-on-bifferboard/</link>
		<comments>http://blog.famzah.net/2009/11/20/running-debian-on-bifferboard/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 06:46:44 +0000</pubDate>
		<dc:creator>Ivan Zahariev</dc:creator>
				<category><![CDATA[Bifferboard]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[.deb package]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[debian rootfs]]></category>

		<guid isPermaLink="false">http://blog.famzah.net/?p=121</guid>
		<description><![CDATA[There are two major steps in installing Debian on your Bifferboard: Kernel installation on the Bifferboard. Rootfs installation on a USB device or an SD/MMC card. Kernel installation on the Bifferboard Download a pre-built kernel binary image: vmlinuz-2.6.30.5-bifferboard-ipipe (909K) vmlinuz-2.6.32-bifferboard (906K) &#8211; EXPERIMENTAL The kernel is compiled with (almost) all possible modules, so your Bifferboard [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=121&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are two major steps in installing Debian on your <a href="http://bifferos.bizhat.com/">Bifferboard</a>:</p>
<ol>
<li>Kernel installation on the Bifferboard.</li>
<li>Rootfs installation on a USB device or an SD/MMC card.</li>
</ol>
<h3>Kernel installation on the Bifferboard</h3>
<p>Download a pre-built kernel binary image:</p>
<ul>
<li><a href="http://www.famzah.net/download/bifferboard/vmlinuz-2.6.30.5-bifferboard-ipipe">vmlinuz-2.6.30.5-bifferboard-ipipe</a> (909K)</li>
<li><a href="http://www.famzah.net/download/bifferboard/vmlinuz-2.6.32-bifferboard">vmlinuz-2.6.32-bifferboard</a> (906K) &#8211; EXPERIMENTAL</li>
</ul>
<p>The kernel is compiled with (almost) all possible modules, so your Bifferboard should be able to easily use any device supported on Debian. Once you have downloaded the kernel image, you can then upload it to the Bifferboard, as advised at <a href="http://sites.google.com/site/bifferboard/Home/bootloader">the Biffboot Wiki page</a>. You have two options to upload the kernel &#8211; via the serial port or over the ethernet. Both work well.</p>
<p><strong>Example:</strong> Assuming that you have the <a href="http://sourceforge.net/projects/bifferboard/develop">Bifferboard SVN repository</a> checked out in &#8220;<strong>~/biffer/svn</strong>&#8220;, you have downloaded the &#8220;<strong>vmlinuz-2.6.30.5-bifferboard-ipipe</strong>&#8221; kernel image in &#8220;<strong>/tmp</strong>&#8220;, your Bifferboard has a MAC address of &#8220;<strong>00:B3:F6:00:37:A9</strong>&#8220;, and you have connected it on the Ethernet port &#8220;<strong>eth0</strong>&#8221; of your computer, here are the commands that you would need to use:</p>
<div class="sourcecode">
<pre class="brush: bash; light: true;">
cd ~/biffer/svn/utils
sudo ./bb_eth_upload.py eth0 00:B3:F6:00:37:A9 /tmp/vmlinuz-2.6.30.5-bifferboard-ipipe
</pre>
</div>
<h3>Rootfs installation on a USB device or an SD/MMC card</h3>
<p>Once you have the kernel &#8220;installed&#8221; on the Bifferboard and ready to boot, you need to prepare a rootfs media. This is where your Debian installation is stored and booted from. Download one of the following pre-built rootfs images (default root password is &#8220;biffroot&#8221;):</p>
<ul>
<li><a href="http://www.famzah.net/download/bifferboard/debian-lenny-bifferboard-rootfs-minimal.tar.bz2">Debian &#8220;lenny&#8221; for Bifferboard &#8211; minimal</a> (download size 95M, uncompressed size 346MB).</li>
<li><a href="http://www.famzah.net/download/bifferboard/debian-lenny-bifferboard-rootfs-developer.tar.bz2">Debian &#8220;lenny&#8221; for Bifferboard &#8211; developer</a> (download size 129M, uncompressed size 468MB).</li>
</ul>
<p>The &#8220;developer&#8221; version adds the following packages: build-essential, perl, links, manpages, manpages-dev, man-db, mc, vim. Note that for each image you will need at least 100MB more free on the rootfs media.</p>
<p>In order to populate the rootfs media, you have to do the following:</p>
<ol>
<li>Create one primary partition, format it as &#8220;ext3&#8243; and then mount the USB device or SD/MMC card.</li>
<li>Extract the archive in the mounted directory.</li>
<li>Unmount the directory.</li>
</ol>
<p><strong>Example:</strong> Assuming that you have the <a href="http://sourceforge.net/projects/bifferboard/develop">Bifferboard SVN repository</a> checked out in &#8220;<strong>~/biffer/svn</strong>&#8220;, you have downloaded the &#8220;<strong>minimal</strong>&#8221; rootfs image in &#8220;<strong>/tmp</strong>&#8220;, and you are using an SD/MMC card under the device name &#8220;<strong>/dev/mmcblk0</strong>&#8220;, here are the commands that you would need to use:</p>
<div class="sourcecode">
<pre class="brush: bash; light: true;">
sudo bash
mkdir /mnt/rootfs
cd ~/biffer/svn/debian/rootfs
./format-and-mount.sh /dev/mmcblk0 /mnt/rootfs
tar -jxf /tmp/debian-lenny-bifferboard-rootfs-minimal.tar.bz2 -C /mnt/rootfs
umount /mnt/rootfs
# CHANGE THE DEFAULT ROOT PASSWORD!
</pre>
</div>
<p>When you have the USB device or SD/MMC card ready and populated with the customized Debian rootfs, plug it in Bifferboard, attach a serial cable to Bifferboard, if you have one, and boot it up.</p>
<p>That&#8217;s it. Enjoy your Bifferboard running Debian.</p>
<p><em>Update:</em> As already mentioned in the comments below, you would probably need to set up swap too. Here is my recipe:</p>
<div class="sourcecode">
<pre class="brush: bash; light: true;">
# change &quot;128&quot; (MBytes) below to a number which suits your needs
dd if=/dev/zero of=/swapfile bs=1M count=128
mkswap /swapfile
swapon /swapfile # enables swap right away; disable with &quot;swapoff -a&quot;
echo '/swapfile none swap sw 0 0' &gt;&gt; /etc/fstab # enables swap at system boot
</pre>
</div>
<p>Using a file for swap on a 2.6 Linux kernel has the same performances as using a separate swap partition <a href="http://lkml.org/lkml/2005/7/7/326">as discussed at LKML</a>.</p>
<hr />
<p>P.S. If you want to build your own customized Debian rootfs image for Bifferboard &#8211; checkout the <a href="http://sourceforge.net/projects/bifferboard/develop">Bifferboard SVN repository</a> and review the instructions in &#8220;<a href="http://bifferboard.svn.sourceforge.net/viewvc/bifferboard/debian/rootfs/images.txt">debian/rootfs/images.txt</a>&#8220;.</p>
<p>References:</p>
<ul>
<li><a href="http://www.mail-archive.com/debian-user@lists.debian.org/msg258718.html">dpkg: extract specific file.</a></li>
<li>Other similar Debian projects for Bifferboard &#8211; <a href="http://sites.google.com/site/bifferboard/Home/desktop-linux-distributions/debian">Bifferboard Wiki &#8220;Home‎ &gt; ‎&#8217;Desktop&#8217; Linux Distributions‎ &gt; ‎Debian&#8221; page</a>.</li>
<li><a href="http://bifferos.bizhat.com/pinouts/">Pinouts for the standard single USB Bifferboard</a>.</li>
<li><a href="http://sites.google.com/site/bifferboard/Home/2-port-bifferboard">Bifferboard with 2 USB ports</a> &#8211; hardware specification and pinouts.</li>
</ul>
<br />Posted in Bifferboard, Linux Tagged: .deb package, Bifferboard, debian, debian rootfs, Linux <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/famzah.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/famzah.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/famzah.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/famzah.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/famzah.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/famzah.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/famzah.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/famzah.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/famzah.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/famzah.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/famzah.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/famzah.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/famzah.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/famzah.wordpress.com/121/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=121&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.famzah.net/2009/11/20/running-debian-on-bifferboard/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e354dbace6659e6cfc6ec6f01d7d962d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">famzah</media:title>
		</media:content>
	</item>
		<item>
		<title>Debian rootfs installation customized for Bifferboard</title>
		<link>http://blog.famzah.net/2009/11/18/debian-rootfs-installation-customized-for-bifferboard/</link>
		<comments>http://blog.famzah.net/2009/11/18/debian-rootfs-installation-customized-for-bifferboard/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 08:55:14 +0000</pubDate>
		<dc:creator>Ivan Zahariev</dc:creator>
				<category><![CDATA[Bifferboard]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[debian rootfs]]></category>
		<category><![CDATA[debootstrap]]></category>
		<category><![CDATA[qemu]]></category>

		<guid isPermaLink="false">http://blog.famzah.net/?p=75</guid>
		<description><![CDATA[Update: There are (more up-to-date) automated scripts which you can use for the below actions: You need to checkout the whole Bifferboard SVN repository. The scripts are located in the directory &#8220;/debian/rootfs&#8220;. Execute them from the checked out repository on your local computer. First you have to mount a medium on which we are going [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=75&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Update: There are (more up-to-date) automated scripts which you can use for the below actions:</p>
<ol>
<li>You need to checkout the whole <a href="http://sourceforge.net/projects/bifferboard/develop">Bifferboard SVN repository</a>.</li>
<li>The scripts are located in the directory &#8220;<a href="http://bifferboard.svn.sourceforge.net/viewvc/bifferboard/debian/rootfs/">/debian/rootfs</a>&#8220;. Execute them from the checked out repository on your local computer.</li>
</ol>
<hr />
<p>First you have to mount a medium on which we are going to install the Debian system. Generally, you have two options:</p>
<ul>
<li>Using a USB Flash drive:<br />
<blockquote><p><code><br />
## MAKE SURE THAT YOU UPDATE THIS<br />
$ export ROOTDEV=/dev/sdc1<br />
$ sudo mkfs.ext3 $ROOTDEV<br />
$ sudo tune2fs -c 0 -i 0 $ROOTDEV<br />
$ export MNTPOINT=/mnt/diskimage<br />
$ sudo mount $ROOTDEV $MNTPOINT<br />
</code></p></blockquote>
</li>
<li>Using a <a href="http://blog.famzah.net/2009/11/16/create-a-qemu-image-file-which-you-can-mount-in-both-linux-and-qemu/">Qemu image</a>:<br />
<blockquote><p><code><br />
$ export MNTPOINT=/mnt/diskimage<br />
$ export IMGFILE=hd0.img<br />
$ sudo mount -o loop,offset=32256 "$IMGFILE" $MNTPOINT<br />
</code></p></blockquote>
</li>
</ul>
<p>Once we have the medium mounted at $MNTPOINT, we can proceed with installing Debian there and configuring it for Bifferboard:</p>
<blockquote><p><code>$ export DBS_OS_VERSION=lenny<br />
## replace "bg." with your local archive, or just omit it<br />
$ export DBS_LOCAL_ARCHIVE=bg.<br />
$ sudo debootstrap --arch i386 ${DBS_OS_VERSION} $MNTPOINT/ http://ftp.${DBS_LOCAL_ARCHIVE}debian.org/debian<br />
## ... go grab a pizza or something ... this will take a while<br />
$ sudo cp /etc/resolv.conf $MNTPOINT/etc/<br />
$ sudo mount proc $MNTPOINT/proc -t proc<br />
$ sudo chroot $MNTPOINT<br />
##<br />
## We are now in the "chroot" environment as root<br />
##<br />
/# apt-get -qq update &amp;&amp; apt-get install wget<br />
/# cd /root &amp;&amp; wget http://bifferboard.svn.sourceforge.net/viewvc/bifferboard/debian/rootfs/include/debootstrap-postconfig.sh<br />
/root# chmod +x debootstrap-postconfig.sh &amp;&amp; ./debootstrap-postconfig.sh<br />
/root# passwd root<br />
/root# exit<br />
##<br />
## Back to our machine<br />
##<br />
$ sudo umount $MNTPOINT/proc<br />
$ sudo umount $MNTPOINT<br />
</code></p></blockquote>
<hr />
<p>Now you have a minimum Debian installation customized for Bifferboard in the following way:</p>
<ul>
<li>Custom kernel for Bifferboard installed by a .deb package.</li>
<li>Ethernet interface configured as DHCP client.</li>
<li>Temporary directories /tmp and /var/tmp mounted on a RAM-disk.</li>
<li>All APT sources &#8220;main contrib non-free&#8221; enabled.</li>
<li>Serial console on ttyS0 (115200 8N1).</li>
<li>RTC (real-time clock) kernel modules blacklisted &#8211; the Bifferboard has no RTC.</li>
<li>IPv6 disabled &#8211; takes a lot of resources and we won&#8217;t use it anyway, for now.</li>
</ul>
<p>I may add any further customizations if needed. You can always review the <a href="http://bifferboard.svn.sourceforge.net/viewvc/bifferboard/debian/rootfs/include/debootstrap-postconfig.sh?view=markup">debootstrap-postconfig.sh</a> script for details on what is being configured.</p>
<p>You can use this image/disk as a rootfs which you can boot directly on Bifferboard or try in Qemu. Note that you have to install our Debian kernel on Bifferboard prior to booting this rootfs.</p>
<hr />
<p>Used resources:</p>
<ul>
<li><a href="http://www.debian-administration.org/articles/426">Debian Administration: Installing new Debian systems with debootstrap</a></li>
<li><a href="https://help.ubuntu.com/6.10/ubuntu/installation-guide/hppa/linux-upgrade.html">Installing Ubuntu from a Unix/Linux System</a></li>
</ul>
<br />Posted in Bifferboard, Linux Tagged: Bifferboard, debian, debian rootfs, debootstrap, Linux, qemu <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/famzah.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/famzah.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/famzah.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/famzah.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/famzah.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/famzah.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/famzah.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/famzah.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/famzah.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/famzah.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/famzah.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/famzah.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/famzah.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/famzah.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=75&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.famzah.net/2009/11/18/debian-rootfs-installation-customized-for-bifferboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e354dbace6659e6cfc6ec6f01d7d962d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">famzah</media:title>
		</media:content>
	</item>
		<item>
		<title>Build a Debian Linux kernel for Bifferboard as .deb packages</title>
		<link>http://blog.famzah.net/2009/11/16/build-a-debian-linux-kernel-for-bifferboard-as-deb-packages/</link>
		<comments>http://blog.famzah.net/2009/11/16/build-a-debian-linux-kernel-for-bifferboard-as-deb-packages/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 11:09:11 +0000</pubDate>
		<dc:creator>Ivan Zahariev</dc:creator>
				<category><![CDATA[Bifferboard]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[.deb package]]></category>
		<category><![CDATA[build .deb]]></category>
		<category><![CDATA[build kernel]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[very small kernel]]></category>

		<guid isPermaLink="false">http://blog.famzah.net/?p=62</guid>
		<description><![CDATA[In my previous article I explained why and how to build a very small Linux kernel with all possible modules enabled which would help us to run a standard Debian installation on Bifferboard. You can download the already built .deb packages for Debian &#8220;lenny&#8221; at the following addresses: 2.6.30.5: Linux kernel 2.6.30.5 binary image (18M) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=62&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In my previous article I explained why and how to <a href="http://blog.famzah.net/2009/11/15/build-a-very-small-linux-kernel-with-all-possible-modules-enabled/">build a very small Linux kernel with all possible modules enabled</a> which would help us to run a standard Debian installation on <a href="http://bifferos.bizhat.com/">Bifferboard</a>.</p>
<p>You can download the already built .deb packages for Debian &#8220;lenny&#8221; at the following addresses:</p>
<ul>
<li>2.6.30.5:
<ul>
<li><a href="http://www.famzah.net/download/bifferboard/linux-image-2.6.30.5-bifferboard-ipipe_2.6.30.5-bifferboard-ipipe-10.00.Custom_i386.deb">Linux kernel 2.6.30.5 binary image</a> (18M)</li>
<li><a href="http://www.famzah.net/download/bifferboard/linux-headers-2.6.30.5-bifferboard-ipipe_2.6.30.5-bifferboard-ipipe-10.00.Custom_i386.deb">Header files for the 2.6.30.5 Linux kernel</a> (5.6M)</li>
</ul>
</li>
<li>2.6.32 &#8211; EXPERIMENTAL:
<ul>
<li><a href="http://www.famzah.net/download/bifferboard/linux-image-2.6.32-bifferboard_2.6.32-bifferboard-10.00.Custom_i386.deb">Linux kernel 2.6.32 binary image</a> (19M)</li>
<li><a href="http://www.famzah.net/download/bifferboard/linux-headers-2.6.32-bifferboard_2.6.32-bifferboard-10.00.Custom_i386.deb">Header files for the 2.6.32 Linux kernel</a> (5.9M)</li>
</ul>
</li>
</ul>
<p>On my Bifferboard, I use the following Kernel command line to boot this kernel:</p>
<blockquote><p><code>rootwait root=/dev/sda1 console=uart,io,0x3f8</code></p></blockquote>
<p>For Qemu, because of some USB mass-storage emulation issues, the line looks like:</p>
<blockquote><p><code>rootwait root=/dev/sda1 console=uart,io,0x3f8 irqpoll</code></p></blockquote>
<hr />
<p>Update: There are (more up-to-date) automated scripts which you can use for the below actions:</p>
<ul>
<li>You need to checkout the whole <a href="http://sourceforge.net/projects/bifferboard/develop">Bifferboard SVN repository</a>.</li>
<li>The scripts are located in the directory “<a href="http://bifferboard.svn.sourceforge.net/viewvc/bifferboard/debian/kernel/">/debian/kernel</a>“. Execute the &#8220;build.sh&#8221; script from the checked out repository on your local computer, on a <strong>Debian</strong> &#8220;lenny&#8221; system.</li>
</ul>
<hr />
<p>If you want to build the packages yourself, you need to execute the following commands on a <strong>Debian</strong> &#8220;lenny&#8221; machine (a virtual machine or a chroot()&#8217;ed installation work too):</p>
<blockquote><p><code>famzah@FURNA:~$ sudo apt-get install kernel-package fakeroot build-essential ncurses-dev tar patch<br />
famzah@FURNA:~$ export KVERSION=2.6.30.5<br />
famzah@FURNA:~$ rm -rf /tmp/tmpkern-$KVERSION<br />
famzah@FURNA:~$ mkdir /tmp/tmpkern-$KVERSION<br />
famzah@FURNA:~$ cd /tmp/tmpkern-$KVERSION &amp;&amp; wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-$KVERSION.tar.bz2<br />
famzah@FURNA:/tmp/tmpkern-2.6.30.5$ tar -xjf linux-$KVERSION.tar.bz2<br />
famzah@FURNA:/tmp/tmpkern-2.6.30.5$ sudo mkdir -p /usr/src/bifferboard &amp;&amp; sudo chown $USER /usr/src/bifferboard<br />
famzah@FURNA:/tmp/tmpkern-2.6.30.5$ mv linux-$KVERSION /usr/src/bifferboard/<br />
famzah@FURNA:/tmp/tmpkern-2.6.30.5$ cd /usr/src/bifferboard/linux-$KVERSION<br />
famzah@FURNA:/usr/src/bifferboard/linux-2.6.30.5$ wget 'http://www.famzah.net/download/bifferboard/obsolete/bifferboard-2.6.30.5-12.patch' -O bifferboard-2.6.30.5-12.patch<br />
famzah@FURNA:/usr/src/bifferboard/linux-2.6.30.5$ patch --quiet -p1 &lt; bifferboard-2.6.30.5-12.patch<br />
famzah@FURNA:/usr/src/bifferboard/linux-2.6.30.5$ wget http://www.famzah.net/download/bifferboard/obsolete/build-biff-kernel-2.6.30.5-deb.sh<br />
famzah@FURNA:/usr/src/bifferboard/linux-2.6.30.5$ chmod +x build-biff-kernel-2.6.30.5-deb.sh<br />
famzah@FURNA:/usr/src/bifferboard/linux-2.6.30.5$ ./build-biff-kernel-2.6.30.5-deb.sh<br />
# When "make menuconfig" is displayed, just EXIT and SAVE the configuration.<br />
#<br />
# After the build, you can find the two .deb packages in "/usr/src/bifferboard".</code></p></blockquote>
<hr />
<p>Used resources:</p>
<ul>
<li><a href="http://www.famzah.net/download/bifferboard/obsolete/bifferboard-2.6.30.5-12.patch">Bifferboard Kernel Patch for 2.6.30.5 (old, mirror copy)</a></li>
<li><a href="https://wiki.ubuntu.com/KernelTeam/GitKernelBuild">Ubuntu Wiki guide for building a custom kernel from the upstream mainline Linux kernel</a></li>
</ul>
<br />Posted in Bifferboard, Linux Tagged: .deb package, Bifferboard, build .deb, build kernel, debian, Linux, package, very small kernel <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/famzah.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/famzah.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/famzah.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/famzah.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/famzah.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/famzah.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/famzah.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/famzah.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/famzah.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/famzah.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/famzah.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/famzah.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/famzah.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/famzah.wordpress.com/62/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=62&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.famzah.net/2009/11/16/build-a-debian-linux-kernel-for-bifferboard-as-deb-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e354dbace6659e6cfc6ec6f01d7d962d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">famzah</media:title>
		</media:content>
	</item>
		<item>
		<title>Build a very small Linux kernel with all possible modules enabled</title>
		<link>http://blog.famzah.net/2009/11/15/build-a-very-small-linux-kernel-with-all-possible-modules-enabled/</link>
		<comments>http://blog.famzah.net/2009/11/15/build-a-very-small-linux-kernel-with-all-possible-modules-enabled/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 09:26:41 +0000</pubDate>
		<dc:creator>Ivan Zahariev</dc:creator>
				<category><![CDATA[Bifferboard]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[all modules enabled]]></category>
		<category><![CDATA[build kernel]]></category>
		<category><![CDATA[initrd]]></category>
		<category><![CDATA[merge kernel config]]></category>
		<category><![CDATA[very small kernel]]></category>

		<guid isPermaLink="false">http://blog.famzah.net/?p=49</guid>
		<description><![CDATA[&#8230;and still be able to mount a root file-system stored on a USB mass-storage. The idea is to build a very small kernel with the bare minimum compiled-in and all the rest as modules which are stored on the &#8220;rootfs&#8221; device. Once the &#8220;rootfs&#8221; device has been mounted by the kernel, the kernel can load [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=49&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#8230;and still be able to mount a root file-system stored on a USB mass-storage.</p>
<p>The idea is to build a very small kernel with the bare minimum compiled-in and all the rest as modules which are stored on the &#8220;rootfs&#8221; device. Once the &#8220;rootfs&#8221; device has been mounted by the kernel, the kernel can load any additional modules from there. Therefore, our kernel has the following compiled-in features:</p>
<ul>
<li><strong>device drivers for the &#8220;rootfs&#8221;</strong>: USB mass-storage.</li>
<li><strong>File-systems</strong>: ext3.</li>
<li><strong>Misc</strong>: BSD process accounting, /proc support, inotify support, NO initrd (we do not need one as we can mount the &#8220;rootfs&#8221; device directly), NO compiled-in wireless support (only by modules, thus you cannot download a &#8220;rootfs&#8221; over-the-air by PXE, for example), NO swap support (Bifferboard I/O is too slow for swapping).</li>
<li><strong>Size</strong>: very small, only 918224 bytes.</li>
</ul>
<p><u>Why would someone need such a kernel?</u><br />
The size of the bootable kernel image (+the initrd ramdisk, if any) on a <a href="http://bifferos.bizhat.com/">Bifferboard</a> single-chip-computer is limited to:</p>
<ul>
<li>974848 bytes with Biffboot v2.0</li>
<li>983040 bytes with BiffBoot v1.X</li>
</ul>
<p>Furthermore, some patches and special configuration is required for the RDC chip which is the heart of the system. The creator of Bifferboard has done this for us already &#8211; he developed the patch and created a minimal config for the 2.6.30.5 Linux kernel.</p>
<p>In order to merge the Bifferboard minimal kernel config with a config where all modules are enabled, I do the following:</p>
<ul>
<li>Make a kernel config with all possible modules enabled by executing &#8220;<strong>make allmodconfig</strong>&#8220;. The problem with this config is that it has every possible option selected as &#8220;Yes&#8221;, not only the modules. Therefore, I substitute every &#8220;Yes&#8221; (which is not a module) to &#8220;No&#8221; by executing &#8220;<strong>perl -pi -e &#8216;s/=y/=n/g&#8217; .config</strong>&#8220;. This way I have only config entries which say &#8220;CONFIG_SOME_OPTION=m&#8221;.</li>
<li>Download the other minimal kernel config which I want to merge with priority over the &#8220;all modules config&#8221;. I make a &#8220;<strong>grep =y .config-biff &gt; .config-biff-yes</strong>&#8220;. This way I leave only the &#8220;Yes&#8221; selected kernel config options, nothing more.</li>
<li>Finally, I can merge the config files into one by concatenating them. The file which is concatenated last has the most priority. This is how Kconfig merges the config lines and resolves conflicts or redefinitions of the same kernel option.</li>
<li>There is however a problem with this automatic way of generating and merging an all-modules kernel config &#8211; there are sections in the kernel config which add no additional code to the kernel (thus add no space either) but they &#8220;hide&#8221; their child sub-sections. One has to go through the kernel menu manually and select with &#8220;Yes&#8221; every menu option which has a sub-menu associated with it. You can easily recognize such menu options by the &#8220;<strong>&#8212;&gt;</strong>&#8221; ending after their menu title. I&#8217;ve created a third config which is also being merged as last which selects all such options as &#8220;Yes&#8221; (multiple CONFIG_SUBMENU_EXAMPLE=y).</li>
<li>If you want to overwrite anything at the very end, you can create a fourth config file and merge it as very last.</li>
</ul>
<p>Here is a Bash script which does what I&#8217;ve currently described: <a href="http://www.famzah.net/download/bifferboard/obsolete/build-biff-kernel-2.6.30.5-deb.sh">http://www.famzah.net/download/bifferboard/obsolete/build-biff-kernel-2.6.30.5-deb.sh</a>.</p>
<p>Note that when you have <strong>no initrd and boot from a USB</strong> mass-storage device, you have to add <strong>&#8220;rootdelay=30&#8243;</strong> (or less) to your kernel command line. It takes some time for the USB mass-storage devices to get initialized. If there is no &#8220;rootdelay&#8221; option specified, the kernel tries to mount the &#8220;rootfs&#8221; device immediately which ends up in <strong>Kernel panic &#8211; not syncing: VFS: Unable to mount root fs</strong>. This <a href="http://www.ibm.com/developerworks/linux/library/l-initrd.html">very useful article describing the initial RAM disk (initd) in detail</a> helped me to find out why the original Ubuntu kernel+initrd gave no kernel panic and was able to mount the root file-system from my USB stick, but at the very same time my custom kernel couldn&#8217;t do it. I did some initrd debugging and found out that it simulates the kernel command line option &#8220;rootdelay&#8221; &#8211; it polls if the &#8220;rootfs&#8221; device has been detected, every 0.1 seconds.</p>
<p><strong>UPDATE</strong>: The option &#8220;<strong>rootwait</strong>&#8221; is what I was actually looking for. It is similar to &#8220;<strong>rootdelay</strong>=NN&#8221;, only that it waits forever for a root device and continues with the boot immediately after the root device is found, thus the kernel wastes no time in just waiting for &#8220;NN&#8221; seconds to elapse.</p>
<p>You can read my next article which gives detailed instructions on how to <a href="http://blog.famzah.net/2009/11/16/build-a-debian-linux-kernel-for-bifferboard-as-deb-packages/">build a kernel suitable for Bifferboard and package it as .deb files</a>.</p>
<br />Posted in Bifferboard, Linux Tagged: all modules enabled, Bifferboard, build kernel, initrd, Linux, merge kernel config, very small kernel <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/famzah.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/famzah.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/famzah.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/famzah.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/famzah.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/famzah.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/famzah.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/famzah.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/famzah.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/famzah.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/famzah.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/famzah.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/famzah.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/famzah.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.famzah.net&amp;blog=10109730&amp;post=49&amp;subd=famzah&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.famzah.net/2009/11/15/build-a-very-small-linux-kernel-with-all-possible-modules-enabled/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e354dbace6659e6cfc6ec6f01d7d962d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">famzah</media:title>
		</media:content>
	</item>
	</channel>
</rss>