diff options
| -rw-r--r-- | documentation/dev-manual/creating-fragments.rst | 146 | ||||
| -rw-r--r-- | documentation/dev-manual/index.rst | 1 | ||||
| -rw-r--r-- | documentation/ref-manual/fragments.rst | 258 | ||||
| -rw-r--r-- | documentation/ref-manual/index.rst | 1 | ||||
| -rw-r--r-- | documentation/ref-manual/terms.rst | 92 | ||||
| -rw-r--r-- | documentation/ref-manual/variables.rst | 39 |
6 files changed, 537 insertions, 0 deletions
diff --git a/documentation/dev-manual/creating-fragments.rst b/documentation/dev-manual/creating-fragments.rst new file mode 100644 index 0000000000..7f437d7c94 --- /dev/null +++ b/documentation/dev-manual/creating-fragments.rst | |||
| @@ -0,0 +1,146 @@ | |||
| 1 | .. SPDX-License-Identifier: CC-BY-SA-2.0-UK | ||
| 2 | |||
| 3 | Creating New Configuration Fragments In Your Build | ||
| 4 | ************************************************** | ||
| 5 | |||
| 6 | :term:`Configuration Fragments <Configuration Fragment>` define top level build | ||
| 7 | configuration features that can be independently enabled and disabled using | ||
| 8 | standard tooling. Such features are made of one or several build configuration | ||
| 9 | statements that are either contained in a fragment file, or are set indirectly | ||
| 10 | using the :term:`Built-in Fragment` mechanism. | ||
| 11 | |||
| 12 | This section will describe how to create new fragments for your builds. | ||
| 13 | |||
| 14 | There are two kinds of configuration fragments: | ||
| 15 | |||
| 16 | - Standard :term:`Configuration Fragments <Configuration Fragment>` which a | ||
| 17 | stored in a file. These fragments include a summary and a description, | ||
| 18 | following by configuration statements. | ||
| 19 | |||
| 20 | - :term:`Built-in Fragments <Built-in Fragment>` which can be used to assign a | ||
| 21 | value to a single variable and do not require a separate definition file. | ||
| 22 | They are especially useful when a list of possible values is very long (or | ||
| 23 | infinite). | ||
| 24 | |||
| 25 | Creating A Standard Configuration Fragment | ||
| 26 | ========================================== | ||
| 27 | |||
| 28 | By default, all configuration fragments are located within the | ||
| 29 | ``conf/fragments`` directory of a :term:`layer`. This location is defined by the | ||
| 30 | :term:`OE_FRAGMENTS_PREFIX` variable which, in turn, is used as a parameter in an | ||
| 31 | :ref:`addfragments <bitbake-user-manual/bitbake-user-manual-metadata:\`\`addfragments\`\` | ||
| 32 | directive>` directive in :oe_git:`bitbake.conf </openembedded-core/tree/meta/conf/bitbake.conf>`. | ||
| 33 | |||
| 34 | You can create one or more :term:`configuration fragment` files in your | ||
| 35 | :term:`layer` in this directory. Let's take the following example, where | ||
| 36 | ``custom-fragment.conf`` is our custom fragment file:: | ||
| 37 | |||
| 38 | meta-custom | ||
| 39 | ├── conf | ||
| 40 | │ ├── fragments | ||
| 41 | │ │ └── custom-fragment.conf | ||
| 42 | │ └── layer.conf | ||
| 43 | ... | ||
| 44 | |||
| 45 | For our ``custom-fragment.conf`` file, the following variables **must** be set | ||
| 46 | for our fragment to be considered a valid fragment by the :term:`OpenEmbedded | ||
| 47 | Build System`: | ||
| 48 | |||
| 49 | - :term:`BB_CONF_FRAGMENT_SUMMARY`: a one-line summary of this fragment. | ||
| 50 | |||
| 51 | - :term:`BB_CONF_FRAGMENT_DESCRIPTION`: a description of this fragment. | ||
| 52 | |||
| 53 | .. note:: | ||
| 54 | |||
| 55 | The :term:`BB_CONF_FRAGMENT_SUMMARY` and :term:`BB_CONF_FRAGMENT_DESCRIPTION` | ||
| 56 | variables are also passed as parameters in an :ref:`addfragments | ||
| 57 | <bitbake-user-manual/bitbake-user-manual-metadata:\`\`addfragments\`\` | ||
| 58 | directive>` directive in :oe_git:`bitbake.conf | ||
| 59 | </openembedded-core/tree/meta/conf/bitbake.conf>`. | ||
| 60 | |||
| 61 | After creating these variables, our custom fragment should look like the | ||
| 62 | following: | ||
| 63 | |||
| 64 | .. code-block:: | ||
| 65 | :caption: custom-fragment.conf | ||
| 66 | |||
| 67 | BB_CONF_FRAGMENT_SUMMARY = "This fragment sets a limit of 4 bitbake threads and 4 parsing threads" | ||
| 68 | BB_CONF_FRAGMENT_DESCRIPTION = "This fragment is useful to constrain resource consumption when the Yocto default \ | ||
| 69 | is causing an overload of host machine's memory and CPU resources." | ||
| 70 | |||
| 71 | For now, our fragment does not have any additional configuration statement. | ||
| 72 | Let's add the following assignments to our fragment: | ||
| 73 | |||
| 74 | .. code-block:: | ||
| 75 | :caption: custom-fragment.conf (continued) | ||
| 76 | |||
| 77 | BB_NUMBER_THREADS = "4" | ||
| 78 | BB_NUMBER_PARSE_THREADS = "4" | ||
| 79 | |||
| 80 | This means that our fragment can be enabled to set a limit on the number of | ||
| 81 | threads :term:`BitBake` will use with the :term:`BB_NUMBER_THREADS` and | ||
| 82 | :term:`BB_NUMBER_PARSE_THREADS` variables. | ||
| 83 | |||
| 84 | For now, our fragment exists and is listed by the | ||
| 85 | :ref:`ref-bitbake-config-build-list-fragments` command, but is not enabled. To | ||
| 86 | enable this fragment, use the :ref:`ref-bitbake-config-build-enable-fragment` | ||
| 87 | command:: | ||
| 88 | |||
| 89 | bitbake-config-build enable-fragment meta-custom/custom-fragment | ||
| 90 | |||
| 91 | .. note:: | ||
| 92 | |||
| 93 | The ``meta-custom`` prefix in the above command depends on the name of your | ||
| 94 | layer. This name is defined by the :term:`BBFILE_COLLECTIONS` variable in | ||
| 95 | the ``conf/layer.conf`` file of your layer. | ||
| 96 | |||
| 97 | Standard Configuration fragments can be organized in a more complex way. For | ||
| 98 | example, it's possible to create sub-directories to organize your fragments:: | ||
| 99 | |||
| 100 | meta-custom | ||
| 101 | ├── conf | ||
| 102 | │ ├── fragments | ||
| 103 | │ │ ├── networking | ||
| 104 | │ │ │ └── mirrors.conf | ||
| 105 | │ │ └── resources | ||
| 106 | │ │ └── numberthreads.conf | ||
| 107 | │ └── layer.conf | ||
| 108 | ... | ||
| 109 | |||
| 110 | In the above example, the ``meta-custom/networking/mirrors`` and | ||
| 111 | ``meta-custom/resources/numberthreads`` fragments will be available in your | ||
| 112 | build. | ||
| 113 | |||
| 114 | Creating A Built-in Fragment | ||
| 115 | ============================ | ||
| 116 | |||
| 117 | Within the :term:`OpenEmbedded Build System`, Built-in Fragments are defined | ||
| 118 | with the :term:`OE_FRAGMENTS_BUILTIN` variable, which is passed as a | ||
| 119 | parameter in an :ref:`addfragments <bitbake-user-manual/bitbake-user-manual-metadata:\`\`addfragments\`\` | ||
| 120 | directive>` directive in :oe_git:`bitbake.conf </openembedded-core/tree/meta/conf/bitbake.conf>`. | ||
| 121 | |||
| 122 | Adding new :term:`Built-in Fragments <Built-in Fragment>` can be done by | ||
| 123 | appending the :term:`OE_FRAGMENTS_BUILTIN` variable from your :term:`layer` | ||
| 124 | configuration file: | ||
| 125 | |||
| 126 | .. code-block:: | ||
| 127 | :caption: layer.conf | ||
| 128 | |||
| 129 | OE_FRAGMENTS_BUILTIN:append = " custom-builtin-fragment:CUSTOM_VARIABLE" | ||
| 130 | |||
| 131 | .. warning:: | ||
| 132 | |||
| 133 | Make sure to use the ``:append`` override in the above assignment, as using | ||
| 134 | ``+=`` can lead to unexpected behavior. | ||
| 135 | |||
| 136 | .. warning:: | ||
| 137 | |||
| 138 | Due to the way :term:`BitBake` parses files, it is not possible to modify | ||
| 139 | :term:`OE_FRAGMENTS_BUILTIN` from any kind of :term:`configuration file`. | ||
| 140 | Setting it from the :term:`layer` configuration file (``conf/layer.conf``) is | ||
| 141 | the retained solution to create new built-in fragments. | ||
| 142 | |||
| 143 | You can then use the :ref:`ref-bitbake-config-build-enable-fragment` command to | ||
| 144 | set a value to the ``CUSTOM_VARIABLE`` variable:: | ||
| 145 | |||
| 146 | bitbake-config-build enable-fragment custom-builtin-fragment/somevalue | ||
diff --git a/documentation/dev-manual/index.rst b/documentation/dev-manual/index.rst index ea528855a8..7a581236a9 100644 --- a/documentation/dev-manual/index.rst +++ b/documentation/dev-manual/index.rst | |||
| @@ -16,6 +16,7 @@ Yocto Project Development Tasks Manual | |||
| 16 | new-machine | 16 | new-machine |
| 17 | upgrading-recipes | 17 | upgrading-recipes |
| 18 | temporary-source-code | 18 | temporary-source-code |
| 19 | creating-fragments | ||
| 19 | quilt.rst | 20 | quilt.rst |
| 20 | development-shell | 21 | development-shell |
| 21 | python-development-shell | 22 | python-development-shell |
diff --git a/documentation/ref-manual/fragments.rst b/documentation/ref-manual/fragments.rst new file mode 100644 index 0000000000..c0118876c8 --- /dev/null +++ b/documentation/ref-manual/fragments.rst | |||
| @@ -0,0 +1,258 @@ | |||
| 1 | .. SPDX-License-Identifier: CC-BY-SA-2.0-UK | ||
| 2 | |||
| 3 | ***************************** | ||
| 4 | Using Configuration Fragments | ||
| 5 | ***************************** | ||
| 6 | |||
| 7 | :term:`Configuration Fragments <Configuration Fragment>` define top level build | ||
| 8 | configuration features that can be independently enabled and disabled using | ||
| 9 | standard tooling. Such features are made of one or several build configuration | ||
| 10 | statements that are either contained in a fragment file, or are set indirectly | ||
| 11 | using the :term:`Built-in Fragment` mechanism. | ||
| 12 | |||
| 13 | This document provides a quick reference of the :oe_git:`bitbake-config-build | ||
| 14 | </bitbake/tree/bin/bitbake-config-build>` tool and lists the | ||
| 15 | :term:`Configuration Fragments <Configuration Fragment>` and :term:`Built-in | ||
| 16 | Fragments <Built-in Fragment>` available in the :term:`OpenEmbedded Build | ||
| 17 | System` core repositories. | ||
| 18 | |||
| 19 | .. note:: | ||
| 20 | |||
| 21 | For details on how to define new fragments in your build, see the | ||
| 22 | :doc:`/dev-manual/creating-fragments` section of the Yocto Project Development | ||
| 23 | Tasks Manual. | ||
| 24 | |||
| 25 | ``bitbake-config-build`` Quick Reference | ||
| 26 | ======================================== | ||
| 27 | |||
| 28 | :term:`Configuration Fragments <Configuration Fragment>` are managed with the | ||
| 29 | :oe_git:`bitbake-config-build </bitbake/tree/bin/bitbake-config-build>` | ||
| 30 | command-line tool, which is available after :ref:`dev-manual/start:Initializing | ||
| 31 | the Build Environment`. | ||
| 32 | |||
| 33 | The ``bitbake-config-build`` command-line tool uses sub-commands to manage | ||
| 34 | fragments, which are detailed in the sections below. For each sub-command, the | ||
| 35 | ``--help`` flag can be passed to get more information on the sub-command. | ||
| 36 | |||
| 37 | .. _ref-bitbake-config-build-list-fragments: | ||
| 38 | |||
| 39 | ``bitbake-config-build list-fragments`` | ||
| 40 | --------------------------------------- | ||
| 41 | |||
| 42 | The :ref:`ref-bitbake-config-build-list-fragments` command will list the :term:`Built-in | ||
| 43 | Fragments <Built-in Fragment>` and :term:`Configuration Fragments <Configuration | ||
| 44 | Fragment>` that are currently available, and will also print which fragments are | ||
| 45 | enabled or disabled. | ||
| 46 | |||
| 47 | .. _ref-bitbake-config-build-show-fragment: | ||
| 48 | |||
| 49 | ``bitbake-config-build show-fragment`` | ||
| 50 | -------------------------------------- | ||
| 51 | |||
| 52 | The :ref:`ref-bitbake-config-build-show-fragment` command is used to show the | ||
| 53 | location and value of a fragment. For example, running ``bitbake-config-build | ||
| 54 | show-fragment core/yocto/sstate-mirror-cdn`` will show the content of the | ||
| 55 | :ref:`ref-fragments-core-yocto-sstate-mirror-cdn` fragment. | ||
| 56 | |||
| 57 | .. _ref-bitbake-config-build-enable-fragment: | ||
| 58 | |||
| 59 | ``bitbake-config-build enable-fragment`` | ||
| 60 | ---------------------------------------- | ||
| 61 | |||
| 62 | The :ref:`ref-bitbake-config-build-enable-fragment` command is used to enable a | ||
| 63 | fragment. When a fragment is enabled, the configuration variables of this | ||
| 64 | fragment are parsed by :term:`BitBake` and their values are available globally | ||
| 65 | in your build. | ||
| 66 | |||
| 67 | From the list obtained with the :ref:`ref-bitbake-config-build-list-fragments` | ||
| 68 | command, you can determine which fragments can be enabled for your build. | ||
| 69 | |||
| 70 | For example, the following command would enable the | ||
| 71 | :ref:`ref-fragments-core-yocto-sstate-mirror-cdn` fragment:: | ||
| 72 | |||
| 73 | bitbake-config-build enable-fragment core/yocto/sstate-mirror-cdn | ||
| 74 | |||
| 75 | .. note:: | ||
| 76 | |||
| 77 | Multiple fragments can be enabled at once with the same command:: | ||
| 78 | |||
| 79 | bitbake-config-build enable-fragment <fragment1> <fragment2> ... | ||
| 80 | |||
| 81 | :term:`Built-in fragments <Built-in Fragment>` are enabled the same way, and | ||
| 82 | their values are defined from the command-line directly. For example, the | ||
| 83 | following command sets the ``qemuarm64`` :term:`MACHINE` through the | ||
| 84 | :ref:`ref-fragments-builtin-core-machine` fragment:: | ||
| 85 | |||
| 86 | bitbake-config-build enable-fragment machine/qemuarm64 | ||
| 87 | |||
| 88 | This fragment can be overridden from the command-line by setting it to another | ||
| 89 | value, for example:: | ||
| 90 | |||
| 91 | bitbake-config-build enable-fragment machine/qemux86-64 | ||
| 92 | |||
| 93 | Note that in this case, the fragment will be defined twice in | ||
| 94 | :term:`OE_FRAGMENTS`, and the last value is taken into account: | ||
| 95 | |||
| 96 | .. code-block:: | ||
| 97 | :caption: build/conf/auto.conf | ||
| 98 | |||
| 99 | OE_FRAGMENTS += " ... machine/qemuarm64 machine/qemux86-64" | ||
| 100 | |||
| 101 | In the above example, the value of :term:`MACHINE` is thus equal to | ||
| 102 | ``qemux86-64``. | ||
| 103 | |||
| 104 | When a fragment is enabled with :ref:`ref-bitbake-config-build-enable-fragment`, | ||
| 105 | its name is automatically appended to the :term:`OE_FRAGMENTS` variable in | ||
| 106 | :ref:`structure-build-conf-auto.conf`. | ||
| 107 | |||
| 108 | .. note:: | ||
| 109 | |||
| 110 | It is also possible to manually remove or add fragments by modifying the | ||
| 111 | :term:`OE_FRAGMENTS` variable in a configuration file such as | ||
| 112 | :ref:`structure-build-conf-local.conf`. | ||
| 113 | |||
| 114 | .. _ref-bitbake-config-build-disable-fragment: | ||
| 115 | |||
| 116 | ``bitbake-config-build disable-fragment`` | ||
| 117 | ----------------------------------------- | ||
| 118 | |||
| 119 | Any fragment enabled with the :ref:`ref-bitbake-config-build-enable-fragment` | ||
| 120 | command can be disabled with the :ref:`ref-bitbake-config-build-disable-fragment` | ||
| 121 | command. The list of enabled fragments can be obtained with | ||
| 122 | :ref:`ref-bitbake-config-build-list-fragments`. | ||
| 123 | |||
| 124 | For example, the following command disables the | ||
| 125 | :ref:`ref-fragments-core-yocto-sstate-mirror-cdn` fragment:: | ||
| 126 | |||
| 127 | bitbake-config-build disable-fragment core/yocto/sstate-mirror-cdn | ||
| 128 | |||
| 129 | Likewise, :term:`Built-in Fragments <Built-in Fragment>` are disabled the | ||
| 130 | same way. For example, this would disable the ``machine/qemuarm64`` fragment:: | ||
| 131 | |||
| 132 | bitbake-config-build disable-fragment machine/qemuarm64 | ||
| 133 | |||
| 134 | .. note:: | ||
| 135 | |||
| 136 | Multiple fragments can be disabled at once with the same command:: | ||
| 137 | |||
| 138 | bitbake-config-build disable-fragment <fragment1> <fragment2> | ||
| 139 | |||
| 140 | .. _ref-bitbake-config-build-disable-all-fragments: | ||
| 141 | |||
| 142 | ``bitbake-config-build disable-all-fragments`` | ||
| 143 | ---------------------------------------------- | ||
| 144 | |||
| 145 | The :ref:`ref-bitbake-config-build-disable-all-fragments` command disables all of the | ||
| 146 | currently enabled fragments. The list of enabled fragments can be obtained with | ||
| 147 | :ref:`ref-bitbake-config-build-list-fragments`. | ||
| 148 | |||
| 149 | This command is run without arguments:: | ||
| 150 | |||
| 151 | bitbake-config-build disable-all-fragments | ||
| 152 | |||
| 153 | Core Fragments | ||
| 154 | ============== | ||
| 155 | |||
| 156 | Core Built-in Fragments | ||
| 157 | ----------------------- | ||
| 158 | |||
| 159 | :term:`Built-in Fragments <Built-in Fragment>` are used to assign a single | ||
| 160 | variable globally. The :term:`OpenEmbedded Build System` defines multiple | ||
| 161 | built-in fragments that are detailed in this section. | ||
| 162 | |||
| 163 | .. _ref-fragments-builtin-core-machine: | ||
| 164 | |||
| 165 | ``machine/`` | ||
| 166 | ~~~~~~~~~~~~ | ||
| 167 | |||
| 168 | The ``machine/`` :term:`built-in fragment` can be used to assign the value of | ||
| 169 | the :term:`MACHINE` variable globally. | ||
| 170 | |||
| 171 | .. _ref-fragments-builtin-core-distro: | ||
| 172 | |||
| 173 | ``distro/`` | ||
| 174 | ~~~~~~~~~~~ | ||
| 175 | |||
| 176 | The ``distro/`` :term:`built-in fragment` can be used to assign the value of | ||
| 177 | the :term:`DISTRO` variable globally. | ||
| 178 | |||
| 179 | Core Configuration Fragments | ||
| 180 | ---------------------------- | ||
| 181 | |||
| 182 | Yocto Project Fragments | ||
| 183 | ~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 184 | |||
| 185 | This group defines fragments related to the Yocto Project infrastructure in | ||
| 186 | general. | ||
| 187 | |||
| 188 | .. _ref-fragments-core-yocto-sstate-mirror-cdn: | ||
| 189 | |||
| 190 | ``core/yocto/sstate-mirror-cdn`` | ||
| 191 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 192 | |||
| 193 | The ``core/yocto/sstate-mirror-cdn`` :term:`configuration fragment` can be used | ||
| 194 | to set up :term:`BB_HASHSERVE_UPSTREAM` and :term:`SSTATE_MIRRORS` to use | ||
| 195 | pre-built :ref:`shared state cache <overview-manual/concepts:shared state | ||
| 196 | cache>` artifacts for standard Yocto build configurations. | ||
| 197 | |||
| 198 | This will mean the build will query the Yocto Project mirrors to check for | ||
| 199 | artifacts at the start of builds, which does slow it down initially but it will | ||
| 200 | then speed up the builds by not having to build things if they are present in | ||
| 201 | the cache. It assumes you can download something faster than you can build it | ||
| 202 | which will depend on your network configuration. | ||
| 203 | |||
| 204 | Yocto Project Autobuilder Fragments | ||
| 205 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 206 | |||
| 207 | This group defines fragment used for the Yocto Project Autobuilder. For details, | ||
| 208 | see the :ref:`test-manual/intro:Yocto Project Autobuilder Overview` section of | ||
| 209 | the Yocto Project Test Environment Manual. | ||
| 210 | |||
| 211 | .. _ref-fragment-core-yocto-autobuilder-autobuilder: | ||
| 212 | |||
| 213 | ``core/yocto-autobuilder/autobuilder`` | ||
| 214 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 215 | |||
| 216 | The ``core/yocto-autobuilder/autobuilder`` fragment defines common variables | ||
| 217 | used in builds started by the Yocto Project Autobuilder. | ||
| 218 | |||
| 219 | .. _ref-fragment-core-yocto-autobuilder-autobuilder-resource-constraints: | ||
| 220 | |||
| 221 | ``core/yocto-autobuilder/autobuilder-resource-constraints`` | ||
| 222 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 223 | |||
| 224 | The ``core/yocto-autobuilder/autobuilder`` fragment defines variables for | ||
| 225 | limiting the resources used by the Yocto Project Autobuilder during builds. For | ||
| 226 | more details on how to limit resources, see the :doc:`/dev-manual/limiting-resources` | ||
| 227 | section of the Yocto Project Development Tasks Manual. | ||
| 228 | |||
| 229 | .. _ref-fragment-core-yocto-autobuilder-multilib-mips64-n32: | ||
| 230 | |||
| 231 | ``core/yocto-autobuilder/multilib-mips64-n32`` | ||
| 232 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 233 | |||
| 234 | The ``core/yocto-autobuilder/multilib-mips64-n32`` fragment enables | ||
| 235 | tri-architecture :ref:`multilib <dev-manual/libraries:Combining Multiple | ||
| 236 | Versions of Library Files into One Image>` configurations for :wikipedia:`MIPS64 | ||
| 237 | <MIPS_architecture>` machines, which includes ``mips64-n32``, ``mips64``, and | ||
| 238 | ``mips32r2``. | ||
| 239 | |||
| 240 | .. _ref-fragment-core-yocto-autobuilder-multilib-x86-lib32: | ||
| 241 | |||
| 242 | ``core/yocto-autobuilder/multilib-x86-lib32`` | ||
| 243 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 244 | |||
| 245 | The ``core/yocto-autobuilder/multilib-x86-lib32`` fragment enables | ||
| 246 | :ref:`multilib <dev-manual/libraries:Combining Multiple Versions of Library | ||
| 247 | Files into One Image>` configurations for supporting 32-bit libraries on 64-bit | ||
| 248 | :wikipedia:`X86 <X86>` builds. | ||
| 249 | |||
| 250 | .. _ref-fragment-core-yocto-autobuilder-multilib-x86-lib64: | ||
| 251 | |||
| 252 | ``core/yocto-autobuilder/multilib-x86-lib64`` | ||
| 253 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 254 | |||
| 255 | The ``core/yocto-autobuilder/multilib-x86-lib64`` fragment enables | ||
| 256 | :ref:`multilib <dev-manual/libraries:Combining Multiple Versions of Library | ||
| 257 | Files into One Image>` configurations for supporting 64-bit libraries on 32-bit | ||
| 258 | :wikipedia:`X86 <X86>` builds. | ||
diff --git a/documentation/ref-manual/index.rst b/documentation/ref-manual/index.rst index 53fa98cc99..aa1a63e050 100644 --- a/documentation/ref-manual/index.rst +++ b/documentation/ref-manual/index.rst | |||
| @@ -17,6 +17,7 @@ Yocto Project Reference Manual | |||
| 17 | structure | 17 | structure |
| 18 | classes | 18 | classes |
| 19 | tasks | 19 | tasks |
| 20 | fragments | ||
| 20 | devtool-reference | 21 | devtool-reference |
| 21 | kickstart | 22 | kickstart |
| 22 | qa-checks | 23 | qa-checks |
diff --git a/documentation/ref-manual/terms.rst b/documentation/ref-manual/terms.rst index f3d3d059d1..e25c714d9b 100644 --- a/documentation/ref-manual/terms.rst +++ b/documentation/ref-manual/terms.rst | |||
| @@ -131,6 +131,53 @@ universal, the list includes them just in case: | |||
| 131 | A variant of :term:`buildtools`, just providing the required | 131 | A variant of :term:`buildtools`, just providing the required |
| 132 | version of ``make`` to run the OpenEmbedded build system. | 132 | version of ``make`` to run the OpenEmbedded build system. |
| 133 | 133 | ||
| 134 | :term:`Built-in Fragment` | ||
| 135 | A built-in fragment is a specific kind of :term:`Configuration Fragment` | ||
| 136 | that affects the value of a single variable globally. :term:`Built-in | ||
| 137 | Fragments <Built-in Fragment>` do not require a separate configuration | ||
| 138 | file, but like a standard :term:`Configuration Fragment`, Built-in | ||
| 139 | Fragments can be enabled or disabled using the :oe_git:`bitbake-config-build | ||
| 140 | </bitbake/tree/bin/bitbake-config-build>` command-line utility. | ||
| 141 | |||
| 142 | When declared, a built-in fragment follows the following naming | ||
| 143 | convention:: | ||
| 144 | |||
| 145 | <fragment>:<variable name> | ||
| 146 | |||
| 147 | Where: | ||
| 148 | |||
| 149 | - ``<fragment>`` is the name of the built-in fragment. | ||
| 150 | - ``<variable name>`` is the name of the variable to be modified by this | ||
| 151 | fragment. | ||
| 152 | |||
| 153 | For example:: | ||
| 154 | |||
| 155 | machine:MACHINE | ||
| 156 | |||
| 157 | Will setup the ``machine`` Built-in Fragment for modifying the value of | ||
| 158 | the :term:`MACHINE` variable. | ||
| 159 | |||
| 160 | Setting the :term:`MACHINE` variable through this fragment must follow | ||
| 161 | this syntax:: | ||
| 162 | |||
| 163 | machine/qemux86-64 | ||
| 164 | |||
| 165 | This sets the value of :term:`MACHINE` to ``qemux86-64``. | ||
| 166 | |||
| 167 | In :term:`OpenEmbedded-Core (OE-Core)`, the list of available | ||
| 168 | :term:`Built-in Fragments <Built-in Fragment>` can be obtained from the | ||
| 169 | :term:`OE_FRAGMENTS_BUILTIN` variable. | ||
| 170 | |||
| 171 | For more details on fragments, see: | ||
| 172 | |||
| 173 | - The :doc:`/ref-manual/fragments` section of the Yocto Project Reference | ||
| 174 | Manual for a list of fragments the :term:`OpenEmbedded Build System` | ||
| 175 | supports, and a quick reference guide on how to manage fragments. | ||
| 176 | |||
| 177 | - The :doc:`/dev-manual/creating-fragments` section of the Yocto Project | ||
| 178 | Development Tasks Manual for details on how to create new fragments | ||
| 179 | in your build. | ||
| 180 | |||
| 134 | :term:`Classes` | 181 | :term:`Classes` |
| 135 | Files that provide for logic encapsulation and inheritance so that | 182 | Files that provide for logic encapsulation and inheritance so that |
| 136 | commonly used patterns can be defined once and then easily used in | 183 | commonly used patterns can be defined once and then easily used in |
| @@ -154,6 +201,51 @@ universal, the list includes them just in case: | |||
| 154 | only used when building for that target (e.g. the | 201 | only used when building for that target (e.g. the |
| 155 | :file:`machine/beaglebone.conf` configuration file defines variables for | 202 | :file:`machine/beaglebone.conf` configuration file defines variables for |
| 156 | the Texas Instruments ARM Cortex-A8 development board). | 203 | the Texas Instruments ARM Cortex-A8 development board). |
| 204 | :term:`Configuration Fragments <Configuration Fragment>` such as | ||
| 205 | :ref:`ref-fragments-core-yocto-sstate-mirror-cdn` define snippets of | ||
| 206 | configuration that can be enabled from the command-line. | ||
| 207 | |||
| 208 | :term:`Configuration Fragment` | ||
| 209 | A :term:`Configuration Fragment` (also called Standard :term:`Configuration | ||
| 210 | Fragment`) is a :term:`configuration file` that contains configuration | ||
| 211 | statements such as variable assignments, affecting the build at a | ||
| 212 | global-level when the fragment is enabled. By default, configuration | ||
| 213 | fragments are located in the :file:`conf/fragments/` directory of a | ||
| 214 | :term:`Layer`. | ||
| 215 | |||
| 216 | .. note:: | ||
| 217 | |||
| 218 | Another form of fragment not to be confounded with Standard | ||
| 219 | :term:`Configuration Fragments <Configuration Fragment>` are | ||
| 220 | :term:`Built-in Fragments <Built-in Fragment>` which are used to assign | ||
| 221 | a single variable value globally. | ||
| 222 | |||
| 223 | A fragment :term:`configuration file` must contain a summary | ||
| 224 | (:term:`BB_CONF_FRAGMENT_SUMMARY`) and a description | ||
| 225 | (:term:`BB_CONF_FRAGMENT_DESCRIPTION`) explaining the purpose of the | ||
| 226 | fragment. | ||
| 227 | |||
| 228 | In :term:`OpenEmbedded-Core (OE-Core)`, the location of fragments and what | ||
| 229 | variables are required in a fragment is specified in :oe_git:`bitbake.conf | ||
| 230 | </openembedded-core/tree/meta/conf/bitbake.conf>` thanks to the | ||
| 231 | :ref:`addfragments <bitbake-user-manual/bitbake-user-manual-metadata:\`\`addfragments\`\` | ||
| 232 | directive>` directive and the :term:`OE_FRAGMENTS`, | ||
| 233 | :term:`OE_FRAGMENTS_METADATA_VARS` and :term:`OE_FRAGMENTS_BUILTIN` | ||
| 234 | variables. | ||
| 235 | |||
| 236 | Fragments can be listed, enabled and disabled with the | ||
| 237 | :oe_git:`bitbake-config-build </bitbake/tree/bin/bitbake-config-build>` | ||
| 238 | command-line utility. | ||
| 239 | |||
| 240 | For more details on fragments, see: | ||
| 241 | |||
| 242 | - The :doc:`/ref-manual/fragments` section of the Yocto Project Reference | ||
| 243 | Manual for a list of fragments the :term:`OpenEmbedded Build System` | ||
| 244 | supports, and a quick reference guide on how to manage fragments. | ||
| 245 | |||
| 246 | - The :doc:`/dev-manual/creating-fragments` section of the Yocto Project | ||
| 247 | Development Tasks Manual for details on how to create new fragments | ||
| 248 | in your build. | ||
| 157 | 249 | ||
| 158 | :term:`Container Layer` | 250 | :term:`Container Layer` |
| 159 | A flexible definition that typically refers to a single Git checkout | 251 | A flexible definition that typically refers to a single Git checkout |
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 2f9f1a9d80..aefe598a56 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst | |||
| @@ -397,6 +397,18 @@ system and gives an overview of their function and contents. | |||
| 397 | :term:`BB_CHECK_SSL_CERTS` | 397 | :term:`BB_CHECK_SSL_CERTS` |
| 398 | See :term:`bitbake:BB_CHECK_SSL_CERTS` in the BitBake manual. | 398 | See :term:`bitbake:BB_CHECK_SSL_CERTS` in the BitBake manual. |
| 399 | 399 | ||
| 400 | :term:`BB_CONF_FRAGMENT_DESCRIPTION` | ||
| 401 | The :term:`BB_CONF_FRAGMENT_DESCRIPTION` variable defines the textual | ||
| 402 | description of a :term:`Configuration Fragment`. For details on how to use | ||
| 403 | fragments, see the :doc:`/ref-manual/fragments` section of the Yocto | ||
| 404 | Project Reference Manual. | ||
| 405 | |||
| 406 | :term:`BB_CONF_FRAGMENT_SUMMARY` | ||
| 407 | The :term:`BB_CONF_FRAGMENT_SUMMARY` variable defines the one-line textual | ||
| 408 | summary of a :term:`Configuration Fragment`. For details on how to use | ||
| 409 | fragments, see the :doc:`/ref-manual/fragments` section of the Yocto | ||
| 410 | Project Reference Manual. | ||
| 411 | |||
| 400 | :term:`BB_CONSOLELOG` | 412 | :term:`BB_CONSOLELOG` |
| 401 | See :term:`bitbake:BB_CONSOLELOG` in the BitBake manual. | 413 | See :term:`bitbake:BB_CONSOLELOG` in the BitBake manual. |
| 402 | 414 | ||
| @@ -6230,6 +6242,33 @@ system and gives an overview of their function and contents. | |||
| 6230 | :term:`Source Directory` for details on how this class | 6242 | :term:`Source Directory` for details on how this class |
| 6231 | applies these additional sed command arguments. | 6243 | applies these additional sed command arguments. |
| 6232 | 6244 | ||
| 6245 | :term:`OE_FRAGMENTS` | ||
| 6246 | The :term:`OE_FRAGMENTS` variable holds the list of :term:`Configuration | ||
| 6247 | Fragments <Configuration Fragment>` currently enabled for the build. For | ||
| 6248 | details on how to use fragments, see the :doc:`/ref-manual/fragments` | ||
| 6249 | section of the Yocto Project Reference Manual. | ||
| 6250 | |||
| 6251 | :term:`OE_FRAGMENTS_BUILTIN` | ||
| 6252 | The :term:`OE_FRAGMENTS_BUILTIN` variable holds the list of | ||
| 6253 | :term:`Built-in Fragments <Built-in Fragment>` available for being set with | ||
| 6254 | :oe_git:`bitbake-config-build </bitbake/tree/bin/bitbake-config-build>`. | ||
| 6255 | For details on how to use fragments, see the :doc:`/ref-manual/fragments` | ||
| 6256 | section of the Yocto Project Reference Manual. | ||
| 6257 | |||
| 6258 | :term:`OE_FRAGMENTS_METADATA_VARS` | ||
| 6259 | The :term:`OE_FRAGMENTS_METADATA_VARS` variable holds the list of | ||
| 6260 | variables that are required to set in a standard :term:`Configuration | ||
| 6261 | Fragment` file. In :term:`OpenEmbedded-Core (OE-Core)`, these variables | ||
| 6262 | are :term:`BB_CONF_FRAGMENT_SUMMARY` and | ||
| 6263 | :term:`BB_CONF_FRAGMENT_DESCRIPTION`. | ||
| 6264 | |||
| 6265 | :term:`OE_FRAGMENTS_PREFIX` | ||
| 6266 | The :term:`OE_FRAGMENTS_PREFIX` variable defines the prefix where | ||
| 6267 | :term:`BitBake` tries to locate :term:`Configuration Fragments | ||
| 6268 | <Configuration Fragment>` in :term:`layers <Layer>`. For details on how to | ||
| 6269 | use fragments, see the :doc:`/ref-manual/fragments` section of the Yocto | ||
| 6270 | Project Reference Manual. | ||
| 6271 | |||
| 6233 | :term:`OE_INIT_ENV_SCRIPT` | 6272 | :term:`OE_INIT_ENV_SCRIPT` |
| 6234 | The name of the build environment setup script for the purposes of | 6273 | The name of the build environment setup script for the purposes of |
| 6235 | setting up the environment within the extensible SDK. The default | 6274 | setting up the environment within the extensible SDK. The default |
