Emulating the XO/lang-es: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (first dump of raw wiki-text (reusable))
 
(14 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Translation | lang = es | source = OS images for emulation | version = 35296}}
{{Translation | lang = es | source = Emulating the XO | version = 48033}}
{{Ongoing Translation}}
{{ Latest Releases | livecd = inline | devel = inline | server = inline }}


[[Image:AP1_39.jpg|thumb|laptop-in-laptop]]
<font size="-1"><blockquote>Basic emulation options are listed here. For Windows emulation, see '''[[Using QEMU on Windows XP]]'''.


{{anchor|Quick Start - [[LiveCd|LiveCD]]}}
You can find the '''[[OS_images#Latest_Stable_Build |latest stable build here.]]'''</blockquote></font>
== Inicio Rápido - [[LiveCd/lang-es|CD-Vivo]] ==


Para muchos, el [[LiveCd/lang-es|CD-Vivo]] es la forma más fácil de probar [[Sugar/lang-es|Sugar]]. Es fácil, pero tu trabajo se pierde cuando reinicias.
<div id="OLPC OS performance under emulation"/>
{{ Translated text |
== Rendimiento del SO OLPC simulado ==
For many, the [[LiveCd|LiveCD]] is the easiest way to try [[Sugar]]. It's easy to do, but your work is lost when you reboot.
| display = block }}


{{anchor|Quick Start - [[Emulating the XO/Quick Start|Emulation]]}}
<font size="-1"><blockquote>It should be noted that running the OLPC images under qemu and related emulators are '''significantly less responsive'''. A side by side of OLPC OS under qemu and other OS (such as Linux or Windows), will present Sugar as very unresponsive. However, Sugar responds far better on the A-Test development board. See [[User Feedback on Images]].


== Inicio Rápido - [[Emulating the XO/Quick Start/lang-es|Emulación]] ==
If performance is so poor activities fail to load see [[#Coping with Slow|Coping with Slow]] for a possible work-around.</blockquote></font>


La '''[[Emulating the XO/Quick Start/lang-es|emulación]]''' es otra forma de probar [[Sugar/lang-es|Sugar]]. Puede resultar un poco más difícil, pero no se pierde lo hecho.
<div id="OLPC Simulator GRUB boot option"/>
: El sonido en [[TamTam/lang-es|TamTam]] puede no funcionar por el momento.
== Opcion de ''booteo'' GRUB del ''Simulador OLPC Simulator'' ==
{{ Translated text |
'''[[Emulating the XO/Quick Start|Emulation]]''' is the other way to try [[Sugar]]. It can be harder to set up,, but work is preserved.
:Sound in [[TamTam]] may not be working at the moment. [[User:MitchellNCharity|MitchellNCharity]] 13:16, 5 June 2007 (EDT)
| display = block }}


{{anchor|Quick Start for Developers}}
<font size="-1"><blockquote>When booting an [[OS images|OS image]] within an emulator, you need to make sure you boot the kernel with the correct options. When booting, you'll see the green screen of GRUB with ''One Laptop Per Child'' along the bottom: in this boot menu, make sure you select ''OLPC Simulator''. Otherwise, bootup on real OLPC hardware will be assumed, and since the emulator does not emulate the OLPC hardware exactly, bootup will fail.</blockquote></font>
== Inicio Rápido para Desarrolladores ==


Una alternativa es el uso de la emulación para el desarrollo de software.
<div id="QEMU"/>
== QEMU ==


Descargue la [http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/olpc-redhat-stream-development-devel_ext3.img.bz2 última imagen] de [http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/ acá]. Instale [[QEMU/lang-es|QEMU]] y el acelerador como se indica en [[Emulating the XO/Quick Start/lang-es|Emulando la XO - Inicio Rápido]]. Vea [[Emulating the XO/Help and tips/lang-es|Ayuda y soluciones]].
<font size="-1"><blockquote>The easiest way to test the images is to use qemu or some similar emulator. It is available for various host systems:
* [[#QEMU on Linux|Linux]]
* [[#QEMU on FreeBSD|FreeBSD]]
* [[#QEMU on Windows|Windows]]
* [[#QEMU on Mac OS X|Mac OS X]]</blockquote></font>


'''Vea [[#XO-QEMU boot broken - current workarounds|Booteo QEMU roto - soluciones temporales]]
<div id="QEMU on Linux"/>
=== QEMU en Linux ===


El ''build 486 puede que funcione [http://www.j5live.com/?p=388 j5live.com]. Si no, el 445 sería la mejor alternativa. Los ''builds'' 485 y 482 tienen problemas con red (y 482 requiere de pasos adicionales [[Emulating_the_XO/Help_and_tips/lang-es#Builds_between_445_and_485.2C_non-inclusive_--_Workaround_for_netfs_preventing_boot|Builds 445 al 485 no inclusive - soluciones para el netfs]].
<font size="-1"><blockquote>On Fedora Core 5, QEMU is included in extras and is very easy to install. As root just type
{{ Translated text |1=
Developing on emulation is one alternative for developing software.


Get [http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/olpc-redhat-stream-development-devel_ext3.img.bz2 the latest image]
yum install qemu
from [http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/ here]. ''(add link to tinderbox)''
Install QEMU and kernel acceleration as described in [[Emulating the XO/Quick Start]]. See the [[/Help_and_tips]] "Development" section.


'''See [[#XO-QEMU boot broken - current workarounds]].'''
and it should be installed. You may have to start the service for it. As root run:


Build 486 may be working[http://www.j5live.com/?p=388]. Otherwise, 445 is still your best bet.
service qemu start
485 and 482 have network issues (and 482 requires an additional workaround
[http://wiki.laptop.org/go/Emulating_the_XO/Help_and_tips#Builds_between_445_and_485.2C_non-inclusive_--_Workaround_for_netfs_preventing_boot]).
| display = block }}


{{anchor|Overview}}
On Debian/Ubuntu, QEMU is included in the repository.


== Overview ==
apt-get install qemu


Una forma de correr software OLPC es usando un emulador en su PC. Vea [[Getting started programming/lang-es|comenzando a programar]] para más opciones.
Once you have an image downloaded, it is very easy to use qemu to launch the OLPC environment:


Note '''[[:Category:Emulation]]''' y '''[[Emulating the XO/Help and tips/lang-es|Ayuda y soluciones]]'''.
qemu -soundhw es1370 -serial `tty` -hda \
olpc-stream-development-7-20060609_1600-ext3.img


Para jugar, se puede usar el [[LiveCd/lang-es|CD-Vivo]], o [[QEMU/lang-es|QEMU]] (como en el 'inicio rápido', pero con una imagen diferente), o quizás alguna de nuestras [[Developer Images/lang-es|imágenes de desarrollador]] distintas al [[LiveCd/lang-es|cd-vivo]]. Otra alternativa es fijarse en la [[:Category:Installing_Sugar|categoría de instalación de Sugar]]. Vea [[Getting started programming/lang-es|comenzando a programar]] para una comparación.
If qemu complains about insufficient space in /dev/shm then


Una alternativa frecuente es usar [[QEMU/lang-es|QEMU]] junto a su acelerador <tt>kqemu</tt>. Vea su [[Emulating the XO/Quick Start/lang-es|inicio rápido]] para comenzar. Sin embargo, para el desarrollo, usaremos una imagen diferente (<tt>.img</tt>) con algunos utilitarios extra. Vea [[OS images/lang-es|imagenes del SO]], incluyendo la '''[[OS_images/lang-es#Latest Stable Build|última versión estable]]'''.
mount -t tmpfs -o remount,size=144m none /dev/shm


En vez de [[QEMU/lang-es|QEMU]], se puede utilizar [[Emulating the XO/UsingVMware/lang-es|VMware]], y hay otras alternativas para [[Emulating the XO/Mac/lang-es|Mac]].
If you want to use kqemu to speed up the emulation then


Por favor informe sus resultados en [[User Feedback on Images/lang-es|feedback sobre las imágenes]]. Existe además un [[Virtualization Common Room/lang-es|Salón de Virtualización]] sobre el tema.
modprobe kqemu major=0


Existen algunas [[Emulating the XO/Limitations of XO disk images/lang-es|limitaciones en las imágenes de disco XO]].
and add the <tt>-kernel-kqemu</tt> option.


La diferencia entre ''<tt>LATEST-STABLE-BUILD</tt>'' y ''<tt>LATEST</tt>'' es quizás de interés para aquellas personas usando XOs reales. Emulando, los desarrolladores deberían usar ''<tt>LATEST</tt>'', y cuando ''<tt>LATEST-STABLE-BUILD</tt>'' es viejo (un par de semanas), los no desarrolladores también.
We have heard multiple people say that QEMU doesn't work with these images on the debian-derived distributions. The symptom is that the kernel hangs during boot. There's a problem with <code>bochsbios</code> version 2.2, version 2.3 works. As a quick fix, <code>apm=off</code> can be added to OLPC kernel arguments. (For more info, see the [[Talk:OS images for emulation#Boot hangs on Debian-derived distros|discussion]].)
{{ Translated text |
One way to run oplc software is using an emulator on your pc. See [[Getting started programming]] for other options.


Note '''[[:Category:Emulation]]''' and '''[[Emulating the XO/Help and tips|Help and tips]]'''.
If you have network problems through Qemu and OLPC, [[Using_QEMU_on_Troubleshooting#Network|try this.]]</blockquote></font>


For play, you can use [[LiveCd]] or [[Emulating the XO/Quick Start|Quick Start]].
<div id="QEMU Development Strategies"/>
=== Estrategias de Desarrollo bajo QEMU ===


For development, you can use [[LiveCd]], or qemu (as in quick start, but with a different image), or perhaps one of the [[Developer Images]] other than the LiveCd. An alternate approach is to attempt [[:Category:Installing_Sugar|installing sugar]]. See [[Getting started programming]] for a comparison.
<font size="-1"><blockquote>For those who would like to use QEMU for developing Python software (Sugar software) for the OLPC, it's convenient to set up a connection between the host and the Laptop image. Under QEMU the Laptop image can see the host as IP address 10.0.2.2 . If you create an SSH server on your host and install a key on your Laptop image that has logon rights for that server.
ok it working</blockquote></font>


A common development approach is to use [[QEMU]] with kqemu acceleration. See [[Emulating the XO/Quick Start|Quick Start]] for the basics.
<div id="QEMU on FreeBSD"/>
Though for development, we will use a different .img, one with a few extra utility programs. See [[OS images]], including '''[[OS_images#Latest_Stable_Build |latest stable build]]'''.
=== QEMU en FreeBSD ===


Instead of qemu, you can run [[Emulating the XO/UsingVMware|VMware]], and there are additional options on a [[Emulating the XO/Mac|Mac]].
<font size="-1"><blockquote>Install qemu from ports:


Please report your experiences in [[User Feedback on Images]]. There is a [[Virtualization Common Room]].
cd /usr/ports/emulators/qemu && make install clean


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


The LATEST-STABLE-BUILD versus LATEST build distinction is mostly of interest to people running on actual XO's. In emulation, developers should usually use LATEST. And when STABLE is old, non-developers probably should too.
pkg_add -r qemu
| display = block }}


{{anchor|Comparison of alternatives}}
Once installed, load kqemu and aio kernel modules:
== Comparando alternativas ==


La laptop OLPC es hardware especializado, corriendo una versión mínima de Fedora de Red Hat, sobre la cual corre [[Sugar/lang-es|Sugar]]. Pero que si no se tiene una laptop OLPC? Hay varias alternativas, cada una posible de ser usada en modos diferentes.
kldload kqemu
{{ Translated text |
kldload aio
An OLPC laptop is custom hardware, running a stripped-down Red Hat linux, running [[Sugar]]. But what if you don't have a real olpc laptop? There are a several options, which can each be used in a couple of ways.
| display = block }}


{{anchor|recommendations}}
and launch the image you want:
=== recomendaciones ===


{| border=1 cellspacing=0
qemu -hda olpc-stream-development-7-20060609_1600-ext3.img</blockquote></font>


|- style="background:lightgray; "
<div id="QEMU on Windows"/>
! platforma {{Translated text |platform| display = block}} !! proposito {{Translated text |purpose| display = block}} !! recomendación {{Translated text |recommendation| display = block}}
=== QEMU en Windows ===


|-
<font size="-1"><blockquote>See [[Using QEMU on Windows XP]]</blockquote></font>
| Windows || desarrollo || imagen de disco XO emulado; o Ubuntu emulado con <tt>sugar-jhbuild</tt>; (o CD-desarrollador o CD-Vivo)?. (''necesitamos sus informes'')
|- style="font-size:66%; font-family:fixed; background:#eaeaea; " <!-- TRANSLATED ROW -->
| Windows || development || emulated xo disk image; or emulated Ubuntu with sugar-jhbuild; (or develoepr CD or LiveCD)?. (''need your reports'')


|-
<div id="QEMU on Mac OS X"/>
| Mac || desarrollo || imagen de disco XO emulado; o Ubuntu emulado con <tt>sugar-jhbuild</tt>; (o CD-desarrollador o CD-Vivo)?. (''necesitamos sus informes'')
=== QEMU en Mac OS X ===
|- style="font-size:66%; font-family:fixed; background:#eaeaea; " <!-- TRANSLATED ROW -->
| Mac || development || emulated xo disk image; or emulated Ubuntu with sugar-jhbuild; (or developer CD or LiveCD)?. (''need your reports'')


|-
<font size="-1"><blockquote>[[User:Bert|Bert]]: I successfully ran OLPC on OS X using the following method on a Powerbook G4 (867 MHz), albeit very slowly.
| Mac con Parallels || desarrollo || instale Ubuntu 32-bit, y [[Sugar on Ubuntu Linux/lang-es|Sugar en Ubuntu Linux]]. Vea [[Emulating the XO/Mac/lang-es|Emulando la XO - Mac]].
|- style="font-size:66%; font-family:fixed; background:#eaeaea; " <!-- TRANSLATED ROW -->
| Mac with Parallels || development || install Ubuntu 32-bit, and [[Sugar on Ubuntu Linux]]. See [[/Mac]].


|-
[[User:Justin|Justin]]: Likewise, I successfully ran the latest disk image (Build 385) through QEMU on OS X (10.4) on and Intel Apple using the instructions below.
| Ubuntu 32-bit || desarrollo || [[Sugar with sugar-jhbuild/lang-es|Sugar con <tt>sugar-jhbuild</tt>]] y [[Sugar on Ubuntu Linux/lang-es|Sugar en Ubuntu Linux]]
|- style="font-size:66%; font-family:fixed; background:#eaeaea; " <!-- TRANSLATED ROW -->
| Ubuntu 32-bit || development || [[Sugar with sugar-jhbuild]] and [[Sugar on Ubuntu Linux]]


|-
*Download and install Q.app ([http://kju-app.org/ kju-app.org ] , I got 0.8.1a35, the builds are here: [http://www.kberg.ch/q/builds/ kberg.ch/q/builds/] (previous link broken / server down))
| 32-bit linux || desarrollo || [[Sugar with sugar-jhbuild/lang-es|Sugar con <tt>sugar-jhbuild</tt>]]
*Download a disk image (build 59 worked, 73 did not), double-click to unzip. (Note: See point (1) in Section "Enabling SSH" below before choosing an image.)
|- style="font-size:66%; font-family:fixed; background:#eaeaea; " <!-- TRANSLATED ROW -->
*Double-click Q.app [[Media:Q_empty.jpg|Example]]
| 32-bit linux || development || [[Sugar with sugar-jhbuild]]
*Click (+) to add a new PC [[Media:Q_create_new_guest.jpg|Example]]
** Name: OLPC
** Operating System: Q Standard Guest
** Click (Create PC)
*Configure Settings:
** General: No file sharing [[Media:Q_general_prefs.jpg|Example]]
** Hardware - Hard disk: Select your unzipped disk image [[Media:Q_hardware_prefs.jpg|Example]]
** Advanced - QEMU Arguments: type "-redir tcp:2222::22" (without quotes) [[Media:Q_advanced_prefs.jpg|Example]]
** Click (Create PC)
*Double-click "OLPC" to run:
** press space to get into GRUB, [[Media:Grub_start.png|Example]]
**choose "OLPC for Qemu Target", [[Media:Grub_choose_qemu.png|Example]]
**press "e" to edit commands,
**select "kernel" line, and press "e", [[Media:Grub_choose_the_line.png|Example]]
**add "single" option at the end of the line, [[Media:Grub_edit_the_line.png|Example]]
**hit return, then "b" to boot
** set some root password (necessary for SSH), sync (Note: See point (2) in Section "Enabling SSH" below)
** reboot (power-off button or run "init 6")
*once it's up, from a terminal, log into OLPC using "ssh -p 2222 root@localhost" (Note: See point (3) in Section "Enabling SSH" below)


|-
[[User:Jonb|Jonb]]: I had trouble running this using Q.app. I guess Q.app doesn't have USB 1.1 support for "real" USB devices yet http://www.kju-app.org/proj/wiki/KjuUSBSupport. Their documentation says something about using the USB Tablet to emulate the mouse, no idea what this is about. The result is that I do not get a keyboard in OLPC on my G4 Mac (USB Keyboard, obviously). I assume [[User:bert]] got it to work using his PowerBook because PCMCIA emulation works?
| 64-bit linux || desarrollo || imágenes de disco XO bajo [[QEMU/lang-es|qemu]]; o [[LiveCd/lang-es|CD-Vivo]] una vez que sea actualizado (el actual es de abril)
|- style="font-size:66%; font-family:fixed; background:#eaeaea; " <!-- TRANSLATED ROW -->
| 64-bit linux || development || xo disk images under qemu; or [[LiveCd]] once it gets updated (currently it's April)


|}
[[User:Shekay|Shekay]]: I was able to run Q.app from the command line. for example:
: No creo realmente en la opción developer/liveCD Windows/Mac. No he escuchado a nadie que la esté usando. Y es muy vieja (abril), aunque el usuario [[User:Mcfletch|Mcfletch]] dijo (en mayo) que era una opción y por eso se la incluyó. [[User:MitchellNCharity|MitchellNCharity]] 09:19, 23 June 2007 (EDT)
{{ Translated text | 1=
:I don't really believe the development option of Windows/Mac developer/live CD. I've not yet heard of it actually being used. They are months out of date (April). But [[User:Mcfletch|Mcfletch]] said (in May) it's an option, so I added it. [[User:MitchellNCharity|MitchellNCharity]] 09:19, 23 June 2007 (EDT)
| display = block }}


{{anchor|background}}
$ /Applications/Q.app/Contents/MacOS/i386-softmmu.app/Contents/MacOS/i386-softmmu -hda olpc/olpc-redhat-stream-development-devel_ext3.img -serial stdio</blockquote></font>
=== background ===


{| border=1 cellspacing=0
<div id="Sending Ctrl-Alt combos in Qemu (or Q.app)"/>
|- style="background:lightgray; "
==== Enviando combinaciones Ctrl-Alt en Qemu (o Q.app) ====
! opción{{ Translated text |option| display = block }}
! actualización{{ Translated text |updated| display = block }}
! sonido?{{ Translated text |sound?| display = block }}
! cámara?{{ Translated text |camera?| display = block }}
! biblioteca?{{ Translated text |library?| display = block }}
! etoys?{{ Translated text |etoys?| display = block }}
! R/W?{{ Translated text |R/W?| display = block }}
! software de desarrollo{{ Translated text |development software?| display = block }}
! red?{{ Translated text |net?| display = block }}
! comentarios{{ Translated text |comments| display = block }}


|-
<font size="-1"><blockquote>According to [http://wiki.laptop.org/go/Sugar_Instructions#Terminal_.28linux_prompt.29 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.
| [[:Category:Installing Sugar|Instalando Sugar]]
| continuou || si || si? || si? || si
| si || las propias || si
| En algunas plataformas, lleva tiempo y espacio (horas y ~3GiB), pero "funciona". En otras, puede ser dificil de instalar.
|- style="font-size:66%; font-family:fixed; background:#eaeaea; " <!-- TRANSLATED ROW -->
| [[:Category:Installing Sugar|Installing Sugar]]
| continuous || yes || yes? || yes? || yes
| yes || your own || yes
| On some platforms, it takes time and space (hours and ~3GB), but "just works". On others, it is quite difficult to install.


|-
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.
| [[LiveCd/lang-es|CD-Vivo]]
| Abril || si (boot) si? (qemu) || si? (boot) no (qemu) || no || si
| no || toolchain, Gnome || si?
| Inicio Rápido alternativo. Puede ser usado para ''bootear'' como emulado en [[QEMU/lang-es|qemu]]. Ver abajo Problema A.
|- style="font-size:66%; font-family:fixed; background:#eaeaea; " <!-- TRANSLATED ROW -->
| [[LiveCd]]
| April || yes(boot) yes?(qemu) || yes?(boot) no(qemu) || no || yes
| no || toolchain, Gnome || yes?
| Alternative Quick Start. Can both be booted from, and used in qemu. Problems: A.


|-
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.
| colspan=10 style="background:lightgray; " | [[OS images/lang-es|imágenes de disco XO]]:{{ Translated text |[[OS images|XO disk images]]:| display = block }}


|-
e.g. to switch to the shell:
| colspan=10 | ÚLTIMA VERSIÓN ESTABLE <span style="font-size:80%; "><tt>http://olpc.download.redhat.com/olpc/streams/development/LATEST-STABLE-BUILD/</tt></span>{{ Translated text |LATEST-STABLE-BUILD| display = block }}


|-
sendkey ctrl-alt-f1
| ...development-ext3.img
| ~mensual || si/B || no || si || si
| si || no || tras configurar
| Inicio Rápido para evaluar Sugar
|- style="font-size:66%; font-family:fixed; background:#eaeaea; " <!-- TRANSLATED ROW -->
| ...development-ext3.img
| ~monthly || yes/B || no || yes || yes
| yes || no || after config
| Quick Start for getting a look at Sugar.


|-
to return to Sugar:
| ...development-devel_ext3.img
| ~mensual || si/B || no || no || si
| si || un poco || tras configurar
|
|- style="font-size:66%; font-family:fixed; background:#eaeaea; " <!-- TRANSLATED ROW -->
| ...development-devel_ext3.img
| ~monthly || yes/B || no || no || yes
| yes || a little || after config
|


|-
sendkey ctrl-alt-f7
| colspan=10 | ÚLTIMA VERSIÓN <span style="font-size:80%; "><tt>http://olpc.download.redhat.com/olpc/streams/development/LATEST/</tt></span>{{ Translated text |LATEST| display = block }}


|-
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.
| ...development-ext3.img
| ~diario || si/B || no || si || si
| si || no || tras configurar
|
|- style="font-size:66%; font-family:fixed; background:#eaeaea; " <!-- TRANSLATED ROW -->
| ...development-ext3.img
| ~daily || yes/B || no || yes || yes
| yes || no || after config
|


|-
Note: you type the ''name'' of the keys to send, you don't actually press the keys.</blockquote></font>
| [http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/olpc-redhat-stream-development-devel_ext3.img.bz2 ...development-devel_ext3.img]
| ~diario || si/B || no || no || si
| si || un poco || tras configurar
| Bueno para nuevos desarrolladores (requiere un poco de comodidad con la línea de comandos)
|- style="font-size:66%; font-family:fixed; background:#eaeaea; " <!-- TRANSLATED ROW -->
| [http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/olpc-redhat-stream-development-devel_ext3.img.bz2 ...development-devel_ext3.img]
| ~daily || yes/B || no || no || yes
| yes || a little || after config
| Good for new developers (requires some command-line comfort).


|-
<div id="Enabling SSH"/>
| colspan=10 style="background:lightgray; " | OTROS {{ Translated text |OTHER| display = block}}
==== Habilitando SSH ====


|-
<font size="-1"><blockquote>[[User:Follower|Follower]] needed to perform the following additional steps to successfully enable the use of SSH (with build 239):
| [[Developer Images/lang-es#Big Fedora Core 6 Build|FC6+Sugar]]
# Ensure you have a "*-devel*.img" image, as the standard (non-devel) images appear to not include sshd.
| abril || si? || ? || ? || no
# At the same time as enabling the root password you will probably also want to enable the network to start automatically. I followed the instructions from [[Using_QEMU_on_Troubleshooting#Network | Alternative #1 here]].
| si || Todas las herramientas de Fedora || si
# To avoid a "man in the middle attack" warning you might want to use:
| 6 GiB (versión de abril; sin Etoys)
ssh -o NoHostAuthenticationForLocalhost=yes -p 2222 root@localhost</blockquote></font>
|- style="font-size:66%; font-family:fixed; background:#eaeaea; " <!-- TRANSLATED ROW -->
| [[Developer Images#Big Fedora Core 6 Build|FC6+Sugar]]
| April || yes? || ? || ? || no
| yes || Full Fedora Softare Dev. || yes
| 6GB (April version: no etoys)


|}
<div id="VMware Player"/>
== VMware Player ==


; Clave :
<div id="Linux / Windows"/>
: '''biblioteca''': Una biblioteca de muestra de el contenido incluido. ej: textos para ver en el navegador sin necesidad de una conexión de red.
=== Linux / Windows ===
: '''R/W (grabable)''': Con un <tt>.img</tt> se pueden guardar cosas entre sesiones. Con un <tt>.iso</tt> el ambiente es el mismo con cada inicio.
: '''herramientas de desarrollo''': tiene herramientas de desarrollo incluidas?
: '''Red''': la red simplemente ''funciona''? O requiere de algún paso previo?
{{ Translated text |
Key:
:library: A library of sample content is included (english version). Ie, pretty text to web browse without having to get network.
:R/W (writable): With an .img, you can save things between sessions. With a .iso, your environment is the same each time you start.
:development software: are development tools included?
:Net (network): does the network "just work" or "manual" steps are required?
| display = block }}


; Problemas :
<font size="-1"><blockquote>Warning
: '''A''': el [[LiveCd/lang-es|CD-Vivo]] (de abril) entra en pánico cuando se corre bajo <tt>kqemu</tt> en Fedora Core 6 x86_64. Un problema con <tt>squashfs</tt>.
: '''B''': [[TamTam/lang-es|TamTam]] no emite sonidos (aún si [[Etoys/lang-es|Etoys]] puede). Causa desconocida.


'''Notas:'''
For easy-to-use operation, you probably want to use Qemu, which is known to work on all of Linux, Win32 and Mac. Most recent builds '''do not''' support VMWare due to the lack of a pcnet32 network driver. See [[http://dev.laptop.org/ticket/925]]. There are [[Developer Images]] available which are built on top of regular desktop environments and provide basically all drivers as well as a reasonable development environment, but in a much larger download (900MB+).
* acaso <tt>sugar-jhbuild</tt> soporta la cámara/micrófono?
** Si, si la cámara usa <tt>v4l2</tt> y 640x480. (Alguien puede confirmarlo fehacientemente? [[IRC/lang-es|IRC]]?)
{{ Translated text |
Problems:
:A: LiveCd (April) on fc6 x86_64, kernel panics under kqemu. A squashfs problem.
:B: Tam Tam is silent (though EToys makes noise). Cause unknown.


Notes:
VMware Player is another convenient way to test the image on your Linux / Windows machine. You can convert an image to a VMware virtual disk file with the qemu-img command from the QEMU distribution.
*re "does sugar-jhbuild support camera/mic?": "yes, if the camera uses v4l2 and 640x480, I'd suspect so." Can someone confirm this? (#olpc, now) [[User:MitchellNCharity|MitchellNCharity]] 00:16, 2 June 2007 (EDT)


Doables:
$ qemu-img convert olpc-stream-development-59-20060808_1153-rpm-ext3.img -O vmdk olpc.vmdk
*Remove LiveCd's "?" above.
*Find out what's going on with Tam Tam sound. It would be nice for the xo disk images to all be sound-yes.
*Add a microphone column? Reconsolidate sound/camera/mic into a H/W column?
| display = block }}


= NUEVO XAVA =
Additionally, you need a config file to run the virtual disk. Here is an example (save it as olpc.vmx).


{{anchor|XO-QEMU boot broken - current workarounds}}
#!/usr/bin/vmware
== XO-QEMU boot broken - current workarounds ==
config.version = "8"
virtualHW.version = "3"
memsize = "128"
ide0:0.present = "TRUE"
ide0:0.fileName = "olpc.vmdk"
ide1:0.present = "TRUE"
ide1:0.fileName = "/dev/cdrom"
ide1:0.deviceType = "atapi-cdrom"
floppy0.fileName = "A:"
ethernet0.present = "TRUE"
ethernet0.connectionType = "nat"
usb.present = "TRUE"
sound.present = "TRUE"
sound.virtualDev = "es1371"
displayName = "OLPC"
guestOS = "other26xlinux"
ethernet0.addressType = "generated"
uuid.location = "56 4d d1 99 5c 64 a3 6f-ef c7 aa 86 a8 cc ed 46"
uuid.bios = "56 4d d1 99 5c 64 a3 6f-ef c7 aa 86 a8 cc ed 46"
tools.remindInstall = "TRUE"
ethernet0.generatedAddress = "00:0c:29:cc:ed:46"
ethernet0.generatedAddressOffset = "0"
checkpoint.vmState = "olpc.vmss"
ide0:0.redo = ""


{{ Translated text |1=
Start VMWare Player, open this .vmx file. Allow VMWare to create a new UUID.
Build 445 was the last version which booted cleanly under qemu ([http://dev.laptop.org/ticket/1809 ticket]).
More recent builds require workarounds. Build 485 resolved one problem.


*When booting on qemu, add root=/dev/hda to the grub kernel line. This needs to be done every time.
Note: Make sure the emulator starts the 'OLPC for qemu target'.</blockquote></font>
*#When you start your xo disk image on qemu, you should see a blue grub screen, doing a "Booting .. in N seconds" countdown. Press space to interrupt it.
*#Press '''e''' (edit). This will show you 3 lines.
*#Move to the second, which begins "kernel". Press '''e'''. This will take you to the end of the kernel line.
*#Add <tt> root=/dev/hda1</tt> Then press enter.
*#Press '''b''' to continue booting.
:(This workaround avoids "WARNING: Cannot find root file system!", and being dropped into an emergency shell.)


Should add instructions to modify the image's grub config, so this doesn't need to be done every time you boot. [[User:MitchellNCharity|MitchellNCharity]] 12:04, 3 July 2007 (EDT)
<div id="Mac OSX"/>
=== Mac OSX ===


It might be worth gathering the currently scattered notes, into a single list of step by step instructions, for getting from nothing, to a pair of qemu images running with Xephyr's and ssh. [[User:MitchellNCharity|MitchellNCharity]] 12:04, 3 July 2007 (EDT)
<font size="-1"><blockquote>* Unzip the package and double click OLPC.VDMK
| display = block}}


{{anchor|Example step-by-step instructions}}
* More at http://www.edgargonzalez.com/2006/11/21/emulating-the-olpc-xo-on-a-mac-osx/
== Example step-by-step instructions ==


{{ Translated text |
''This package seems to be gone. Suggestions?''
Here, in one place, are assembled all the steps to get you to a working
emulated XO. Assuming you are running on linux, and have already
installed qemu and kqemu.


The following will ''not'' work on your virtual xo: sound, camera. The first because I haven't gotten around to figuring out why it isn't working. The second because qemu doesn't yet support them.
* It should worked with the livecd sdk. Download it from the downloads section. No need for the OLPC.VDMK if you run the livecd.</blockquote></font>


And when you boot your image a second time, network likely won't work. :( Something for another day. [[User:MitchellNCharity|MitchellNCharity]] 16:49, 4 July 2007 (EDT)
<div id="Windows"/>
| display = block}}
=== Windows ===


{{ Translated text |1=
<font size="-1"><blockquote>* [http://tuttlesvc.teacherhosting.com/wordpress/?p=251 Tuttle on VMWare on Windows]</blockquote></font>
Go to
http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/
and obtain the numbered -devel_ext3.img.bz2 and its md5. For this example I used build 485.
Though the network doesn't seem to work in 485. 482 works, but you have to work around a boot failure.
[http://wiki.laptop.org/go/Emulating_the_XO/Help_and_tips#Builds_between_445_and_485.2C_non-inclusive_--_Workaround_for_netfs_preventing_boot]


md5sum -c olpc-redhat-stream-development-build-485-20070703_0249-devel_ext3.img.bz2.md5
<div id="Parallels Desktop on Mac OS X"/>
== Parallels en Mac OS X ==
bzcat olpc-redhat-stream-development-build-485-20070703_0249-devel_ext3.img.bz2 > xo-485a.img


The resulting file is 1 GB.
<font size="-1"><blockquote>[[User:Bert|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 [[User:Bert|me]] know if you find out anything.


export PORT=2221
[[User:BruceB|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.
qemu-system-x86_64 -soundhw es1370 -serial `tty` -kernel-kqemu -redir tcp:$PORT::22 -hda xo-485a.img
* Launch Parallels, create a new VM (I user "other Linux"
Unless you have a x86_64 cpu, use <tt>qemu</tt> instead of <tt>qemu-system-x86_64</tt>.
* Set the hard drive to be 512MB, OK when it says it already exists.
| display = block}}
* 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!


{{ Translated text |1=
[[User:Bert|Bert]]: Oh, so Parallel's hdd is nothing more than a plain disk image? How interesting! Thanks, that's a lot easier!
The screen will very briefly be black, and then show the blue "GNU
GRUB" screen. If it stays black, that's a qemu bug. Kill qemu and try again.


0. Press any key to interrupt the countdown to boot. Then,
[[User:Wooky|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).


# Press '''e'''.
[[User:martindolphin|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.
# Press down-arrow to get the "kernel" line.
# Press '''e'''. This takes you to the end of the kernel command line.
# Type space and <tt>root=/dev/hda1</tt>
# Press Enter.
# Press '''b'''.


The boot messages will scroll by, and you should eventually see the normal XO first-time login. We'll save that for later.
[[User:George|George]]: I have the same problem with MartinDolphin
| display = block}}


{{ Translated text |1=
[[User:ScottSwanson|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 "..."):
In the window where you started qemu, you should now see a login: prompt.
bzcat ...ext3.img.bz2 | dd of=...otherlin.hdd bs=1024 conv=notrunc,noerror,sync


# Enter <tt>root</tt>
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 [[User:martindolphin|MartinDolphin]] and [[User:George|George]]'s issue.)
# Then:
/etc/rc5.d/S98NetworkManager stop
mv /etc/rc3.d/S98NetworkManager /etc/rc3.d/DISABLED-S98NetworkManager
mv /etc/rc5.d/S98NetworkManager /etc/rc5.d/DISABLED-S98NetworkManager
echo ifup eth0 >> /etc/rc.local
mv /boot/grub/grub.conf /boot/grub/grub.conf.orig
awk '/kernel/ {print $O,"root=/dev/hda1";next} {print}' < /boot/grub/grub.conf.orig > /boot/grub/grub.conf
grub-install hd0


If grub-install hangs, just kill it. It may even have worked anyway.
[[User:StarKruzr|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.


ifup eth0
[[User:SRiggins|SRiggins]]: Parallels Build 3188 now stores vm hard disk images in /Users/{USERNAME}/Documents/Parallels/{VMNAME}/</blockquote></font>
killall X


Killing X should restart sugar.
<div id="Virtual PC on Mac OS X (PowerPC)"/>
== Virtual PC en Mac OS X (PowerPC) ==


If you want to enter a name with diacritics, you need to wait for X to restart, and then do:
<font size="-1"><blockquote>[[User:Akauppi|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.
su olpc -c"DISPLAY=:0 xmodmap -e 'keycode 77 = Multi_key'"
This sets up Num_lock as Multi_key. Unfortunately, the next time X is
restarted, you will lose it. A better solution is needed.
| display = block}}


{{ Translated text |
TODO: system boots nicely, but the mouse remains unresponsive. Ideas???
At this point you could just proceed to use your new XO. However, the screen resolution is wrong (1024x768). So for development, or to get a more accurate feel for how things really look, some extra steps are required.


Once you reach the main sugar screen, you should check the Neighborhood view (F1). If you can't see other people, either the we are having problems with the presence server, you are behind an unusually picky firewall, or networking on qemu is broken again in the build number you are using. (Remember that ping doesn't work inside of qemu).
John Palmieri advised:


While this next step is not strictly required, it will enable you to use ssh and scp, which can be handy to move stuff back and forth between your host and xo.
Add this to /etc/X11/qemu-Xorg.conf and then copy qemu-Xorg.conf to Xorg.conf:
| display = block}}


{{ Translated text |
Section "InputDevice"
Still as root on the xo,
Identifier "Mouse0"

Driver "mouse"
1. Change the root password.
Option "Protocol" "IMPS/2"
passwd
Option "Device" "/dev/input/mice"
Don't worry if it says something like "BAD PASSWORD: ", and complains about the password you picked. It will still work.
Option "ZAxisMapping" "4 5"

Option "Emulate3Buttons" "yes"
2. Change the olpc password.
EndSection</blockquote></font>
passwd olpc

Now you can use ssh and scp.
| display = block}}


{{ Translated text |1=
The current released version of QEMU doesn't support 1200x900, so we use a Xephyr remote X server. Each time you boot the xo, if you want 1200x900, you'll need to do these next steps again, except for the ones marked "(First time only)".
| display = block}}

{{ Translated text |
1. Still as root on the xo:
init 3
sleep 5
ifup eth0
su olpc
grep export /usr/bin/sugar > ~/env
source ~/env


If the <tt>ifup eth0</tt> fails with an "already running" message, that's ok. Perhaps it is no longer needed.
<div id="Instructions"/>
| display = block}}
== Instrucciones ==


{{ Translated text |
<font size="-1"><blockquote>See [[Sugar Instructions]].</blockquote></font>
2. Back on the host, prepare Xephyr (First time only)
mcookie > xephyr-cookie
export COOKIE=`cat xephyr-cookie`
rm -f xephyr-xauth; echo "add :1 . $COOKIE" | xauth -f xephyr-xauth
echo $COOKIE
| display = block}}


{{ Translated text |
<div id="Limitations"/>
3. On the xo, still as "su olpc", record the cookie: (First time only)
== Limitaciones ==
echo "add 10.0.2.2:1 . " PUT-THE-COOKIE-HERE | xauth
| display = block}}


{{ Translated text |
<font size="-1"><blockquote>The XO system is designed specifically to run on 'foo'. Some of the components are unlike any off the shelf product (example, the camera) so you won't be able to get 100% emulation of the OLPC.
4. Back on the host, start a Xephyr:
See [[Emulation Limitations]] for details .</blockquote></font>
Xephyr :1 -auth xephyr-xauth -reset -screen 1200x900x16 -dpi 200
You will probably want to do this in its own window, as it periodically dies and needs to be restarted.
| display = block}}


{{ Translated text |
<div id="Coping with Slow"/>
5. On the xo, still as "su olpc", start sugar:
== Tolerando lo Lento ==
DISPLAY=10.0.2.2:1 sugar
| display = block}}


{{ Translated text |1=
<font size="-1"><blockquote>It is possible for the OLPC image to boot successfully and load the Sugar UI in the emulator but then be too slow to successfully load any activities.
Actually, I usually ssh in from the host, and run sugar that way:


a. On the host,
For example, between build 239 and build 303 activity loading slowed enough for me (Qemu / 1.6GHz G4 PPC / OS X) that no activities loaded successfully. Symptons include messages in <tt>/home/olpc/.sugar/default/logs/shell.log</tt> like this:
ssh -o NoHostAuthenticationForLocalhost=yes -p 2222 olpc@localhost
<pre>
b. in the resulting shell,
DEBUG - Shell.start_activity
source ~/env
DEBUG - Activity f4a9f5322b49dcc3364a4eca9b13633c0ce1868e (org.laptop.ChatActivity) launching...
export DISPLAY=10.0.2.2:1
DEBUG - Activity f4a9f5322b49dcc3364a4eca9b13633c0ce1868e (org.laptop.ChatActivity) launch timed out
sugar
STDERR - Introspect error: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
You may also want to run
xmodmap -e 'keycode 77 = Multi_key'
to be able to enter diacritics with the Num_lock key.
But I find doing it first thing tends to kill Xephyr. :(


You should now see the XO first-login screen in correct resolution.
DEBUG - Couldn't create activity f4a9f5322b49dcc3364a4eca9b13633c0ce1868e (org.laptop.ChatActivity): Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
You can use Num_lock to enter diacritics. Congratulations. Sorry it
ERROR - Model for activity id f4a9f5322b49dcc3364a4eca9b13633c0ce1868e does not exist.
was so much bother.
DEBUG - Activity f4a9f5322b49dcc3364a4eca9b13633c0ce1868e (org.laptop.ChatActivity) launching...
| display = block}}
DEBUG - Activity f4a9f5322b49dcc3364a4eca9b13633c0ce1868e (org.laptop.ChatActivity) finished launching
</pre>


Another sympton is the flashing activity load icon appearing in the donut for a length of time and then disappearing without the activity loading. (Although this can also be caused by other issues such as uncaught programming errors.)


{{ Translated text |1=
These failures are due to two timeouts values configured in the system, one in Sugar and one in D-Bus. If you're more patient than OLPC/Sugar is by default then it's possible to tweak these values to enable activities to eventually load:</blockquote></font>
To run multiple xo's (to play with collaboration, for instance), you
can repeat the above steps. Create a xo-485b.img, and use a different
PORT number (like 2222). If you are using Xephyr, start a second
Xephyr, which will be 10.0.2.2:'''2''', use that instead of ...:1 in
the instructions. You should now be able to see yourself, and
collaborate in Write.


The following will save you having to periodically type your xo password, but is optional, and can just as easily be done later.
<div id="D-Bus"/>
=== D-Bus ===


Back on the host,
<font size="-1"><blockquote>Insert the following line in <tt>/etc/dbus-1/session.conf</tt> below the <tt></policy></tt> tag:
<pre>
<limit name="service_start_timeout">120000</limit>
</pre>


1. Create an ssh key if you don't already have one. See [[/Help_and_tips#SSH into qemu, using a key]].
This means D-Bus will wait 120 seconds before giving up--the icon will still disappear from the donut but eventually the activity will load. (Strictly speaking this setting might really need to be in <tt>session-local.conf</tt>. See [http://www.die.net/doc/linux/man/man1/dbus-daemon.1.html man dbus-daemon].)</blockquote></font>


2. Copy it to the xo,
<div id="Sugar"/>
scp -o NoHostAuthenticationForLocalhost=yes -P $PORT ~/.ssh/id_rsa.pub root@localhost:~/
=== Sugar ===


3. On the xo, spread the key around:
<font size="-1"><blockquote>To ensure the flashing activity load icon appears in the donut longer the following <i>untested</i> change should work:
mkdir ~root/.ssh
mkdir ~olpc/.ssh
cat id_rsa.pub >> ~root/.ssh/authorized_keys
cat id_rsa.pub >> ~olpc/.ssh/authorized_keys


You can now ssh and scp without retyping your password.
In [http://dev.laptop.org/git.do?p=sugar;a=blob;f=shell/model/homeactivity.py shell/model/homeactivity.py] replace:
| display = block }}
<pre>
self._launch_timeout_id = gobject.timeout_add(20000, self._launch_timeout_cb)
</pre>
with (for example) this:
<pre>
self._launch_timeout_id = gobject.timeout_add(120000, self._launch_timeout_cb)
</pre>
As far as I can tell this only has a cosmetic impact and activities should still load without it.</blockquote></font>


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

Latest revision as of 19:11, 8 July 2011

  Traducción de Emulating the XO original  
  english | español日本語한국어portuguêsрусский   +/- cambios  
This is an on-going translation


laptop-in-laptop

Inicio Rápido - CD-Vivo

Para muchos, el CD-Vivo es la forma más fácil de probar Sugar. Es fácil, pero tu trabajo se pierde cuando reinicias.

For many, the LiveCD is the easiest way to try Sugar. It's easy to do, but your work is lost when you reboot.

Inicio Rápido - Emulación

La emulación es otra forma de probar Sugar. Puede resultar un poco más difícil, pero no se pierde lo hecho.

El sonido en TamTam puede no funcionar por el momento.

Emulation is the other way to try Sugar. It can be harder to set up,, but work is preserved.

Sound in TamTam may not be working at the moment. MitchellNCharity 13:16, 5 June 2007 (EDT)

Inicio Rápido para Desarrolladores

Una alternativa es el uso de la emulación para el desarrollo de software.

Descargue la última imagen de acá. Instale QEMU y el acelerador como se indica en Emulando la XO - Inicio Rápido. Vea Ayuda y soluciones.

Vea Booteo QEMU roto - soluciones temporales

El build 486 puede que funcione j5live.com. Si no, el 445 sería la mejor alternativa. Los builds 485 y 482 tienen problemas con red (y 482 requiere de pasos adicionales Builds 445 al 485 no inclusive - soluciones para el netfs.

Developing on emulation is one alternative for developing software.

Get the latest image from here. (add link to tinderbox) Install QEMU and kernel acceleration as described in Emulating the XO/Quick Start. See the /Help_and_tips "Development" section.

See #XO-QEMU boot broken - current workarounds.

Build 486 may be working[1]. Otherwise, 445 is still your best bet. 485 and 482 have network issues (and 482 requires an additional workaround

[2]).

Overview

Una forma de correr software OLPC es usando un emulador en su PC. Vea comenzando a programar para más opciones.

Note Category:Emulation y Ayuda y soluciones.

Para jugar, se puede usar el CD-Vivo, o QEMU (como en el 'inicio rápido', pero con una imagen diferente), o quizás alguna de nuestras imágenes de desarrollador distintas al cd-vivo. Otra alternativa es fijarse en la categoría de instalación de Sugar. Vea comenzando a programar para una comparación.

Una alternativa frecuente es usar QEMU junto a su acelerador kqemu. Vea su inicio rápido para comenzar. Sin embargo, para el desarrollo, usaremos una imagen diferente (.img) con algunos utilitarios extra. Vea imagenes del SO, incluyendo la última versión estable.

En vez de QEMU, se puede utilizar VMware, y hay otras alternativas para Mac.

Por favor informe sus resultados en feedback sobre las imágenes. Existe además un Salón de Virtualización sobre el tema.

Existen algunas limitaciones en las imágenes de disco XO.

La diferencia entre LATEST-STABLE-BUILD y LATEST es quizás de interés para aquellas personas usando XOs reales. Emulando, los desarrolladores deberían usar LATEST, y cuando LATEST-STABLE-BUILD es viejo (un par de semanas), los no desarrolladores también.

One way to run oplc software is using an emulator on your pc. See Getting started programming for other options.

Note Category:Emulation and Help and tips.

For play, you can use LiveCd or Quick Start.

For development, you can use LiveCd, or qemu (as in quick start, but with a different image), or perhaps one of the Developer Images other than the LiveCd. An alternate approach is to attempt installing sugar. See Getting started programming for a comparison.

A common development approach is to use QEMU with kqemu acceleration. See Quick Start for the basics. Though for development, we will use a different .img, one with a few extra utility programs. See OS images, including latest stable build.

Instead of qemu, you can run VMware, and there are additional options on a Mac.

Please report your experiences in User Feedback on Images. There is a Virtualization Common Room.

There are limitations with XO disk images.

The LATEST-STABLE-BUILD versus LATEST build distinction is mostly of interest to people running on actual XO's. In emulation, developers should usually use LATEST. And when STABLE is old, non-developers probably should too.

Comparando alternativas

La laptop OLPC es hardware especializado, corriendo una versión mínima de Fedora de Red Hat, sobre la cual corre Sugar. Pero que si no se tiene una laptop OLPC? Hay varias alternativas, cada una posible de ser usada en modos diferentes.

An OLPC laptop is custom hardware, running a stripped-down Red Hat linux, running Sugar. But what if you don't have a real olpc laptop? There are a several options, which can each be used in a couple of ways.

recomendaciones

platforma
platform
proposito
purpose
recomendación
recommendation
Windows desarrollo imagen de disco XO emulado; o Ubuntu emulado con sugar-jhbuild; (o CD-desarrollador o CD-Vivo)?. (necesitamos sus informes)
Windows development emulated xo disk image; or emulated Ubuntu with sugar-jhbuild; (or develoepr CD or LiveCD)?. (need your reports)
Mac desarrollo imagen de disco XO emulado; o Ubuntu emulado con sugar-jhbuild; (o CD-desarrollador o CD-Vivo)?. (necesitamos sus informes)
Mac development emulated xo disk image; or emulated Ubuntu with sugar-jhbuild; (or developer CD or LiveCD)?. (need your reports)
Mac con Parallels desarrollo instale Ubuntu 32-bit, y Sugar en Ubuntu Linux. Vea Emulando la XO - Mac.
Mac with Parallels development install Ubuntu 32-bit, and Sugar on Ubuntu Linux. See /Mac.
Ubuntu 32-bit desarrollo Sugar con sugar-jhbuild y Sugar en Ubuntu Linux
Ubuntu 32-bit development Sugar with sugar-jhbuild and Sugar on Ubuntu Linux
32-bit linux desarrollo Sugar con sugar-jhbuild
32-bit linux development Sugar with sugar-jhbuild
64-bit linux desarrollo imágenes de disco XO bajo qemu; o CD-Vivo una vez que sea actualizado (el actual es de abril)
64-bit linux development xo disk images under qemu; or LiveCd once it gets updated (currently it's April)
No creo realmente en la opción developer/liveCD Windows/Mac. No he escuchado a nadie que la esté usando. Y es muy vieja (abril), aunque el usuario Mcfletch dijo (en mayo) que era una opción y por eso se la incluyó. MitchellNCharity 09:19, 23 June 2007 (EDT)
:I don't really believe the development option of Windows/Mac developer/live CD. I've not yet heard of it actually being used. They are months out of date (April). But Mcfletch said (in May) it's an option, so I added it. MitchellNCharity 09:19, 23 June 2007 (EDT)

background

opción
option
actualización
updated
sonido?
sound?
cámara?
camera?
biblioteca?
library?
etoys?
etoys?
R/W?
R/W?
software de desarrollo
development software?
red?
net?
comentarios
comments
Instalando Sugar continuou si si? si? si si las propias si En algunas plataformas, lleva tiempo y espacio (horas y ~3GiB), pero "funciona". En otras, puede ser dificil de instalar.
Installing Sugar continuous yes yes? yes? yes yes your own yes On some platforms, it takes time and space (hours and ~3GB), but "just works". On others, it is quite difficult to install.
CD-Vivo Abril si (boot) si? (qemu) si? (boot) no (qemu) no si no toolchain, Gnome si? Inicio Rápido alternativo. Puede ser usado para bootear como emulado en qemu. Ver abajo Problema A.
LiveCd April yes(boot) yes?(qemu) yes?(boot) no(qemu) no yes no toolchain, Gnome yes? Alternative Quick Start. Can both be booted from, and used in qemu. Problems: A.
imágenes de disco XO:
ÚLTIMA VERSIÓN ESTABLE http://olpc.download.redhat.com/olpc/streams/development/LATEST-STABLE-BUILD/
LATEST-STABLE-BUILD
...development-ext3.img ~mensual si/B no si si si no tras configurar Inicio Rápido para evaluar Sugar
...development-ext3.img ~monthly yes/B no yes yes yes no after config Quick Start for getting a look at Sugar.
...development-devel_ext3.img ~mensual si/B no no si si un poco tras configurar
...development-devel_ext3.img ~monthly yes/B no no yes yes a little after config
ÚLTIMA VERSIÓN http://olpc.download.redhat.com/olpc/streams/development/LATEST/
LATEST
...development-ext3.img ~diario si/B no si si si no tras configurar
...development-ext3.img ~daily yes/B no yes yes yes no after config
...development-devel_ext3.img ~diario si/B no no si si un poco tras configurar Bueno para nuevos desarrolladores (requiere un poco de comodidad con la línea de comandos)
...development-devel_ext3.img ~daily yes/B no no yes yes a little after config Good for new developers (requires some command-line comfort).
OTROS
OTHER
FC6+Sugar abril si? ? ? no si Todas las herramientas de Fedora si 6 GiB (versión de abril; sin Etoys)
FC6+Sugar April yes? ? ? no yes Full Fedora Softare Dev. yes 6GB (April version: no etoys)
Clave
biblioteca: Una biblioteca de muestra de el contenido incluido. ej: textos para ver en el navegador sin necesidad de una conexión de red.
R/W (grabable): Con un .img se pueden guardar cosas entre sesiones. Con un .iso el ambiente es el mismo con cada inicio.
herramientas de desarrollo: tiene herramientas de desarrollo incluidas?
Red: la red simplemente funciona? O requiere de algún paso previo?

Key:

library: A library of sample content is included (english version). Ie, pretty text to web browse without having to get network.
R/W (writable): With an .img, you can save things between sessions. With a .iso, your environment is the same each time you start.
development software: are development tools included?
Net (network): does the network "just work" or "manual" steps are required?
Problemas
A: el CD-Vivo (de abril) entra en pánico cuando se corre bajo kqemu en Fedora Core 6 x86_64. Un problema con squashfs.
B: TamTam no emite sonidos (aún si Etoys puede). Causa desconocida.

Notas:

  • acaso sugar-jhbuild soporta la cámara/micrófono?
    • Si, si la cámara usa v4l2 y 640x480. (Alguien puede confirmarlo fehacientemente? IRC?)

Problems:

A: LiveCd (April) on fc6 x86_64, kernel panics under kqemu. A squashfs problem.
B: Tam Tam is silent (though EToys makes noise). Cause unknown.

Notes:

  • re "does sugar-jhbuild support camera/mic?": "yes, if the camera uses v4l2 and 640x480, I'd suspect so." Can someone confirm this? (#olpc, now) MitchellNCharity 00:16, 2 June 2007 (EDT)

Doables:

  • Remove LiveCd's "?" above.
  • Find out what's going on with Tam Tam sound. It would be nice for the xo disk images to all be sound-yes.
  • Add a microphone column? Reconsolidate sound/camera/mic into a H/W column?

NUEVO XAVA

XO-QEMU boot broken - current workarounds

Build 445 was the last version which booted cleanly under qemu (ticket).

More recent builds require workarounds. Build 485 resolved one problem.

  • When booting on qemu, add root=/dev/hda to the grub kernel line. This needs to be done every time.
    1. When you start your xo disk image on qemu, you should see a blue grub screen, doing a "Booting .. in N seconds" countdown. Press space to interrupt it.
    2. Press e (edit). This will show you 3 lines.
    3. Move to the second, which begins "kernel". Press e. This will take you to the end of the kernel line.
    4. Add root=/dev/hda1 Then press enter.
    5. Press b to continue booting.
(This workaround avoids "WARNING: Cannot find root file system!", and being dropped into an emergency shell.)

Should add instructions to modify the image's grub config, so this doesn't need to be done every time you boot. MitchellNCharity 12:04, 3 July 2007 (EDT)

It might be worth gathering the currently scattered notes, into a single list of step by step instructions, for getting from nothing, to a pair of qemu images running with Xephyr's and ssh. MitchellNCharity 12:04, 3 July 2007 (EDT)

Example step-by-step instructions

Here, in one place, are assembled all the steps to get you to a working emulated XO. Assuming you are running on linux, and have already installed qemu and kqemu.

The following will not work on your virtual xo: sound, camera. The first because I haven't gotten around to figuring out why it isn't working. The second because qemu doesn't yet support them.

And when you boot your image a second time, network likely won't work. :( Something for another day. MitchellNCharity 16:49, 4 July 2007 (EDT)

Go to

http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/ and obtain the numbered -devel_ext3.img.bz2 and its md5. For this example I used build 485. Though the network doesn't seem to work in 485. 482 works, but you have to work around a boot failure. [3]

md5sum -c olpc-redhat-stream-development-build-485-20070703_0249-devel_ext3.img.bz2.md5

bzcat olpc-redhat-stream-development-build-485-20070703_0249-devel_ext3.img.bz2 > xo-485a.img

The resulting file is 1 GB.

export PORT=2221
qemu-system-x86_64  -soundhw es1370 -serial `tty` -kernel-kqemu -redir tcp:$PORT::22 -hda xo-485a.img
Unless you have a x86_64 cpu, use qemu instead of qemu-system-x86_64.
The screen will very briefly be black, and then show the blue "GNU

GRUB" screen. If it stays black, that's a qemu bug. Kill qemu and try again.

0. Press any key to interrupt the countdown to boot. Then,

  1. Press e.
  2. Press down-arrow to get the "kernel" line.
  3. Press e. This takes you to the end of the kernel command line.
  4. Type space and root=/dev/hda1
  5. Press Enter.
  6. Press b.
The boot messages will scroll by, and you should eventually see the normal XO first-time login. We'll save that for later.
In the window where you started qemu, you should now see a login: prompt.
  1. Enter root
  2. Then:
/etc/rc5.d/S98NetworkManager stop
mv /etc/rc3.d/S98NetworkManager /etc/rc3.d/DISABLED-S98NetworkManager
mv /etc/rc5.d/S98NetworkManager /etc/rc5.d/DISABLED-S98NetworkManager
echo ifup eth0 >> /etc/rc.local

mv /boot/grub/grub.conf /boot/grub/grub.conf.orig
awk '/kernel/ {print $O,"root=/dev/hda1";next} {print}' < /boot/grub/grub.conf.orig > /boot/grub/grub.conf
grub-install hd0

If grub-install hangs, just kill it. It may even have worked anyway.

ifup eth0 
killall X

Killing X should restart sugar.

If you want to enter a name with diacritics, you need to wait for X to restart, and then do:

su olpc -c"DISPLAY=:0 xmodmap -e 'keycode  77 = Multi_key'"

This sets up Num_lock as Multi_key. Unfortunately, the next time X is

restarted, you will lose it. A better solution is needed.

At this point you could just proceed to use your new XO. However, the screen resolution is wrong (1024x768). So for development, or to get a more accurate feel for how things really look, some extra steps are required.

Once you reach the main sugar screen, you should check the Neighborhood view (F1). If you can't see other people, either the we are having problems with the presence server, you are behind an unusually picky firewall, or networking on qemu is broken again in the build number you are using. (Remember that ping doesn't work inside of qemu).

While this next step is not strictly required, it will enable you to use ssh and scp, which can be handy to move stuff back and forth between your host and xo.

Still as root on the xo,

1. Change the root password.

passwd

Don't worry if it says something like "BAD PASSWORD: ", and complains about the password you picked. It will still work.

2. Change the olpc password.

passwd olpc

Now you can use ssh and scp.


The current released version of QEMU doesn't support 1200x900, so we use a Xephyr remote X server. Each time you boot the xo, if you want 1200x900, you'll need to do these next steps again, except for the ones marked "(First time only)".

1. Still as root on the xo:

init 3
sleep 5
ifup eth0

su olpc
grep export /usr/bin/sugar > ~/env
source ~/env

If the ifup eth0 fails with an "already running" message, that's ok. Perhaps it is no longer needed.

xauth -f xephyr-xauth
echo $COOKIE

3. On the xo, still as "su olpc", record the cookie: (First time only)

echo "add 10.0.2.2:1 . " PUT-THE-COOKIE-HERE

4. Back on the host, start a Xephyr:

Xephyr :1 -auth xephyr-xauth -reset -screen 1200x900x16 -dpi 200

You will probably want to do this in its own window, as it periodically dies and needs to be restarted.

{{{1}}}
Actually, I usually ssh in from the host, and run sugar that way:

a. On the host,

ssh -o NoHostAuthenticationForLocalhost=yes -p 2222 olpc@localhost

b. in the resulting shell,

source ~/env
export DISPLAY=10.0.2.2:1
sugar

You may also want to run

xmodmap -e 'keycode  77 = Multi_key'

to be able to enter diacritics with the Num_lock key. But I find doing it first thing tends to kill Xephyr. :(

You should now see the XO first-login screen in correct resolution. You can use Num_lock to enter diacritics. Congratulations. Sorry it

was so much bother.


To run multiple xo's (to play with collaboration, for instance), you

can repeat the above steps. Create a xo-485b.img, and use a different PORT number (like 2222). If you are using Xephyr, start a second Xephyr, which will be 10.0.2.2:2, use that instead of ...:1 in the instructions. You should now be able to see yourself, and collaborate in Write.

The following will save you having to periodically type your xo password, but is optional, and can just as easily be done later.

Back on the host,

1. Create an ssh key if you don't already have one. See /Help_and_tips#SSH into qemu, using a key.

2. Copy it to the xo,

scp -o NoHostAuthenticationForLocalhost=yes -P $PORT ~/.ssh/id_rsa.pub root@localhost:~/

3. On the xo, spread the key around:

mkdir ~root/.ssh
mkdir ~olpc/.ssh
cat id_rsa.pub >> ~root/.ssh/authorized_keys
cat id_rsa.pub >> ~olpc/.ssh/authorized_keys
You can now ssh and scp without retyping your password.