diff options
| author | Scott Rifenbark <srifenbark@gmail.com> | 2016-10-19 11:37:17 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-10-25 17:56:27 +0100 |
| commit | 5e0d6341ab25e3b7bad9c76aff2a3e21f0589b77 (patch) | |
| tree | 91eeab02f17c6253bd1abe0d2b9f26ef98f1ad5f | |
| parent | 41e74881b013cdab5ad503f8c08f521c9414c627 (diff) | |
| download | poky-5e0d6341ab25e3b7bad9c76aff2a3e21f0589b77.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: 0bf464908200d6c40c35fbf753712a8b0201dd88)
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | documentation/dev-manual/dev-manual-common-tasks.xml | 100 |
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 | ||
