Emulating the XO/Mac
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.
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.
- 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.
- 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.
- 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.
- 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.
- Additionally, you can (and should!) look at http://dev.laptop.org for things to do. There are two 'beginner' links there.
Parallels Desktop on Mac OS X
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}/
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)
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.