Getting Openmoko working on host with Xoo/it

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Install Xoo on your host)
(Build an OpenMoko Image (Getting rootfs))
Line 18: Line 18:
 
Per gli altri, trovare un modo per farlo con la propria distro.
 
Per gli altri, trovare un modo per farlo con la propria distro.
  
==  Build an OpenMoko Image (Getting rootfs) ==
+
==  Creare l'immagine OpenMoko (ottenere rootfs) ==
First, you'll need to build an openmoko-devel-image and get rootfs. One good way to get started developing is getting rootfs working on host machine, since most of us don't have real hardware.
+
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.
  
You should use [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to build an openmoko-devel-image for your host architecture.
+
Per creare una openmoko-devel-image per la propria architettura, seguire [[MokoMakefile/it|Creare OpenMoko usando MokoMakefile]].
  
Prior to running make openmoko-devel-image to get rootfs (before step 5) run :
+
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
 
  # sed -i 's/fic-gta01/x86/' build/conf/local.conf
then just run make openmoko-devel-image. After a while (half a day) the build should complete.
+
ed eseguire make openmoko-devel-image. Dopo parecchio tempo ('''parecchio''' tempo) dovrebbe terminare con successo.
  
You might need to add
+
Potrebbe essere necessario aggiungere
 
  TARGET_FPU = ""
 
  TARGET_FPU = ""
to your build/conf/local.conf to avoid:
+
al file build/conf/local.conf per evitare l'errore:
 
  NOTE: <type 'exceptions.Exception'>:variable TARGET_FPU references itself! while evaluating:${TARGET_FPU}
 
  NOTE: <type 'exceptions.Exception'>:variable TARGET_FPU references itself! while evaluating:${TARGET_FPU}
errors.
+
 
 
=== Build issues ===
 
=== Build issues ===
  

Revision as of 17:29, 11 July 2007

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

Contents

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}

Build issues

Please see this bug tracker issues if you have problems getting libelf compiled (do_stage fails).

Setup the Image Filesystem

The filesystem of the image can be found at build/tmp/rootfs . It is that image that we want to run in a chrooted environment.

This image should also be packed/compressed as the file openmoko-devel-image-x86-$(DATE).rootfs.tar.gz in build/tmp/image/ - mine is here [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.

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}

Build issues

Please see this bug tracker issues if you have problems getting libelf compiled (do_stage fails).

Setup the Image Filesystem

The filesystem of the image can be found at build/tmp/rootfs . It is that image that we want to run in a chrooted environment.

This image should also be packed/compressed as the file openmoko-devel-image-x86-$(DATE).rootfs.tar.gz in build/tmp/image/ - mine is here [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.