Monday, January 14, 2008

OLPC Laptop in Ubuntu 7.10

This tutorial covers information on how to emulate XO on a typical Linux environment. I will be using Ubuntu Gutsy (7.10) and qemu for emulation.

First we need to get qemu.

sudo apt-get install qemu
sudo apt-get install kqemu-source
Then we need to prepare the module for using accelerated layer qemu (kqemu)
sudo module-assistant prepare
sudo module assistant auto-install kqemu
We make the udev rules so it automatically loads the module. Create the file /etc/udev/rules.d/60-kqemu.rules and write:
KERNEL=="kqemu", NAME="%k", GROUP="kqemu", MODE="0660"
appending a new line.

Add a new group and a new user:
sudo addgroup --system kqemu
sudo adduser $USER kqemu
    Login and logout for changes to take effect and then reload the udev daemon:
    sudo /etc/init.d/udev reload.
    Load the kqemu module itself:
    sudo update-modules
    sudo modprobe kqemu
    Now, get the XO image from the olpc site:

    and unpack it:
    bunzip2 olpc-redhat-stream-development-devel_ext3.img.bz2
    Now make your ram partition bigger
    sudo umount /dev/shm
    sudo mount -t tmpfs -o size=528m none /dev/shm
    And run it:
    qemu -m 512 -hda olpc-redhat-stream-development-devel_ext3.img