Getting Openmoko working on host with Xoo/it

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Setup the Image Filesystem)
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
Vedere anche [[Getting OpenMoko working on host with Xephyr/it|Far funzionare OpenMoko su host con Xephyr]], è probabile che contenga informazioni più aggiornate.
+
#REDIRECT [[Host-based development with Xoo and Xephyr/it]]
 
+
== Cosa è Xoo ==
+
[http://projects.o-hand.com/xoo/ Xoo] è un wrapper per Server X annidati, basato su GTK2. Tipicamente, il Server X è '''Xnest''', il Server X annidato, o [http://projects.o-hand.com/xephyr Xephyr]. Si rivolge a sviluppatori di sistemi embedded che hanno bisogno di simulare device particolari (con dimensioni del display '''accurate''', tasti hardware, etc) su macchine desktop.
+
 
+
Attualmente, viene trattato solo come far funzionare Xoo con '''Xnest'''. Sono comunque pianificate istruzioni per far funzionare Xoo con [http://projects.o-hand.com/xephyr Xephyr].
+
 
+
''Xoo non è necessario per simulare l'hardware OpenMoko - semplicemente migliora la presentazione''
+
 
+
== Installare Xoo sul proprio host ==
+
Per gli utenti gentoo, eseguire
+
# emerge xoo
+
Debian/Ubuntu
+
# sudo apt-get install xoo xnest
+
Per Fedora (il pacchetto è stato inviato a Fedora per l'approvazione, vedere https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=236297):
+
# ftp://ftp.xelerance.com/xoo/
+
 
+
Per gli altri, trovare un modo per farlo con la propria distro.
+
 
+
==  Creare l'immagine OpenMoko (ottenere rootfs) ==
+
Prima di tutto, bisogna creare una openmoko-devel-image e ottenere la directory rootfs. Un buon metodo è fare in modo che rootfs sia adatta alla macchina host visto che la maggior parte di noi non ha l'hardware giusto.
+
 
+
Per creare una openmoko-devel-image per la propria architettura, seguire [[MokoMakefile/it|Creare OpenMoko usando MokoMakefile]].
+
 
+
Prima di eseguire make openmoko-devel-image ed ottenere rootfs (prima del passo 5) eseguire:
+
# sed -i 's/fic-gta01/x86/' build/conf/local.conf
+
ed eseguire make openmoko-devel-image. Dopo parecchio tempo ('''parecchio''' tempo) dovrebbe terminare con successo.
+
 
+
Potrebbe essere necessario aggiungere
+
TARGET_FPU = ""
+
al file build/conf/local.conf per evitare l'errore:
+
NOTE: <type 'exceptions.Exception'>:variable TARGET_FPU references itself! while evaluating:${TARGET_FPU}
+
 
+
=== Problemi di compilazione ===
+
 
+
[http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=264 Vedere questo bug tracker] se si verificano problemi durante la compilazione di libelf (do_stage fallisce).
+
 
+
== Configurazione Filesystem dell'immagine ==
+
Il filesystem dell'immagine che vogliamo eseguire in ambiente chroot può essere trovato in build/tmp/rootfs .
+
 
+
Questa immagine può anche essere compressa come file openmoko-devel-image-x86-$(DATE).rootfs.tar.gz in build/tmp/image/ - la mia è qui [http://www.ms.mff.cuni.cz/~kupem6am/openmoko-devel-image-x86-20070227064250.rootfs.tar.gz].
+
 
+
=== Making X cooperate ===
+
* Make sure your iptables do not prevent you from connecting to port 6000(x11) on localhost
+
 
+
* Make sure your X is listening on port 6000(X11) on localhost (netstat is friend)
+
 
+
* Enable conection from localhost
+
# xhost localhost
+
 
+
===  Preparing rootfs ===
+
Unpack the rootfs file and copy the contents into a directory called /home/moko/mokobox. This will be our chrooted environment.
+
 
+
make sure /dev of the host machine are visible from within mokobox
+
# sudo mount --bind /dev/ /home/moko/mokobox/dev
+
 
+
Start/Move into the protected mokobox environment
+
# sudo chroot /home/moko/mokobox /bin/sh
+
 
+
==  Starting the nested X server ==
+
=== Launch Xoo ===
+
In another terminal (not related to mokobox), start Xoo. Download [http://www.datenfreihafen.org/~stefan/OpenMoko/neo1973-xoo-device.tar.bz2] and run for a nice neo 1973 theme.
+
# xoo --device neo1973.xml
+
 
+
=== Start X Client ===
+
Now, back in chroo'ted environment, start X client: <br /><br />
+
Export display to connect to started xoo
+
# export DISPLAY=localhost:1.0
+
Start window manager.
+
# x-window-manager
+
By this time you should have Xnest & Xoo running OpenMoko in a window.
+

Latest revision as of 07:30, 8 July 2008

  1. REDIRECT Host-based development with Xoo and Xephyr/it
Personal tools

Vedere anche Far funzionare OpenMoko su host con Xephyr, è probabile che contenga informazioni più aggiornate.

Cosa è Xoo

Xoo è un wrapper per Server X annidati, basato su GTK2. Tipicamente, il Server X è Xnest, il Server X annidato, o Xephyr. Si rivolge a sviluppatori di sistemi embedded che hanno bisogno di simulare device particolari (con dimensioni del display accurate, tasti hardware, etc) su macchine desktop.

Attualmente, viene trattato solo come far funzionare Xoo con Xnest. Sono comunque pianificate istruzioni per far funzionare Xoo con Xephyr.

Xoo non è necessario per simulare l'hardware OpenMoko - semplicemente migliora la presentazione

Installare Xoo sul proprio host

Per gli utenti gentoo, eseguire

# emerge xoo

Debian/Ubuntu

# sudo apt-get install xoo xnest

Per Fedora (il pacchetto è stato inviato a Fedora per l'approvazione, vedere https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=236297):

# ftp://ftp.xelerance.com/xoo/

Per gli altri, trovare un modo per farlo con la propria distro.

Creare l'immagine OpenMoko (ottenere rootfs)

Prima di tutto, bisogna creare una openmoko-devel-image e ottenere la directory rootfs. Un buon metodo è fare in modo che rootfs sia adatta alla macchina host visto che la maggior parte di noi non ha l'hardware giusto.

Per creare una openmoko-devel-image per la propria architettura, seguire Creare OpenMoko usando MokoMakefile.

Prima di eseguire make openmoko-devel-image ed ottenere rootfs (prima del passo 5) eseguire:

# sed -i 's/fic-gta01/x86/' build/conf/local.conf

ed eseguire make openmoko-devel-image. Dopo parecchio tempo (parecchio tempo) dovrebbe terminare con successo.

Potrebbe essere necessario aggiungere

TARGET_FPU = ""

al file build/conf/local.conf per evitare l'errore:

NOTE: <type 'exceptions.Exception'>:variable TARGET_FPU references itself! while evaluating:${TARGET_FPU}

Problemi di compilazione

Vedere questo bug tracker se si verificano problemi durante la compilazione di libelf (do_stage fallisce).

Configurazione Filesystem dell'immagine

Il filesystem dell'immagine che vogliamo eseguire in ambiente chroot può essere trovato in build/tmp/rootfs .

Questa immagine può anche essere compressa come file openmoko-devel-image-x86-$(DATE).rootfs.tar.gz in build/tmp/image/ - la mia è qui [1].

Making X cooperate

  • Make sure your iptables do not prevent you from connecting to port 6000(x11) on localhost
  • Make sure your X is listening on port 6000(X11) on localhost (netstat is friend)
  • Enable conection from localhost
# xhost localhost

Preparing rootfs

Unpack the rootfs file and copy the contents into a directory called /home/moko/mokobox. This will be our chrooted environment.

make sure /dev of the host machine are visible from within mokobox

# sudo mount --bind /dev/ /home/moko/mokobox/dev

Start/Move into the protected mokobox environment

# sudo chroot /home/moko/mokobox /bin/sh

Starting the nested X server

Launch Xoo

In another terminal (not related to mokobox), start Xoo. Download [2] and run for a nice neo 1973 theme.

# xoo --device neo1973.xml

Start X Client

Now, back in chroo'ted environment, start X client:

Export display to connect to started xoo

# export DISPLAY=localhost:1.0

Start window manager.

# x-window-manager

By this time you should have Xnest & Xoo running OpenMoko in a window.