summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2018-05-16 14:34:11 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-24 17:16:35 +0100
commit5c5a8e3d348adb979be10baca0d814cf0dfb8cb8 (patch)
treec4f10e27273f2071dbb6a72b8cf40eac9a040b32 /documentation/dev-manual
parentcbda3472e371c24a38d1e7b49cd718fffd6ddb25 (diff)
downloadpoky-5c5a8e3d348adb979be10baca0d814cf0dfb8cb8.tar.gz
dev-manual: Moved "Building Targets with Multiple Configurations"
This is a "building" topic. I moved it beneath the new parent "building" section. (From yocto-docs rev: 0426f0dd6871c8063476945b93743ffc5cfc0856) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml191
1 files changed, 95 insertions, 96 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 9f993d21e3..14e30de039 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -5320,114 +5320,113 @@
5320 </orderedlist> 5320 </orderedlist>
5321 </para> 5321 </para>
5322 </section> 5322 </section>
5323 </section>
5324
5325
5326
5327
5328 5323
5324 <section id='platdev-building-targets-with-multiple-configurations'>
5325 <title>Building Targets with Multiple Configurations</title>
5329 5326
5327 <para>
5328 Bitbake also has functionality that allows you to build
5329 multiple targets at the same time, where each target uses
5330 a different configuration.
5331 </para>
5330 5332
5331 <section id='platdev-building-targets-with-multiple-configurations'> 5333 <para>
5332 <title>Building Targets with Multiple Configurations</title> 5334 In order to accomplish this, you setup each of the configurations
5333 5335 you need to use in parallel by placing the configuration files in
5334 <para> 5336 your current build directory alongside the usual
5335 Bitbake also has functionality that allows you to build 5337 <filename>local.conf</filename> file.
5336 multiple targets at the same time, where each target uses 5338 </para>
5337 a different configuration.
5338 </para>
5339
5340 <para>
5341 In order to accomplish this, you setup each of the configurations
5342 you need to use in parallel by placing the configuration files in
5343 your current build directory alongside the usual
5344 <filename>local.conf</filename> file.
5345 </para>
5346 5339
5347 <para> 5340 <para>
5348 Follow these guidelines to create an environment that supports 5341 Follow these guidelines to create an environment that supports
5349 multiple configurations: 5342 multiple configurations:
5350 <itemizedlist> 5343 <itemizedlist>
5351 <listitem><para> 5344 <listitem><para>
5352 <emphasis>Create Configuration Files</emphasis>: 5345 <emphasis>Create Configuration Files</emphasis>:
5353 You need to create a single configuration file for each 5346 You need to create a single configuration file for each
5354 configuration for which you want to add support. 5347 configuration for which you want to add support.
5355 These files would contain lines such as the following: 5348 These files would contain lines such as the following:
5356 <literallayout class='monospaced'> 5349 <literallayout class='monospaced'>
5357 MACHINE = "A" 5350 MACHINE = "A"
5358 </literallayout> 5351 </literallayout>
5359 The files would contain any other variables that can 5352 The files would contain any other variables that can
5360 be set and built in the same directory. 5353 be set and built in the same directory.
5361 <note> 5354 <note>
5362 You can change the 5355 You can change the
5363 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink> 5356 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
5364 to not conflict. 5357 to not conflict.
5365 </note></para> 5358 </note></para>
5366 5359
5367 <para> 5360 <para>
5368 Furthermore, the configuration file must be located in the 5361 Furthermore, the configuration file must be located in the
5369 current build directory in a directory named 5362 current build directory in a directory named
5370 <filename>multiconfig</filename> under the build's 5363 <filename>multiconfig</filename> under the build's
5371 <filename>conf</filename> directory where 5364 <filename>conf</filename> directory where
5372 <filename>local.conf</filename> resides. 5365 <filename>local.conf</filename> resides.
5373 The reason for this restriction is because the 5366 The reason for this restriction is because the
5374 <filename>BBPATH</filename> variable is not constructed 5367 <filename>BBPATH</filename> variable is not constructed
5375 until the layers are parsed. 5368 until the layers are parsed.
5376 Consequently, using the configuration file as a 5369 Consequently, using the configuration file as a
5377 pre-configuration file is not possible unless it is 5370 pre-configuration file is not possible unless it is
5378 located in the current working directory. 5371 located in the current working directory.
5379 </para></listitem> 5372 </para></listitem>
5380 <listitem><para> 5373 <listitem><para>
5381 <emphasis>Add the BitBake Multi-Config Variable to you Local Configuration File</emphasis>: 5374 <emphasis>Add the BitBake Multi-Config Variable to you Local Configuration File</emphasis>:
5382 Use the 5375 Use the
5383 <filename>BBMULTICONFIG</filename> 5376 <filename>BBMULTICONFIG</filename>
5384 variable in your <filename>conf/local.conf</filename> 5377 variable in your <filename>conf/local.conf</filename>
5385 configuration file to specify each separate configuration. 5378 configuration file to specify each separate configuration.
5386 For example, the following line tells BitBake it should load 5379 For example, the following line tells BitBake it should load
5387 <filename>conf/multiconfig/configA.conf</filename>, 5380 <filename>conf/multiconfig/configA.conf</filename>,
5388 <filename>conf/multiconfig/configB.conf</filename>, and 5381 <filename>conf/multiconfig/configB.conf</filename>, and
5389 <filename>conf/multiconfig/configC.conf</filename>. 5382 <filename>conf/multiconfig/configC.conf</filename>.
5390 <literallayout class='monospaced'> 5383 <literallayout class='monospaced'>
5391 BBMULTICONFIG = "configA configB configC" 5384 BBMULTICONFIG = "configA configB configC"
5392 </literallayout> 5385 </literallayout>
5393 </para></listitem> 5386 </para></listitem>
5394 <listitem><para> 5387 <listitem><para>
5395 <emphasis>Launch BitBake</emphasis>: 5388 <emphasis>Launch BitBake</emphasis>:
5396 Use the following BitBake command form to launch the 5389 Use the following BitBake command form to launch the
5397 build: 5390 build:
5398 <literallayout class='monospaced'> 5391 <literallayout class='monospaced'>
5399 $ bitbake [multiconfig:<replaceable>multiconfigname</replaceable>:]<replaceable>target</replaceable> [[[multiconfig:<replaceable>multiconfigname</replaceable>:]<replaceable>target</replaceable>] ... ] 5392 $ bitbake [multiconfig:<replaceable>multiconfigname</replaceable>:]<replaceable>target</replaceable> [[[multiconfig:<replaceable>multiconfigname</replaceable>:]<replaceable>target</replaceable>] ... ]
5400 </literallayout> 5393 </literallayout>
5401 Following is an example that supports building a minimal 5394 Following is an example that supports building a minimal
5402 image for configuration A alongside a standard 5395 image for configuration A alongside a standard
5403 <filename>core-image-sato</filename>, which takes its 5396 <filename>core-image-sato</filename>, which takes its
5404 configuration from <filename>local.conf</filename>: 5397 configuration from <filename>local.conf</filename>:
5405 <literallayout class='monospaced'> 5398 <literallayout class='monospaced'>
5406 $ bitbake multiconfig:configA:core-image-minimal core-image-sato 5399 $ bitbake multiconfig:configA:core-image-minimal core-image-sato
5407 </literallayout> 5400 </literallayout>
5408 </para></listitem> 5401 </para></listitem>
5409 </itemizedlist> 5402 </itemizedlist>
5410 </para> 5403 </para>
5411 5404
5412 <para> 5405 <para>
5413 Support for multiple configurations in this current release of 5406 Support for multiple configurations in this current release of
5414 the Yocto Project (&DISTRO_NAME; &DISTRO;) has some known issues: 5407 the Yocto Project (&DISTRO_NAME; &DISTRO;) has some known issues:
5415 <itemizedlist> 5408 <itemizedlist>
5416 <listitem><para> 5409 <listitem><para>
5417 No inter-multi-configuration dependencies exist. 5410 No inter-multi-configuration dependencies exist.
5418 </para></listitem> 5411 </para></listitem>
5419 <listitem><para> 5412 <listitem><para>
5420 Shared State (sstate) optimizations do not exist. 5413 Shared State (sstate) optimizations do not exist.
5421 Consequently, if the build uses the same object twice 5414 Consequently, if the build uses the same object twice
5422 in, for example, two different 5415 in, for example, two different
5423 <filename>TMPDIR</filename> directories, the build 5416 <filename>TMPDIR</filename> directories, the build
5424 will either load from an existing sstate cache at the 5417 will either load from an existing sstate cache at the
5425 start or build the object twice. 5418 start or build the object twice.
5426 </para></listitem> 5419 </para></listitem>
5427 </itemizedlist> 5420 </itemizedlist>
5428 </para> 5421 </para>
5422 </section>
5429 </section> 5423 </section>
5430 5424
5425
5426
5427
5428
5429
5431 <section id="platdev-working-with-libraries"> 5430 <section id="platdev-working-with-libraries">
5432 <title>Working With Libraries</title> 5431 <title>Working With Libraries</title>
5433 5432