summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual/custom-template-configuration-directory.rst
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@bootlin.com>2022-11-24 17:50:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-01 19:20:29 +0000
commit945c669138a76be18c6b4da4f8f907d2a5cfd83f (patch)
treecebff3cae5021d4fcceb5aa51fce1c2aead97ed2 /documentation/dev-manual/custom-template-configuration-directory.rst
parent6fe3143800925463279d0664fc7f3372b53c6c52 (diff)
downloadpoky-945c669138a76be18c6b4da4f8f907d2a5cfd83f.tar.gz
manuals: split dev-manual/common-tasks.rst
A 500 KB source file is always harder to manage, and can have section title conflicts. So, the "Common Tasks" document is gone and all its constituents are moved up one level. You now have 40 chapters in the Development Tasks Manual. (From yocto-docs rev: 8a45bc469411410020b8e688c137395fcaf3761b) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual/custom-template-configuration-directory.rst')
-rw-r--r--documentation/dev-manual/custom-template-configuration-directory.rst52
1 files changed, 52 insertions, 0 deletions
diff --git a/documentation/dev-manual/custom-template-configuration-directory.rst b/documentation/dev-manual/custom-template-configuration-directory.rst
new file mode 100644
index 0000000000..9bffef35b4
--- /dev/null
+++ b/documentation/dev-manual/custom-template-configuration-directory.rst
@@ -0,0 +1,52 @@
1.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2
3Creating a Custom Template Configuration Directory
4**************************************************
5
6If you are producing your own customized version of the build system for
7use by other users, you might want to provide a custom build configuration
8that includes all the necessary settings and layers (i.e. ``local.conf`` and
9``bblayers.conf`` that are created in a new :term:`Build Directory`) and a custom
10message that is shown when setting up the build. This can be done by
11creating one or more template configuration directories in your
12custom distribution layer.
13
14This can be done by using ``bitbake-layers save-build-conf``::
15
16 $ bitbake-layers save-build-conf ../../meta-alex/ test-1
17 NOTE: Starting bitbake server...
18 NOTE: Configuration template placed into /srv/work/alex/meta-alex/conf/templates/test-1
19 Please review the files in there, and particularly provide a configuration description in /srv/work/alex/meta-alex/conf/templates/test-1/conf-notes.txt
20 You can try out the configuration with
21 TEMPLATECONF=/srv/work/alex/meta-alex/conf/templates/test-1 . /srv/work/alex/poky/oe-init-build-env build-try-test-1
22
23The above command takes the config files from the currently active :term:`Build Directory` under ``conf``,
24replaces site-specific paths in ``bblayers.conf`` with ``##OECORE##``-relative paths, and copies
25the config files into a specified layer under a specified template name.
26
27To use those saved templates as a starting point for a build, users should point
28to one of them with :term:`TEMPLATECONF` environment variable::
29
30 TEMPLATECONF=/srv/work/alex/meta-alex/conf/templates/test-1 . /srv/work/alex/poky/oe-init-build-env build-try-test-1
31
32The OpenEmbedded build system uses the environment variable
33:term:`TEMPLATECONF` to locate the directory from which it gathers
34configuration information that ultimately ends up in the
35:term:`Build Directory` ``conf`` directory.
36
37If :term:`TEMPLATECONF` is not set, the default value is obtained
38from ``.templateconf`` file that is read from the same directory as
39``oe-init-build-env`` script. For the Poky reference distribution this
40would be::
41
42 TEMPLATECONF=${TEMPLATECONF:-meta-poky/conf/templates/default}
43
44If you look at a configuration template directory, you will
45see the ``bblayers.conf.sample``, ``local.conf.sample``, and
46``conf-notes.txt`` files. The build system uses these files to form the
47respective ``bblayers.conf`` file, ``local.conf`` file, and show
48users a note about the build they're setting up
49when running the ``oe-init-build-env`` setup script. These can be
50edited further if needed to improve or change the build configurations
51available to the users.
52