View source for Building FSO
From Openmoko
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Templates used on this page:
Return to Building FSO.
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Templates used on this page:
Return to Building FSO.
FSO is an abbreviation for FreeSmartphone.Org
OM 2007.2 is one of the many distributions that currently work on the Openmoko phones. You can compare a distribution with an Operating System on normal computers. It gives the phone all the software needed for operating. For more information about the different flavors, see distributions.
See OpenmokoFramework for more information.
And also trac.freesmartphone.org
Note : The following is an essay in order to explain how to build FSO. Please mind the fact that it's a work in progress, done by someone fairly new to Open Embedded.
This information is taken as is from OpenEmbedded Wiki. Some commentaries are voluntarily stripped in order to keep this page simple, please look on OE Wiki for more information.
apt-get install ccache sed wget cvs subversion git-core monotone coreutils \ unzip texi2html texinfo libsdl1.2-dev docbook-utils gawk
urpmi python python-devel python-psyco ccache patch m4 sed bison make wget bzip2 \ cvs gawk glibc-devel gcc-c++ subversion sharutils coreutils docbook-utils openjade \ quilt pcre-devel unzip
Install apt4rpm, then follow Debian instructions.
python-dev and python-spyco are not in suse apt repository. python-spyco is not mandatory, so one can ignore it. I suppose python-devel (suse) is python-dev (debian).
yum install python patch m4 sed make docbook* openjade glibc-devel xmlto
Apart from the usual (native) development packages like gcc and binutils, you should check that you have the following RPM's installed:
Use apt, synaptic, up2date or yum to automagically retrieve these packages or download and install them manually (lots of work).
Commands I used to install OE pre-requisites on FC5/6
This long command will ensure all pre-requisites are installed (patch is 2.5.4, not 2.5.9, but appears to work).
su -c "yum install python m4 make wget curl ftp cvs monotone subversion tar bzip2 gzip unzip python-psyco ccache perl texinfo texi2html diffstat openjade docbook-style-dsssl docbook-style-xsl docbook-dtds docbook-utils sed bison bc glibc-devel gcc binutils pcre pcre-devel git quilt groff linuxdoc-tools patch gcc gcc-c++ python-sqlite2 help2man"
or download the metapackage http://www.openembedded.org/dl/packages/rpm/openembedded-essential-1.1-1.noarch.rpm (may be out of date).
then do
su -c "yum localinstall openembedded-essential-1.1-1.noarch.rpm"
This long command will ensure all pre-requisites are installed (patch is 2.5.4, not 2.5.9, but appears to work).
su -c "yum install python m4 make wget curl ftp cvs monotone subversion tar bzip2 gzip unzip python-psyco ccache perl texinfo texi2html diffstat openjade docbook-style-dsssl docbook-style-xsl docbook-dtds docbook-utils sed bison bc glibc-devel gcc binutils pcre pcre-devel git quilt groff linuxdoc-tools patch linuxdoc-tools gcc gcc-c++ help2man"
# yum install bison ccache coreutils cvs docbook-utils gawk git-core monotone \ python quilt rpmlib sed subversion tetex texinfo unzip wget
emerge -n bitbake psyco ccache patch make sed dev-lang/python m4 bison cvs openjade quilt sgmltools-lite docbook-xml-dtd docbook-dsssl-stylesheets xmlto docbook-sgml-utils libpcre boost subversion monotone texi2html pysqlite diffstat
apt-get install devel-core diffstat texi2html cvs subversion git texinfo psyco monotone python-devel python-encodings python-sqlite
sudo pacman -S psyco ccache patch make sed python m4 bison cvs quilt sgmltools-lite docbook-xml xmlto pcre boost monotone jade git texinfo
In Arch Linux the install command is in /bin/install. Since most of Linux distribution assume that install is located in /usr/bin/install, you have to create a symlink:
sudo ln -s /bin/install /usr/bin/install
You can build BitBake by using this PKGBUILD:
pkgname=bitbake pkgver=1.8.4 pkgrel=1 pkgdesc="A simple tool for task execution derived from Gentoo's portage" url="http://developer.berlios.de/projects/bitbake/" arch=('i686') license=('GPL' 'custom') depends=('python') source=(http://download.berlios.de/bitbake/${pkgname}-${pkgver}.tar.gz) md5sums=('508d9a61c635d469be8facc95151158b') build() { cd ${startdir}/src/${pkgname}-${pkgver} python setup.py install --root=${startdir}/pkg # Install vim extensions install -D -m644 ${startdir}/src/${pkgname}-${pkgver}/contrib/vim/ftdetect/bitbake.vim \ ${startdir}/pkg/usr/share/vim/ftplugin/bitbake.vim install -D -m644 ${startdir}/src/${pkgname}-${pkgver}/contrib/vim/syntax/bitbake.vim \ ${startdir}/pkg/usr/share/vim/syntax/bitbake.vim # Handle MIT license install -D -m644 ${startdir}/src/${pkgname}-${pkgver}/doc/COPYING.MIT \ ${startdir}/pkg/usr/share/licenses/${pkgname}/COPYING.MIT }
Go to the base directory of your OpenEmbedded environment and checkout bitbake:
$ cd /stuff/ $ svn co svn://svn.berlios.de/bitbake/branches/bitbake-1.8/ bitbake
NOTE: for proxy handling, see SVN FAQ
Next, you'll need to obtain the actual Openembedded database. The OE database store all the OE metadata: build classes, configuration files, and packages. Then you can extract from this database the development branch(es) you want.
The Openembedded database is a Monotone database, which is the current SCM (Source Code Management) system for Openembedded. You can find monotone binaries and documentation at Monotone official site.
To obtain Openembedded:
$ cd /stuff/
$ wget http://www.openembedded.org/snapshots/OE.mtn.bz2 $ bunzip2 -d OE.mtn.bz2
This is the database you'll be using for all the work.
If you run into a problem at this stage, check to make sure you have version 0.32 (or newer) of monotone installed.
If you get further troubles in using monotone, there are two ways out:
Then you can checkout your local copy of the Openembedded tree.
$ cd /stuff $ mtn --db=/stuff/OE.mtn checkout --branch=org.openembedded.dev
This extracts directories and files relating to the selected branch from the OE.mtn database and places them under /stuff/branchname (i.e. in /stuff/org.openembedded.dev in this guide)
IMPORTANT NOTE ! If mtn complains about an outdated database, you can migrate it using the following command :
mtn db migrate --db=/stuff/OE.mtn
You'll then have to do the checkout.
It's now time to create your local configuration. While you could copy the default local.conf.sample like that:
$ cd /stuff/ $ cp org.openembedded.dev/conf/local.conf.sample build/conf/local.conf $ vi build/conf/local.conf
It is actually recommended to start smaller and keep local.conf.sample in the background and add entries from there step-by-step as you understand and need them. Please, do not just edit build/conf/local.conf.sample but actually READ it.
For building a .dev branch, in your local.conf file, you should have at least the following three entries. Example for the Angstrom distribution and the Openmoko gta01 machine:
BBFILES = "/stuff/org.openembedded.dev/packages/*/*.bb" DISTRO = "angstrom-2008.1" MACHINE = "om-gta01"
For a Freerunner, using an openmoko distro, you'll do that :
BBFILES = "/stuff/org.openembedded.dev/packages/*/*.bb" DISTRO = "openmoko" MACHINE = "om-gta02"
Don't forget to include the two following files :
require conf/distro/include/fso-autorev.inc require conf/distro/include/moko-autorev.inc
One of the four command sets below will need to be run every time you open a terminal for development. (You can automate this in ~/.profile, /etc/profile, or perhaps use a script to set the necessary variables for using BitBake.)
If you followed the recommendation above to use an uninstalled BitBake:
$ export PATH=/stuff/bitbake/bin:$PATH $ export BBPATH=/stuff/build:/stuff/org.openembedded.dev
If you installed BitBake:
$ export BBPATH=/stuff/build:/stuff/org.openembedded.dev
Alternative syntax for those using the tcsh shell (e.g FreeBSD):
$ setenv PATH "/stuff/bitbake/bin:"$PATH $ setenv BBPATH "/stuff/build:/stuff/org.openembedded.dev:"$BBPATH
cd /stuff/build && bitbake fso-image
Currently GTK is not well supported in the FSO build. To use GTK applications you'll most likely have to install the gtk library, and the Openmoko theme.
Step 1) Install the ipk-packages
opkg install moko-gtk-theme opkg install openmoko-icon-theme-standard2
Step 2) Enable Theme
ln -s /usr/share/themes/Moko/gtk-2.0/gtkrc /etc/gtk-2.0/gtkrc
Step 3) Adjust fontsize and set icon theme
vi /etc/gtk-2.0/gtkrc
Add the two lines:
gtk-font-name = "Sans 5" gtk-icon-theme-name="openmoko-standard"
(Thanks to Jtickle for pointing out how to set the font size on the Getting_Started_FAQ-Page)