Emulating the XO/Quick Start/Mac

From OLPC
< Emulating the XO‎ | Quick Start
Revision as of 16:48, 24 May 2007 by Xavi (talk | contribs) (cosmetics + cleanup)
Jump to navigation Jump to search

This page needs some cleaning to become a nice quickstart. Non-quickstart mac-specific content can be moved to Emulating the XO/Mac. The mentioned "Enabling SSH" section was missing even before this was copied here. If found, it can go in Emulating the XO. MitchellNCharity 03:34, 24 May 2007 (EDT)

Installing QEMU for MacOS-X

You should already have an XO build image.

The port of Qemu for MacOSX is called Q and can be found in kju-app.org. Download and install Q.app stable version 0.8.1a35. Other builds are here: kberg.ch/q/builds/

Setting up

Q.app

Click on the (+) button to create a new guest:

Create new Guest:              Name:  OLPC
                   Operating System:  Q Standard Guest
                -- click (Create PC) --

Proceed to configure its preferences:

 General Prefs | SMB Filessharing:  No file sharing
Hardware Prefs |        Hard disk:  Select your unzipped build image
Advanced Prefs |   QEMU Arguments:  -redir tcp:2222::22
                -- click (Create PC) --


Starting OLPC Environment

Double click on the newly created "OLPC" to launch a window for it.

NOTE
what follows may not be required. If you happen to do with or without it, please let us know in the discussion page (signing it) so this section can be updated accordingly.
Grub start.png

— press "space" to get into GRUB


Grub choose qemu.png

— choose "OLPC for Qemu Target",

— press "e" to edit commands,

Grub choose the line.png

— select "kernel" line, and press "e"


Grub edit the line.png

— add "single" option at the end of the line

— hit "return", then "b" to boot

Advanced

You may encounter some issues supporting USB devices.

You can run Q.app from the command line:

$ /Applications/Q.app/Contents/MacOS/i386-softmmu.app/Contents/MacOS/i386-softmmu -hda olpc/olpc-redhat-stream-development-devel_ext3.img -serial stdio

Ctrl-Alt combos in Qemu (or Q.app)


This section about keys should go somewhere else...

According to Sugar Instructions you need to "hold down Ctrl+Alt+F1 to leave the Sugar screen and return to the login prompt" and then "you can return to Sugar with Ctrl+Alt+F7". Unfortunately for me the "Ctrl+Alt" action seems to be grabbed by the Q.app "mouse pointer ungrab" functionality.

Under Linux, this will be grabbed by the X server running on your computer, and not the one running in the emulator, and will switch your own computer to a terminal.

The other method(s) suggested for opening a terminal activity didn't work for me either (OLPC build 239). I eventually discovered that Q.app actually has a "Monitor" accessible by "ctrl-alt-2". When in this monitor mode you can send key-presses directly to the OLPC emulation by using the "sendkey" command. For example:

  sendkey ctrl-alt-f1       # to switch to the shell
  sendkey ctrl-alt-f7       # to return to Sugar

Note: you will need to exit the monitor mode and return to the emulated machine by pressing "ctrl-alt-1" once you type either of the above commands.

Note: you type the name of the keys to send, you don't actually press the keys.