BeagleBoardOpenEmbeddedDevelopment

This guide briefly describes one way to modify packages contained within OpenEmbedded (OE) for the the BeagleBoard.

Prerequisites

You should set up the OpenEmbedded environment for the BeagleBoard by following the BeagleBoardAndOpenEmbeddedGit guide first before using this guide.

Local Overlay Setup

Many of us have installed OpenEmbedded to allow us to make BeagleBoard specific modifications to the official packages that are already in OpenEmbedded. One way to accomplish this is to use a local overlay tree that contains a copy of that the openembedded.dev tree that was created in the BeagleBoardAndOpenEmbeddedGit guide. The local overlay packages will override the packages contained in the openembedded.dev tree, with the recipes in the local copy of the package being preferred over the recipes in the openembedded.dev tree. You could even have a full copy of the openembedded.dev/packages tree under the local directory, and each package will override the one in the openembedded.dev/package tree.

This guide assumes that the openembedded.dev tree was created under $HOME/oe/openembedded, or /home/you/oe/openembedded and the local overlay tree you will be using will be under /home/you/oe/local. It also assumes that the package you are modifying is the u-boot package. Change the path names and the name of the package as appropriate for your installation and package.

Edit the profile.sh file that was created in the BeagleBoardAndOpenEmbeddedGit guide under the /home/you/oe/beagleboard/beagleboard directory to look like:

For some reason, using the symbolic names ${OE_TOP} and ${USERBRANCH} did not work in BBFILES so I just used the full paths in my site.conf file. The priority for the _user has to be higher than the priority for _oe to make bitbake prefer the user packages over the openembedded packages.

In my case, the files under /home/you/oe/local/packages/u-boot are the same as those in /home/you/oe/openemedded/packages/u-boot, with the u-boot-git.bb recipe changed to use the local sources or some other git repository than the one specified in the official upstream u-boot_git.bb that is present in the openembedded/packages/u-boot directory. If you want to specify another public repository in the .bb file, you can change the SRC_URI in the local package's version to point to it. If you just want to use a local copy of the sources, without using a public repository, you can change the S variable in the .bb file from:

S = "${WORKDIR}/git"

or whatever S is set in the recipe, to point to your local directory that contains your copy of the sources like:

S = "/home/you/oe/local/sources/u-boot"

Overriding S will still download the repository specified in SRC_URI, but will then build using the sources specified in S. Now, you will be sourcing the profile.sh file to set up your build environment before you start your build:

source /home/oe/beagleboard/beaglboard/profile.sh

Now when you call:

bitbake u-boot

it will actually use the /home/you/oe/local/packages/u-boot/u-boot_git.bb recipe instead of the one in the openembedded tree (u-boot_git.bb is the recipe for the u-boot package).