Building with OpenEmbedded
Aus jalimo
Building Jalimo packages for OpenEmbedded-based distributions
Inhaltsverzeichnis |
Preface
Building packages is easy. Understanding all the tools required to do so is not. This page describes the neccessary steps to achieve the goal of building Jalimo packages for OpenEmbedded-based distributions like OpenMoko. It does not describe all the details of setting up OpenEmbedded and their meaning. However this information is provided by the respective project and you are highly encouraged to learn those.
OpenEmbedded documentation
The OE developers have a fine Wiki which explains all the steps that are neccesary to set up the OpenEmbedded build system. If you are new to OE you should read the GettingStarted page first and then come back here. Without reading the documentation you will not understand what this is all about. The only thing I suggest at this time is to use the main development branch of OpenEmbedded which is called **org.openembedded.dev**.
You do not need to follow the steps to set up your local.conf since Jalimo provides a preconfigured one. However you are **highly** advised to read through OE's sample local.conf to get an overview of all the possible options and understand how those have been set for Jalimo.
Get Jalimo-Overlay
OpenEmbedded is capable of overlaying its data with the data from another location. At this time Jalimo uses such an OE-overlay to develop and maintain its packages. The reasons why this data is not maintained in OE yet are that OE does not contain a proper Java toolchain yet. Any package that uses the improper one that is currently provided makes it more difficult to switch over to a correct one later. Jalimo seeks to develop a Java toolchain support at a later point. After that any mergeable meta data will be sent upstream.
The Jalimo-Overlay is contained within its Subversion repository. Just check out the trunk like this:
svn co svn://svn.evolvis.org/svnroot/jalimo/trunk jalimo-trunk
This will give you a jalimo-trunk folder containing oe-overlay. The latter contains a directory structure similar to what you find in OE's branch. Please read oe-overlay/README. It contains information about the directory layout and some general hints on how to set up the overlay.
Now have a look into oe-overlay/contrib. This directory contains sample and preconfigured local.conf configuration files. Currently one is for the iRex Ereader, the other is for OpenMoko 2007.2. Follow the advice given at the top of each sample configuration file and copy it into your //build// directory under conf (and name it local.conf :)).
Finally adjust the variables in your local.conf.
Some convenience
In order to start building packages bitbake needs to be in your path and the BBPATH environment variable has to be set up. oe-overlay/contrib contains a Bash script which can be appended to your ~/.bashrc. However you need to adjust the paths correctly!
If you don't like that approach you can write a small script that sets up BPATH and PATH for you and source it everytime you want to do OE package building.
Build the Jalimo feed
In IPKG terminology a feed is a repository containing IPK packages. Jalimo defines the meta package jalimo-feed containing all the Java-related packages we maintain. With Bitbake in your path and BBPATH properly set up you can start the build process by issuing:
bitbake jalimo-feed
This will take a while because OE will build all dependencies including your cross-compilation toolchain. When it finishes there will be a $BUILD_DIR/tmp/deploy/*/ipk/jalimo folder. ($BUILD_DIR depends on the name you gave it. The asterisk in the path means that for different targets/distros this part of the path may differ. For the Iliad it is empty.). This folder contains all the built and packaged Jalimo packages. You can copy single IPKs from that folder onto your device and install them by hand (ipk install). The other possibility is to put the whole directory on a HTTP server which is accessible by your target device and then add the URL of that folder to the device's /etc/ipkg.conf.
Note: Currently Jalimo packages are built with PACKAGE_ARCH=jalimo. This is just a workaround since OE lacks a proper way to handle third party feeds. We are investigating enhancing OpenEmbedded to handle this appropriately since the current workaround has unacceptable flaws. For the time being you must add the line arch jalimo 30 to the file /etc/ipkg/arch.conf on your device.
Special note about the iRex Ereader support
Unfortunately iRex does not provide the OE distribution configuration for their Ereader device. The kernel even contains proprietary modules which makes distributing the kernel by 3rd party developers a copyright infringement (on the Linux kernel developers). Even worse: Versions of packages that are used on the Ereader are outdated nowadays and are not available anymore in OE or cannot be build. Nevertheless Jalimo contains a distro configuration which allows building binary package that are runtime compatible to the existing operating system on the Ereader.
We highly recommend that you do not replace system packages (e.g. libraries) with ones you build with the above mentioned distribution configuration.
If you are a device manufacturer: By all means, please do not treat parties that want to provide additional software for your device, which would make it more attractive, like this!
