summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonin Godard <antonin.godard@bootlin.com>2025-02-17 15:50:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-02-26 14:49:28 +0000
commit705966c54623b85775ba540acbd6941c91e23e40 (patch)
tree01992ff56f1c561af30a18160205e6d704073271
parent8368cac811c9b4d84716c95410fb962ed9b92136 (diff)
downloadpoky-705966c54623b85775ba540acbd6941c91e23e40.tar.gz
dev-manual/multiconfig: improve the current doc
After the suggestions from Mark Hatle on the list (https://lists.yoctoproject.org/g/docs/topic/110487932), rewrite the introduction to multiconfig with the following changes: - Move the part of overriding TMPDIR or not to a note. - Use BB_CURRENT_MC in the example. - Various additions of references & improved formatting. Suggested-by: Mark Hatle <mark.hatle@kernel.crashing.org> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> (From yocto-docs rev: 8cedef6d5b701235325e6e0bdd793f8c06dfef57) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--documentation/dev-manual/multiconfig.rst68
1 files changed, 42 insertions, 26 deletions
diff --git a/documentation/dev-manual/multiconfig.rst b/documentation/dev-manual/multiconfig.rst
index d8f6470d51..8371cf0e46 100644
--- a/documentation/dev-manual/multiconfig.rst
+++ b/documentation/dev-manual/multiconfig.rst
@@ -17,7 +17,7 @@ Setting Up and Running a Multiple Configuration Build
17===================================================== 17=====================================================
18 18
19To accomplish a multiple configuration build, you must define each 19To accomplish a multiple configuration build, you must define each
20target's configuration separately using a parallel configuration file in 20target's configuration separately using a parallel :term:`configuration file` in
21the :term:`Build Directory` or configuration directory within a layer, and you 21the :term:`Build Directory` or configuration directory within a layer, and you
22must follow a required file hierarchy. Additionally, you must enable the 22must follow a required file hierarchy. Additionally, you must enable the
23multiple configuration builds in your ``local.conf`` file. 23multiple configuration builds in your ``local.conf`` file.
@@ -25,31 +25,30 @@ multiple configuration builds in your ``local.conf`` file.
25Follow these steps to set up and execute multiple configuration builds: 25Follow these steps to set up and execute multiple configuration builds:
26 26
27- *Create Separate Configuration Files*: You need to create a single 27- *Create Separate Configuration Files*: You need to create a single
28 configuration file for each build target (each multiconfig). 28 :term:`Configuration File` for each build target (each multiconfig).
29 The configuration definitions are implementation dependent but often 29 The configuration definitions are implementation dependent but often
30 each configuration file will define the machine and the 30 each configuration file will define the :term:`MACHINE` and the
31 temporary directory BitBake uses for the build. Whether the same 31 temporary directory (:term:`TMPDIR`) BitBake uses for the build.
32 temporary directory (:term:`TMPDIR`) can be shared will depend on what is
33 similar and what is different between the configurations. Multiple MACHINE
34 targets can share the same (:term:`TMPDIR`) as long as the rest of the
35 configuration is the same, multiple :term:`DISTRO` settings would need separate
36 (:term:`TMPDIR`) directories.
37
38 For example, consider a scenario with two different multiconfigs for the same
39 :term:`MACHINE`: "qemux86" built
40 for two distributions such as "poky" and "poky-lsb". In this case,
41 you would need to use the different :term:`TMPDIR`.
42 32
43 Here is an example showing the minimal statements needed in a 33 .. note::
44 configuration file for a "qemux86" target whose temporary build
45 directory is ``tmpmultix86``::
46 34
47 MACHINE = "qemux86" 35 Whether the same temporary directory (:term:`TMPDIR`) can be shared will
48 TMPDIR = "${TOPDIR}/tmpmultix86" 36 depend on what is similar and what is different between the
37 configurations. Multiple :term:`MACHINE` targets can share the same
38 :term:`TMPDIR` as long as the rest of the configuration is the same,
39 multiple :term:`DISTRO` settings would need separate :term:`TMPDIR`
40 directories.
41
42 For example, consider a scenario with two different multiconfigs for the same
43 :term:`MACHINE`: "qemux86" built for two distributions such as "poky" and
44 "poky-lsb". In this case, you would need to use two different :term:`TMPDIR`.
45
46 In the general case, using separate :term:`TMPDIR` for the different
47 multiconfigs is strongly recommended.
49 48
50 The location for these multiconfig configuration files is specific. 49 The location for these multiconfig configuration files is specific.
51 They must reside in the current :term:`Build Directory` in a sub-directory of 50 They must reside in the current :term:`Build Directory` in a sub-directory of
52 ``conf`` named ``multiconfig`` or within a layer's ``conf`` directory 51 ``conf`` named ``multiconfig`` or within a :term:`Layer`'s ``conf`` directory
53 under a directory named ``multiconfig``. Here is an example that defines 52 under a directory named ``multiconfig``. Here is an example that defines
54 two configuration files for the "x86" and "arm" multiconfigs: 53 two configuration files for the "x86" and "arm" multiconfigs:
55 54
@@ -58,7 +57,19 @@ Follow these steps to set up and execute multiple configuration builds:
58 :width: 50% 57 :width: 50%
59 58
60 The usual :term:`BBPATH` search path is used to locate multiconfig files in 59 The usual :term:`BBPATH` search path is used to locate multiconfig files in
61 a similar way to other conf files. 60 a similar way to other configuration files.
61
62 Here is an example showing the minimal statements needed in a
63 :term:`configuration file` named ``qemux86.conf`` for a ``qemux86`` target
64 whose temporary build directory is ``tmp-qemux86``::
65
66 MACHINE = "qemux86"
67 TMPDIR .= "-${BB_CURRENT_MC}"
68
69 BitBake will expand the :term:`BB_CURRENT_MC` variable to the value of the
70 current multiconfig in use. We append this value to :term:`TMPDIR` so that
71 any change on the definition of :term:`TMPDIR` will automatically affect the
72 value of :term:`TMPDIR` for each multiconfig.
62 73
63- *Add the BitBake Multi-configuration Variable to the Local 74- *Add the BitBake Multi-configuration Variable to the Local
64 Configuration File*: Use the 75 Configuration File*: Use the
@@ -88,11 +99,16 @@ Follow these steps to set up and execute multiple configuration builds:
88 99
89 $ bitbake mc:x86:core-image-minimal mc:arm:core-image-sato mc::core-image-base 100 $ bitbake mc:x86:core-image-minimal mc:arm:core-image-sato mc::core-image-base
90 101
91 The previous BitBake command builds a ``core-image-minimal`` image 102 The previous BitBake command builds several components:
92 that is configured through the ``x86.conf`` configuration file, a 103
93 ``core-image-sato`` image that is configured through the ``arm.conf`` 104 - A ``core-image-minimal`` image that is configured through the ``x86.conf``
94 configuration file and a ``core-image-base`` that is configured 105 configuration file
95 through your ``local.conf`` configuration file. 106
107 - A ``core-image-sato`` image that is configured through the ``arm.conf``
108 configuration file
109
110 - A ``core-image-base`` that is configured through your ``local.conf``
111 configuration file
96 112
97.. note:: 113.. note::
98 114