View source for User:CesarB/Using a local overlay
From Openmoko
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Return to User:CesarB/Using a local overlay.
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Return to User:CesarB/Using a local overlay.
A local overlay is a way to add your own bitbake recipes (or override the ones from openembedded) without having them clobbered when you update these trees.
To create a local overlay:
mkdir local local/conf local/classes local/packages
site.conf
from the openmoko tree to local/conf
cp build/conf/site.conf local/conf/site.conf
BBFILES
variable, and add the BBFILE_COLLECTIONS
, BBFILE_PATTERN_*
and BBFILE_PRIORITY_*
variables:
BBFILES := "${OMDIR}/openembedded/packages/*/*.bb ${OMDIR}/local/packages/*/*.bb" BBFILE_COLLECTIONS = "upstream local" BBFILE_PATTERN_upstream = "^${OMDIR}/openembedded/packages/" BBFILE_PATTERN_local = "^${OMDIR}/local/packages/" BBFILE_PRIORITY_upstream = "5" BBFILE_PRIORIRY_local = "10"
The BBFILE_PRIORITY_local
value should be greater than the BBFILE_PRIORITY_upstream
value.
While you are at it, you could change the SOURCEFORGE_MIRROR
variable to a nearby mirror.
BBPATH
environment variable to add the new tree before the two others (for MokoMakefile, the variable is on the setup-env
file).
export BBPATH="${OMDIR}/local:${OMDIR}/build:${OMDIR}/openembedded"
How you use the local overlay depends on which part of the tree you want to affect.
To change a file in conf/, just copy the file to the overlay tree (preserving the directory structure) and edit it.
To change a file in classes/, just copy the file to the overlay tree and edit it.
Changing a package's recipe is a bit more complex. You have to copy over (or symlink) not only the .bb file for the package, but also all the files it includes with require
, and the FILESDIR
directories (all directories referred to by FILESDIR
, usually named either package-version or files
). If you forget one of them, the build will give an error (either when parsing the recipe in the case of require
, or when trying to build in the case of the FILESDIR
directories).
You can add a new package (or a recipe for a new version of a package) to the overlay tree simply by creating it on the overlay tree.