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)

Contents

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

You may also want to check the OpenEmbedded Wiki Distro page. Then decide where the OpenEmbedded 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 OpenEmbedded build dir in ~/neuros/oe In any case, for the rest of the document, we will call the OpenEmbedded build dir OEBASE. Most of the instructions below should be run from OEBASE, unless otherwise noted. Now choose if you want to automatically or manually install OE.

Automatically Setup OpenEmbedded

First, in OEBASE, lets get the tools and scripts necessary to setup OE:

git clone git://git.neurostechnology.com/git/build-tools

Now lets create our build environment:

./build-tools/run-me-first.sh

And load that environment into our shell session:

source neuros-env

Finally let's install OpenEmbedded in OEBASE:

build-tools/oe/bootstrap.sh distribution

If these steps completed succesfully after some time you should see bootstrap.sh return with output ending with:

# Bootstrap complete.
Before being able to work with OpenEmbedded you will need to run:

   source OEBASE/oe/oe-env

You need to do this every time you open a new shell where you want to work with OpenEmbedded for the Neuros OSD2.

Manually Setup OpenEmbedded

Set up some dir OpenEmbedded will use from within OEBASE:

   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 OpenEmbedded metadata (recipes, machine configs, etc - the stuff that makes OpenEmbedded interesting) from the new OpenEmbedded 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 OpenEmbedded 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

If everything is working and all dependencies are in order, you should see something like:

NOTE: Out of date cache found, rebuilding...
NOTE: Handling BitBake files: | (5694/5694) [100 %]
NOTE: Parsing finished. 0 cached, 5441 parsed, 253 skipped, 0 masked.
Nothing to do.  Use 'bitbake world' to build everything, or run 'bitbake --help'
for usage information.

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. There is a guide on the OpenEmbedded Wiki that can help resolve distro-specific problems. 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).

Building OSD

The OpenEmbedded folks have put together a minimal 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


If you are able to build console-image the next step is building the full OSD2 system image:

   OEBASE/bitbake/bin/bitbake neuros-osd-base-image

There are several missing files (probably for license reasons) which can be had from here (20080920):

https://www-a.ti.com/downloads/sds_support/targetcontent/index.html
dsplink_1_50.tar.gz
codec_engine_2_10_01.tar.gz
Personal tools