Getting Openmoko working on host with Xephyr/it

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Creare un'immagine OpenMoko)
(Configurare il filesystem dell'immagine)
Line 24: Line 24:
 
==  Configurare il filesystem dell'immagine ==
 
==  Configurare il filesystem dell'immagine ==
  
=== Nell'ambiente chroot ===
+
Please see the included help script at the bottom of this article. It should make your life much easier.
 +
 
 +
The filesystem of the image can be found at /home/moko/build/tmp/rootfs . It is that image that we want to run in a chrooted environment.
 +
 
 +
We will copy that that rootfs directory somewhere so that subsquent builds (using the MokoMakefile  for instance) don't overwrite it.
 +
 
 +
Make sure you have root privileges:
 +
su -
 +
 
 +
Copy the rootf into a directory called MokoBox. From now on, we will call the chrooted environment a MokoBox.
 +
 
 +
cp -r /home/moko/build/tmp/rootfs /home/moko/mokobox
 +
 
 +
make sure /dev and /proc of the host machine are visible from within mokobox
 +
 
 +
mount --bind /dev /home/moko/mokobox/dev
 +
mount -t proc none /home/moko/mokobox/proc
 +
 
 +
Start/Move into the protected mokobox environment
 +
 
 +
chroot /home/moko/mokobox /bin/sh
 +
 
 +
=== In chroot'ed environment ===
 +
 
 +
set environment variables
 +
 
 +
DISPLAY=:1
 +
LANG=C
 +
HOME=/home/root
 +
export DISPLAY LANG HOME
 +
 
 +
Create pango.modules file
 +
 
 +
pango-querymodules > /etc/pango/pango.modules
 +
 
 +
Create gdk-pixbuf.loaders file
 +
 
 +
gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders
 +
 
 +
Remove touch screen calibrator. Since touch screen hardware is not present, the touch screen calibration prevents X start-up on PC.
 +
 
 +
rm /etc/X11/Xsession.d/30xTs_Calibrate
  
 
== Avviare il server X annidato ==
 
== Avviare il server X annidato ==

Revision as of 16:13, 11 July 2007

Lo scopo di questa pagina è quello di mostrare come eseguire un'immagine OpenMoko su una macchina x86 in un ambiente chroot.

Contents

Cosa è Xephyr

Xephyr è un moderno Server X eseguito in una finestra che può essere utilizzato per simulare un piccolo display in un ambiente di sviluppo su desktop. Xephyr è mantenuto sulla pagina del progetto OpenedHand. Da notare che nonostante OpenMoko verrà renderizzato pixel per pixel, probabilmente verrà visualizzato 4 volte più grande di quanto non sia nella realtà. Questo perché i dispositivi portatili tendono ad avere pixel più piccoli rispetto ai monitor dei computer.

Creare un'immagine OpenMoko

Prima di tutto, bisogna creare una openmoko-devel-image. Il file local.conf andrà modificato durante il processo (prima del passo 5).

Per creare una openmoko-devel-image per l'architettura adatta (x86 nel nostro caso) vedere Creare OpenMoko usando MokoMakefile. Assicurarsi di avere il makefile moko in /home/moko/Makefile .

Prima di questo, modificare il file build/conf/local.conf in questo modo:

MACHINE = "x86"
DISTRO = "openmoko"
BUILD_ARCH = "i686"
INHERIT += " devshell"
SRCDATE_eds-dbus = "now"

Una volta creata l'immagine, possiamo passare alla sua configurazione.

(User:Flerchjj) Ho dovuto aggiungere anche la seguente riga al file "build/conf/local.conf" per poter completare "make openmoko-devel-image".

TARGET_FPU = ""

Configurare il filesystem dell'immagine

Please see the included help script at the bottom of this article. It should make your life much easier.

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

We will copy that that rootfs directory somewhere so that subsquent builds (using the MokoMakefile for instance) don't overwrite it.

Make sure you have root privileges:

su -

Copy the rootf into a directory called MokoBox. From now on, we will call the chrooted environment a MokoBox.

cp -r /home/moko/build/tmp/rootfs /home/moko/mokobox

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

mount --bind /dev /home/moko/mokobox/dev
mount -t proc none /home/moko/mokobox/proc

Start/Move into the protected mokobox environment

chroot /home/moko/mokobox /bin/sh

In chroot'ed environment

set environment variables

DISPLAY=:1
LANG=C
HOME=/home/root
export DISPLAY LANG HOME

Create pango.modules file

pango-querymodules > /etc/pango/pango.modules

Create gdk-pixbuf.loaders file

gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders

Remove touch screen calibrator. Since touch screen hardware is not present, the touch screen calibration prevents X start-up on PC.

rm /etc/X11/Xsession.d/30xTs_Calibrate

Avviare il server X annidato

Fornire i fonts

Eseguire Xephyr

Avviare il Client X

Uno script di esempio

Migliorare il realismo del Display - Estendere Xephyr con Xoo

Personal tools

Lo scopo di questa pagina è quello di mostrare come eseguire un'immagine OpenMoko su una macchina x86 in un ambiente chroot.

Cosa è Xephyr

Xephyr è un moderno Server X eseguito in una finestra che può essere utilizzato per simulare un piccolo display in un ambiente di sviluppo su desktop. Xephyr è mantenuto sulla pagina del progetto OpenedHand. Da notare che nonostante OpenMoko verrà renderizzato pixel per pixel, probabilmente verrà visualizzato 4 volte più grande di quanto non sia nella realtà. Questo perché i dispositivi portatili tendono ad avere pixel più piccoli rispetto ai monitor dei computer.

Creare un'immagine OpenMoko

Prima di tutto, bisogna creare una openmoko-devel-image. Il file local.conf andrà modificato durante il processo (prima del passo 5).

Per creare una openmoko-devel-image per l'architettura adatta (x86 nel nostro caso) vedere Creare OpenMoko usando MokoMakefile. Assicurarsi di avere il makefile moko in /home/moko/Makefile .

Prima di questo, modificare il file build/conf/local.conf in questo modo:

MACHINE = "x86"
DISTRO = "openmoko"
BUILD_ARCH = "i686"
INHERIT += " devshell"
SRCDATE_eds-dbus = "now"

Una volta creata l'immagine, possiamo passare alla sua configurazione.

(User:Flerchjj) Ho dovuto aggiungere anche la seguente riga al file "build/conf/local.conf" per poter completare "make openmoko-devel-image".

TARGET_FPU = ""

Configurare il filesystem dell'immagine

Nell'ambiente chroot

Avviare il server X annidato

Fornire i fonts

Eseguire Xephyr

Avviare il Client X

Uno script di esempio

Migliorare il realismo del Display - Estendere Xephyr con Xoo