The B2 development machine we currently have will not run the latest OLPC builds so I have been attempting to get them running in an emulator. I decided to try all 3 emulators to see what issues there were with each one, the 3 being Qemu, VMPlayer and VirtualBox.
After doing the installs the launchers are put in various places. Qemu puts the launcher under Accessories, VMPlayer puts the launcher under Other and VirtualBox winds up in System Tools as Innotek VirtualBox. More detailed instructions are available for the emulations here http://wiki.laptop.org/go/Emulating_the_XO. The following is not meant to be instructions but is a short collection of tips for each emulator that were either hard to find at the above website or were not at this website.
Each emulator has a different command and/or set of issues for getting it to successfully run, at least on this machine doing these tests. It seems best to install Qemu first so that you then have some of the other tools mentioned for making/converting image files to the appropriate format.
Qemu has 2 things that need to be entered but are hard to find in the instructions.
1. Qemu runs very slowly unless you have an accelerator, kqemu, running. Follow the instructions for installing and setting up Qemu then Kqemu if needed. This command needs to be run one time before launching Qemu, or needs to be run each time after the computer has been rebooted.
sudo /sbin/modprobe kqemu major=0
2. This is the command that is used in the launcher to start Qemu with the last bit, the .img file, being the appropriate location/image you are trying to use.
sudo /usr/bin/qemu -m 256 -kernel-kqemu -soundhw es1370 -net user -net nic,model=rtl8139 -hda /home/newlands/olpc/laptop623.img (the name and location of your disk image for Qemu).
VMPlayer also had a couple of issues to solve that did not seem clear or were not mentioned in the website instructions.
1. First the OLPC site gives a .vmdk file, the actual machine image, or instructions on how to make one using qemu-img convert. But before VMPlayer can successfully be setup to use this image, first a .vmx file is needed but is not supplied. This is just a text file with various settings and parameters. I finally found one for an older image file, took that and edited it to correct any information for the image file I was running and for this computer. For instance one change that needed to be made was the /dev for the CDROM so it would be active when VMPlayer was running.
2. The other problem I ran into is that after running VMPlayer and then closing it down, a .vmss file is created with the same name and location as the image file that is being used. With this file in existance VMPlayer would not launch a second time. So I made a simple shell script that first deletes this .vmss file then launches VMPlayer as sudo.
VirtualBox also had a couple of special setup issues.
1. A .vdi file is not supplied for VBox but can easily be made from the Qemu image file. After succesful installation of VBox and adding yourself as a user in the vboxusers group (don’t forget to do this step or lots of things will not work properly), then an appropriate VBox image file can be obtained by taking the Qemu image file and running:
VBoxManager convertdd *.img *.vdi
2. The other issue with VBox is more major. Not all the stable released versions seem to run correctly inside VBox. The OLPC website says that build 557 runs correctly but after following the links I found that this was in fact build 558 and it does run properly. Also just learned that if ACPI is disabled then recent builds seem to run okay.
Once the images are all running properly in the emulators, some further configuration is needed to access the internet from any network running a proxy server. Launch the browser (from within the OLPC emulation) and go to about:config. In the filter type proxy. A shorter list will then appear with some entries that need to be modified. The values to adjust for the Calgary office are:
network.proxy.http -> proxy.wycliffe.ca
network.proxy.http-port -> 3128
network.proxy.type -> 1
Other values can also be adjusted as needed such as network.proxy.ssl, etc. Do these modifications in each emulator that requires internet access.
Here is the VMX file I used for VMPlayer. Right click here and Save Link As. Take off the .txt on the end. I used the OLPC build 625 image and converted that to a VMDK file called laptop625.vmdk. The VMX file reflects these settings. Adjust it as necessary.
Posted in OLPC |