- Open Source Workshop #2 - Voyage Linux Introduction
- Spam protected email address for mailman archive
- Subversion to DVCS - Your mindset has to change as well
- DNMA92, ath9k and hostapd with Voyage Linux
- Slides for Open Source Developer talk at SFD
- Open Source Developer talk at Software Freedom Day 2009 HK
- Building compat-wireless drivers for 2.6.30
- leds-alix2 module in 2.6.30 kernel
- squashfs 4.0 on Debian Lenny and 2.6.30 kernel
- Upgrade Debian Etch Xen 3.0.2 to Lenny Xen 3.2
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
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 yyy.com", which makes intelligent spam-bots easily to find out the email address.
I have prepared the a script called "replace_spam.sh" to replace "xxx at yyy.com" with "(spam-protected)" for all archived messages.
#!/bin/sh for FILE in 20[0-9][0-9]-*/0*.html do echo $FILE #grep "TITLE=.*\>.* at .*$" $FILE sed -e "s/TITLE=\(.*\)>.* at .*$/TITLE\1>\(spam-protected\)/" -i $FILE done
Put the script to the archive root and run it:
# cd /usr/local/mailman/archives/private/voyage-linux # replace_spam.sh
Next, we need to change the achiver program such that it will not generated "xxx at yyy.com" as well. In /usr/local/mailman/Mailman/Archiver/HyperArch.py, change:
- self.email = re.sub('@', _(' at '), self.email) + self.email = "(spam-protected)"
- author = re.sub('@', _(' at '), self.author) + 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 yyy.com 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
Joel Spolsky has setup Mercurial Tutorial  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.
First, you will need to install iw package from http://www.voyage.hk/dists/0.6/iw/. 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 http://www.voyage.hk/dists/0.6/iw/iw_0.9.14-1_i386.deb # dpkg -i iw_0.9.14-1_i386.debAccording 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.
driver=nl80211 interface=wlan0 logger_syslog=-1 logger_syslog_level=2 logger_stdout=-1 logger_stdout_level=2 debug=4 dump_file=/tmp/hostapd.dump ctrl_interface=/var/run/hostapd ctrl_interface_group=0 macaddr_acl=0 auth_algs=3 eapol_key_index_workaround=0 eap_server=0 wpa=3 ssid=voyage-wpa wpa_passphrase=voyage-wpa wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP channel=11 hw_mode=g eapol_version=1Please 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 address 10.1.10.1 netmask 255.255.255.0 broadcast 10.1.10.255 up nat.sh wlan0 eth0 "10.1.10.0/24"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 restartThat's it. I can now connecting my iBook and iPhone to Voyage Linux with running ath9k in AP mode!
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:
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 punknix.com 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.
ath5k driver in 2.6.30 does not support AP mode. After a bit of research, it was found that the latest
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 http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2009-07-10.tar.bz2 # tar -jxf compat-wireless-2009-07-10.tar.bz2Since 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/ \ KLIB_BUILD=/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_installNow 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.
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
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 http://ftp.de.debian.org/debian/pool/main/s/squashfs/squashfs_4.0-1.dsc # (however, it complains key-ring not found, so use dpkg-source) # dpkg-source -x squashfs_4.0-1.dsc # cd squashfs-4.0 # debuildThen, upload the built package to Voyage Linux experimental repository. Rebuild the Live CD, and everything works again.
After upgrading the punknix.com 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 punknix:~#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