Emulating the XO: Difference between revisions

From OLPC
Jump to navigation Jump to search
(Table for comparing alternatives started.)
No edit summary
 
(216 intermediate revisions by 60 users not shown)
Line 1: Line 1:
{{translations}}
{{translations}}
{{emulation-nav}}
<div style="float:right; clear:right; font-size:80%; max-width:60%; padding:0.3em; background:#c1fea1; color:#0a6c00; border:2px solid #8ad962; "><big>'''Latest Release:'''</big><br>Stable: [http://olpc.download.redhat.com/olpc/streams/development/build406/ '''Build 406'''] (May 7)<br>[[LiveCD]]: [http://olpc.download.redhat.com/olpc/streams/sdk/latest/livecd/olpc-redhat-stream-sdk-livecd.iso '''ISO-Build 385'''] (Apr 7)
</div>
[[Image:AP1_39.jpg|thumb|laptop-in-laptop]]


In the past, OLPC produced alternative software images which could be run in emulators such as QEMU and VMware. This meant that development and testing could happen to a limited extent without requiring an XO laptop.
== [[Emulating the XO/Quick Start|Quick Start]] ==


'''In 2013, please see Tom Gilliard's many [http://wiki.sugarlabs.org/go/Sugar_Creation_Kit virtual machine images ready-to-go].'''
To set up a "virtual XO", and get a taste of the XO software, see [[Emulating the XO/Quick Start|Quick Start]].


Note, XOs are readily available to genuine volunteer contributors through the [[Contributors program]].
== Context ==


[http://sugarlabs.org Sugar], the unique user interface of the XO laptops, is also distributed as a generic software project and can be developed and tested on "regular" computers as well as XOs. See [http://wiki.sugarlabs.org/go/Downloads Sugar Labs Downloads] for the full range of options, such as [http://wiki.sugarlabs.org/go/Sugar_on_a_Stick Sugar on a Stick].
One way to run oplc software is using an emulator on your pc. See [[Software]] for other options. Compared to using a [[Developer Images|developer image LiveCD]], it might be harder to set up, but easier to develop on. Compared to [[:Category:Installing_Sugar|installing sugar]], easier, but harder.

== Alternatives ==

''Table under construction'' [[User:MitchellNCharity|MitchellNCharity]] 17:59, 26 May 2007 (EDT)
{|
|-
! option !! note !! updated !! hardware? !! library? !! writable? !! comments
|-
| XO disk images

|-
| [[LiveCd]]
|
| April
| yes || no || no
|
|-
| [[:Category:Installing Sugar|Installing Sugar]]
|
| continuous
| yes || yes || yes
| Quite hard to do.
|}

== Emulation for Development ==

The most common approach is to use [[QEMU]] with kqemu acceleration. See [[Emulating the XO/Quick Start|Quick Start]] for the basics.
But we will use a different .img, one with a few extra utility programs. See [[OS images]]. Including the '''[[OS_images#Latest_Stable_Build |latest stable build]]'''.

Instead of qemu, you can run [[Emulating the XO/UsingVMware|VMware]], and there are addition options on a [[Emulating the XO/Mac|Mac]].

[[Emulating the XO/Help and tips]] may help. Please report your experiences in [[User Feedback on Images]]. There is a [[Virtualization Common Room]].

There are [[Emulating the XO/Limitations of XO disk images|limitations with XO disk images]].

=== Development using QEMU ===

If you wish to develop software on an emulated image, you will usually want a connection between your host and the laptop image.

You need a "<tt>*-devel*.img</tt>" image, rather than a standard (non-devel) one. The <tt>-devel</tt> image has extra software like <tt>sshd</tt> and <tt>wget</tt>.

Get network working on the laptop. See [[Using QEMU for Troubleshooting#Network]]. A simple <tt>echo ifup eth0 >> /etc/rc.local</tt> , run as root on the laptop, should do it. You should now be able to surf with the laptop's web activity. Under QEMU the Laptop image can see the host as IP address 10.0.2.2 .

Next, you have several alternatives:
* SSH using qemu -redir tcp:2222::22. (a good first approach)
*# First-time setup
*## Get the image's network working.
*## Change the image's root password.
*##: Log into the image as root (no password needed yet!), type <tt>passwd</tt> , and then give it one. Complaints about "BAD" passwords won't stop things from working.
*##: Logging in as root is easy in qemu - you have a console window. Elsewhere...''(? someone else will need to fill this in)''
*# Whenever you run qemu, add the argument <tt>-redir tcp:2222::22</tt>
*# You can now log into the laptop image, from your real machine, using ssh. And you can use scp, etc.
ssh -p 2222 root@localhost # simple
ssh -o NoHostAuthenticationForLocalhost=yes -p 2222 root@localhost #avoids annoying warning
* SSH using a key. (if ssh passwords get annoying, you can try this)
*: If you create an SSH server on your host and install a key on your Laptop image that has logon rights for that server, you can ssh from the OLPC to your host. This avoids password typing.
*: Adding platform-specific instructions might be useful? [[User:MitchellNCharity|MitchellNCharity]] 15:59, 21 May 2007 (EDT)
* Using a web server. (if you don't want to deal with ssh, and have a webserver)
*: If you have a web server, you might simply download stuff onto the laptop using the laptops's web browser.


For emulation of extremely old builds, you may be able to come across "ext3 images" on some corners of http://download.laptop.org and http://xs-dev.laptop.org/~cscott/olpc/streams/ which can be loaded into emulators. You are unlikely to find support for them!


[[Category:OS]]
[[Category:OS]]

Latest revision as of 16:26, 30 July 2013

  english | español日本語한국어portuguêsрусский HowTo [ID# 290021]  +/-  
modify 

In the past, OLPC produced alternative software images which could be run in emulators such as QEMU and VMware. This meant that development and testing could happen to a limited extent without requiring an XO laptop.

In 2013, please see Tom Gilliard's many virtual machine images ready-to-go.

Note, XOs are readily available to genuine volunteer contributors through the Contributors program.

Sugar, the unique user interface of the XO laptops, is also distributed as a generic software project and can be developed and tested on "regular" computers as well as XOs. See Sugar Labs Downloads for the full range of options, such as Sugar on a Stick.

For emulation of extremely old builds, you may be able to come across "ext3 images" on some corners of http://download.laptop.org and http://xs-dev.laptop.org/~cscott/olpc/streams/ which can be loaded into emulators. You are unlikely to find support for them!