OpenEmbedded OSD2

From The Neuros Technology Wiki

Jump to: navigation, search

(this page is just notes i'm putting together, will be structured into a proper guide later)

[edit] Setting up OpenEmbedded to do OSD2 development

Let's set up OpenEmbedded to build OSD2 code base the modern way. It's gonna take a while to set up the environment properly and it's gonna take some serious disk space.

First off, ensure you have installed the following packages on your host:

  * subversion (or svn)
  * git (or git-core)
  * python

Then decide where the OE build dir will be on your machine. Don't put this build dir on the same place where you put check out the OSD2 sources. For example, on my machine i have the OSD2 sources in ~/neuros/git and the OE build dir in ~/neuros/oe In any case, for the rest of the document, we will call the OE build dir OEBASE. Most of the instructions below should be run from OEBASE, unless otherwise noted.

Set up some dir OE will use:

   mkdir -p build/conf

First get bitbake (OE's task executor, kind of like a uber-make). You have two choices here. The safe one is to get it from SVN:

  svn co svn://svn.berlios.de/bitbake/branches/bitbake-1.8/ bitbake

Alternatively, you can fetch the tarball from the bitbake project (choose the most recent 8.1 version). Then unpack it so that you have it into OEBASE/bitbake

Either way you choose, try running

  OEBASE/bitbake/bin/bitbake

And if it tells you the following, then you can proceed to the next step:

  ERROR: Unable to open conf/bitbake.conf

Now it's time to get the OE metadata (recipes, machine configs, etc - the stuff that makes OE interesting) from the new OE git repo (you would've previously used monotone, but thankfully one less tool):

cd OEBASE
git clone git://git.openembedded.net/org.openembedded.dev.git

Get a cup of coffee while it clone, it's a couple hundred megabytes of stuff

When it's done, it's time to have your bitbake use the right OE metadata for OSD2. You need to create OEBASE/build/conf/local.conf with the values below in it:

   BBFILES = "OEBASE/org.openembedded.dev/packages/*/*.bb"
   DISTRO = "angstrom-2008.1"
   MACHINE = "neuros-osd2"
   TMPDIR = "OEBASE/${DISTRO}-tmp"
   DL_DIR = "OEBASE/downloads"

The latter two options are if you want to keep all tmp files and downloads local, so you can cleanup more easily when you need to.

You also need to setup the BBPATH env var. You can temporarily set this up with

   export BBPATH=OEBASE/build:OEBASE/org.openembedded.dev

(likely in the future neuros-env will set up this for you)

Now try to run

   OEBASE/bitbake/bin/bitbake

just to test everything is ok. It will likely tell you you need to install a bunch of extra packages. Check with your distro on how to do that (e.g. use apt-get, yum, emerge .or whatever your distro uses) and install them all. Yes, I told you you needed a lot of disk space. There's also another package it won't complain about that it would be nice to install, and it's "python-psyco" (again, it may have a different name for your distro, it's the "Psyco: a jit compiler for python", help to speed up stuff).

Then when you have installed them all, bitbake will stop complaining and start crunching the metadata files (faster if you have psyco installed).

[edit] Building OSD

The OE folks have put together a basic image for OSD2 that boots linux and allow ssh into the box. We will add the rest of the OSD2 system on top of that.

   OEBASE/bitbake/bin/bitbake console-image

And watch it download a gazillion megabytes of sources and build them.

More to come...

Personal tools