From 6e9ff843fdba084b7c50d95c3ff482ddb4f18e55 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Wed, 5 Sep 2018 10:40:13 -0700 Subject: bitbake: bitbake-user-manual: Added section on multicong dependencies Created a new section to show how to handle dependencies when you are doing a multiple configuration build. Put it in the "Examples" section. (Bitbake rev: fa42212a6cb7b64add4d6ca0f723a95c908c6b87) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../bitbake-user-manual-intro.xml | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) (limited to 'bitbake/doc') diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml index 47c8d5d89b..9e2e6b2eb2 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml @@ -804,6 +804,82 @@ + +
+ Enabling Multiple Configuration Build Dependencies + + + Sometimes dependencies can exist between targets + (multiconfigs) in a multiple configuration build. + For example, suppose that in order to build an image + for a particular architecture, the root filesystem of + another build for a different architecture needs to + exist. + In other words, the image for the first multiconfig depends + on the root filesystem of the second multiconfig. + This dependency is essentially that the task in the recipe + that builds one multiconfig is dependent on the + completion of the task in the recipe that builds + another multiconfig. + + + + To enable dependencies in a multiple configuration + build, you must declare the dependencies in the recipe + using the following statement form: + + task_or_package[mcdepends] = "multiconfig:from_multiconfig:to_multiconfig:recipe_name:task_on_which_to_depend" + + To better show how to use this statement, consider an + example with two multiconfigs: target1 + and target2: + + image_task[mcdepends] = "multiconfig:target1:target2:image2:rootfs_task" + + In this example, the + from_multiconfig is "target1" and + the to_multiconfig is "target2". + The task on which the image whose recipe contains + image_task depends on the + completion of the rootfs_task + used to build out image2, which + is associated with the "target2" multiconfig. + + + + Once you set up this dependency, you can build the + "target1" multiconfig using a BitBake command as follows: + + $ bitbake multiconfig:target1:image1 + + This command executes all the tasks needed to create + image1 for the "target1" + multiconfig. + Because of the dependency, BitBake also executes through + the rootfs_task for the "target2" + multiconfig build. + + + + Having a recipe depend on the root filesystem of another + build might not seem that useful. + Consider this change to the statement in the + image1 recipe: + + image_task[mcdepends] = "multiconfig:target1:target2:image2:image_task" + + In this case, BitBake must create + image2 for the "target2" + build since the "target1" build depends on it. + + + + Because "target1" and "target2" are enabled for multiple + configuration builds and have separate configuration + files, BitBake places the artifacts for each build in the + respective temporary build directories. + +
-- cgit v1.2.3-54-g00ecf