Open Source Workshop #2 - Voyage Linux Introduction

I have given a 5 min lightning talk about Voyage Linux in Open Source Workshop #2 held in Hong Kong Polytechnic University on Jan 14, 2012.

The presentation slides could be found here:

It is a nice gathering for all open source developers in Hong Kong to meet regularly. I decide to join the workshop whenever I have free ti

Spam protected email address for mailman archive

As a voyage-linux list administrator, I have recently received a request from a list member for removing his email address from the archive. I have reviewed the archive immediately and the email address is shown as "xxx at", which makes intelligent spam-bots easily to find out the email address.

I have prepared the a script called "" to replace "xxx at" with "(spam-protected)" for all archived messages.

for FILE in 20[0-9][0-9]-*/0*.html
    echo $FILE
    #grep "TITLE=.*\>.* at .*$" $FILE
    sed -e "s/TITLE=\(.*\)>.* at .*$/TITLE\1>\(spam-protected\)/" -i $FILE

Put the script to the archive root and run it:

# cd /usr/local/mailman/archives/private/voyage-linux

Next, we need to change the achiver program such that it will not generated "xxx at" as well. In /usr/local/mailman/Mailman/Archiver/, change:

-       = re.sub('@', _(' at '),
+       = "(spam-protected)"

-                author = re.sub('@', _(' at '),
+                author = "(spam-protected)"

-            author = re.sub('@', _(' at '), author)
+            author = "(spam-protected)"

That's it. When new mail comes from the list member, the archiver will now mask xxx at email address as "(spam-protected)".

2010-06-08 Update: Two of the above changes in incorrect. Now fixed. I also have found a way to regenerate all the archive by using this command:

# cd /usr/local/mailman
# bin/arch voyage-linux archives/private/voyage-linux.mbox/voyage-linux.mbox 

Subversion to DVCS - Your mindset has to change as well

Joel Spolsky has setup Mercurial Tutorial [1] that help developers understand DVCS and work it works.

Joel shares the same confusion as I have with git and mercurial. Right now, I still don't buy the way how git and mercurial work. Hoping I will accept the novel DVCS concept with a my mindset change.

The key point is: don't assume your subversion knowledge will apply to DVCS, it will just make you more confused. And you need re-education to learn this new version control concept again.

[1] - Hg Init: a Mercurial tutorial

DNMA92, ath9k and hostapd with Voyage Linux

| |

After the release of Voyage Linux 0.6.5, I finally have time to explore AP mode with ath9k driver.

DNMA-92 wireless card is donated by PCEngines for ath9k driver and Voyage Linux integration.

First, you will need to install iw package from Voyage Linux 0.6.5 didn't package it, so you need to install it manually.

Although you won't need iw tool in the instructions further below, you can use it for getting information on your nl80211 based wireless interface instead of iwconfig (See this page for more info). To start with, install iw tool:

# remountrw
# wget
# dpkg -i iw_0.9.14-1_i386.deb
According to this link, ath9k will need to use nl80211 driver for hostap functions. So, in /etc/hostapd/hostapd.conf, append the following at the end of the file.
Please note that Voyage Linux use wlan0 for ath9k interface. From the above configure, I have configured WPA/WPA2, using voyage-wpa as both SSID and pre-shared key, running 802.11g mode on channel 11. eapol_version=1 is set for backward compatibility to my damn old 2001 iBook. Later, I may further explore on setting up 802.11n mode, I won't do it now since I have no client device with 11n.

At last, don't forget to enable wlan0 in /etc/network/interfaces:

auto wlan0
iface wlan0 inet static
        up wlan0 eth0 ""
You don't need to set anything with iw tools since hostapd will do it for you. Now, make sure hostapd is enabled in /etc/default/hostapd and restart wlan0 interface and hostapd by:
# ifdown wlan0
# ifup wlan0
# /etc/init.d/hostapd restart
That's it. I can now connecting my iBook and iPhone to Voyage Linux with running ath9k in AP mode!

Slides for Open Source Developer talk at SFD

| |

Although my session in SFD is a little bit rush, I got a good feeling that my presentation on Voyage Linux project is a successful one. Here is the slides of my session:

At last, I would like to thank the organizer and Ben Lau for arranging SFD event and a session for introducing Open Source Developer in HK.

Open Source Developer talk at Software Freedom Day 2009 HK

| |

Invited by Ben Lau, I will present Voyage Linux project at Software Freedom Day 2009 HK on 19 Sept 2009 to share my experiences as an open source developer in Hong Kong.

I have conducted similar talk back in 2007 at Linux the Gathering #3. I am looking forward to meeting up with other open source hackers in Hong Kong, and I am particularly interested in the project related to Linux DMB-T driver.

I am now preparing the slides for the talk, and will probably publish it on after the talk. These weeks, I am preparing a series of articles about DIY setting up OSS project. Hopefully, I am able to publish the first article before the talk.

Building compat-wireless drivers for 2.6.30

| |

ath5k driver in 2.6.30 does not support AP mode. After a bit of research, it was found that the latest compat-wireless code supports it and it will be probably included in 2.6.31. For 2.6.30 kernel, I will need to build from either compat-wireless or to patch it. It is a bit troublesome to build the driver modules out-of-kernel-tree and cannot use debian's make-kpkg to bundle the drivers in the kernel image. Since I am testing it rather than releasing it, I should investigate later to build compat-wireless module package.

First, download bleeding-edge source code and extract it. As describe here, you cannot use wget to automate the download of compat-wireless-2.6.tar.bz2, which contain all the latest codes of wireless drivers. However, the tarball with a date in the file name (e.g. compat-wireless-2009-07-10.tar.bz2) can. So browse this directory and download the tarball with the current date accordingly:

# cd /usr/src/
# wget
# tar -jxf compat-wireless-2009-07-10.tar.bz2 
Since I build the drivers for Voyage Linux kernel, I need to specify KLIB and KLIB_BUILD to different directory. Otherwise, "uname -r" will be used to determine your kernel version.
# cd /usr/src/compat-wireless-2009-07-10
# make KLIB=/usr/src/linux-source-2.6.30-voyage/ \
This will built all modules /usr/src/compat-wireless-2009-07-10. To get all the .ko driver modules, it is more tricky and you need to specify the correct variables accordingly.
# mkdir -p /root/compat-wireless 
# make -C /usr/src/linux-source-2.6.30-voyage/ \
   M=/usr/src/compat-wireless-2009-07-10 \
   INSTALL_MOD_PATH=/root/compat-wireless modules_install
Now all the latest drivers are now installed to /root/compat-wireless so that I can transfer the driver modules from there to my ALIX board using scp easily.

leds-alix2 module in 2.6.30 kernel

| |

When reviewing 2.6.30 kernel changes, I have found that leds support for ALIX.2/3 is now added to vanilla kernel. But when I compare the source between the openwrt version, I found they they are written by different authors. Voyage Linux 0.6.2 uses the leds-alix module written by Petr Liebman and leds-alix2 modules in 2.6.30 is written by Constantin Baranov. No matter which one is better, the one in the vanilla kernel is the champion. So the work is to port existing Voyage Linux code to load leds-alix2 instead.

After switching to 2.6.30, the driver cannot recognize my ALIX.3A (early) board. To workaround this, I need to use force parameter to bypass the BIOS check, that is

# modprobe leds-alix2 force

squashfs 4.0 on Debian Lenny and 2.6.30 kernel

| |

Recently, I started 2.6.30 kernel development on Voyage Linux. When reviewing 2.6.30 changes, I found that squashfs is now included in vanilla kernel. So I am very pleased to use the built-in squashfs module instead of out of tree module.

One notable thing of the in-kernel squashfs module is with a newer version 4.0 than version 3.3 provided in Lenny and/or Voyage Linux 0.6.2. Running re-built Voyage Linux Live CD with a 2.6.30 kernel, squashfs filesystem cannot be mount as the same time I was surprisingly to know that squashfs 4.0 module is incompatible to 3.x squashfs filesystem. That's why the mount failure comes out.

I have no choice but have to rebuilt squashfs-tools package from squeeze/sid. I download and rebuild the package on Lenny by:

# dget
# (however, it complains key-ring not found, so use dpkg-source)
# dpkg-source -x squashfs_4.0-1.dsc
# cd squashfs-4.0
# debuild
Then, upload the built package to Voyage Linux experimental repository. Rebuild the Live CD, and everything works again.

Upgrade Debian Etch Xen 3.0.2 to Lenny Xen 3.2


After upgrading the to Debian Lenny, the next major task is upgrading the Xen kernel in Dom0 host and the kernels in all DomU guests. Thanks to this link, it provides useful information on upgrading Debian Lenny Xen 3.2.

Upgrade the Xen kernel and hypervisor by:

# apt-get install \
    xen-hypervisor-3.2-1-i386 \
    xen-linux-system-2.6.26-2-xen-686 \
    xen-utils-3.2-1 \
    xenstore-utils xenwatch \
    xen-shell xen-tools

Edit all /etc/xen/*.cfg to change the Xen DomU guest kernels:

kernel      = '/boot/vmlinuz-2.6.26-2-xen-686'
ramdisk     = '/boot/initrd.img-2.6.26-2-xen-686'
extra       = "console=hvc0 xencons=tty"
The last "extra" line is needed for 2.6.26 DomU guest. Then reboot the machines and then restart all DomU guests, that is!

After reboot, new Xen hypervisor is run, Dom0 host shows:

punknix:~# uname -a
Linux punknix 2.6.26-2-xen-686 #1 SMP Mon May 11 21:51:55 UTC 2009 i686 GNU/Linux
Restart Xen DomU guests, and one of my DomU guest shows new kernel is run:
punknix-uml:~# uname -a
Linux punknix-uml 2.6.26-2-xen-686 #1 SMP Mon May 11 21:51:55 UTC 2009 i686 GNU/Linux

Syndicate content