Emulating the XO: Difference between revisions

From OLPC
Jump to navigation Jump to search
(revert FreeBSD Quick Start layout experiment. also tweaked.)
(first draft of linux quick start)
Line 32: Line 32:
qemu -soundhw es1370 -serial `tty` -hda laptop.img
qemu -soundhw es1370 -serial `tty` -hda laptop.img


4. See [[Emulating the XO#Quick Start: Running for the first time|Quick Start: Running for the first time]].
4 (optional) Make qemu run faster.


5 (optional) Make qemu run faster.
If you want to use [http://fabrice.bellard.free.fr/qemu/kqemu-doc.html kqemu] to speed up the emulation (on x86 and related cpus) then


If you have an x86 or x86_64 cpu, you can use [http://fabrice.bellard.free.fr/qemu/kqemu-doc.html kqemu] to speed up the emulation several 100%.

5a. Obtain kqemu.

On fedora, x86,
XXX please fill this in if you know

On fedora, x86_64, there are no official kqemu, or kqemu kernel module, rpms. [http://atrpms.net/name/kqemu/ atrpms.net] has some. Or install from source.

On Debian/Ubuntu, as root:
XXX please fill this in if you know

5b. Run modprobe.
modprobe kqemu major=0
modprobe kqemu major=0


This will need to be run again if the host computer is rebooted. If you forget, qemu will be slow again (and a one-line error message scroll by when you run qemu).
and add the <tt>-kernel-kqemu</tt> option. See [[Using QEMU for Troubleshooting]] for tips.


5c. Run a qemu variant with the <tt>-kernel-kqemu</tt> 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 <code>bochsbios</code> version 2.2, version 2.3 works. As a quick fix, <code>apm=off</code> can be added to OLPC kernel arguments. (For more info, see the [[Talk:OS images for emulation#Boot hangs on Debian-derived distros|discussion]].)


On x86,
If you have network problems through Qemu and OLPC, [[Using_QEMU_on_Troubleshooting#Network|try this.]]
qemu -kernel-kqemu ...


On x86_64,
qemu-system-x86_64 -kernel-kqemu ...
If you forget and use just <tt>qemu</tt> instead, things will be slow again.


=== FreeBSD Quick Start ===
=== FreeBSD Quick Start ===
Line 66: Line 83:




=== Quick Start: Get image ===
=== Quick Start: Getting an image ===


=== Quick Start: Running for the first time ===

=== Quick Start: Does my qemu have kqemu? ===

Does the version of the QEMU support [http://fabrice.bellard.free.fr/qemu/kqemu-doc.html KQEMU]? Type ctrl+alt+2 and type '''info kqemu'''. Use ctrl+alt+1 to return to OLPC screen.


== Developing software using emulation ==
== Developing software using emulation ==



[[Category:OS]]
[[Category:Developers]]
[[Category:Emulation]]
[[Category:Sugar]]

Revision as of 01:45, 24 May 2007

This page is an inprogress overhaul of OS images for emulation.

Quick Start

Mac Quick Start

Linux Quick Start

1. Obtain qemu.

On Fedora, as root:

yum install qemu

On Debian/Ubuntu, as root:

apt-get install qemu

2. Obtain an image.

Download olpc-redhat-stream-development-ext3.img.bz2 (md5). Then,

bzcat olpc-redhat-stream-development-ext3.img.bz2 > laptop.img

3. Run qemu on the image.

qemu -soundhw es1370 -serial `tty` -hda laptop.img

4. See Quick Start: Running for the first time.

5 (optional) Make qemu run faster.

If you have an x86 or x86_64 cpu, you can use kqemu to speed up the emulation several 100%.

5a. Obtain kqemu.

On fedora, x86,

XXX please fill this in if you know

On fedora, x86_64, there are no official kqemu, or kqemu kernel module, rpms. atrpms.net has some. Or install from source.

On Debian/Ubuntu, as root:

XXX please fill this in if you know

5b. Run modprobe.

modprobe kqemu major=0

This will need to be run again if the host computer is rebooted. If you forget, qemu will be slow again (and a one-line error message scroll by when you run qemu).

5c. Run a qemu variant with the -kernel-kqemu option.

On x86,

qemu -kernel-kqemu ...

On x86_64,

qemu-system-x86_64 -kernel-kqemu ...

If you forget and use just qemu instead, things will be slow again.

FreeBSD Quick Start

Install qemu from ports:

cd /usr/ports/emulators/qemu && make install clean

or as a package

pkg_add -r qemu

Then load kqemu and aio kernel modules:

kldload kqemu
kldload aio

and launch the image you want:

qemu -hda olpc-stream-development-7-20060609_1600-ext3.img
Should this take the same arguments as the linux qemu invocation? Are those arguments even needed for linux? MitchellNCharity 21:18, 23 May 2007 (EDT)


Quick Start: Getting an image

Quick Start: Running for the first time

Quick Start: Does my qemu have kqemu?

Does the version of the QEMU support KQEMU? Type ctrl+alt+2 and type info kqemu. Use ctrl+alt+1 to return to OLPC screen.

Developing software using emulation