summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2016-10-19 11:37:17 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-25 17:55:37 +0100
commit0df906b779abce4288c73c398dd251fd8892f9a0 (patch)
treee9204a3a9d85b2d20a4ad0118b68d0835d401f82 /documentation
parent5f4b2020781f82ae2b9d391a16905ec9ddb4f888 (diff)
downloadpoky-0df906b779abce4288c73c398dd251fd8892f9a0.tar.gz
dev-manual: Added section for multi-configuration support
I added a new section in the "Common Tasks" chapter to support the fact that BB can now build for multi-configurations. (From yocto-docs rev: aa21aeb2f3d2f9d5a3a6e7175b7c6f13da5f608e) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml100
1 files changed, 100 insertions, 0 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index a2376f67a8..086d0bad99 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -3621,6 +3621,106 @@
3621 </section> 3621 </section>
3622 </section> 3622 </section>
3623 3623
3624 <section id='platdev-building-targets-with-multiple-configurations'>
3625 <title>Building Targets with Multiple Configurations</title>
3626
3627 <para>
3628 Bitbake also has functionality that allows you to build
3629 multiple targets at the same time, where each target uses
3630 a different configuration.
3631 </para>
3632
3633 <para>
3634 In order to accomplish this, you setup each of the configurations
3635 you need to use in parallel by placing the configuration files in
3636 your current build directory alongside the usual
3637 <filename>local.conf</filename> file.
3638 </para>
3639
3640 <para>
3641 Follow these guidelines to create an environment that supports
3642 multiple configurations:
3643 <itemizedlist>
3644 <listitem><para>
3645 <emphasis>Create Configuration Files</emphasis>:
3646 You need to create a single configuration file for each
3647 configuration for which you want to add support.
3648 These files would contain lines such as the following:
3649 <literallayout class='monospaced'>
3650 MACHINE = "A"
3651 </literallayout>
3652 The files would contain any other variables that can
3653 be set and built in the same directory.
3654 <note>
3655 You can change the
3656 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
3657 to not conflict.
3658 </note></para>
3659
3660 <para>
3661 Furthermore, the configuration file must be located in the
3662 current build directory in a directory named
3663 <filename>multiconfig</filename> under the build's
3664 <filename>conf</filename> directory where
3665 <filename>local.conf</filename> resides.
3666 The reason for this restriction is because the
3667 <filename>BBPATH</filename> variable is not constructed
3668 until the layers are parsed.
3669 Consequently, using the configuration file as a
3670 pre-configuration file is not possible unless it is
3671 located in the current working directory.
3672 </para></listitem>
3673 <listitem><para>
3674 <emphasis>Add the BitBake Multi-Config Variable to you Local Configuration File</emphasis>:
3675 Use the
3676 <filename>BBMULTICONFIG</filename>
3677 variable in your <filename>conf/local.conf</filename>
3678 configuration file to specify each separate configuration.
3679 For example, the following line tells BitBake it should load
3680 <filename>conf/multiconfig/configA.conf</filename>,
3681 <filename>conf/multiconfig/configB.conf</filename>, and
3682 <filename>conf/multiconfig/configC.conf</filename>.
3683 <literallayout class='monospaced'>
3684 BBMULTICONFIG = "configA configB configC"
3685 </literallayout>
3686 </para></listitem>
3687 <listitem><para>
3688 <emphasis>Launch BitBake</emphasis>:
3689 Use the following BitBake command form to launch the
3690 build:
3691 <literallayout class='monospaced'>
3692 $ bitbake [multiconfig:<replaceable>multiconfigname</replaceable>:]<replaceable>target</replaceable> [[[multiconfig:<replaceable>multiconfigname</replaceable>:]<replaceable>target</replaceable>] ... ]
3693 </literallayout>
3694 Following is an example that supports building a minimal
3695 image for configuration A alongside a standard
3696 <filename>core-image-sato</filename>, which takes its
3697 configuration from <filename>local.conf</filename>:
3698 <literallayout class='monospaced'>
3699 $ bitbake multiconfig:configA:core-image-minimal core-image-sato
3700 </literallayout>
3701 </para></listitem>
3702 </itemizedlist>
3703 </para>
3704
3705 <para>
3706 Support for multiple configurations in this current release of
3707 the Yocto Project (&DISTRO_NAME; &DISTRO;) has some known issues:
3708 <itemizedlist>
3709 <listitem><para>
3710 No inter-multi-configuration dependencies exist.
3711 </para></listitem>
3712 <listitem><para>
3713 Shared State (sstate) optimizations do not exist.
3714 Consequently, if the build uses the same object twice
3715 in, for example, two different
3716 <filename>TMPDIR</filename> directories, the build
3717 will either load from an existing sstate cache at the
3718 start or build the object twice.
3719 </para></listitem>
3720 </itemizedlist>
3721 </para>
3722 </section>
3723
3624 <section id="platdev-working-with-libraries"> 3724 <section id="platdev-working-with-libraries">
3625 <title>Working With Libraries</title> 3725 <title>Working With Libraries</title>
3626 3726