Developing/OESetup
From OpenZaurus
The canonical source for this information is OE:GettingStarted. This page is just a practical example.
This example uses the oz354x branch. See OE:DevelopmentBranches for a list of other branches.
Create the base directory. OE developers seem to place the base dir in the root directory but you can put it in whatever directory you want so long as none of the directory's parents are symlinks.
$ mkdir ~/oz $ cd ~/oz
Check out BitBake
$ svn co svn://svn.berlios.de/bitbake/tags/bitbake-1.4.2 bitbake
Grab the OE database snapshot appropriate for your monotone version. Look at http://www.openembedded.org/snapshots/ for available versions and see OE:OpenEmbeddedMigration for more information.
$ wget http://www.openembedded.org/snapshots/OE-this-is-for-mtn-X.YZ.mtn.bz2 $ bunzip2 OE.db.bz2
Update the database, then check out the branch.
$ monotone --db=OE.db pull monotone.openembedded.org org.openembedded.oz354x $ monotone --db=OE.db checkout --branch=org.openembedded.oz354x
Create your local config file.
$ mkdir -p build/conf $ cp org.openembedded.oz354x/conf/local.conf.sample build/conf/local.conf $ vi build/conf/local.conf
You should go through the entire file and ensure everything is sane. Here are some hints:
DL_DIR = "${HOME}/oe-sources"
BBFILES := "${TOPDIR}/org.openembedded.oz354x/packages/*/*.bb"
BBINCLUDELOGS = "yes"
CVS_TARBALL_STASH = "http://www.oesources.org/source/current/"
# PARALLEL_MAKE="-j2" # (if you have a multiprocessor machine)
TARGET_OS = linux
TARGET_ARCH = arm
MACHINE = collie
DISTRO = "openzaurus-3.5.4.1"
IMAGE_FSTYPE="jffs2 tar"
PREFERRED_PROVIDERS = "virtual/qte:qte virtual/libqpe:libqpe-opie"
PREFERRED_PROVIDERS += " virtual/libsdl:libsdl-qpe"
Finally, set up your environment variables. It's probably easiest to store these commands in a file, env-setup, and source it any time you intend to do OE development.
export BBPATH=${HOME}/oz/build:${HOME}/oz/org.openembedded.oz354x
export PATH=${HOME}/oz/bitbake-1.4/bin:$PATH
Now, source that file and your OE build environment should be set up properly.
source env-setup
Now you should be able to go back to Developing and start building.
Troubleshooting
I would get a register spill error when bitbake tried to compile a native qemu. Apparently this is a conflict between qemu's assembly and recent versions of GCC with a rewritten register allocation algorithm. So I installed my distro's qemu package (apt-get install qemu) and added ASSUME_PROVIDED += "qemu-native" to build/conf/local.conf. That fixed it.

