OS images for emulation

From OLPC
Revision as of 13:53, 12 April 2007 by 61.144.122.45 (talk)
Jump to navigation Jump to search

Basic emulation options are listed here. For Windows emulation, see Using QEMU on Windows XP.

You can find the latest stable build here.

OLPC OS performance under emulation

It should be noted that running the OLPC images under qemu and related emulators are significantly less responsive. A side by side of OLPC OS under qemu and other OS (such as Linux or Windows), will present Sugar as very unresponsive. However, Sugar responds far better on the A-Test development board. See User Feedback on Images.

If performance is so poor activities fail to load see Coping with Slow for a possible work-around.

OLPC Simulator GRUB boot option

When booting an OS image within an emulator, you need to make sure you boot the kernel with the correct options. When booting, you'll see the green screen of GRUB with One Laptop Per Child along the bottom: in this boot menu, make sure you select OLPC Simulator. Otherwise, bootup on real OLPC hardware will be assumed, and since the emulator does not emulate the OLPC hardware exactly, bootup will fail.

QEMU

The easiest way to test the images is to use qemu or some similar emulator. It is available for various host systems:

QEMU on Linux

On Fedora Core 5, QEMU is included in extras and is very easy to install. As root just type

yum install qemu

and it should be installed. You may have to start the service for it. As root run:

service qemu start

On Debian/Ubuntu, QEMU is included in the repository.

apt-get install qemu

Once you have an image downloaded, it is very easy to use qemu to launch the OLPC environment:

qemu -soundhw es1370 -serial `tty` -hda \
  olpc-stream-development-7-20060609_1600-ext3.img

If qemu complains about insufficient space in /dev/shm then

mount -t tmpfs -o remount,size=144m none /dev/shm

If you want to use kqemu to speed up the emulation then

modprobe kqemu major=0

and add the -kernel-kqemu option.

We have heard multiple people say that QEMU doesn't work with these images on the debian-derived distributions. The symptom is that the kernel hangs during boot. There's a problem with bochsbios version 2.2, version 2.3 works. As a quick fix, apm=off can be added to OLPC kernel arguments. (For more info, see the discussion.)

If you have network problems through Qemu and OLPC, try this.

QEMU Development Strategies

For those who would like to use QEMU for developing Python software (Sugar software) for the OLPC, it's convenient to set up a connection between the host and the Laptop image. Under QEMU the Laptop image can see the host as IP address 10.0.2.2 . If you create an SSH server on your host and install a key on your Laptop image that has logon rights for that server. ok it working

QEMU on FreeBSD

Install qemu from ports:

cd /usr/ports/emulators/qemu