Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use DEPENDS in bitbake

I have a bitbake build environment with multiple recipes, which are dependent in a chain.

At the moment I have to do: bitbake recipe1 && bitbake recipe2

I have added: DEPENDS = "recipe1" to the meta-recipe2/recipe2.bb

bitbake-layers show-cross-depends shows this dependency.

There fore I expect running bitbake recipe2 to build recipe1 first, however it does not.

What do I need to do to build the dependencies listend in the DEPENDS variable?

like image 234
Oli Gray Avatar asked Jan 18 '17 14:01

Oli Gray


People also ask

What is BitBake used for?

Today, BitBake is the primary basis of the OpenEmbedded project, which is being used to build and maintain Linux distributions such as the Angstrom Distribution and which is used as the build tool for Linux projects such as the Yocto Project.

What are build time dependencies?

Build-time dependencies need to include all packages that are required for the package to build correctly and reliably. That is, a package needs to be included in build dependencies if at least one of the following conditions hold: A script or a Python module from this package is used (run, loaded) at build time.

What is BitBake recipe?

BitBake recipes specify how a particular package is built. Recipes consist of the source URL (http, https, ftp, cvs, svn, git, local file system) of the package, dependencies and compile or install options. They also store the metadata for the package in standard variables.


1 Answers

Adding recipe1 to recipe2by

DEPENDS += "recipe1"

should work fine for you. The line above means that before the do_configure task of recipe2 can be run, the task do_populate_sysroot fro mrecipe1 will have completed. This should work for all version of bitbake and OpenEmbedded.

You can achieve something similar to DEPENDS += "recipe1" by

do_configure[depends] += "recipe1:do_populate_sysroot"

If necessary, you could manually set up your own custom depends like this.

like image 160
Anders Avatar answered Oct 13 '22 21:10

Anders