summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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>