Host-based development with Xoo and Xephyr/zh tw

From Openmoko

Revision as of 08:22, 24 October 2008 by Coolcat (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

本頁的內容將會為您介紹在Openmoko平台下建立軟體的更有效方法。

Does anyone know where to find this VMWare image??

Contents

在主機上進行開發

在主機上進行開發的意思是,在你個人的標準電腦上進行程式開發,直到程式開發到一定的程度為止。接著,你可以使用Toolchain來編譯你的Neo應用程式。Host-based development is incredibly more efficient since you can use your (typically) fast computer, large monitor, ... Compiling for your host also means that your edit-run-debug turnaround cycles are much faster, because you can skip the uploading-to-neo step.

Xoo and Xephyr

Xoo is a GTK2 based graphical wrapper around a ‘Windowed’ X Server. The X server is typically Xnest, the nested X server, or Xephyr. It is intended for embedded developers that want to simulate a target device (with an accurate display size, working hardware buttons, etc) on a desktop machine.

Note that Xoo is not required to simulate Openmoko hardware - it just improves the presentation.

Prerequisites

Part I (precompiled software)

You need to install some software that is usually not present on a desktop system, but used on the Neo1973. Some of this software has already been precompiled by your friendly distribution packager, so you don't need to compile it yourself. Most likely you can install the following packages from your distribution repository:

  • gtk-doc-tools
  • libstartup-notification0-dev
  • libapm-dev
  • libgpgme11-dev
  • libgtk2.0-dev
  • libebook1.2-dev
  • libecal1.2-dev
  • libnotify-dev
  • libpulse-dev
  • libcurl4-openssl-dev (or libcurl4-gnutls-dev)
  • matchbox-window-manager
  • matchbox-keyboard
  • pulseaudio
  • xephyr ( package is called xserver-xephyr on ubuntu and debian )
  • xoo


Ubuntu-Specific Packages

  • gnome-common (does this belong above?)
  • ubuntu-mobile-dev (this depends on many other development packages; some are necessary, others optional)


Other Useful Packages

  • libasound2-dev (needed to compile openmoko-dialer2 (User:Tomjoad))


Gentoo users run just

  1. emerge <package>

note: To get the Xephyr package installed Gentoo users have to rebuild the x11-base/xorg-server package with the "kdrive" use flag enabled (link)


Debian/Ubuntu $ sudo apt-get install <package> For Fedora, you can use

  1. yum install <package>

For Mandriva, you may try

  1. urpmi <package>

for any other find a way how to do it in your distro.

Part II (building from source)

You also need some software that is typically not found in your distribution repository, either because it's too new, too specific, or unheard of.

Most likely you will need to compile the following packages for your distribution:

  • matchbox-panel-2
  • libjana
  • libipkg

To compile and install matchbox-panel-2:

mkdir -f /local/pkg/ohand cd /local/pkg/ohand svn co http://svn.o-hand.com/repos/matchbox/trunk matchbox cd matchbox/matchbox-panel-2 ./autogen.sh make sudo make install

To compile and install libjana:

mkdir -f /local/pkg/ohand cd /local/pkg/ohand svn co http://svn.o-hand.com/repos/jana/trunk jana cd jana ./autogen.sh make sudo make install

To compile and install libipkg:

mkdir -f /local/pkg/handhelds.org cd /local/pkg/handhelds.org wget http://downloads.openmoko.org/sources/ipkg-0.99.163.tar.gz tar xzf ipkg-0.99.163.tar.gz cd ipkg-0.99.163 ./configure make sudo make install

Building the Openmoko core

First we download the Openmoko subversion repository:

mkdir -f /local/pkg/openmoko cd /local/pkg/openmoko svn co http://svn.openmoko.org/trunk/src src

Then you compile the software contained there, e.g. you will definitely want to compile at least:

In directory src/target/:

In directory src/target/OM-2007.2/artwork:

In directory src/target/OM-2007.2/libraries/:

In directory src/target/OM-2007.2/daemons/:

In directory src/target/OM-2007.2/panel-plugins/:

In directory src/target/OM-2007.2/applications:

Each of these packages can be compiled with the well-known-triple of:

./configure (or ./autogen.sh, if it's the first time) make make install

Data files

Some of the data files are not yet installed. We will create links so that Openmoko finds the data files and uses them directly from the svn directories that you have checked out. To create the links:

mkdir /usr/local/share/matchbox cd /usr/local/share/matchbox sudo ln -s /local/pkg/openmoko/src/target/OM-2007.2/misc/openmoko-today2-folders vfolders

cd /usr/share/themes sudo ln -s /local/pkg/openmoko/src/target/OM-2007.2/artwork/themes/openmoko-standard-2

Starting the nested Openmoko

We have prepared a script for you that starts Xoo and all the necessary X clients in one run. The script is online at

Creating a new application

TODO: ... (See: To-Do List)

Using a Neo1973 as external GSM modem

TODO: ... (See: To-Do List)

Using an external GPS device

TODO: ... (See: To-Do List)
Personal tools

本頁的內容將會為您介紹在Openmoko平台下建立軟體的更有效方法。

Does anyone know where to find this VMWare image??

在主機上進行開發

在主機上進行開發的意思是,在你個人的標準電腦上進行程式開發,直到程式開發到一定的程度為止。接著,你可以使用Toolchain來編譯你的Neo應用程式。Host-based development is incredibly more efficient since you can use your (typically) fast computer, large monitor, ... Compiling for your host also means that your edit-run-debug turnaround cycles are much faster, because you can skip the uploading-to-neo step.

Xoo and Xephyr

Xoo is a GTK2 based graphical wrapper around a ‘Windowed’ X Server. The X server is typically Xnest, the nested X server, or Xephyr. It is intended for embedded developers that want to simulate a target device (with an accurate display size, working hardware buttons, etc) on a desktop machine.

Note that Xoo is not required to simulate Openmoko hardware - it just improves the presentation.

Prerequisites

Part I (precompiled software)

You need to install some software that is usually not present on a desktop system, but used on the Neo1973. Some of this software has already been precompiled by your friendly distribution packager, so you don't need to compile it yourself. Most likely you can install the following packages from your distribution repository:

  • gtk-doc-tools
  • libstartup-notification0-dev
  • libapm-dev
  • libgpgme11-dev
  • libgtk2.0-dev
  • libebook1.2-dev
  • libecal1.2-dev
  • libnotify-dev
  • libpulse-dev
  • libcurl4-openssl-dev (or libcurl4-gnutls-dev)
  • matchbox-window-manager
  • matchbox-keyboard
  • pulseaudio
  • xephyr ( package is called xserver-xephyr on ubuntu and debian )
  • xoo


Ubuntu-Specific Packages

  • gnome-common (does this belong above?)
  • ubuntu-mobile-dev (this depends on many other development packages; some are necessary, others optional)


Other Useful Packages

  • libasound2-dev (needed to compile openmoko-dialer2 (User:Tomjoad))


Gentoo users run just

  1. emerge <package>

note: To get the Xephyr package installed Gentoo users have to rebuild the x11-base/xorg-server package with the "kdrive" use flag enabled (link)


Debian/Ubuntu $ sudo apt-get install <package> For Fedora, you can use

  1. yum install <package>

For Mandriva, you may try

  1. urpmi <package>

for any other find a way how to do it in your distro.

Part II (building from source)

You also need some software that is typically not found in your distribution repository, either because it's too new, too specific, or unheard of.

Most likely you will need to compile the following packages for your distribution:

  • matchbox-panel-2
  • libjana
  • libipkg

To compile and install matchbox-panel-2:

mkdir -f /local/pkg/ohand cd /local/pkg/ohand svn co http://svn.o-hand.com/repos/matchbox/trunk matchbox cd matchbox/matchbox-panel-2 ./autogen.sh make sudo make install

To compile and install libjana:

mkdir -f /local/pkg/ohand cd /local/pkg/ohand svn co http://svn.o-hand.com/repos/jana/trunk jana cd jana ./autogen.sh make sudo make install

To compile and install libipkg:

mkdir -f /local/pkg/handhelds.org cd /local/pkg/handhelds.org wget http://downloads.openmoko.org/sources/ipkg-0.99.163.tar.gz tar xzf ipkg-0.99.163.tar.gz cd ipkg-0.99.163 ./configure make sudo make install

Building the Openmoko core

First we download the Openmoko subversion repository:

mkdir -f /local/pkg/openmoko cd /local/pkg/openmoko svn co http://svn.openmoko.org/trunk/src src

Then you compile the software contained there, e.g. you will definitely want to compile at least:

In directory src/target/:

In directory src/target/OM-2007.2/artwork:

In directory src/target/OM-2007.2/libraries/:

In directory src/target/OM-2007.2/daemons/:

In directory src/target/OM-2007.2/panel-plugins/:

In directory src/target/OM-2007.2/applications:

Each of these packages can be compiled with the well-known-triple of:

./configure (or ./autogen.sh, if it's the first time) make make install

Data files

Some of the data files are not yet installed. We will create links so that Openmoko finds the data files and uses them directly from the svn directories that you have checked out. To create the links:

mkdir /usr/local/share/matchbox cd /usr/local/share/matchbox sudo ln -s /local/pkg/openmoko/src/target/OM-2007.2/misc/openmoko-today2-folders vfolders

cd /usr/share/themes sudo ln -s /local/pkg/openmoko/src/target/OM-2007.2/artwork/themes/openmoko-standard-2

Starting the nested Openmoko

We have prepared a script for you that starts Xoo and all the necessary X clients in one run. The script is online at

Creating a new application

TODO: ... (See: To-Do List)

Using a Neo1973 as external GSM modem

TODO: ... (See: To-Do List)

Using an external GPS device

TODO: ... (See: To-Do List)