Voyage Linux

warning: Creating default object from empty value in /home/punkytse/Sites/punknix-drupal-4.7.4/modules/taxonomy.module on line 1223.

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.

DIY Open Source Project (Part 1)

| |

Nowadays, the easiest way to setup an open source project is hosting via But did you ever think about hosting a project by yourself so that you will have complete control of the project and not dependent by others? My project, Voyage Linux, is built by me little-by-little, bit-by-bit over 4-year time span. At the time of writing (Sep 2009), the project homepage has over 10,000 pageviews per month, the community mailing list has 430 subscribes, and 13 country mirror sites from sponsors.

This series of articles documents my experiences on setting up open source project totally by yourself. Part 1 of this series covers the preparation before setting up open source project that includes the following topics:

  • Setting up dedicate Linux Server
  • Selecting ISP
  • Domain name registration

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.

OCF-enabled Voyage Lenny and test on ALIX1C

| |

I have included ocf patch to 2.6.26 voyage kernel and rebuild libssl and openssh package. Voyage Lenny now includes ocf enabled kernel and libssl.

To test, you need to install ocf-enabled openssl, which could be found in here.

Before you test, you need to enable cryptodev, geode_aes and cryptosoft modules.

# modprobe cryptodev
# modprobe geode-aes
# modprobe cryptosoft

Here are the test result on ALIX1C.

voyage:~# openssl speed -evp aes-128-cbc -engine cryptodev
engine "cryptodev" set.
Doing aes-128-cbc for 3s on 16 size blocks: 171575 aes-128-cbc's in 0.10s
Doing aes-128-cbc for 3s on 64 size blocks: 161556 aes-128-cbc's in 0.18s
Doing aes-128-cbc for 3s on 256 size blocks: 133868 aes-128-cbc's in 0.11s
Doing aes-128-cbc for 3s on 1024 size blocks: 78685 aes-128-cbc's in 0.07s
Doing aes-128-cbc for 3s on 2048 size blocks: 50938 aes-128-cbc's in 0.05s
OpenSSL 0.9.8g 19 Oct 2007
built on: Thu Nov 27 01:34:17 HKT 2008
options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) aes(partial) blo
available timing options: TIMES TIMEB HZ=100 [sysconf value]
timing function used: times
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   2048 bytes
aes-128-cbc      27452.00k    57442.13k   311547.35k  1151049.14k  2086420.48k

However, I cannot get the same result in ALIX3C.

Testing Voyage Experimental using QEMU

| |

Recent days I have been developing the next Voyage Linux release which based on upcoming Debian Lenny. In my experience, the most consuming part in my development activities is testing for the distribution and Live CD. Previously, I tested the Live CD using VMWare on my Windows desktop. These days, I have migrated my testing activities to qemu instead. I write up this article to document what I have done for my later reference.

All of the commands I used here are similar when using kvm. You can read to my KVM Virtualization article for further details. In my development environment, I can't use kvm because I run Xen Dom0 kernel that would experience a hang with kvm when running both Dom0 and kvm modules together, qemu is my best option.

GPS for NTP Time Sync - Success with Voyage and ALIX

| |

Following up my last blog post, I have finally got a Garmin GPS18/USB unit from my friend working in Asia Link to test for time sync for NTP. Right now, I have an ALIX board running Voyage Linux 0.4. It is an ideal platform to test the kernel support in Voyage with the USB-based GPS device.

Voyage kernel immediately recognizes GPS18/USB device at boot, it connects to /dev/ttyUSB0 according to dmesg:

garmin_gps 1-3:1.0: Garmin GPS usb/tty converter detected
usb 1-3: Garmin GPS usb/tty converter now attached to ttyUSB0
usbcore: registered new interface driver garmin_gps
drivers/usb/serial/garmin_gps.c: garmin gps driver v0.28

First, install the required Debian package for gps and ntp:

apt-get install gpsd gpsd-clients ntp ntp-simple
gpsd-clients package provides client utility programs to interact with gpsd for getting GPS data from the device. Since the client program includes xgps that requires X libraries, around 30MB will be consumed after you install them.

Syndicate content