Emulating the XO/Mac: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
 
(10 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<big><b><font color=red>For current information on emulation of OLPC software images, see [[Emulating the XO]]</font></b></big>

{{Deprecated}}

== VMware ==
== VMware ==


Works really well. See [[VMWare]].
You'll probably want two different Virtual Machines. For serious development, a Fedora 7 with sugar-jhbuild. For play, you will likely want to just run the XO Emulator, see [[Emulating_the_XO/UsingVMware]]. You need the Fedora 7 system, so you can use GIT for creating patches. With F7, you're also unlikely to lose your work accidentally while you can still easily run the latest version. The XO image is nice, beacuse it is much more responsive than F7+Sugar-jhbuild. However, sound and networking may or may not work, depending on the image you are using.


*I need to emphasize this: '''VMWare Fusion beats Parallels''' for running Linux on your Mac, hands down. I have used Parallels for about two years to do Linux/Sugar development, and I could smack myself that I didn't try VMWare earlier. The final straw was that I would have had to pay for a Parallels upgrade to support Fedora 9 after they promised for several months it would be supported. On VMWare, even the officially "unsupported" versions work because the installer simply offers to compile the necessary drivers, which worked flawlessly for me. [[User:Bert|Bert]] 12:54, 2 December 2008 (UTC)
The quickest way to get started:
* First get a preconverted XO image, see [[Emulating_the_XO/UsingVMware]] (don't worry about getting the latest). Be sure to change networking to 'bridged' if you want to access the virtual XO using ssh from another machine in your network. Now you have something to play with, while getting the ''real'' environment.


== Parallels Desktop on Mac OS X ==
* The next steps will take the better part of a day to complete, if not more on a slower machine. Don't even think about this on a G4 or even a G5. Use an Intel-Mac. You can try this with 1GB of RAM in your Mac, but 2GB is a more realistic minimum. 3GB is perfect.


Said to work in Parallels. http://lists.laptop.org/pipermail/devel/2007-November/007559.html
* So: Join one of the [[IRC]] channels! This will kill time :) You will probably want to start either in #sugar for hacking on activities or #olpc for core hacking. #olpc-content is about creating/maintaining materials (you don't actually need an F7 vmware for that!). A lot of people just hang out in two or all three of those. Ask if someone knows about a little thing to hack on. There are always buttons to be added, simple things to be done. Those will get you to learn the environment, really quickly.


=== Step by step instructions for getting XO emulation up on a Mac using Parallels v3 ===
* Create a new virtual machine and do a base F7 install on it. Make sure you give the disk at least 15GB max size. If you have the disk space, preallocate it now. That will give you a twofold increase in performance. If you have plenty of RAM, set the virtual machine to 800MB. Give it access to all your CPUs too (default is one). '''Don't worry about packages yet. That will come scripted in the next step.''' ''note: There is a preinstalled 'virtual appliance' F7 available via vmware.com, but you'll need to increase its disk size first. It maxes out at 4.7GB. 2GB short of a working sugar-jhbuild environment.''


Screenshots collected at [[Emulating_the_XO/Mac_Parallels3]].
* Next: follow the instructions on [[Sugar on Fedora 7]]. Skip the [[Sugar with sugar-jhbuild]] step on that page.


* Now do everything on [[Sugar with sugar-jhbuild]]. Your home directory is a fine place. The ''update'' step will take long-ish, downloading 1.6GB of data (using compression so probably around 400MB in actual download). The ''build'' phase is correspondingly long, too: On a 2.4Ghz Core2 duo iMac with 3GB ram it took about two hours. YMMV.


=== Simpler way of using Parallels v3 ===
* Additionally, you can (and should!) look at http://dev.laptop.org for things to do. There are two 'beginner' links there.


[[OS images]] can be used with Parallels by following these simple steps
== Parallels Desktop on Mac OS X ==

# Uncompress and change the image extension from .img to .hdd
# Create a new virtual machine (Custom/Linux/Red Hat)
# Choose "Use an existing hard disk image" and choose the image

It will warn you that it will convert the image to some newer format but otherwise boots up fine. Sound didn't work (i have not explored why) and you need to run "ifup eth0" to get networking like others have mentioned.

--[[User:Cgalpin|Cgalpin]] 18:42, 3 January 2008 (EST)


=== sugar-jhbuild on 32-bit Ubuntu in Parallels ===
=== sugar-jhbuild on 32-bit Ubuntu in Parallels ===
Line 65: Line 75:


[[User:SRiggins|SRiggins]]: Parallels Build 3188 now stores vm hard disk images in /Users/{USERNAME}/Documents/Parallels/{VMNAME}/
[[User:SRiggins|SRiggins]]: Parallels Build 3188 now stores vm hard disk images in /Users/{USERNAME}/Documents/Parallels/{VMNAME}/

[[User:GKnauth|GKnauth]]: Using Parallels 3 with [[User:BruceB|BruceB]]'s and [[User:ScottSwanson|ScottSwanson]]'s suggestions, I overwrote the <tt>.hds</tt> file in the <tt>.hdd</tt> directory and afterward Parallels booted the OLPC fine:

#!/bin/bash
# edit these to match your system
IND=/Users/gknauth/test/olpc
INF=os650.img
OUTD=/Users/gknauth/Documents/Parallels/OLPC/otherlin.hdd
OUTF='otherlin.hdd.0.{some-parallels-hex-key}.hds'
dd if="$IND/$INF" "of=$OUTD/$OUTF" bs=1024 conv=notrunc,noerror,sync


== Virtual PC on Mac OS X (PowerPC) ==
== Virtual PC on Mac OS X (PowerPC) ==
Line 114: Line 136:
Stack: c0745fdc 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Stack: c0745fdc 00000000 00000000 00000000 00000000 00000000 00000000 00000000
&#x25aa;&nbsp;[[User:NeoAmsterdam|NeoAmsterdam]]<small><sup>[[User talk:NeoAmsterdam|Talk]]</sup><sub>[[Special:Contributions/NeoAmsterdam|Edits]]</sub></small> 23:07, 18 May 2007 (EDT)
&#x25aa;&nbsp;[[User:NeoAmsterdam|NeoAmsterdam]]<small><sup>[[User talk:NeoAmsterdam|Talk]]</sup><sub>[[Special:Contributions/NeoAmsterdam|Edits]]</sub></small> 23:07, 18 May 2007 (EDT)


Hi. I had a similar problem and i solved it with "install noapic nolapic acpi=off" :)


== Notes moved from Talk:OS_images_for_emulation ==
== Notes moved from Talk:OS_images_for_emulation ==
=== QEMU on MacOS X ===
=== QEMU on MacOS X ===



[[User:Jonb]]: Per my comment from the article, I can not get the USB emulation to work with the OLPC image in QEMU using the Q.app front-end. However, I can build a new VM that will boot off of the Windows 2000 Pro install CD and while in the installation screens I have full mouse and keyboard support. Could it be that there are missing drivers in the OLPC image? Has anyone gotten this to work without using a laptop?
[[User:Jonb]]: Per my comment from the article, I can not get the USB emulation to work with the OLPC image in QEMU using the Q.app front-end. However, I can build a new VM that will boot off of the Windows 2000 Pro install CD and while in the installation screens I have full mouse and keyboard support. Could it be that there are missing drivers in the OLPC image? Has anyone gotten this to work without using a laptop?




=== Parallels Desktop ===
=== Parallels Desktop ===

Latest revision as of 16:15, 8 February 2011

For current information on emulation of OLPC software images, see Emulating the XO

Stop hand.png WARNING:
The content of this section is considered
DEPRECATED and OBSOLETE
It is preserved for historical or documenting reasons.

VMware

Works really well. See VMWare.

  • I need to emphasize this: VMWare Fusion beats Parallels for running Linux on your Mac, hands down. I have used Parallels for about two years to do Linux/Sugar development, and I could smack myself that I didn't try VMWare earlier. The final straw was that I would have had to pay for a Parallels upgrade to support Fedora 9 after they promised for several months it would be supported. On VMWare, even the officially "unsupported" versions work because the installer simply offers to compile the necessary drivers, which worked flawlessly for me. Bert 12:54, 2 December 2008 (UTC)

Parallels Desktop on Mac OS X

Said to work in Parallels. http://lists.laptop.org/pipermail/devel/2007-November/007559.html

Step by step instructions for getting XO emulation up on a Mac using Parallels v3

Screenshots collected at Emulating_the_XO/Mac_Parallels3.


Simpler way of using Parallels v3

OS images can be used with Parallels by following these simple steps

  1. Uncompress and change the image extension from .img to .hdd
  2. Create a new virtual machine (Custom/Linux/Red Hat)
  3. Choose "Use an existing hard disk image" and choose the image

It will warn you that it will convert the image to some newer format but otherwise boots up fine. Sound didn't work (i have not explored why) and you need to run "ifup eth0" to get networking like others have mentioned.

--Cgalpin 18:42, 3 January 2008 (EST)

sugar-jhbuild on 32-bit Ubuntu in Parallels

The OLPC Wiki instructions for Sugar on Ubuntu Linux (with sugar-jhbuild) worked for me after installing Ubuntu 7.04 from ISO in Parallels on my MacBook. 23 June 2007.

LiveCD in Parallels

A person on #sugar reports, regards the sdk LiveCd of April,

i was able to get things running in parallels smoothly
i don't think i did anything else than what was suggested by the wiki with dd -- that part worked smoothly, and parallels booted the image without any issues. i had trouble getting networking to work only because i couldn't figure out how to get a shell. all the ctrl- commands would have side effects on my powerbook. ctrl-alt-delete worked though and was able to get the interface up and running that way
I don't have sound thou
(copied by MitchellNCharity 22:32, 27 May 2007 (EDT))

The following was originally copied from another, older, page

Bert: First, install a regular Linux in Parallels - I used Fedora Core 5. To use an OS image directly, add a second hard disk (size 512 MB) to the VM. Boot the VM, download an OS image (ending in ext3.img.bz2), then copy it to the second hard disk (hdc for me, hdb is the CD):

bzcat ...ext3.img.bz2 | dd of=/dev/hdc bs=1M
sync

Then shut down that Linux, and change the VM (or make another one) to boot from the second hard disk image. Start that VM - should work :) I have not yet made sound work, though, please let me know if you find out anything.

BruceB: It can be a bit easier than that, no need to load a Linux system if you don't already happen to have one. This worked for me, though it may be simplified further still.

  • Launch Parallels, create a new VM (I user "other Linux"
  • Set the hard drive to be 512MB, OK when it says it already exists.
  • Note the Hard drive file name, for me it was:
 /Users/bruce/Library/Parallels/otherlin/otherlin.hdd
  • Download the image (as bert says, ending in ext3.img.bz2) from this page:
 http://olpc.download.redhat.com/olpc/streams/development/latest/devel_ext3/
  • Drop into the Apple Terminal and type: (replacing "..." with the right file name you downloaded and your username. Check to see if "otherlin.hdd" is what you are using too.)
 bzcat ~/Desktop/olpc...ext3.img.bz2 | dd of=/Users/.../Library/Parallels/otherlin/otherlin.hdd
  • Re-launch Parallels and run!

Bert: Oh, so Parallel's hdd is nothing more than a plain disk image? How interesting! Thanks, that's a lot easier!

Wooky: The dd-ing worked allright under OS X, but with a caveat: both images I tried (206 and 193) were only 480MB after dd, even though they originally had 512MB. I used Parallel's image utility to resize them back to 512MB and all went fine (almost, couldn't start GUI. Guess it is something between fbdev and Parallel's video).

MartinDolphin: I managed to get this working following the shorter method suggested by BruceB - the OLPC software starts with the initial screen, I can enter my name, but can't get any further.

George: I have the same problem with MartinDolphin

ScottSwanson: To avoid the 480MB "autoshrink" when running dd in Terminal.app, try using the following (remember to explicitly enter the correct paths for your system instead of "..."):

 bzcat ...ext3.img.bz2 | dd of=...otherlin.hdd bs=1024 conv=notrunc,noerror,sync

I was informed on #Sugar that there was a known issue with the file selection dialog box where you had to type in the filename with full path by hand. The newest build (298 as I write this) obviates this need. (This addresses MartinDolphin and George's issue.)

StarKruzr: I get so far as the Sugar splash screen. Never get to type in a name, it crashes shortly after telling Grub to boot from the QEMU target.

SRiggins: Parallels Build 3188 now stores vm hard disk images in /Users/{USERNAME}/Documents/Parallels/{VMNAME}/

GKnauth: Using Parallels 3 with BruceB's and ScottSwanson's suggestions, I overwrote the .hds file in the .hdd directory and afterward Parallels booted the OLPC fine:

#!/bin/bash

# edit these to match your system
IND=/Users/gknauth/test/olpc
INF=os650.img
OUTD=/Users/gknauth/Documents/Parallels/OLPC/otherlin.hdd
OUTF='otherlin.hdd.0.{some-parallels-hex-key}.hds'

dd if="$IND/$INF" "of=$OUTD/$OUTF" bs=1024 conv=notrunc,noerror,sync

Virtual PC on Mac OS X (PowerPC)

Akauppi: The instructions above on preparing a 512MB boot disk, based on ...img.bz2 file apply. However, create a 1GB disk image in VPC, since it does not allow precisely 512MB.

TODO: system boots nicely, but the mouse remains unresponsive. Ideas???

John Palmieri advised:

Add this to /etc/X11/qemu-Xorg.conf and then copy qemu-Xorg.conf to Xorg.conf:

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "IMPS/2"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5"
        Option      "Emulate3Buttons" "yes"
EndSection

Startup Failure

VirtualPC 7.0.1 (041022) on a Quad G5 (PowerMac11,2) fails to boot from the LiveCD, neither as disk or from image. The following output post-bootloader was copied verbatim from the (virtual) screen:

  Booting 'OLPC Operating System SDK'

root (cd)
 Filesystem type is iso9660, using whole disk
kernel /boot/vmlinuz ro quiet root=CDLABEL=OLPCRoot_build385_CD rootfstype=iso9
660 fastboot livecd selinux=0
   [Linux-bzImage, setup=0x1e00, size=0x1e2474]
initrd /boot/initrd
   [Linux-initrd @ 0x1fd37000, 0x2a888d bytes]

Uncompressing Linux... Ok, booting the kernel.














Int 14: CR2 ffffbe47  err 00000002  EIP c0427b06  CS 00000060  flags 00000047
Stack: c0745fdc 00000000 00000000 00000000 00000000 00000000 00000000 00000000

▪ NeoAmsterdamTalkEdits 23:07, 18 May 2007 (EDT)


Hi. I had a similar problem and i solved it with "install noapic nolapic acpi=off" :)

Notes moved from Talk:OS_images_for_emulation

QEMU on MacOS X

User:Jonb: Per my comment from the article, I can not get the USB emulation to work with the OLPC image in QEMU using the Q.app front-end. However, I can build a new VM that will boot off of the Windows 2000 Pro install CD and while in the installation screens I have full mouse and keyboard support. Could it be that there are missing drivers in the OLPC image? Has anyone gotten this to work without using a laptop?


Parallels Desktop

Joc Got this working on Parallels Desktop by making another serial port which I telnetted into and used the modprobe command to enable the keyboard and mouse. How ever I can't find a way to edit the grub.conf file in /boot/grub/grub.conf to change the screen resolution so that I can try Squeak usefully. Any ideas? Being able to open a console in the olpc image would be useful too as I get errors over telnet.