summaryrefslogtreecommitdiffstats
path: root/bitbake/doc/bitbake-user-manual
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2018-09-05 10:40:13 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-04 14:33:31 +0100
commit6e9ff843fdba084b7c50d95c3ff482ddb4f18e55 (patch)
treec61f63201898a9164e660443c12e5611a54b99ec /bitbake/doc/bitbake-user-manual
parent859d36b1309ccb41d0218bfad11c4cfceebcd980 (diff)
downloadpoky-6e9ff843fdba084b7c50d95c3ff482ddb4f18e55.tar.gz
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 <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/doc/bitbake-user-manual')
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml76
1 files changed, 76 insertions, 0 deletions
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 @@
804 </literallayout> 804 </literallayout>
805 </para> 805 </para>
806 </section> 806 </section>
807
808 <section id='bb-enabling-multiple-configuration-build-dependencies'>
809 <title>Enabling Multiple Configuration Build Dependencies</title>
810
811 <para>
812 Sometimes dependencies can exist between targets
813 (multiconfigs) in a multiple configuration build.
814 For example, suppose that in order to build an image
815 for a particular architecture, the root filesystem of
816 another build for a different architecture needs to
817 exist.
818 In other words, the image for the first multiconfig depends
819 on the root filesystem of the second multiconfig.
820 This dependency is essentially that the task in the recipe
821 that builds one multiconfig is dependent on the
822 completion of the task in the recipe that builds
823 another multiconfig.
824 </para>
825
826 <para>
827 To enable dependencies in a multiple configuration
828 build, you must declare the dependencies in the recipe
829 using the following statement form:
830 <literallayout class='monospaced'>
831 <replaceable>task_or_package</replaceable>[mcdepends] = "multiconfig:<replaceable>from_multiconfig</replaceable>:<replaceable>to_multiconfig</replaceable>:<replaceable>recipe_name</replaceable>:<replaceable>task_on_which_to_depend</replaceable>"
832 </literallayout>
833 To better show how to use this statement, consider an
834 example with two multiconfigs: <filename>target1</filename>
835 and <filename>target2</filename>:
836 <literallayout class='monospaced'>
837 <replaceable>image_task</replaceable>[mcdepends] = "multiconfig:target1:target2:<replaceable>image2</replaceable>:<replaceable>rootfs_task</replaceable>"
838 </literallayout>
839 In this example, the
840 <replaceable>from_multiconfig</replaceable> is "target1" and
841 the <replaceable>to_multiconfig</replaceable> is "target2".
842 The task on which the image whose recipe contains
843 <replaceable>image_task</replaceable> depends on the
844 completion of the <replaceable>rootfs_task</replaceable>
845 used to build out <replaceable>image2</replaceable>, which
846 is associated with the "target2" multiconfig.
847 </para>
848
849 <para>
850 Once you set up this dependency, you can build the
851 "target1" multiconfig using a BitBake command as follows:
852 <literallayout class='monospaced'>
853 $ bitbake multiconfig:target1:<replaceable>image1</replaceable>
854 </literallayout>
855 This command executes all the tasks needed to create
856 <replaceable>image1</replaceable> for the "target1"
857 multiconfig.
858 Because of the dependency, BitBake also executes through
859 the <replaceable>rootfs_task</replaceable> for the "target2"
860 multiconfig build.
861 </para>
862
863 <para>
864 Having a recipe depend on the root filesystem of another
865 build might not seem that useful.
866 Consider this change to the statement in the
867 <replaceable>image1</replaceable> recipe:
868 <literallayout class='monospaced'>
869 <replaceable>image_task</replaceable>[mcdepends] = "multiconfig:target1:target2:<replaceable>image2</replaceable>:<replaceable>image_task</replaceable>"
870 </literallayout>
871 In this case, BitBake must create
872 <replaceable>image2</replaceable> for the "target2"
873 build since the "target1" build depends on it.
874 </para>
875
876 <para>
877 Because "target1" and "target2" are enabled for multiple
878 configuration builds and have separate configuration
879 files, BitBake places the artifacts for each build in the
880 respective temporary build directories.
881 </para>
882 </section>
807 </section> 883 </section>
808 </section> 884 </section>
809</chapter> 885</chapter>