Roads Less Taken

20 Jun 05

QEMU rocks

Most people have heard about VMWare I guess. Not many knows about the excellent free (GPL) variant called QEMU by Fabrice Bellard. QEMU is a truly remarkable thing, it is an emulator but not only does it fully emulate a PC but it can also emulate other CPUs like the Sparc or PPC!

Speed is about 5-10x slower than native, but… there is also a kernel "Accelerator" module which is free for use (but with a proprietary license) and which brings the speed up to almost the same as the native host! As long as the guest CPU is the same as the host CPU of course. :)

I tried nbench first without and later with the kernel "Accelerator" module installed. Without the accelerator it was about 10x times slower, a bit too painful for my taste. But with the "Accelerator", nbench reported a slowdown of merely 10-15%! Wow.

Now I have also discovered an ongoing project called qvm86 which is a GPLed variant of the "Accelerator", haven’t had time to try it yet.

If you want to play with QEMU, go to www.freeoszoo.org and have a look.

16 Jun 05

Got 802.11g working!

I use LunarLinux on my laptop, which is a Zepto 4200 (=Compal CL56). This is a Centrino box with the Intel IPW2200 chip which supports 802.11g/b.

There also is a module called ipw2200 in Lunar which contains the driver, and it recently got mature enough to use. Installing it was a snap:

        lin ipw2200

This is lunar-speak for "apt-get install ipw2200" :). You still though want to go through the docs for this module, and in Lunar it is dead easy to see what files were installed:

        lvu install ipw2200

…which shows a list of all files installed, notably INSTALL and README.ipw2200. INSTALL goes through various settings you need to have in the kernel etc, short and to the point, and it explains where to get the firmware - in Lunar you unpack those files in /lib/firmware/.

The README.ipw2200 describes among other things how to see some nice info when the module is loaded, and most importantly it describes how to see the status of the so called "Radio Frequence Kill Switch:

        root@zaphod ~ $ cat /sys/bus/pci/drivers/ipw2200/0000\:02\:02.0/rf_kill
        2

…and if we check the README.ipw2200 again we find this table:

        rf_kill
                read -
                0 = RF kill not enabled (radio on)
                1 = SW based RF kill active (radio off)
                2 = HW based RF kill active (radio off)
                3 = Both HW and SW RF kill active (radio off)
                write -
                0 = If SW based RF kill active, turn the radio back on
                1 = If radio is on, activate SW based RF kill

        NOTE: If you enable the SW based RF kill and then toggle the HW
        based RF kill from ON -> OFF -> ON, the radio will NOT come back on

Ehum. Ok, so "2" means we have a "hardware based kill active". First I thought that, ok, hey, can this possibly have something to do with the button on the left hand side which says on/off with a little radio symbol beside it?! Nah… That would have been too easy! :)

Evidently that is not the "hardware switch". I turned it on but no go, cat above still says "2".

Ok, google to the rescue. Christian Iversen also uses Linux on the Zepto 4200 and he has a nice webpage which swiftly points me to the package acerhk. Hehe, doesn’t sound right, but ok… download, make, make install - got a new little kernel module. And after reading some docs it is evident that this may work - we do:

        modprobe acerhk
        echo 1 > /proc/driver/acerhk/wirelessled

..tada! The light comes on (the LED on the front side) showing we have radio! Given of course that the switch on the left side is ON. :)

At least on my box tests show that the switch on the left side is a major override, simple as that. The "hardware switch" which we can manipulate using the acerhk module is another thing and operates independently of the switch on the left side. And when we have turned it on we can even rmmod acerhk and then we can use the left side switch only.

Ok, now what? I installed the module wireless_tools which gave me iwconfig (similar to ifconfig) and it shows some nice info. But…

Finally I decided to re-read the network howto for Lunar, duh. Nowadays Lunar has a nice tool called lnet which is interactive and ask a bunch of questions and then sets up eth1 for me. It basically all ends up with a little file /etc/config.d/network/eth1 which includes the relevant settings, it even names the module so that it is modprobed on demand. Nice! But perhaps this isn’t Lunar specific. :)

So… just a simple /etc/init.d/network start and we have liftoff! Cool. It connected to my Linksys WAG54Gv2 ,which was just out-of-the-box-turned-on, and DHCPed and all. Then I could surf onto it using 192.168.1.1 and start messing.

End of first part, ADSL2+ journey coming up later. :)

16 Jun 05

Lunar Linux

…is a source distribution which is really nice! I am a long time Debian user but when I bought my Zepto 4200 laptop (really nice machine) then I decided to be a bit more adventurous.

So after looking around and asking questions on some IRC channels I ended up using Lunar - a less known distro - and it has been great so far. The installation was easy and the tools (equivalent of apt-get etc) are top notch, in fact I think they are much better than what Debian has.

One the greatest things with Lunar is that it is so easy to make your own "modules" for software that you find on the net and which isn’t included in the standard moonbase catalog.

Recently version 1.5 was released and I have tested the new installer inside QEMU, it is even nicer than before so do give it a try.

Powered by RubLog