What I did this afternoon (or: Windows XP on OLPC XO-1)

18 October 2008

This is possibly one of the most cruel things one could do to an OLPC XO-1:

Windows XP being shown on OLPC XO-1 screen.

That’s Windows XP under QEMU under Gentoo on an OLPC XO-1.

It took about two hours to run the mini-setup routine from a previously sysprepped image I had created, and took about 10 minutes to boot. The user interface is virtually unusable, and the VM can only be practically run with 128MB of RAM allocated to it.

I installed Gentoo during yesterday and the day before from a stage3 tarball. I wish I’d found out about GentooXO sooner. Also, I’m running QEMU with the kqemu accelerator installed.

It would be interesting to get Windows XP working natively, but I doubt that will ever happen (apart from Microsoft’s own efforts). I doubt you can kexec() into a Windows kernel, and you would need to initialise the display adapter to the exact right mode (the XO-1 appears to only support one video mode), which Windows would almost certainly not support out of the box.

Broken PyGTK in Gentoo

4 October 2008

If you have a broken PyGTK in Gentoo after upgrading to Python 2.5, like what happened to me, try this:

emerge -1 pygobject pycairo pygtk

…which fixed it for me.

Apparently, running python-updater is supposed to take care of all of that for you, but running it did nothing for me.

If you’re encountering similar Python-based breakages in Gentoo after a Python upgrade, check your /usr/lib/python2.4/site-packages directory. If you’ve removed Python 2.4 and installed Python 2.5, any files still lurking in your python2.4 directory are being very bad indeed.

Simply re-emerging the offending packages usually fixes it and places them in python2.5 instead. For example, if pyxslt broke after upgrading, you would find which package /usr/lib/python2.4/site-packages/libxslt.py belongs to by running:

$ equery belongs /usr/lib/python2.4/site-packages/libxslt.py

[ Searching for file(s) /usr/lib/python2.4/site-packages/libxslt.py in *... ]
dev-libs/libxslt-1.1.24 (/usr/lib/python2.4/site-packages/libxslt.py)

That would tell you the package (libxslt) to re-emerge.

I’d have blogged sooner

7 June 2008

I’d have blogged about this sooner, if I hadn’t been spending so much time compiling.

I now have a working Gentoo system running GNOME, and most of the basics, like 3D acceleration, sound, and wireless networking.

I started out with a stage 3 tarball, extracted it into a partition, chrooted it, compiled a kernel, rebooted, got my wireless driver working, and started emerge-ing GNOME.

First impressions: slow bootup. Gentoo uses sysvinit by default, so DHCP slows down my bootup by about 30 seconds, which absolutely sucks. It’s a shame orinoco_usb chucks a kernel panic if you try and use it with NetworkManager, because then I’d be able to use that instead.

I love the fact that Gentoo does virtually no customisations to GNOME — no vendor branding whatsoever. Even the GNOME foot logo in the Applications menu and the desktop wallpaper are intact. I could find a hint of the fact that I was running Gentoo through the GUI in the ‘About GNOME’ dialog. It said “Distributor: Gentoo”, and nothing more. Rock on.

Audio, networking, and 3D didn’t work out of the box. I needed to run genkernel --menuconfig all and opt-in to compile the kernel with E1000, AC’97, and ATI Radeon support.

Fonts are ugly. The GNOME meta-package, or whatever you call it when you run emerge -DuN gnome, doesn’t depend on DejaVu or Bitstream Vera, which means you get this horribly distorted Nimbus Sans as a UI font, which is not very pleasant to read, and some monospace font that’s barely contrasted from the background, the strokes are so blurred. Fortunately, I was just an emerge dejavu away from fixing this craziness. Now to figure out how to apply the Turner patches to get some decent subpixel font rendering.