<?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/"
	>

<channel>
	<title>twam.info &#187; ALIX.3D3</title>
	<atom:link href="http://www.twam.info/tag/alix3d3/feed" rel="self" type="application/rss+xml" />
	<link>http://www.twam.info</link>
	<description>My computer, physics, electronics &#38; photography blog</description>
	<lastBuildDate>Wed, 25 Jan 2012 20:49:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CHOST: i586 vs. i486 on AMD Geode LX</title>
		<link>http://www.twam.info/hardware/chost-i586-vs-i486-on-amd-geode-lx</link>
		<comments>http://www.twam.info/hardware/chost-i586-vs-i486-on-amd-geode-lx#comments</comments>
		<pubDate>Mon, 25 May 2009 18:27:01 +0000</pubDate>
		<dc:creator>twam</dc:creator>
				<category><![CDATA[Alix]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ALIX.3D3]]></category>
		<category><![CDATA[CHOST]]></category>

		<guid isPermaLink="false">http://www.twam.info/?p=510</guid>
		<description><![CDATA[On my blog post about Installing Gentoo on ALIX.3D3 Mart Raudsepp made an interesting comment: He pointed out, that on AMD Geode CPUs it might be better to use i486 CHOST instead of my used i586, because the CPU is more like a i486 as far as instruction scheduling and times go. This sounded interesting, [...]]]></description>
			<content:encoded><![CDATA[<p>On my blog post about <a href="http://www.twam.info/linux/gentoo/installing-gentoo-on-alix3d3">Installing Gentoo on ALIX.3D3 </a>Mart Raudsepp made an interesting <a href="http://www.twam.info/linux/gentoo/installing-gentoo-on-alix3d3/comment-page-1#comment-67">comment</a>: He pointed out, that on AMD Geode CPUs it might be better to use i486 CHOST instead of my used i586, because the CPU is more like a i486 as far as instruction scheduling and times go.</p>
<p>This sounded interesting, so I googled for some benchmark test to measure differences. I found <a href="http://www.tux.org/~mayer/linux/bmark.html">nbench</a>, which measures performance by executing some typical algorithms and compares them to a Pentium 90 based system. So I installed it and run on the i586 CHOST system, then rebuild it completely to i486 CHOST and run it again.<span id="more-510"></span> The differences are not that huge, but on some algorithms they&#8217;re measurable:</p>
<p><a href="http://www.twam.info/wp-content/uploads/2009/05/i486_i586_comparison.png"><img class="aligncenter size-full wp-image-513" title="i486 &amp; i586 CHOST comparison" src="http://www.twam.info/wp-content/uploads/2009/05/i486_i586_comparison.png" alt="i486 &amp; i586 CHOST comparison" width="580" height="450" /></a></p>
<p>The first 13 bars are the different algorithms. The main difference is on the string sort, which is heavily memory dependent. That last 3 rows are a index based on the algorithms. Here is main difference on memory index, as the normalized version shows very clear (positive values mean that i486 is faster):</p>
<p><a href="http://www.twam.info/wp-content/uploads/2009/05/i486_i586_comparison_normalized.png"><img class="aligncenter size-full wp-image-514" title="i486 &amp; i586 CHOST comparison (normalized)" src="http://www.twam.info/wp-content/uploads/2009/05/i486_i586_comparison_normalized.png" alt="i486 &amp; i586 CHOST comparison (normalized)" width="580" height="450" /></a></p>
<p>As there is no significant disadvantage of the i486 CHOST, this seems to be the choice. <img src='http://www.twam.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If anybody has other (free) benchmarks to suggest, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twam.info/hardware/chost-i586-vs-i486-on-amd-geode-lx/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>GPIO on ALIX.3D3</title>
		<link>http://www.twam.info/linux/gpio-on-alix3d3</link>
		<comments>http://www.twam.info/linux/gpio-on-alix3d3#comments</comments>
		<pubDate>Sun, 17 May 2009 13:41:35 +0000</pubDate>
		<dc:creator>twam</dc:creator>
				<category><![CDATA[Alix]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ALIX.3D3]]></category>
		<category><![CDATA[Kernel]]></category>

		<guid isPermaLink="false">http://www.twam.info/?p=497</guid>
		<description><![CDATA[The AMD CS5536 Geode companion on the ALIX.3D3 board has several general purpose input/output pins. Most of them have different functions as well, and there are some registers to set if they should be used as special function GPIO pins. The ALIX.3D3 uses 4 GPIO pins for 3 LEDs and 1 mode switch. Accessing the [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.amd.com/us-en/ConnectivitySolutions/ProductInformation/0,,50_2330_9863_13022,00.html">AMD CS5536</a> Geode companion on the ALIX.3D3 board has several general purpose input/output pins. Most of them have different functions as well, and there are some registers to set if they should be used as special function GPIO pins. The ALIX.3D3 uses 4 GPIO pins for 3 LEDs and 1 mode switch. <a href="http://www.twam.info/hardware/alix/leds-on-alix3d3">Accessing the leds</a> is very easy using the leds-alix2 driver, but they can be addressed as GPIO as well. There is already a driver for the GPIO pins in the kernel named cs5535_gpio.c, but it uses a non standard interface to communicate with kernel. So, I wrote a new kernel driver using the GPIO interface.<span id="more-497"></span></p>
<p>Installating is very easy: Download the patch (<a href="http://www.twam.info/wp-content/uploads/2009/05/gpio.patch">GPIO drivers for AMD CS5535/CS5536 (Kernel 2.6.30-rc6)</a>), patch it and compile the kernel:</p>
<pre>wget http://www.twam.info/wp-content/uploads/2009/05/gpio.patch -O /root/gpio.patch
cd /usr/src/linux
patch -p1 &lt; /root/gpio.patch</pre>
<p>Now run kernel configuration and select</p>
<pre>Device Drivers  ---&gt;
   [*] GPIO Support  ---&gt;
   [*]   /sys/class/gpio/... (sysfs interface)
   &lt;*&gt;   AMD CS5535/CS5536 (Geode Companion Device)</pre>
<p>Compile the kernel and reboot. If you go to <em>/sys/class/gpio</em> there should be a file name <em>gpiochip0</em>. Now we can enable some pins and test them. By</p>
<pre>echo 6 &gt; /sys/class/gpio/export</pre>
<p>we tell the kernel, that we want to use pin 6 from userspace. Pin 6 is connected to led. Now we configure pin 6 as an output by</p>
<pre>echo out &gt; /sys/class/gpio/GPIO6/direction</pre>
<p>Now we can toggle the values by</p>
<pre>echo 1 &gt; /sys/class/gpio/GPIO6/value
sleep 1
echo 0 &gt; /sys/class/gpio/GPIO6/value</pre>
<div id="attachment_501" class="wp-caption alignright" style="width: 147px"><a href="http://www.twam.info/wp-content/uploads/2009/05/alix_modeswitch.jpg"><img class="size-medium wp-image-501" title="ALIX.3D3: modeswitch pins" src="http://www.twam.info/wp-content/uploads/2009/05/alix_modeswitch-196x300.jpg" alt="ALIX.3D3: modeswitch pins" width="137" height="210" /></a><p class="wp-caption-text">ALIX.3D3: modeswitch pins</p></div>
<p>Notice, that the LED is connected to 3.3V, so setting value to 0 it will be lit. The other LEDs are connected to pin 25 &amp; pin 27. On pin 24 is a switch connected. We can read the value by enabling the pin, setting it as an input and reading the value:</p>
<pre>echo 24 &gt; /sys/class/gpio/export
echo in &gt; /sys/class/gpio/GPIO24/direction
cat /sys/class/gpio/GPIO24/value</pre>
<p>As the pin has an internal pull up, it will show 1 if the switch isn&#8217;t pressed or installed. If you press the switch or connect to the metal pins, it will result in 0.</p>
<p>Don&#8217;t forget to unexport all pins after when you&#8217;re done:</p>
<pre>echo 6 &gt; /sys/class/gpio/unexport
echo 24 &gt; /sys/class/gpio/unexport</pre>
<p><strong>Any feedback on the driver is welcome!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.twam.info/linux/gpio-on-alix3d3/feed</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Using Geode&#8217;s AES engine on ALIX.3D3</title>
		<link>http://www.twam.info/hardware/alix/using-geodes-aes-engine-on-alix3d3</link>
		<comments>http://www.twam.info/hardware/alix/using-geodes-aes-engine-on-alix3d3#comments</comments>
		<pubDate>Wed, 13 May 2009 17:08:45 +0000</pubDate>
		<dc:creator>twam</dc:creator>
				<category><![CDATA[Alix]]></category>
		<category><![CDATA[ALIX.3D3]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[LUKS]]></category>

		<guid isPermaLink="false">http://www.twam.info/?p=491</guid>
		<description><![CDATA[The AMD Geode LX800 CPU has an on-chip AES 128-bit crypto accelerations block and a true random number generator. Using this block for encryption and decryption is a lot faster than software implemented algorithms and it unloads the CPU. There are two main purposes where en/decryption is needed: Storing files Communication over network (IPSEC, OpenVPN, [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.amd.com/us-en/ConnectivitySolutions/ProductInformation/0,,50_2330_9863_13022,00.html">AMD Geode LX800</a> CPU has an on-chip AES 128-bit crypto accelerations block and a true random number generator. Using this block for encryption and decryption is a lot faster than software implemented algorithms and it unloads the CPU. There are two main purposes where en/decryption is needed:</p>
<ul>
<li>Storing files</li>
<li>Communication over network (IPSEC, OpenVPN, WPA2, &#8230;)</li>
</ul>
<p>I&#8217;ll focus on the first point in this article using <a href="http://en.wikipedia.org/wiki/LUKS">LUKS</a> (Linux Unified Key Setup).</p>
<p><span id="more-491"></span>To use LUKS and the crypto block, some kernel adjustments have to be made:</p>
<pre>Device Drivers  ---&gt;
   [*] Multiple devices driver support (RAID and LVM)  ---&gt;
   &lt;*&gt;   Device mapper support
   &lt;*&gt;     Crypt target support

-*- Cryptographic API  ---&gt;
   -*- Cryptographic algorithm manager
   -*- CBC support
   {*} ECB support
   {*} AES cipher algorithms
   &lt;*&gt; AES cipher algorithms (i586)
   -*-   MD5 digest algorithm
   &lt;*&gt; SHA224 and SHA256 digest algorithm
   [*] Hardware crypto devices  ---&gt;
   &lt;*&gt;   Support for the Geode LX AES engine</pre>
<p>If you want to test with and without crypto acceleration, I recommend compiling the last one as a module. After compiling and rebooting we have to install LUKE userspace tools:</p>
<pre>emerge -v cryptsetup</pre>
<p>That&#8217;s all. Now we&#8217;re ready to test. As we want to bandwidth limitation from a slow CF card or USB stick, we create a memory loopback device for testing purposes with a size of 128 MB:</p>
<pre>mkdir /tmp/tmpfs
mount -t tmpfs none /tmp/tmpfs -o size=130m
dd if=/dev/zero of=/tmp/tmpfs/test.img count=131072 bs=1024
losetup /dev/loop1 /tmp/tmpfs/test.img</pre>
<p>The tmpfs ramdisk is with intent 130MB large, as the maximum default value is 50% of RAM and with that 128 MB wouldn&#8217;t fit in.</p>
<p>At first, we want to measure software AES performance. For this, we have to assure, that the driver for the crypto block is not loaded. You can get a list of all loaded modules with</p>
<pre>lsmod</pre>
<p>If there&#8217;s geode_aes listed, remove it by</p>
<pre>rmmod geode_aes</pre>
<p>Now we can create a LUKS device by</p>
<pre>cryptsetup -y --cipher aes --key-size 128 luksFormat /dev/loop1</pre>
<p>Mind the key size of 128 bit as the Geode crypto block is only capable of 128 bit keys. You have to confirm this command with a uppercase YES and entering the passphrase twice:</p>
<pre>Are you sure? (Type uppercase yes): YES
Enter LUKS passphrase:
Verify passphrase:
Command successful.</pre>
<p>Now we can open the container. Run</p>
<pre>cryptsetup luksOpen /dev/loop1 test</pre>
<p>and enter the previous set passphrase:</p>
<pre>Enter LUKS passphrase:
key slot 0 unlocked.
Command successful.</pre>
<p>The container is now under /dev/mapper/test and we can do some write test by running dd:</p>
<pre>dd if=/dev/zero of=/dev/mapper/test bs=16384</pre>
<p>After a few seconds, dd will terminate, complaining no space left:</p>
<pre>dd: writing `/dev/mapper/test': No space left on device
8160+0 records in
8159+0 records out
133689344 bytes (134 MB) copied, 18.574 s, 7.2 MB/s</pre>
<p>That&#8217;s OK. We can read here there 7.2 MB/s throughput with crypto block. After closing the container with</p>
<pre>cryptsetup luksClose test</pre>
<p>we can load the crypto block driver by</p>
<pre>modprobe geode_aes</pre>
<p>and can run the same commands as above. We&#8217;ll get a</p>
<pre>dd: writing `/dev/mapper/test': No space left on device
8160+0 records in
8159+0 records out
133689344 bytes (134 MB) copied, 4.88397 s, 27.4 MB/s</pre>
<p>noticing that we&#8217;ve got a 27.4 MB/s throughput now! This also works with <a href="http://de.wikipedia.org/wiki/ESSIV">ESSIV</a> as well. It&#8217;s a bit slower, but more secure. You can to alter the luksFormat to use it:</p>
<pre>cryptsetup -y --cipher aes-cbc-essiv:sha256 --key-size 128 luksFormat /dev/loop1</pre>
<p>I measured 7.0 MB/s without and 24.0 MB/s with crypto block. After all testing don&#8217;t forget to remove the loopback device and umount the ramdisk:</p>
<pre>losetup  -d /dev/loop1
umount /tmp/tmpfs/
rmdir /tmp/tmpfs</pre>
<p>Now you can setup your real crypto disk. You might want to initialize your partition with random data before creating the luksContainter. <em>dd</em> is once again your friend:</p>
<pre>dd if=/dev/urandom of=/dev/XXX bs=1M</pre>
<p>Concerning the use of the crypto block for network encryption: By chance it noticed that if I use WPA2 with AES the geode_aes has a 2 in the used row of lsmod:</p>
<pre>Module                  Size  Used by
lib80211_crypt_ccmp     4808  2
ipw2200               115904  0
libipw                 22792  1 ipw2200
geode_aes               5464  2
lib80211                4568  3 lib80211_crypt_ccmp,ipw2200,libipw</pre>
<p>So it seems, like WPA2 is using this as well. If you know a method to confirm this, let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twam.info/hardware/alix/using-geodes-aes-engine-on-alix3d3/feed</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Installing heat sink on ALIX.3D3</title>
		<link>http://www.twam.info/hardware/alix/installing-heat-sink-on-alix3d3</link>
		<comments>http://www.twam.info/hardware/alix/installing-heat-sink-on-alix3d3#comments</comments>
		<pubDate>Mon, 11 May 2009 17:34:47 +0000</pubDate>
		<dc:creator>twam</dc:creator>
				<category><![CDATA[Alix]]></category>
		<category><![CDATA[ALIX.3D3]]></category>
		<category><![CDATA[Temperature]]></category>

		<guid isPermaLink="false">http://www.twam.info/?p=474</guid>
		<description><![CDATA[A few days ago, while I was compiling some stuff on my ALIX.3D3, I discovered a very high CPU temperature by chance: M/B Temp:    +59 C  (low  =    +0 C, high =   +70 C) CPU Temp:  +71.1 C  (low  =  +0.0 C, high = +70.0 C)   ALARM I downloaded the datasheet of the AMD Geode [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago, while I was compiling some stuff on my ALIX.3D3, I discovered a very high CPU temperature by chance:</p>
<pre>M/B Temp:    +59 C  (low  =    +0 C, high =   +70 C)
CPU Temp:  +71.1 C  (low  =  +0.0 C, high = +70.0 C)   ALARM</pre>
<div id="attachment_476" class="wp-caption alignright" style="width: 220px"><a href="http://www.twam.info/wp-content/uploads/2009/05/alix3d3_heatsink.jpg"><img class="size-medium wp-image-476" title="Alix.3D3 with heatsink" src="http://www.twam.info/wp-content/uploads/2009/05/alix3d3_heatsink-210x130.jpg" alt="Alix.3D3 with heat sink" width="210" height="130" /></a><p class="wp-caption-text">Alix.3D3 with heat sink</p></div>
<p>I downloaded the <a href="http://www.amd.com/files/connectivitysolutions/geode/geode_lx/33234H_LX_databook.pdf">datasheet</a> of the <a href="http://www.amd.com/us-en/ConnectivitySolutions/ProductInformation/0,,50_2330_9863_13022,00.html">AMD Geode LX800</a> CPU to check which temperatures are OK. On page 598 I found that my model (ALXD800EEXJ2VD) is fine for temperatures from 0 °C to 85 °C. Anyway I looked in my spare part box if I could find a suitable heat sink and fortunately I found a 40mm x 40mm x 9mm one. So I ordered some <a href="http://www.arcticsilver.com/arctic_silver_thermal_adhesive.htm">thermal adhesive</a> and installed it.</p>
<p><span id="more-474"></span></p>
<p>To see the advantage of it, I did some measurements. I compiled <a href="http://pages.sbcglobal.net/redelm/">cpuburn </a>and let it ran with and without heat sink. I tried with and without the case. All measurements were made with a <a href="http://www.intel.com/support/wireless/wlan/pro2915abg/">Intel 2915AGB</a> WiFi card and a SanDisk 4 GB Extreme III Compact Flash card installed. Room temperature was between 23.8 °C and 24.5 °C.</p>
<p><a href="http://www.twam.info/wp-content/uploads/2009/05/temp_cpu1.png"><img class="aligncenter size-full wp-image-484" title="ALIX.3D3 CPU temperature" src="http://www.twam.info/wp-content/uploads/2009/05/temp_cpu1.png" alt="ALIX.3D3 CPU temperature" width="580" height="300" /></a>After some start time it&#8217;s possible to see that temperature differences between the with heat sink and without heat sink curves is about 4 °C. After running the board for about an hour with 100% CPU load with the case, temperature was about 66.6 °C. That&#8217;s about 4 °C less than the measured 71.1 °C in the screenshot above.</p>
<p>So installing the heat sink results in only about 4 °C temperature difference, but installation was very simple and cheap.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twam.info/hardware/alix/installing-heat-sink-on-alix3d3/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>LEDs on ALIX.3D3</title>
		<link>http://www.twam.info/hardware/alix/leds-on-alix3d3</link>
		<comments>http://www.twam.info/hardware/alix/leds-on-alix3d3#comments</comments>
		<pubDate>Fri, 08 May 2009 17:43:13 +0000</pubDate>
		<dc:creator>twam</dc:creator>
				<category><![CDATA[Alix]]></category>
		<category><![CDATA[ALIX.3D3]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.twam.info/?p=443</guid>
		<description><![CDATA[As most of the ALIX boards, the ALIX.3D3 has 3 general purpose LEDs. There is kernel support for them, but there are problems when the board has a Award BUIS as the ALIX.3D3. After reading the datasheet of the AMD CS5536 Geode companion about initialisation and use of the general purpose pins I got it [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_444" class="wp-caption alignright" style="width: 220px"><a href="http://www.twam.info/wp-content/uploads/2009/05/alix_leds.jpg"><img class="size-medium wp-image-444" title="LEDs on ALIX.3D3" src="http://www.twam.info/wp-content/uploads/2009/05/alix_leds-210x163.jpg" alt="LEDs on ALIX.3D3" width="210" height="163" /></a><p class="wp-caption-text">LEDs on ALIX.3D3</p></div>
<p>As most of the ALIX boards, the ALIX.3D3 has 3 general purpose LEDs. There is kernel support for them, but there are problems when the board has a Award BUIS as the ALIX.3D3. After reading the <a href="http://www.amd.com/files/connectivitysolutions/geode/geode_lx/33238G_cs5536_db.pdf">datasheet</a> of the <a href="http://www.amd.com/us-en/ConnectivitySolutions/ProductInformation/0,,50_2330_9863_13022,00.html">AMD CS5536</a> Geode companion about initialisation and use of the general purpose pins I got it finally running!<span id="more-443"></span></p>
<p>There are 2 problems with Award BIOS. On the one hand it contains no parseable string referring to the board, so the auto detection of the board in driver doesn&#8217;t work and the initialisation of at least 1 LEDs is wrong. The first problem is easy to solve, by forcing the kernel to load the driver. For the second problem I wrote a small kernel patch (see Update at the end of the post): <a href="http://www.twam.info/wp-content/uploads/2009/05/led.patch">leds-alix2 kernel patch for 2.6.29</a></p>
<p>So how to get them running? First of all we need to patch the Linux kernel and then active support. Download the <a href="http://www.twam.info/wp-content/uploads/2009/05/led.patch">patch</a> to your box and run</p>
<pre>wget http://www.twam.info/wp-content/uploads/2009/05/led.patch -O /root/leds-alix2.patch
cd /usr/src/linux
patch -p1 &lt; /root/leds-alix2.patch</pre>
<p>Now run kernel configuration and select</p>
<pre>Device Drivers  ---&gt;
   [*] LED Support  ---&gt;
      &lt;*&gt;   LED Class Support
            *** LED drivers ***
      &lt;*&gt;   LED Support for ALIX.2 and ALIX.3 series
            *** LED Triggers ***
      [*]   LED Trigger support
      &lt;*&gt;     LED Timer Trigger
      &lt;*&gt;     LED Heartbeat Trigger
      &lt;*&gt;     LED Default ON Trigger</pre>
<p>compile the kernel and adjust the kernel boot line by adding <em>leds-alix2.force=1</em> to force the kernel to load the driver. If you use GRUB append it to the kernel line in /boot/grub.menu.lst:</p>
<pre>kernel /boot/vmlinuz root=/dev/sda2 lxfb.mode_option=1280x1024@60 leds-alix2.force=1</pre>
<p>After rebooting, dmesg should show something like</p>
<pre>[    2.819802] leds_alix2: forced to skip BIOS test, assume system has ALIX.2 style LEDs
[    2.833003] Registered led device: alix:1
[    2.845860] Registered led device: alix:2
[    2.858804] Registered led device: alix:3</pre>
<p>and you should be able to able to switch on/off the LEDs for example by</p>
<pre>echo 1 &gt; /sys/class/leds/alix\:3/brightness
sleep 5
echo 0 &gt; /sys/class/leds/alix\:3/brightness</pre>
<p>LED 3 should lit up for 5 seconds. If it&#8217;s working it&#8217;s time to test some triggers. Try</p>
<pre>echo heartbeat &gt; /sys/class/leds/alix\:2/trigger</pre>
<p>LED 2 should blink like:   pulse &#8211; short pause &#8211; pulse &#8211; long pause &#8211; pulse &#8211; short pause &#8211; &#8230;</p>
<p>Another trigger is timer:</p>
<pre>echo timer  &gt; /sys/class/leds/alix\:1/trigger
echo 1000 &gt; /sys/class/leds/alix\:1/delay_on
echo 100 &gt; /sys/class/leds/alix\:1/delay_on</pre>
<p>should activate the LED for 1000ms and then switch it off for 100ms and start again. I enabled this 2 triggers and made a simple demo video:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="data" value="http://www.youtube.com/v/n6ErdNEuLfo&amp;hl=de&amp;fs=1" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/n6ErdNEuLfo&amp;hl=de&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/n6ErdNEuLfo&amp;hl=de&amp;fs=1" allowscriptaccess="always" allowfullscreen="true" data="http://www.youtube.com/v/n6ErdNEuLfo&amp;hl=de&amp;fs=1"></embed></object></p>
<p><strong>Update</strong>: In kernel 2.6.31 the patch isn&#8217;t required anymore, as it was <a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2216c6e83ccbc9d34f541621ff23f510cd8a256f">accepted</a> in the mainline.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twam.info/hardware/alix/leds-on-alix3d3/feed</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Adding additional I²C sensors to ALIX.3D3</title>
		<link>http://www.twam.info/hardware/alix/adding-additional-i2c-sensors-to-alix3d3</link>
		<comments>http://www.twam.info/hardware/alix/adding-additional-i2c-sensors-to-alix3d3#comments</comments>
		<pubDate>Thu, 07 May 2009 20:02:03 +0000</pubDate>
		<dc:creator>twam</dc:creator>
				<category><![CDATA[Alix]]></category>
		<category><![CDATA[ALIX.3D3]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sensor]]></category>
		<category><![CDATA[Temperature]]></category>

		<guid isPermaLink="false">http://www.twam.info/?p=429</guid>
		<description><![CDATA[The manual of the ALIX.3D3 board mentions a lot of pin descriptions of all pin headers on the board. J8 interfaces the SMBus of the AMD CS5536 Geode companion (which is compatible to I²C if bus speed is below 100kHz, see Maxim’s Appnote for detailed comparison). So why not add additional I²C sensors. As an [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_431" class="wp-caption alignright" style="width: 220px"><a href="http://www.twam.info/wp-content/uploads/2009/05/smbus.jpg"><img class="size-medium wp-image-431" title="J8: SMBus" src="http://www.twam.info/wp-content/uploads/2009/05/smbus-210x157.jpg" alt="J8: SMBus" width="210" height="157" /></a><p class="wp-caption-text">J8: SMBus</p></div>
<p>The <a href="http://www.alix-box.info/wiki/images/Alix2.pdf">manual</a> of the ALIX.3D3 board mentions a lot of pin descriptions of all pin headers on the board. J8 interfaces the <a href="http://www.smbus.org/">SMBus</a> of the <a href="http://www.amd.com/us-en/ConnectivitySolutions/ProductInformation/0,,50_2330_9863_13022,00.html">AMD CS5536</a> Geode companion (which is compatible to <a href="http://de.wikipedia.org/wiki/I%C2%B2C">I²C</a> if bus speed is below 100kHz, see <a href="http://www.maxim-ic.com/appnotes.cfm/appnote_number/476">Maxim’s Appnote</a> for detailed comparison). So why not add additional I²C sensors. As an example I connected an <a href="http://www.national.com/ds/LM/LM75.pdf">LM75</a> temperature sensor.</p>
<p>First of all we need to add some pin headers to J8 found on board next to the USB port. <span id="more-429"></span>The pin assignment can be found on page 18 of the <a href="http://www.alix-box.info/wiki/images/Alix2.pdf">manual</a>:</p>
<table border="0">
<tbody>
<tr>
<th>PIN</th>
<th>signal</th>
<th>descriptions</th>
</tr>
<tr>
<td>1</td>
<td>+3.3V</td>
<td>power supply</td>
</tr>
<tr>
<td>2</td>
<td>SMB_SCL</td>
<td>SMBus/I²C clock</td>
</tr>
<tr>
<td>3</td>
<td>SMB_SDA</td>
<td>SMBus/I²C data</td>
</tr>
<tr>
<td>4</td>
<td>GND</td>
<td>ground</td>
</tr>
</tbody>
</table>
<p>We have to connect these four lines with the power (pin 8), SDA (pin 1), SCL (pin 2) and ground (pin 4) of the LM75 chip. A0, A1 and A2 have to be connected either to GND or power. The level on these pins configure the slave address of the device. I connected all of them with GND. The typical application example found in the <a href="http://www.national.com/ds/LM/LM75.pdf">datasheet</a> advises an 100 nF capacitor between pin 4 and pin 8 close to the chip:</p>
<p><a href="http://www.twam.info/wp-content/uploads/2009/05/lm75.png"><img class="aligncenter size-full wp-image-428" title="LM75: Typical application" src="http://www.twam.info/wp-content/uploads/2009/05/lm75.png" alt="LM75: Typical application" width="400" height="280" /></a></p>
<p>If soldered the LM75 (a smd chip) to an adapter and connected everything on a bread board:</p>
<p><a href="http://www.twam.info/wp-content/uploads/2009/05/lm75_wired.jpg"><img class="aligncenter size-medium wp-image-436" title="LM75 wired on bread board" src="http://www.twam.info/wp-content/uploads/2009/05/lm75_wired-210x196.jpg" alt="LM75 wired on bread board" width="210" height="196" /></a></p>
<p>If everything is connected it&#8217;s time to add software support. I assume you already installed the onboard temperature sensors descriped in my <a href="http://www.twam.info/hardware/alix/temperature-sensor-on-alix3d3">previous article</a>. So, only support for the LM75 is need in the kernel:</p>
<pre>Device Drivers  ---&gt;
   &lt;*&gt; Hardware Monitoring support  ---&gt;
      &lt;*&gt;   National Semiconductor LM75 and compatibles</pre>
<p>After compiling and rebooting you can run <em>sensors</em> again. It should show up the new device:</p>
<pre>lm75-i2c-0-48
Adapter: CS5536 ACB0
temp:      +30.0 C  (high = +80.0 C, hyst = +75.0 C)</pre>
<p>So connecting additional sensors is very easy (when they&#8217;re support in the kernel).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twam.info/hardware/alix/adding-additional-i2c-sensors-to-alix3d3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating BIOS on ALIX.3D3 within Linux</title>
		<link>http://www.twam.info/linux/updating-bios-on-alix3d3-within-linux</link>
		<comments>http://www.twam.info/linux/updating-bios-on-alix3d3-within-linux#comments</comments>
		<pubDate>Wed, 06 May 2009 18:45:10 +0000</pubDate>
		<dc:creator>twam</dc:creator>
				<category><![CDATA[Alix]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ALIX.3D3]]></category>
		<category><![CDATA[BIOS]]></category>

		<guid isPermaLink="false">http://www.twam.info/?p=414</guid>
		<description><![CDATA[Usually BIOS updating means booting DOS and running a proprietary tool from the board vendor. A few days ago, coreboot&#8217;s flashrom 0.9 has realeased. It&#8217;s an open-source tool which supports program almost all flash chips used on x86 mainboards. Its compatibility list includes Geode™ CS5530/A, which can be found on the ALIX.3D3 board. So why not [...]]]></description>
			<content:encoded><![CDATA[<p>Usually BIOS updating means booting <a href="http://en.wikipedia.org/wiki/MS-DOS">DOS</a> and running a proprietary tool from the board vendor. A few days ago, coreboot&#8217;s <a href="http://www.coreboot.org/Flashrom">flashrom</a> 0.9 has <a href="http://www.coreboot.org/News#2009.2F05.2F04_flashrom_0.9.0_has_been_released">realeased</a>. It&#8217;s an open-source tool which supports program almost all flash chips used on x86 mainboards. Its compatibility list includes Geode™ CS5530/A, which can be found on the ALIX.3D3 board. So why not using flashrom to update ALIX.3D3 BIOS.</p>
<p><span id="more-414"></span>Sadly there is no ebuild for flashrom in portage, so Gentoo users (and maybe some other) have to build it on there own, but it&#8217;s quite easy. You need to install <a href="http://subversion.tigris.org/">subversion</a>, an open-source revision control system, first:</p>
<p>emerge -va subversion</p>
<p>As there is no portage package for flashrom, we need to install it somewhere. I installed it in /root/flashrom so it can be removed easily. You can achieve this by</p>
<pre>cd root
svn co svn://coreboot.org/flashrom/trunk flashrom
cd flashrom
make</pre>
<p>You can do an optional</p>
<pre>make install</pre>
<p>to install the binaries in /usr/local/sbin and install the man page. Now we should save our old BIOS. Running</p>
<pre>flashrom -r /root/bios_save.bin</pre>
<p>should display some info on the found chipset and flash chip:</p>
<pre>Calibrating delay loop... OK.
No coreboot table found.
Found chipset "AMD CS5536", enabling flash write... OK.
Found chip "AMIC A49LF040A" (512 KB) at physical address 0xfff80000.
Reading flash... done.</pre>
<p>If you have an image of the old installed BIOS you can check, if everything went right, by</p>
<pre>diff /root/bios_save.bin /root/bios_old.bin</pre>
<p>where /root/bios_old.bin is the old BIOS version, preferable found on the manufacturer&#8217;s website. Now we can update the BIOS. Download the new BIOS version (ALIX.3D3 can be found <a href="http://www.pcengines.ch/alix3d3.htm">here</a>) and run:</p>
<pre>flashrom -wv /root/bios_new.bin</pre>
<p>flashrom should print some information, a process status and after all a VERIFIED, if everything went right:</p>
<pre>Calibrating delay loop... OK.
No coreboot table found.
Found chipset "AMD CS5536", enabling flash write... OK.
Found chip "AMIC A49LF040A" (512 KB) at physical address 0xfff80000.
Flash image seems to be a legacy BIOS. Disabling checks.
Programming page: 0007 at address: 0x00070000
Verifying flash... VERIFIED.</pre>
<p>Now your BIOS should be updated. It&#8217;s time to plug (power) and pray.</p>
<p><strong>Update</strong>: After writing a <a href="http://bugs.gentoo.org/show_bug.cgi?id=268790">Gentoo Bug report</a>, there is now an <a href="http://packages.gentoo.org/package/sys-apps/flashrom">ebuild</a> in portage. You can install it by</p>
<pre>emerge -va flashrom</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.twam.info/linux/updating-bios-on-alix3d3-within-linux/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Sound on ALIX.3D3</title>
		<link>http://www.twam.info/hardware/alix/sound-on-alix3d3</link>
		<comments>http://www.twam.info/hardware/alix/sound-on-alix3d3#comments</comments>
		<pubDate>Sat, 02 May 2009 14:10:18 +0000</pubDate>
		<dc:creator>twam</dc:creator>
				<category><![CDATA[Alix]]></category>
		<category><![CDATA[ALIX.3D3]]></category>
		<category><![CDATA[ALSA]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sound]]></category>

		<guid isPermaLink="false">http://www.twam.info/?p=346</guid>
		<description><![CDATA[The AMD CS5536 Geode on the ALIX.3D3 board has an included audio controller which headset output and microphone input is populated on the board. lspci lists the audio controller as 00:0f.3 Multimedia audio controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] Audio (rev 01) ALSA (Advanced Linux Sound Architecture) supports this chip. To use audio [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.amd.com/us-en/ConnectivitySolutions/ProductInformation/0,,50_2330_9863_13022,00.html">AMD CS5536</a> Geode on the ALIX.3D3 board has an included audio controller which headset output and microphone input is populated on the board. <em>lspci</em> lists the audio controller as</p>
<pre>00:0f.3 Multimedia audio controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] Audio (rev 01)</pre>
<p><a href="http://www.alsa-project.org/">ALSA</a> (Advanced Linux Sound Architecture) supports this chip. <span id="more-346"></span>To use audio on the board, some adjustments to kernel are needed:</p>
<pre>Device Drivers  ---&gt;
   &lt;*&gt; Sound card support  ---&gt;
      &lt;*&gt;   Advanced Linux Sound Architecture  ---&gt;
         [*]   Dynamic device file minor numbers
         [*]   PCI sound devices  ---&gt;
            &lt;*&gt;   CS5535/CS5536 Audio</pre>
<p>After compiling and installing the kernel, we need to install ALSA userspace tools:</p>
<pre>emerge -va alsa-headers alsa-lib alsa-utils</pre>
<p>After rebooting the kernel should recognize the sound device:</p>
<pre>[    2.830979] cs5535audio 0000:00:0f.3: PCI INT B -&gt; Link[LNKB] -&gt; GSI 11 (level, low) -&gt; IRQ 11
[    2.842814] cs5535audio 0000:00:0f.3: setting latency timer to 64
[    2.850457] ALSA device list:
[    2.863735]   #0: CS5535 Audio cs5535audio at 0xfe00, irq 11</pre>
<p>Now it&#8217;s time to setup the audio channels. Run</p>
<pre>alsamixer</pre>
<p>unmute and pull up the Headphone and PCM faders. Unmute &#8220;Mic Boost&#8221; and change to the Capture View and pull up Capture there. It should look like</p>
<p><a href="http://www.twam.info/wp-content/uploads/2009/05/playback.png"><img class="size-medium wp-image-352" title="alsamixer: Playback" src="http://www.twam.info/wp-content/uploads/2009/05/playback-300x184.png" alt="alsamixer: Playback" width="210" height="129" /></a> <a href="http://www.twam.info/wp-content/uploads/2009/05/capture.png"><img class="size-medium wp-image-348" title="alsamixer: Capture" src="http://www.twam.info/wp-content/uploads/2009/05/capture-300x184.png" alt="alsamixer: Capture" width="210" height="129" /></a></p>
<p>You can navigate with the left/right keys, change the volume with the up/down keys, mute/unmute with M, change between Playback/Capture/All with TAB and quit with ESC.</p>
<div id="attachment_355" class="wp-caption alignright" style="width: 196px"><a href="http://www.twam.info/wp-content/uploads/2009/05/headphone_microphone.jpg"><img class="size-medium wp-image-355" title="J12/J13 on ALIX.3D3" src="http://www.twam.info/wp-content/uploads/2009/05/headphone_microphone-266x300.jpg" alt="J12/J13 on ALIX.3D3" width="186" height="210" /></a><p class="wp-caption-text">J12/J13 on ALIX.3D3</p></div>
<p>Now connect a headphone oder speakers to J12 (headphone output) and run</p>
<pre>speaker-test -twav -c2</pre>
<p>You should hear a female voice saying &#8220;front left&#8221; and &#8220;front right&#8221; on the corresponding channel. Cancel the test with Control+C. Now connect a microphone to J13 (microphone input) and run</p>
<pre>arecord -d 5 -f cd -t wav /tmp/mic-test.wav</pre>
<p>You have 5 seconds to make some noise. Afterwards run</p>
<pre>aplay /tmp/mic-test.wav</pre>
<p>and you should hear the previous made noise. Finally do</p>
<pre>rc-update add alsasound boot</pre>
<p>so that ALSA can save/restore your settings on reboot.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twam.info/hardware/alix/sound-on-alix3d3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Framebuffer on ALIX.3D3</title>
		<link>http://www.twam.info/hardware/alix/framebuffer-on-alix3d3</link>
		<comments>http://www.twam.info/hardware/alix/framebuffer-on-alix3d3#comments</comments>
		<pubDate>Sat, 02 May 2009 11:11:47 +0000</pubDate>
		<dc:creator>twam</dc:creator>
				<category><![CDATA[Alix]]></category>
		<category><![CDATA[ALIX.3D3]]></category>
		<category><![CDATA[Framebuffer]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.twam.info/?p=332</guid>
		<description><![CDATA[In contrary to most ALIX devices, the ALIX.3D3 has an integrated VGA controller and an Award BIOS (tinyBIOS doesn&#8217;t support VGA), so why not attach a monitor. Standard text mode is supported by default (and faster than graphical mode), but if you wish to change resolution, add a boot logo or even want to use [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_338" class="wp-caption alignright" style="width: 220px"><a href="http://www.twam.info/wp-content/uploads/2009/05/cute_tux.png"><img class="size-medium wp-image-338" title="ALIX.3D3 booting" src="http://www.twam.info/wp-content/uploads/2009/05/cute_tux-300x240.png" alt="ALIX.3D3 booting" width="210" height="168" /></a><p class="wp-caption-text">ALIX.3D3 booting</p></div>
<p>In contrary to most ALIX devices, the ALIX.3D3 has an integrated VGA controller and an Award BIOS (tinyBIOS doesn&#8217;t support VGA), so why not attach a monitor.</p>
<p>Standard text mode is supported by default (and faster than graphical mode), but if you wish to change resolution, add a boot logo or even want to use a graphical boot screen like splashutils a framebuffer device is needed.</p>
<p><em>lspci</em> lists the integrated VGA controller of the <a onclick="javascript:pageTracker._trackPageview('/outbound/article/www.amd.com');" href="http://www.amd.com/us-en/ConnectivitySolutions/ProductInformation/0,,50_2330_9863_13022,00.html">AMD Geode LX800</a> CPU as the video device:</p>
<pre>00:01.1 VGA compatible controller: Advanced Micro Devices [AMD] Geode LX Video</pre>
<p>Luckily the linux kernel supports this device directly and so no VESA framebuffer is needed. <span id="more-332"></span>To support it, you have to select some options in the kernel config:</p>
<pre>Device Drivers  ---&gt;
   Graphics support  ---&gt;
      &lt;*&gt; Support for frame buffer devices  ---&gt;
         [*]   AMD Geode family framebuffer support (EXPERIMENTAL)
         &lt;*&gt;     AMD Geode LX framebuffer support (EXPERIMENTAL)
      Console display driver support  ---&gt;
         -*- VGA text console
         [*]   Enable Scrollback Buffer in System RAM
         (64)    Scrollback Buffer Size (in KB)
         &lt;*&gt; Framebuffer Console support</pre>
<p>If you like to have to linux boot logo as well, you should add some points in addition:</p>
<pre>Device Drivers  ---&gt;
   Graphics support  ---&gt;
      [*] Bootup logo  ---&gt;
         --- Bootup logo
         [*]   Standard 224-color Linux logo</pre>
<p>After compiling and installing the kernel, we have to tell him with resolution we prefer. You have to add something like</p>
<pre>lxfb.mode_option=1280x1024@60</pre>
<p>to you kernel boot line. If you use <a href="http://www.gnu.org/software/grub/">GRUB</a> as your bootloader just append it to the kernel line in /boot/grub/menu.lst.</p>
<p>Before rebooting you should install framebuffer userspace tools. There&#8217;s a ebuild for them, so just try</p>
<pre>emerge -va fbset</pre>
<p>Now you can reboot. After rebooting resolution should have changed. You can controll settings with fbset tool. It should printout something like</p>
<pre>mode "1280x1024-60"
    # D: 107.968 MHz, H: 63.962 kHz, V: 60.002 Hz
    geometry 1280 1024 1280 1024 16
    timings 9262 248 48 38 1 112 3
    rgba 5/11,6/5,5/0,0/0
endmode</pre>
<p>You can change modes with this tool if you added your mode to /etc/fb.modes. This file is empty on default, but there are examples in /usr/share/doc/fbset-2.1/. I copied fb.modes.ATI to /etc/fb.modes and tested some modes, which were running fine.</p>
<p>If you want to make some screenshots from your framebuffer, I recommend installing fbgrab by</p>
<pre>emerge -va fbgrab</pre>
<p>Now you scan make some nice shots with</p>
<pre>fbgrab /tmp/cute_tux.png</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.twam.info/hardware/alix/framebuffer-on-alix3d3/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Installing Gentoo on ALIX.3D3</title>
		<link>http://www.twam.info/linux/gentoo/installing-gentoo-on-alix3d3</link>
		<comments>http://www.twam.info/linux/gentoo/installing-gentoo-on-alix3d3#comments</comments>
		<pubDate>Fri, 01 May 2009 14:54:09 +0000</pubDate>
		<dc:creator>twam</dc:creator>
				<category><![CDATA[Alix]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[ALIX.3D3]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.twam.info/?p=321</guid>
		<description><![CDATA[When I ordered the ALIX.3D3 board I thought installing Gentoo on this should be a piece of cake, but finally there were some stumbling blocks and that&#8217;s why I want to summarize how I got gentoo running. First of all, I recommend installing Gentoo on a normal desktop to get to know the installing process, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="Gentoo Logo" src="http://www.gentoo.org/images/glogo-small.png" alt="" width="146" height="149" />When I ordered the ALIX.3D3 board I thought installing <a href="http://www.gentoo.org/">Gentoo</a> on this should be a piece of cake, but finally there were some <span class="hw">stumbling blocks and that&#8217;s why I want to summarize how I got gentoo running.</span></p>
<p>First of all, I recommend installing Gentoo on a normal desktop to get to know the installing process, which is a bit different from graphical installers of mainstream distros. The <a href="http://www.gentoo.org/doc/en/handbook/handbook-x86.xml">Gentoo Handbook</a> is a great documentation how this done.</p>
<p>To install gentoo, you have to boot a minimal or &#8220;rescue&#8221; linux usually from cd/dvd. I tried to convice the bios to boot from a usb cd-rom drive, but I hadn&#8217;t any success.<span id="more-321"></span></p>
<p>So I had to prepare a USB stick to boot from. There&#8217;s a nice tool <a href="http://unetbootin.sourceforge.net/">UNetbootin</a> which automatically copies ISO images to a usbstick and makes it bootable. I tried a lot with the Linux version of it but didn&#8217;t had any success regardless of which ISO image or USB stick I took. So I booted windows and tried it with this version. I had success on the first attempt, using the install-x86-minimal.iso from Gentoo and a 3 EUR SD-card Reader with a 4 GB SDHC card in it, formatted as FAT32 as the only partition (not in superfloppy mode).</p>
<p>If you&#8217;ve got a booting usb stick, insert it into a USB plug of the board, attach a USB keyboard and a monitor to the VGA port. Power on and press escape to select the boot menu. There should be an option for the usb stick if everything went fine.</p>
<p>Now the gentoo minimal system should boot and you can proceed with the usual installing (look into <a href="http://www.gentoo.org/doc/en/handbook/handbook-x86.xml">Gentoo Handbook</a> for details). The AMD Geode LX800 cpu is a i586 cpu, so you have to install a i386, i486 oder i586 stage (i686 or amd64 won&#8217;t work!). I installed a i486 stage 3 and updated later to i586.</p>
<p>Partitioning should follow your preferences but don&#8217;t a forget a swap partition. 256 MB of RAM is not that much and gcc will not compile without!</p>
<p>I took</p>
<pre>CFLAGS="-O2 -march=i486 -pipe"</pre>
<p>for installation as the gcc version on the stage3 archive don&#8217;t support the geode march.</p>
<p>The rest of the installation is business as usual. I installed gentoo-sources for a optimized kernel and took this configuration here: <a href="http://www.twam.info/wp-content/uploads/2009/05/config">ALIX.3D3 kernel-2.6.29-r2 config</a></p>
<p>After finishing installation and booting with the new kernel, it&#8217;s time to update the systems to i586. For this, at first update all packages to actual version, especially gcc to version 4.3. Afterwards it&#8217;s save to change</p>
<pre>CFLAGS="-march=geode -Os -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -pipe -fomit-frame-pointer"</pre>
<p>and proceed with changing of the CHOST variable. There&#8217;s a nice tutorial here: <a href="http://www.gentoo.org/doc/en/change-chost.xml">Changing CHOST</a>.</p>
<p>Now you should have a nice and optimized gentoo on your ALIX.3D3</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twam.info/linux/gentoo/installing-gentoo-on-alix3d3/feed</wfw:commentRss>
		<slash:comments>51</slash:comments>
		</item>
		<item>
		<title>Temperature sensor on ALIX.3D3</title>
		<link>http://www.twam.info/hardware/alix/temperature-sensor-on-alix3d3</link>
		<comments>http://www.twam.info/hardware/alix/temperature-sensor-on-alix3d3#comments</comments>
		<pubDate>Thu, 30 Apr 2009 13:35:57 +0000</pubDate>
		<dc:creator>twam</dc:creator>
				<category><![CDATA[Alix]]></category>
		<category><![CDATA[ALIX.3D3]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sensor]]></category>
		<category><![CDATA[Temperature]]></category>

		<guid isPermaLink="false">http://www.twam.info/?p=308</guid>
		<description><![CDATA[The schematics of the ALIX.3D3 mention a temperature sensors LM86 on page 2 which external sensors pins are connected to the TDP/TDN pins of the Geode LX800 CPU. So this sensor should be able to measure CPU and mainboard temperature. The LM86 ist connected by the SMBus (which is compatible to I²C if bus speed [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_313" class="wp-caption alignright" style="width: 220px"><a href="http://www.twam.info/wp-content/uploads/2009/04/lm86.jpg"><img class="size-medium wp-image-313" title="LM86 on ALIX.3D3" src="http://www.twam.info/wp-content/uploads/2009/04/lm86-300x228.jpg" alt="LM86 on ALIX.3D3" width="210" height="160" /></a><p class="wp-caption-text">LM86 on ALIX.3D3</p></div>
<p>The <a href="http://www.alix-box.info/wiki/images/Alix3c.pdf">schematics</a> of the ALIX.3D3 mention a temperature sensors <a href="http://www.national.com/mpf/LM/LM86.html">LM86</a> on page 2 which external sensors pins are connected to the TDP/TDN pins of the Geode LX800 CPU. So this sensor should be able to measure CPU and mainboard temperature.</p>
<p>The LM86 ist connected by the <a href="http://www.smbus.org/">SMBus</a> (which is compatible to <a href="http://de.wikipedia.org/wiki/I%C2%B2C">I²C</a> if bus speed is below 100kHz, see <a href="http://www.maxim-ic.com/appnotes.cfm/appnote_number/476">Maxim&#8217;s Appnote</a> for detailed comparison) via the <a href="http://www.amd.com/us-en/ConnectivitySolutions/ProductInformation/0,,50_2330_9863_13022,00.html">AMD CS5536</a> Geode companion.<span id="more-308"></span></p>
<p>To support the temperature sensor by the linux kernel, several options must be set:</p>
<pre>Device Drivers  ---&gt;
&lt;*&gt; I2C support  ---&gt;
&lt;*&gt;   I2C device interface
      I2C Hardware Bus support  ---&gt;
      &lt;*&gt; Geode ACCESS.bus support
&lt;*&gt; Hardware Monitoring support  ---&gt;
&lt;*&gt;   National Semiconductor LM90 and compatibles</pre>
<p>After compiling and booting the kernel, we need some userspace tools to read information by the temperatur sensor. Usually this is done by <a href="http://www.lm-sensors.org/">Lm_sensors</a>. Gentoo provides ebuilds so you should be fine with</p>
<pre>emerge -va lm_sensors</pre>
<p>After emerging, you should run</p>
<pre>sensors-detect</pre>
<p>to search for sensors. The program will ask you some question on which devices it should scan for sensors and which modules should be loaded. If you compiled everything into kernel (not into modules) you should be fine with</p>
<pre>We can start with probing for (PCI) I2C or SMBus adapters.
Do you want to probe now? (YES/no): YES
Probing for PCI bus adapters...
Use driver `scx200_acb' for device 0000:00:0f.0: CS5536 [Geode companion] ISA

We will now try to load each adapter module in turn.
Load `scx200_acb' (say NO if built into your kernel)? (YES/no): no
If you have undetectable or unsupported I2C/SMBus adapters, you can have
them scanned by manually loading the modules before running this script.

We are now going to do the I2C/SMBus adapter probings. Some chips may
be double detected; we choose the one with the highest confidence
value in that case.
If you found that the adapter hung after probing a certain address,
you can specify that address to remain unprobed.

Next adapter: CS5536 ACB0 (i2c-0)
Do you want to scan it? (YES/no/selectively): YES
Client found at address 0x4c
Handled by driver `lm90' (already loaded), chip type `lm86'

Some chips are also accessible through the ISA I/O ports. We have to
write to arbitrary I/O ports to probe them. This is usually safe though.
Yes, you do have ISA I/O ports even if you do not have any ISA slots!
Do you want to scan the ISA I/O ports? (YES/no): no

Some Super I/O chips may also contain sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): no

Some south bridges, CPUs or memory controllers may also contain
embedded sensors. Do you want to scan for them? (YES/no): no</pre>
<p>After answering all questions, sensor-detect should be able to find your sensor</p>
<pre>Driver `lm90' (should be inserted):
  Detects correctly:
  * Bus `CS5536 ACB0'
    Busdriver `UNKNOWN', I2C address 0x4c
    Chip `lm86' (confidence: 6)</pre>
<p>sensors-detect will ask to save config (say YES) and propose some to commands to be executed, but we don&#8217;t care, because we compiled everything direct into kernel.</p>
<p>Now sould be able to run <em>sensors</em> and get temperatures:</p>
<pre>lm86-i2c-0-4c
Adapter: CS5536 ACB0
M/B Temp:    +47 C  (low  =    +0 C, high =   +70 C)
CPU Temp:  +56.8 C  (low  =  +0.0 C, high = +70.0 C)
M/B Crit:    +85 C  (hyst =   +75 C)
CPU Crit:    +85 C  (hyst =   +75 C)</pre>
<p>If everthing&#8217;s fine, you can add lm_sensors to default runlevel with</p>
<pre>rc-update add lm_sensors default</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.twam.info/hardware/alix/temperature-sensor-on-alix3d3/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Watchdog on ALIX.3D3</title>
		<link>http://www.twam.info/hardware/alix/watchdog-on-alix3d3</link>
		<comments>http://www.twam.info/hardware/alix/watchdog-on-alix3d3#comments</comments>
		<pubDate>Tue, 28 Apr 2009 15:09:13 +0000</pubDate>
		<dc:creator>twam</dc:creator>
				<category><![CDATA[Alix]]></category>
		<category><![CDATA[ALIX.3D3]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Watchdog]]></category>

		<guid isPermaLink="false">http://www.twam.info/?p=291</guid>
		<description><![CDATA[The AMD CS5536 Geode companion on the ALIX.3D3 board has an internal watchdog, beeing able to reboot the system by itself if it&#8217;s hangup. To use this watchdog device, kernel support is needed. In kernel 2.6.29 you have to enable   Device Drivers  ---&#62;     [*] Watchdog Timer Support  ---&#62;       [*]   Disable watchdog shutdown [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.amd.com/us-en/ConnectivitySolutions/ProductInformation/0,,50_2330_9863_13022,00.html">AMD CS5536</a> Geode companion on the ALIX.3D3 board has an internal watchdog, beeing able to reboot the system by itself if it&#8217;s hangup. To use this watchdog device, kernel support is needed. In kernel 2.6.29 you have to enable</p>
<pre>  Device Drivers  ---&gt;
    [*] Watchdog Timer Support  ---&gt;
      [*]   Disable watchdog shutdown on close
      &lt;*&gt;   AMD Geode CS5535/CS5536 Watchdog</pre>
<p>for beeing able to use the watchdog timer. The <em>Disable watchdog shutdown on close</em> is optional. Usually if the watchdog program terminates it tell&#8217;s the kernel to disable the watchdog and the kernel does. With this option you can prevent the kernel from disabling the watchdog.<span id="more-291"></span></p>
<p>After compiling the kernel and rebooting you have to install a software to tell the watchdog everything&#8217;s fine. You can install it by</p>
<pre>emerge -va watchdog</pre>
<p>Afterwards you have to enable the hardware watchdog and enable realtime priority in the config file /etc/watchdog.conf</p>
<pre>watchdog-device = /dev/watchdog
realtime        = yes
priority        = 1</pre>
<p>Now you can start the program by</p>
<pre>/etc/init.d/watchdog start</pre>
<p>It now sends about every 10 seconds a ping to the watchdog device, claiming everything&#8217;s fine. <img src='http://www.twam.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You can configure the program to watch files, network, system load as well, but that&#8217;s optional.</p>
<p>Finally do a</p>
<pre>rc-update add watchdog boot</pre>
<p>to start the program on each boot.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twam.info/hardware/alix/watchdog-on-alix3d3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New hardware gadget: ALIX.3D3</title>
		<link>http://www.twam.info/hardware/alix/alix3d3</link>
		<comments>http://www.twam.info/hardware/alix/alix3d3#comments</comments>
		<pubDate>Mon, 27 Apr 2009 14:29:53 +0000</pubDate>
		<dc:creator>twam</dc:creator>
				<category><![CDATA[Alix]]></category>
		<category><![CDATA[ALIX.3D3]]></category>

		<guid isPermaLink="false">http://www.twam.info/?p=282</guid>
		<description><![CDATA[A few days ago, I ordered a new hardware gadget to play with: An embedded pc board called ALIX.3D3 manufactered by PC Engines. It&#8217;s a small (100 x 160 mm) board, with AMD Geode LX800 CPU with 800 MHz 256 MB DDR DRAM Via VT6105M 10/100 Mbit Ethernet 2 miniPCI slots AMD CS5536 Geode companion [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago, I ordered a new hardware gadget to play with: An embedded pc board called <a href="http://www.pcengines.ch/alix3d3.htm">ALIX.3D3</a> manufactered by <a href="http://www.pcengines.ch">PC Engines</a>.</p>
<div id="attachment_284" class="wp-caption alignright" style="width: 310px"><a href="http://www.twam.info/wp-content/uploads/2009/04/alix_up.jpg"><img class="size-medium wp-image-284" title="ALIX.3D3 upside" src="http://www.twam.info/wp-content/uploads/2009/04/alix_up-300x227.jpg" alt="ALIX.3D3 upside" width="300" height="227" /></a><p class="wp-caption-text">ALIX.3D3 upside</p></div>
<p>It&#8217;s a small (100 x 160 mm) board, with</p>
<ul>
<li><a href="http://www.amd.com/us-en/ConnectivitySolutions/ProductInformation/0,,50_2330_9863_13022,00.html">AMD Geode LX800</a> CPU with 800 MHz</li>
<li>256 MB DDR DRAM</li>
<li>Via VT6105M 10/100 Mbit Ethernet</li>
<li>2 miniPCI slots</li>
<li><a href="http://www.google.de/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Fwww.amd.com%2Fus-en%2FConnectivitySolutions%2FProductInformation%2F0%2C%2C50_2330_9863_13022%255E13054%2C00.html&amp;ei=ge71SZK7BIaE_Ab817DiCQ&amp;usg=AFQjCNGUA19RKpTLIfZgPjUgciVTSfe-Fw&amp;sig2=sSRcI-QUW1sB_j2q8zhnVg">AMD CS5536</a> Geode companion providing 2 USB 2.0 ports, 1 serial port (RS232), 1 Compact-Flash slot and integrated VGA and audio</li>
</ul>
<p>More information, datasheets and manual can be found in the <a href="http://www.alix-box.info/wiki/index.php/ALIX.3D3_(1_LAN%2C_2_miniPCI%2C_LX800%2C_USB%2C_VGA%2C_audio%2C_Award_BIOS)">Alix Wiki</a>.</p>
<p>I ordered the board from <a href="http://www.varia-store.com">Varia Store</a> for about 130€ including an aluminium chassis and a suitable power supply.</p>
<div id="attachment_285" class="wp-caption alignright" style="width: 310px"><a href="http://www.twam.info/wp-content/uploads/2009/04/alix_down.jpg"><img class="size-medium wp-image-285" title="ALIX.3D3 downside" src="http://www.twam.info/wp-content/uploads/2009/04/alix_down-300x194.jpg" alt="ALIX.3D3 downside" width="300" height="194" /></a><p class="wp-caption-text">ALIX.3D3 downside</p></div>
<p>Challenges are now to install an optimized <a href="http://www.gentoo.org">Gentoo </a>on a Compact-Flash card with support for all hardware included, installing a 802.11b/g/n WLAN card and doing some tests with my <a href="http://www.google.de/url?sa=t&amp;source=web&amp;ct=res&amp;cd=5&amp;url=http%3A%2F%2Fwww.logitech.com%2Findex.cfm%2Fwebcam_communications%2Fwebcams%2Fdevices%2F3056%26cl%3DDE%2CDE&amp;ei=NMD1SZHHM4WK_Qa-wZncCQ&amp;usg=AFQjCNFTMu5q_bhlmNfg8N4qN4cK6ghq7Q&amp;sig2=EvBYkr11B6hSzkND_zku1g">Logitech QuickCam Pro 9000</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twam.info/hardware/alix/alix3d3/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

