Page 1 of 1

Custom bbfile repository

PostPosted: Wed Aug 17, 2011 4:17 pm
by mladen
In next steps we will make custom bbfile repository in order to make modifications in distributions and recipes without any change in OpenEmbedded repository. OpenEmbedded, Bitbake and packages sources are stored in /angstrom/sources directory. Let's create our custom repository
Code: Select all
mkdir /angstrom/sources/local

bbfile collections exist to allow the user to have multiple repositories of bbfiles that contain the same exact package. Edit the configuration file
Code: Select all
nano /angstrom/build/conf/local.conf

and add the following in the end of file
Code: Select all
BBFILES =+ "/angstrom/sources/local/recipes/*/*.bb"
BBFILE_COLLECTIONS = "local oe"
BBFILE_PATTERN_local = "/angstrom/sources/local"
BBFILE_PRIORITY_local = "5"
BBFILE_PATTERN_oe = "/angstrom/sources/openembedded"
BBFILE_PRIORITY_oe = "0"
BBPATH =. "${BBFILE_PATTERN_local}:"

I suggest to comment out the following line
Code: Select all
INHERIT += "rm_work"

This option will keep all temporary files in process of recipes building.

Another option for custom bbfile repositories is bitbake layers. bitbake has a powerful mechanism called layers which provides a way to handle this extension in a fully supported and non-invasive fashion. It is easy to add the layers path to the BBLAYERS variable in your bblayers.conf.
Code: Select all
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "1"

BBFILES ?= ""

# Add your overlay location to BBLAYERS
# Make sure to have a conf/layers.conf in there
BBLAYERS = " \
  /angstrom/sources/local \
  /angstrom/sources/openembedded \
  "

Bitbake parses the conf/layer.conf of each of the layers in BBLAYERS to add the layers packages, classes and configuration. To create your own layer, independent of the main OpenEmbedded repository, you need only create a directory with a conf/layer.conf file and add the directory to your bblayers.conf.
Code: Select all
BBFILES =+ "${LAYERDIR}/recipes/*/*.bb"
BBPATH =. "${LAYERDIR}:"
BBFILE_COLLECTIONS =+ "local"
BBFILE_PRIORITY_local = "10"
BBFILE_PATTERN_local = "^${LAYERDIR}/"