Using QEMU on Windows: Difference between revisions

From OLPC
Jump to navigation Jump to search
(Sugar Instructions)
(updates for latest file path organization, and more wiki-fied)
Line 1: Line 1:
The step-by-step guide below has worked for builds 59 and 182, see [[User_Feedback_on_Images#QEMU_on_Windows]]
Build 59 of the OLPC software ran well for me on a Dell Latitude D600 Laptop 1.5GHz 512MB RAM, running Windows XP SP2. <BR>

Below is a step by step guide to getting it working.<BR>

<BR>
== Download QEMU emulator and accelerator ==

Download QEMU for Windows from here<BR>
Download QEMU for Windows from here<BR>
http://www.h7.dion.ne.jp/~qemu-win/<BR>
http://www.h7.dion.ne.jp/~qemu-win/

<BR>
Unzip it, and place the files in:<BR>
Unzip it, and place the files in<BR>
<I>C:\Program Files\Qemu</I><BR>
<I>C:\Program Files\Qemu</I><BR>
(There is no setup or installation step.)
<BR>

Then download the QEMU Accelerator Module (called <I>kqemu-1.3.0pre9.tar.gz</I> ) from here<BR>
Then download the QEMU Accelerator Module from
http://fabrice.bellard.free.fr/qemu/download.html<BR>
http://fabrice.bellard.free.fr/qemu/download.html<BR>
KQEMU is a driver allowing the QEMU PC emulator to run much faster when emulating a PC on an x86 host. The latest stable is currently ''kqemu-1.3.0pre9.tar.gz''.
<BR>

Then uncompress the <I>kqemu-1.3.0pre9.tar.gz</I> file. You may need to uncompress it twice, using an application like 7Zip.<BR>
Then uncompress the <tt>kqemu-''version''.tar.gz</tt> file. You may need to uncompress it twice, using an application like 7Zip.<BR>
http://www.7-zip.org/<BR>
http://www.7-zip.org/<BR>
You can place the kqemu-''version'' directory in ''C:\Program Files\Qemu''.
<BR>

Look through the unzipped files, and right-click on the one called <I>kqemu.inf</I><BR>
Look through the unzipped files, and right-click on the one called <I>kqemu.inf</I><BR>
Then click "Install" and wait a few seconds.<BR>
Choose "Install" and wait a few seconds.

<BR>
Then go to a command prompt and type<BR>
Then in a command prompt type
net start kqemu
net start kqemu
You should get a message saying<BR>
You should get a message saying<BR>
<I>The KQEMU virtualisation module for QEMU service was started successfully.</I><BR>
<I>The KQEMU virtualisation module for QEMU service was started successfully.</I>
<BR>
Then you need to download a drive image, so go to this page<BR>
http://wiki.laptop.org/go/Build_images<BR>
<BR>
Then go to "Latest Stable", then "Images", and download <I>olpc-stream-development-59-20060808_1153-ext3.img.bz2</I> (or a later image)<BR>
<BR>
This file will need uncompressing with an application like 7Zip.<BR>
http://www.7-zip.org/<BR>
<BR>
Make sure you place the uncompressed ".img" file in the same folder as QEMU, then go to your command prompt and type<BR>
<I>cd "\Program Files\Qemu"</I><BR>
<BR>
Then finally, type<BR>
qemu -L . -hda olpc-stream-development-59-20060808_1153-ext3.img


== Download an OLPC image ==
or the equivalent for the newest version you have downloaded. By example:
Then you need to download a drive image, so go to [[Build_images#Latest_Stable_Build|Latest Stable Build on the OS Images page]] and navigate to the <tt>ext3</tt> subdirectory (this has images for the ''ext3'' filesystem; if you want to use development tools, navigate to <tt>devel_ext3</tt>).
The image you want will be named something like
<tt>olpc-redhat-stream-development-build-''num''-''date''_ext3.img.bz2</tt>


This file will need uncompressing with an application like 7Zip, available from here<BR>
qemu -L . -hda olpc-stream-development-59-20060808_1153-rpm-ext3.img
http://www.7-zip.org/


Place the uncompressed ".img" file in the same folder as QEMU.


== Starting OLPC environment ==
After a few seconds the simulator will start, and you should see a copy of Linux booting... This may take a minute or two... <BR>
In a command prompt type
When the screen turns green saying One Laptop Per Child at the bottom, press the spacebar to get the grub menu. <BR><B>It's important that you choose the OLPC Simulator option. The default for these images is to boot for the OLPC Hardware, not the Simulator.</B><BR>
cd "\Program Files\Qemu"
The command to start the emulator is <tt>qemu -L . -hda ''image_name''</tt>

Where ''image_name'' is the newest version you have downloaded. For example:
qemu -L . -hda olpc-redhat-stream-development-build-185-20061117_2030-devel_ext3.img

After a few seconds the emulator will start in a new window, and you will see a boot sequence<BR>
When the screen shows the OLPC 'oX' logo and 'Press any key to enter the menu', press any key to go to the GRUB menu.<BR>
'''It's important that you choose the 'OLPC for qemu target'option. The default for these images is to boot for the OLPC Hardware, not the Simulator.'''<BR>
Then you will see a typical Linux boot sequence.


See [[Sugar Instructions]] for instructions on how to use the emulated Laptop.
See [[Sugar Instructions]] for instructions on how to use the emulated Laptop.


To close the OLPC "window" press: Alt+Ctrl+2 or only liberate the pointer using Ctrl+Alt.
To close the OLPC "window" press: Alt+Ctrl+2 or only liberate the pointer using Ctrl+Alt.

<BR>
Please update [[User Feedback on Images#QEMU_on_Windows]] with your experience!
<BR>

--[[User:Tomhannen|Tomhannen]] 19:30, 13 August 2006 (EDT)
--[[User:Tomhannen|Tomhannen]] 19:30, 13 August 2006 (EDT)



Revision as of 00:16, 4 December 2006

The step-by-step guide below has worked for builds 59 and 182, see User_Feedback_on_Images#QEMU_on_Windows


Download QEMU emulator and accelerator

Download QEMU for Windows from here
http://www.h7.dion.ne.jp/~qemu-win/

Unzip it, and place the files in
C:\Program Files\Qemu
(There is no setup or installation step.)

Then download the QEMU Accelerator Module from http://fabrice.bellard.free.fr/qemu/download.html
KQEMU is a driver allowing the QEMU PC emulator to run much faster when emulating a PC on an x86 host. The latest stable is currently kqemu-1.3.0pre9.tar.gz.

Then uncompress the kqemu-version.tar.gz file. You may need to uncompress it twice, using an application like 7Zip.
http://www.7-zip.org/
You can place the kqemu-version directory in C:\Program Files\Qemu.

Look through the unzipped files, and right-click on the one called kqemu.inf
Choose "Install" and wait a few seconds.

Then in a command prompt type

net start kqemu

You should get a message saying
The KQEMU virtualisation module for QEMU service was started successfully.

Download an OLPC image

Then you need to download a drive image, so go to Latest Stable Build on the OS Images page and navigate to the ext3 subdirectory (this has images for the ext3 filesystem; if you want to use development tools, navigate to devel_ext3). The image you want will be named something like olpc-redhat-stream-development-build-num-date_ext3.img.bz2

This file will need uncompressing with an application like 7Zip, available from here
http://www.7-zip.org/

Place the uncompressed ".img" file in the same folder as QEMU.

Starting OLPC environment

In a command prompt type

cd "\Program Files\Qemu"

The command to start the emulator is qemu -L . -hda image_name

Where image_name is the newest version you have downloaded. For example:

qemu -L . -hda olpc-redhat-stream-development-build-185-20061117_2030-devel_ext3.img

After a few seconds the emulator will start in a new window, and you will see a boot sequence
When the screen shows the OLPC 'oX' logo and 'Press any key to enter the menu', press any key to go to the GRUB menu.
It's important that you choose the 'OLPC for qemu target'option. The default for these images is to boot for the OLPC Hardware, not the Simulator.
Then you will see a typical Linux boot sequence.

See Sugar Instructions for instructions on how to use the emulated Laptop.

To close the OLPC "window" press: Alt+Ctrl+2 or only liberate the pointer using Ctrl+Alt.

Please update User Feedback on Images#QEMU_on_Windows with your experience!

--Tomhannen 19:30, 13 August 2006 (EDT)