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.

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

Modrewriting viewcvs to viewvc in Apache2


I have been using viewcvs to provide source browser to Voyage Linux source codes for a few years. After Debian upgrade, viewcvs is now (seemlessly) replaced by viewvc. The upgrade is not the trouble although there are some re-configurable issue I had to deal with. The most painful part is that the original /cgi-bin/viewcvs.cgi/ URL no longer available and has changed to /cgi-bin/viewvc.cgi/ that makes all the reference link broken.

In order to provide backward compatibility to the original URL so that I have no need to modify all the cvs URL in Voyage Linux web site, I decided to use modrewrite to rewrite /cgi-bin/viewcvs.cgi/ to /cgi-bin/viewvc.cgi/. So I edit my virutal host configuration file to add:

RewriteEngine On
RewriteRule ^/cgi-bin/viewcvs.cgi(.*) /cgi-bin/viewvc.cgi$1 [R]

I tried without the "redirect" [R] option, but won't work. It works only if I set it as redirection rather than rewrite. So when you test, it is now being redirected to now.

There is a side issue in the upgrade. After upgrade, the viewvc image files are not accessible and return 404. For example if I access*docroot*/images/logo.png", I got the following:

An Exception Has Occurred

Static file "images/logo.png" not available
([Errno 2] No such file or directory: '/usr/lib/templates/docroot/images/logo.png')

HTTP Response Status

404 Not Found

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/viewvc/", line 3766, in main
  File "/usr/lib/viewvc/", line 183, in run_viewvc
    return view_doc(self)
  File "/usr/lib/viewvc/", line 2342, in view_doc
    % (document, str(v)), '404 Not Found')
ViewVCException: 404 Not Found: Static file "images/logo.png" not available
([Errno 2] No such file or directory: '/usr/lib/templates/docroot/images/logo.png')
After searching, I found this debian bug report very useful. The key is to give the template dir an absolute path:
#self.options.template_dir = "templates"
self.options.template_dir = "/etc/viewvc/templates"
And this solve the final issue I have with viewvc.

Upgrading Asus P1-AH2 with AMD Athlon 64 X2 5050e

| | |

Around mid-May I have upgraded server which is a P1-AH2 barebone with the new AMD Athlon 64 X2 5050e. Not only this CPU has a low 45W TDP (review can be find here: [newegg] and [tomshardware]), but also clocked at 2.6GHz. Hence, I expected this CPU can run faster and with cooler temperature than the replaced Athlon 64 X2 4400 2.3GHz. This CPU is the most best suited for my tiny server with also runs 3 Xen DomU guests.

the 'cat /proc/cpuinfo' gives me this information:

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 107
model name      : AMD Processor model unknown
stepping        : 2
cpu MHz         : 2612.100
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu de tsc msr pae cx8 apic mtrr cmov pat clflush mmx fxsr sse
 sse2 ht nx mmxext fxsr_opt 3dnowext 3dnow pni cmp_legacy extapic cr8_legacy 
bogomips        : 5225.80
clflush size    : 64
power management: ts fid vid ttp tm stc 100mhzsteps
The most disappointed thing after the upgrade is that I cannot find any update of the BIOS of P1-AH2 (M2N8L motherboard ) to recognize the newest CPUs. So /proc/cpuinfo reports "AMD Processor model unknown". Indeed, the CPU flags returns no "svm" flag. I doubted that would 5050e support hardware virtualization as I thought that all latest AMD CPUs after Pacifica should support SVM. This may be due to "unknown AMD processor" gives wrong report in cpu flags. But when I run a voyage kernel compilation test on DomU guest, it reports:
real	12m24.383s
user	17m2.576s
sys	1m56.547s
which is similar to my expectation. Or, may be SVM does not affect Xen paravirtualzation at all, but only affects kvm.

The sensors programs proved the new chip is COOLER!

Adapter: PCI adapter
Core0 Temp:  +25.0 C
Core0 Temp:  +22.0 C
Core1 Temp:  +27.0 C
Core1 Temp:  +29.0 C

Adapter: SMBus nForce2 adapter at 4c00
V5stby:      +0.00 V  (min =  +0.00 V, max =  +6.64 V)   ALARM
Vccp:        +1.18 V  (min =  +0.00 V, max =  +2.99 V)
V3.3:        +3.29 V  (min =  +0.00 V, max =  +4.38 V)
V5:          +4.99 V  (min =  +0.00 V, max =  +6.64 V)
V12:        +11.83 V  (min =  +0.00 V, max = +15.94 V)
V3.3stby:    +3.27 V  (min =  +0.00 V, max =  +4.38 V)
Vbat:        +3.00 V  (min =  +0.00 V, max =  +4.38 V)
CPU_Fan:    2020 RPM  (min =    0 RPM)
Fan2:          0 RPM  (min =    0 RPM)
Fan4:          0 RPM  (min =    0 RPM)
RD1 Temp:      FAULT  (low  = -127.0 C, high = +127.0 C)  ALARM
Int Temp:    +50.7 C  (low  = -127.0 C, high = +127.0 C)
CPU Temp:    +45.0 C  (low  = -127.0 C, high = +127.0 C)
cpu0_vid:   +1.550 V
The fan is running steady 2,000 RPMs at idle and 3,000 RPMs at load. When compare to 3000/5000 RPMs I saw with the old 4400, I am much satisfied. Temperature figures also showed 5050e is 5-10 C degress cooler.

Syndicate content