diff options
Diffstat (limited to 'documentation/ref-manual/structure.rst')
-rw-r--r-- | documentation/ref-manual/structure.rst | 231 |
1 files changed, 114 insertions, 117 deletions
diff --git a/documentation/ref-manual/structure.rst b/documentation/ref-manual/structure.rst index ad3f4ab44a..e4d8b54bb9 100644 --- a/documentation/ref-manual/structure.rst +++ b/documentation/ref-manual/structure.rst | |||
@@ -38,7 +38,7 @@ usually matches the current stable BitBake release from the BitBake | |||
38 | project. BitBake, a :term:`Metadata` interpreter, reads the | 38 | project. BitBake, a :term:`Metadata` interpreter, reads the |
39 | Yocto Project Metadata and runs the tasks defined by that data. Failures | 39 | Yocto Project Metadata and runs the tasks defined by that data. Failures |
40 | are usually caused by errors in your Metadata and not from BitBake | 40 | are usually caused by errors in your Metadata and not from BitBake |
41 | itself; consequently, most users do not need to worry about BitBake. | 41 | itself. |
42 | 42 | ||
43 | When you run the ``bitbake`` command, the main BitBake executable (which | 43 | When you run the ``bitbake`` command, the main BitBake executable (which |
44 | resides in the ``bitbake/bin/`` directory) starts. Sourcing the | 44 | resides in the ``bitbake/bin/`` directory) starts. Sourcing the |
@@ -57,9 +57,8 @@ For more information on BitBake, see the :doc:`BitBake User Manual | |||
57 | This directory contains user configuration files and the output | 57 | This directory contains user configuration files and the output |
58 | generated by the OpenEmbedded build system in its standard configuration | 58 | generated by the OpenEmbedded build system in its standard configuration |
59 | where the source tree is combined with the output. The :term:`Build Directory` | 59 | where the source tree is combined with the output. The :term:`Build Directory` |
60 | is created initially when you ``source`` | 60 | is created initially when you ``source`` the OpenEmbedded build environment |
61 | the OpenEmbedded build environment setup script (i.e. | 61 | setup script (i.e. :ref:`structure-core-script`). |
62 | :ref:`structure-core-script`). | ||
63 | 62 | ||
64 | It is also possible to place output and configuration files in a | 63 | It is also possible to place output and configuration files in a |
65 | directory separate from the :term:`Source Directory` by | 64 | directory separate from the :term:`Source Directory` by |
@@ -68,6 +67,9 @@ information on separating output from your local Source Directory files | |||
68 | (commonly described as an "out of tree" build), see the | 67 | (commonly described as an "out of tree" build), see the |
69 | ":ref:`structure-core-script`" section. | 68 | ":ref:`structure-core-script`" section. |
70 | 69 | ||
70 | See the ":ref:`The Build Directory --- build/ <structure-build>`" section for details | ||
71 | about the contents of the :term:`Build Directory`. | ||
72 | |||
71 | .. _handbook: | 73 | .. _handbook: |
72 | 74 | ||
73 | ``documentation/`` | 75 | ``documentation/`` |
@@ -150,11 +152,10 @@ BitBake commands. The script uses other scripts within the ``scripts`` | |||
150 | directory to do the bulk of the work. | 152 | directory to do the bulk of the work. |
151 | 153 | ||
152 | When you run this script, your Yocto Project environment is set up, a | 154 | When you run this script, your Yocto Project environment is set up, a |
153 | :term:`Build Directory` is created, your working | 155 | :term:`Build Directory` is created, your working directory becomes the |
154 | directory becomes the Build Directory, and you are presented with some | 156 | :term:`Build Directory`, and you are presented with some simple |
155 | simple suggestions as to what to do next, including a list of some | 157 | suggestions as to what to do next, including a list of some possible |
156 | possible targets to build. Here is an example: | 158 | targets to build. Here is an example:: |
157 | :: | ||
158 | 159 | ||
159 | $ source oe-init-build-env | 160 | $ source oe-init-build-env |
160 | 161 | ||
@@ -168,32 +169,33 @@ possible targets to build. Here is an example: | |||
168 | meta-toolchain | 169 | meta-toolchain |
169 | meta-ide-support | 170 | meta-ide-support |
170 | 171 | ||
171 | You can also run generated qemu images with a command like 'runqemu qemux86-64' | 172 | You can also run generated QEMU images with a command like 'runqemu qemux86-64' |
172 | 173 | ||
173 | The default output of the ``oe-init-build-env`` script is from the | 174 | The default output of the ``oe-init-build-env`` script is from the |
174 | ``conf-notes.txt`` file, which is found in the ``meta-poky`` directory | 175 | ``conf-summary.txt`` and ``conf-notes.txt`` files, which are found in the ``meta-poky`` directory |
175 | within the :term:`Source Directory`. If you design a | 176 | within the :term:`Source Directory`. If you design a |
176 | custom distribution, you can include your own version of this | 177 | custom distribution, you can include your own versions of these |
177 | configuration file to mention the targets defined by your distribution. | 178 | configuration files where you can provide a brief summary and detailed usage |
179 | notes, such as a list of the targets defined by your distribution. | ||
178 | See the | 180 | See the |
179 | ":ref:`dev-manual/common-tasks:creating a custom template configuration directory`" | 181 | ":ref:`dev-manual/custom-template-configuration-directory:creating a custom template configuration directory`" |
180 | section in the Yocto Project Development Tasks Manual for more | 182 | section in the Yocto Project Development Tasks Manual for more |
181 | information. | 183 | information. |
182 | 184 | ||
183 | By default, running this script without a Build Directory argument | 185 | By default, running this script without a :term:`Build Directory` argument |
184 | creates the ``build/`` directory in your current working directory. If | 186 | creates the ``build/`` directory in your current working directory. If |
185 | you provide a Build Directory argument when you ``source`` the script, | 187 | you provide a :term:`Build Directory` argument when you ``source`` the script, |
186 | you direct the OpenEmbedded build system to create a Build Directory of | 188 | you direct the OpenEmbedded build system to create a :term:`Build Directory` of |
187 | your choice. For example, the following command creates a Build | 189 | your choice. For example, the following command creates a |
188 | Directory named ``mybuilds/`` that is outside of the :term:`Source Directory`: | 190 | :term:`Build Directory` named ``mybuilds/`` that is outside of the |
189 | :: | 191 | :term:`Source Directory`:: |
190 | 192 | ||
191 | $ source oe-init-build-env ~/mybuilds | 193 | $ source oe-init-build-env ~/mybuilds |
192 | 194 | ||
193 | The OpenEmbedded build system uses the template configuration files, which | 195 | The OpenEmbedded build system uses the template configuration files, which |
194 | are found by default in the ``meta-poky/conf/`` directory in the Source | 196 | are found by default in the ``meta-poky/conf/templates/default`` directory in the Source |
195 | Directory. See the | 197 | Directory. See the |
196 | ":ref:`dev-manual/common-tasks:creating a custom template configuration directory`" | 198 | ":ref:`dev-manual/custom-template-configuration-directory:creating a custom template configuration directory`" |
197 | section in the Yocto Project Development Tasks Manual for more | 199 | section in the Yocto Project Development Tasks Manual for more |
198 | information. | 200 | information. |
199 | 201 | ||
@@ -215,14 +217,13 @@ These files are standard top-level files. | |||
215 | 217 | ||
216 | .. _structure-build: | 218 | .. _structure-build: |
217 | 219 | ||
218 | The Build Directory - ``build/`` | 220 | The Build Directory --- ``build/`` |
219 | ================================ | 221 | ================================== |
220 | 222 | ||
221 | The OpenEmbedded build system creates the :term:`Build Directory` | 223 | The OpenEmbedded build system creates the :term:`Build Directory` when you run |
222 | when you run the build environment setup | 224 | the build environment setup script :ref:`structure-core-script`. If you do not |
223 | script :ref:`structure-core-script`. If you do not give the Build | 225 | give the :term:`Build Directory` a specific name when you run the setup script, |
224 | Directory a specific name when you run the setup script, the name | 226 | the name defaults to ``build/``. |
225 | defaults to ``build/``. | ||
226 | 227 | ||
227 | For subsequent parsing and processing, the name of the Build directory | 228 | For subsequent parsing and processing, the name of the Build directory |
228 | is available via the :term:`TOPDIR` variable. | 229 | is available via the :term:`TOPDIR` variable. |
@@ -233,12 +234,24 @@ is available via the :term:`TOPDIR` variable. | |||
233 | ----------------------- | 234 | ----------------------- |
234 | 235 | ||
235 | The OpenEmbedded build system creates this directory when you enable | 236 | The OpenEmbedded build system creates this directory when you enable |
236 | build history via the ``buildhistory`` class file. The directory | 237 | build history via the :ref:`ref-classes-buildhistory` class file. The directory |
237 | organizes build information into image, packages, and SDK | 238 | organizes build information into image, packages, and SDK |
238 | subdirectories. For information on the build history feature, see the | 239 | subdirectories. For information on the build history feature, see the |
239 | ":ref:`dev-manual/common-tasks:maintaining build output quality`" | 240 | ":ref:`dev-manual/build-quality:maintaining build output quality`" |
240 | section in the Yocto Project Development Tasks Manual. | 241 | section in the Yocto Project Development Tasks Manual. |
241 | 242 | ||
243 | .. _structure-build-cache: | ||
244 | |||
245 | ``build/cache/`` | ||
246 | ---------------- | ||
247 | |||
248 | This directory contains several internal files used by the OpenEmbedded | ||
249 | build system. | ||
250 | |||
251 | It also contains ``sanity_info``, a text file keeping track of important | ||
252 | build information such as the values of :term:`TMPDIR`, :term:`SSTATE_DIR`, | ||
253 | as well as the name and version of the host distribution. | ||
254 | |||
242 | .. _structure-build-conf-local.conf: | 255 | .. _structure-build-conf-local.conf: |
243 | 256 | ||
244 | ``build/conf/local.conf`` | 257 | ``build/conf/local.conf`` |
@@ -253,9 +266,9 @@ variables are hard-coded for various reasons but such variables are | |||
253 | relatively rare. | 266 | relatively rare. |
254 | 267 | ||
255 | At a minimum, you would normally edit this file to select the target | 268 | At a minimum, you would normally edit this file to select the target |
256 | ``MACHINE``, which package types you wish to use | 269 | :term:`MACHINE`, which package types you wish to use |
257 | (:term:`PACKAGE_CLASSES`), and the location from | 270 | (:term:`PACKAGE_CLASSES`), and the location from |
258 | which you want to access downloaded files (``DL_DIR``). | 271 | which you want to access downloaded files (:term:`DL_DIR`). |
259 | 272 | ||
260 | If ``local.conf`` is not present when you start the build, the | 273 | If ``local.conf`` is not present when you start the build, the |
261 | OpenEmbedded build system creates it from ``local.conf.sample`` when you | 274 | OpenEmbedded build system creates it from ``local.conf.sample`` when you |
@@ -263,16 +276,15 @@ OpenEmbedded build system creates it from ``local.conf.sample`` when you | |||
263 | :ref:`structure-core-script`. | 276 | :ref:`structure-core-script`. |
264 | 277 | ||
265 | The source ``local.conf.sample`` file used depends on the | 278 | The source ``local.conf.sample`` file used depends on the |
266 | ``$TEMPLATECONF`` script variable, which defaults to ``meta-poky/conf/`` | 279 | :term:`TEMPLATECONF` script variable, which defaults to ``meta-poky/conf/templates/default`` |
267 | when you are building from the Yocto Project development environment, | 280 | when you are building from the Yocto Project development environment, |
268 | and to ``meta/conf/`` when you are building from the OpenEmbedded-Core | 281 | and to ``meta/conf/templates/default`` when you are building from the OpenEmbedded-Core |
269 | environment. Because the script variable points to the source of the | 282 | environment. Because the script variable points to the source of the |
270 | ``local.conf.sample`` file, this implies that you can configure your | 283 | ``local.conf.sample`` file, this implies that you can configure your |
271 | build environment from any layer by setting the variable in the | 284 | build environment from any layer by setting the variable in the |
272 | top-level build environment setup script as follows: | 285 | top-level build environment setup script as follows:: |
273 | :: | ||
274 | 286 | ||
275 | TEMPLATECONF=your_layer/conf | 287 | TEMPLATECONF=your_layer/conf/templates/your_template_name |
276 | 288 | ||
277 | Once the build process gets the sample | 289 | Once the build process gets the sample |
278 | file, it uses ``sed`` to substitute final | 290 | file, it uses ``sed`` to substitute final |
@@ -281,10 +293,10 @@ file, it uses ``sed`` to substitute final | |||
281 | 293 | ||
282 | .. note:: | 294 | .. note:: |
283 | 295 | ||
284 | You can see how the ``TEMPLATECONF`` variable is used by looking at the | 296 | You can see how the :term:`TEMPLATECONF` variable is used by looking at the |
285 | ``scripts/oe-setup-builddir``` script in the :term:`Source Directory`. | 297 | ``scripts/oe-setup-builddir`` script in the :term:`Source Directory`. |
286 | You can find the Yocto Project version of the ``local.conf.sample`` file in | 298 | You can find the Yocto Project version of the ``local.conf.sample`` file in |
287 | the ``meta-poky/conf`` directory. | 299 | the ``meta-poky/conf/templates/default`` directory. |
288 | 300 | ||
289 | .. _structure-build-conf-bblayers.conf: | 301 | .. _structure-build-conf-bblayers.conf: |
290 | 302 | ||
@@ -292,7 +304,7 @@ file, it uses ``sed`` to substitute final | |||
292 | ---------------------------- | 304 | ---------------------------- |
293 | 305 | ||
294 | This configuration file defines | 306 | This configuration file defines |
295 | :ref:`layers <dev-manual/common-tasks:understanding and creating layers>`, | 307 | :ref:`layers <dev-manual/layers:understanding and creating layers>`, |
296 | which are directory trees, traversed (or walked) by BitBake. The | 308 | which are directory trees, traversed (or walked) by BitBake. The |
297 | ``bblayers.conf`` file uses the :term:`BBLAYERS` | 309 | ``bblayers.conf`` file uses the :term:`BBLAYERS` |
298 | variable to list the layers BitBake tries to find. | 310 | variable to list the layers BitBake tries to find. |
@@ -303,35 +315,26 @@ you ``source`` the top-level build environment setup script (i.e. | |||
303 | :ref:`structure-core-script`). | 315 | :ref:`structure-core-script`). |
304 | 316 | ||
305 | As with the ``local.conf`` file, the source ``bblayers.conf.sample`` | 317 | As with the ``local.conf`` file, the source ``bblayers.conf.sample`` |
306 | file used depends on the ``$TEMPLATECONF`` script variable, which | 318 | file used depends on the :term:`TEMPLATECONF` script variable, which |
307 | defaults to ``meta-poky/conf/`` when you are building from the Yocto | 319 | defaults to ``meta-poky/conf/templates/default`` when you are building from the Yocto |
308 | Project development environment, and to ``meta/conf/`` when you are | 320 | Project development environment, and to ``meta/conf/templates/default`` when you are |
309 | building from the OpenEmbedded-Core environment. Because the script | 321 | building from the OpenEmbedded-Core environment. Because the script |
310 | variable points to the source of the ``bblayers.conf.sample`` file, this | 322 | variable points to the source of the ``bblayers.conf.sample`` file, this |
311 | implies that you can base your build from any layer by setting the | 323 | implies that you can base your build from any layer by setting the |
312 | variable in the top-level build environment setup script as follows: | 324 | variable in the top-level build environment setup script as follows:: |
313 | :: | ||
314 | 325 | ||
315 | TEMPLATECONF=your_layer/conf | 326 | TEMPLATECONF=your_layer/conf/templates/your_template_name |
316 | 327 | ||
317 | Once the build process gets the sample file, it uses ``sed`` to substitute final | 328 | Once the build process gets the sample file, it uses ``sed`` to substitute final |
318 | ``${``\ :term:`OEROOT`\ ``}`` values for all ``##OEROOT##`` values. | 329 | ``${``\ :term:`OEROOT`\ ``}`` values for all ``##OEROOT##`` values. |
319 | 330 | ||
320 | .. note:: | 331 | .. note:: |
321 | 332 | ||
322 | You can see how the ``TEMPLATECONF`` variable ``scripts/oe-setup-builddir`` | 333 | You can see how the :term:`TEMPLATECONF` variable is defined by the ``scripts/oe-setup-builddir`` |
323 | script in the :term:`Source Directory`. You can find the Yocto Project | 334 | script in the :term:`Source Directory`. You can find the Yocto Project |
324 | version of the ``bblayers.conf.sample`` file in the ``meta-poky/conf/`` | 335 | version of the ``bblayers.conf.sample`` file in the ``meta-poky/conf/templates/default`` |
325 | directory. | 336 | directory. |
326 | 337 | ||
327 | .. _structure-build-conf-sanity_info: | ||
328 | |||
329 | ``build/cache/sanity_info`` | ||
330 | --------------------------- | ||
331 | |||
332 | This file indicates the state of the sanity checks and is created during | ||
333 | the build. | ||
334 | |||
335 | .. _structure-build-downloads: | 338 | .. _structure-build-downloads: |
336 | 339 | ||
337 | ``build/downloads/`` | 340 | ``build/downloads/`` |
@@ -340,7 +343,7 @@ the build. | |||
340 | This directory contains downloaded upstream source tarballs. You can | 343 | This directory contains downloaded upstream source tarballs. You can |
341 | reuse the directory for multiple builds or move the directory to another | 344 | reuse the directory for multiple builds or move the directory to another |
342 | location. You can control the location of this directory through the | 345 | location. You can control the location of this directory through the |
343 | ``DL_DIR`` variable. | 346 | :term:`DL_DIR` variable. |
344 | 347 | ||
345 | .. _structure-build-sstate-cache: | 348 | .. _structure-build-sstate-cache: |
346 | 349 | ||
@@ -350,7 +353,7 @@ location. You can control the location of this directory through the | |||
350 | This directory contains the shared state cache. You can reuse the | 353 | This directory contains the shared state cache. You can reuse the |
351 | directory for multiple builds or move the directory to another location. | 354 | directory for multiple builds or move the directory to another location. |
352 | You can control the location of this directory through the | 355 | You can control the location of this directory through the |
353 | ``SSTATE_DIR`` variable. | 356 | :term:`SSTATE_DIR` variable. |
354 | 357 | ||
355 | .. _structure-build-tmp: | 358 | .. _structure-build-tmp: |
356 | 359 | ||
@@ -370,14 +373,15 @@ remove the ``build/sstate-cache`` directory. | |||
370 | .. _structure-build-tmp-buildstats: | 373 | .. _structure-build-tmp-buildstats: |
371 | 374 | ||
372 | ``build/tmp/buildstats/`` | 375 | ``build/tmp/buildstats/`` |
373 | ------------------------- | 376 | ~~~~~~~~~~~~~~~~~~~~~~~~~ |
374 | 377 | ||
375 | This directory stores the build statistics. | 378 | This directory stores the build statistics as generated by the |
379 | :ref:`ref-classes-buildstats` class. | ||
376 | 380 | ||
377 | .. _structure-build-tmp-cache: | 381 | .. _structure-build-tmp-cache: |
378 | 382 | ||
379 | ``build/tmp/cache/`` | 383 | ``build/tmp/cache/`` |
380 | -------------------- | 384 | ~~~~~~~~~~~~~~~~~~~~ |
381 | 385 | ||
382 | When BitBake parses the metadata (recipes and configuration files), it | 386 | When BitBake parses the metadata (recipes and configuration files), it |
383 | caches the results in ``build/tmp/cache/`` to speed up future builds. | 387 | caches the results in ``build/tmp/cache/`` to speed up future builds. |
@@ -393,7 +397,7 @@ cache is reused. If the file has changed, it is reparsed. | |||
393 | .. _structure-build-tmp-deploy: | 397 | .. _structure-build-tmp-deploy: |
394 | 398 | ||
395 | ``build/tmp/deploy/`` | 399 | ``build/tmp/deploy/`` |
396 | --------------------- | 400 | ~~~~~~~~~~~~~~~~~~~~~ |
397 | 401 | ||
398 | This directory contains any "end result" output from the OpenEmbedded | 402 | This directory contains any "end result" output from the OpenEmbedded |
399 | build process. The :term:`DEPLOY_DIR` variable points | 403 | build process. The :term:`DEPLOY_DIR` variable points |
@@ -406,7 +410,7 @@ Project Overview and Concepts Manual. | |||
406 | .. _structure-build-tmp-deploy-deb: | 410 | .. _structure-build-tmp-deploy-deb: |
407 | 411 | ||
408 | ``build/tmp/deploy/deb/`` | 412 | ``build/tmp/deploy/deb/`` |
409 | ------------------------- | 413 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
410 | 414 | ||
411 | This directory receives any ``.deb`` packages produced by the build | 415 | This directory receives any ``.deb`` packages produced by the build |
412 | process. The packages are sorted into feeds for different architecture | 416 | process. The packages are sorted into feeds for different architecture |
@@ -415,7 +419,7 @@ types. | |||
415 | .. _structure-build-tmp-deploy-rpm: | 419 | .. _structure-build-tmp-deploy-rpm: |
416 | 420 | ||
417 | ``build/tmp/deploy/rpm/`` | 421 | ``build/tmp/deploy/rpm/`` |
418 | ------------------------- | 422 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
419 | 423 | ||
420 | This directory receives any ``.rpm`` packages produced by the build | 424 | This directory receives any ``.rpm`` packages produced by the build |
421 | process. The packages are sorted into feeds for different architecture | 425 | process. The packages are sorted into feeds for different architecture |
@@ -424,27 +428,27 @@ types. | |||
424 | .. _structure-build-tmp-deploy-ipk: | 428 | .. _structure-build-tmp-deploy-ipk: |
425 | 429 | ||
426 | ``build/tmp/deploy/ipk/`` | 430 | ``build/tmp/deploy/ipk/`` |
427 | ------------------------- | 431 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
428 | 432 | ||
429 | This directory receives ``.ipk`` packages produced by the build process. | 433 | This directory receives ``.ipk`` packages produced by the build process. |
430 | 434 | ||
431 | .. _structure-build-tmp-deploy-licenses: | 435 | .. _structure-build-tmp-deploy-licenses: |
432 | 436 | ||
433 | ``build/tmp/deploy/licenses/`` | 437 | ``build/tmp/deploy/licenses/`` |
434 | ------------------------------ | 438 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
435 | 439 | ||
436 | This directory receives package licensing information. For example, the | 440 | This directory receives package licensing information. For example, the |
437 | directory contains sub-directories for ``bash``, ``busybox``, and | 441 | directory contains sub-directories for ``bash``, ``busybox``, and |
438 | ``glibc`` (among others) that in turn contain appropriate ``COPYING`` | 442 | ``glibc`` (among others) that in turn contain appropriate ``COPYING`` |
439 | license files with other licensing information. For information on | 443 | license files with other licensing information. For information on |
440 | licensing, see the | 444 | licensing, see the |
441 | ":ref:`dev-manual/common-tasks:maintaining open source license compliance during your product's lifecycle`" | 445 | ":ref:`dev-manual/licenses:maintaining open source license compliance during your product's lifecycle`" |
442 | section in the Yocto Project Development Tasks Manual. | 446 | section in the Yocto Project Development Tasks Manual. |
443 | 447 | ||
444 | .. _structure-build-tmp-deploy-images: | 448 | .. _structure-build-tmp-deploy-images: |
445 | 449 | ||
446 | ``build/tmp/deploy/images/`` | 450 | ``build/tmp/deploy/images/`` |
447 | ---------------------------- | 451 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
448 | 452 | ||
449 | This directory is populated with the basic output objects of the build | 453 | This directory is populated with the basic output objects of the build |
450 | (think of them as the "generated artifacts" of the build process), | 454 | (think of them as the "generated artifacts" of the build process), |
@@ -463,8 +467,7 @@ image again. | |||
463 | If you do accidentally delete files here, you will need to force them to | 467 | If you do accidentally delete files here, you will need to force them to |
464 | be re-created. In order to do that, you will need to know the target | 468 | be re-created. In order to do that, you will need to know the target |
465 | that produced them. For example, these commands rebuild and re-create | 469 | that produced them. For example, these commands rebuild and re-create |
466 | the kernel files: | 470 | the kernel files:: |
467 | :: | ||
468 | 471 | ||
469 | $ bitbake -c clean virtual/kernel | 472 | $ bitbake -c clean virtual/kernel |
470 | $ bitbake virtual/kernel | 473 | $ bitbake virtual/kernel |
@@ -472,7 +475,7 @@ the kernel files: | |||
472 | .. _structure-build-tmp-deploy-sdk: | 475 | .. _structure-build-tmp-deploy-sdk: |
473 | 476 | ||
474 | ``build/tmp/deploy/sdk/`` | 477 | ``build/tmp/deploy/sdk/`` |
475 | ------------------------- | 478 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
476 | 479 | ||
477 | The OpenEmbedded build system creates this directory to hold toolchain | 480 | The OpenEmbedded build system creates this directory to hold toolchain |
478 | installer scripts which, when executed, install the sysroot that matches | 481 | installer scripts which, when executed, install the sysroot that matches |
@@ -484,7 +487,7 @@ Software Development Kit (eSDK) manual. | |||
484 | .. _structure-build-tmp-sstate-control: | 487 | .. _structure-build-tmp-sstate-control: |
485 | 488 | ||
486 | ``build/tmp/sstate-control/`` | 489 | ``build/tmp/sstate-control/`` |
487 | ----------------------------- | 490 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
488 | 491 | ||
489 | The OpenEmbedded build system uses this directory for the shared state | 492 | The OpenEmbedded build system uses this directory for the shared state |
490 | manifest files. The shared state code uses these files to record the | 493 | manifest files. The shared state code uses these files to record the |
@@ -497,7 +500,7 @@ another. | |||
497 | .. _structure-build-tmp-sysroots-components: | 500 | .. _structure-build-tmp-sysroots-components: |
498 | 501 | ||
499 | ``build/tmp/sysroots-components/`` | 502 | ``build/tmp/sysroots-components/`` |
500 | ---------------------------------- | 503 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
501 | 504 | ||
502 | This directory is the location of the sysroot contents that the task | 505 | This directory is the location of the sysroot contents that the task |
503 | :ref:`ref-tasks-prepare_recipe_sysroot` | 506 | :ref:`ref-tasks-prepare_recipe_sysroot` |
@@ -512,11 +515,11 @@ should be automatic, and recipes should not directly reference | |||
512 | .. _structure-build-tmp-sysroots: | 515 | .. _structure-build-tmp-sysroots: |
513 | 516 | ||
514 | ``build/tmp/sysroots/`` | 517 | ``build/tmp/sysroots/`` |
515 | ----------------------- | 518 | ~~~~~~~~~~~~~~~~~~~~~~~ |
516 | 519 | ||
517 | Previous versions of the OpenEmbedded build system used to create a | 520 | Previous versions of the OpenEmbedded build system used to create a |
518 | global shared sysroot per machine along with a native sysroot. Beginning | 521 | global shared sysroot per machine along with a native sysroot. Since |
519 | with the 2.3 version of the Yocto Project, sysroots exist in | 522 | the 2.3 version of the Yocto Project, there are sysroots in |
520 | recipe-specific :term:`WORKDIR` directories. Thus, the | 523 | recipe-specific :term:`WORKDIR` directories. Thus, the |
521 | ``build/tmp/sysroots/`` directory is unused. | 524 | ``build/tmp/sysroots/`` directory is unused. |
522 | 525 | ||
@@ -530,13 +533,12 @@ recipe-specific :term:`WORKDIR` directories. Thus, the | |||
530 | .. _structure-build-tmp-stamps: | 533 | .. _structure-build-tmp-stamps: |
531 | 534 | ||
532 | ``build/tmp/stamps/`` | 535 | ``build/tmp/stamps/`` |
533 | --------------------- | 536 | ~~~~~~~~~~~~~~~~~~~~~ |
534 | 537 | ||
535 | This directory holds information that BitBake uses for accounting | 538 | This directory holds information that BitBake uses for accounting |
536 | purposes to track what tasks have run and when they have run. The | 539 | purposes to track what tasks have run and when they have run. The |
537 | directory is sub-divided by architecture, package name, and version. | 540 | directory is sub-divided by architecture, package name, and version. |
538 | Following is an example: | 541 | Here is an example:: |
539 | :: | ||
540 | 542 | ||
541 | stamps/all-poky-linux/distcc-config/1.0-r0.do_build-2fdd....2do | 543 | stamps/all-poky-linux/distcc-config/1.0-r0.do_build-2fdd....2do |
542 | 544 | ||
@@ -551,17 +553,17 @@ section in the Yocto Project Overview and Concepts Manual. | |||
551 | .. _structure-build-tmp-log: | 553 | .. _structure-build-tmp-log: |
552 | 554 | ||
553 | ``build/tmp/log/`` | 555 | ``build/tmp/log/`` |
554 | ------------------ | 556 | ~~~~~~~~~~~~~~~~~~ |
555 | 557 | ||
556 | This directory contains general logs that are not otherwise placed using | 558 | This directory contains general logs that are not otherwise placed using |
557 | the package's ``WORKDIR``. Examples of logs are the output from the | 559 | the package's :term:`WORKDIR`. Examples of logs are the output from the |
558 | ``do_check_pkg`` or ``do_distro_check`` tasks. Running a build does not | 560 | ``do_check_pkg`` or ``do_distro_check`` tasks. Running a build does not |
559 | necessarily mean this directory is created. | 561 | necessarily mean this directory is created. |
560 | 562 | ||
561 | .. _structure-build-tmp-work: | 563 | .. _structure-build-tmp-work: |
562 | 564 | ||
563 | ``build/tmp/work/`` | 565 | ``build/tmp/work/`` |
564 | ------------------- | 566 | ~~~~~~~~~~~~~~~~~~~ |
565 | 567 | ||
566 | This directory contains architecture-specific work sub-directories for | 568 | This directory contains architecture-specific work sub-directories for |
567 | packages built by BitBake. All tasks execute from the appropriate work | 569 | packages built by BitBake. All tasks execute from the appropriate work |
@@ -575,15 +577,15 @@ It is worth considering the structure of a typical work directory. As an | |||
575 | example, consider ``linux-yocto-kernel-3.0`` on the machine ``qemux86`` | 577 | example, consider ``linux-yocto-kernel-3.0`` on the machine ``qemux86`` |
576 | built within the Yocto Project. For this package, a work directory of | 578 | built within the Yocto Project. For this package, a work directory of |
577 | ``tmp/work/qemux86-poky-linux/linux-yocto/3.0+git1+<.....>``, referred | 579 | ``tmp/work/qemux86-poky-linux/linux-yocto/3.0+git1+<.....>``, referred |
578 | to as the ``WORKDIR``, is created. Within this directory, the source is | 580 | to as the :term:`WORKDIR`, is created. Within this directory, the source is |
579 | unpacked to ``linux-qemux86-standard-build`` and then patched by Quilt. | 581 | unpacked to ``linux-qemux86-standard-build`` and then patched by Quilt. |
580 | (See the ":ref:`dev-manual/common-tasks:using quilt in your workflow`" section in | 582 | (See the ":ref:`dev-manual/quilt:using quilt in your workflow`" section in |
581 | the Yocto Project Development Tasks Manual for more information.) Within | 583 | the Yocto Project Development Tasks Manual for more information.) Within |
582 | the ``linux-qemux86-standard-build`` directory, standard Quilt | 584 | the ``linux-qemux86-standard-build`` directory, standard Quilt |
583 | directories ``linux-3.0/patches`` and ``linux-3.0/.pc`` are created, and | 585 | directories ``linux-3.0/patches`` and ``linux-3.0/.pc`` are created, and |
584 | standard Quilt commands can be used. | 586 | standard Quilt commands can be used. |
585 | 587 | ||
586 | There are other directories generated within ``WORKDIR``. The most | 588 | There are other directories generated within :term:`WORKDIR`. The most |
587 | important directory is ``WORKDIR/temp/``, which has log files for each | 589 | important directory is ``WORKDIR/temp/``, which has log files for each |
588 | task (``log.do_*.pid``) and contains the scripts BitBake runs for each | 590 | task (``log.do_*.pid``) and contains the scripts BitBake runs for each |
589 | task (``run.do_*.pid``). The ``WORKDIR/image/`` directory is where "make | 591 | task (``run.do_*.pid``). The ``WORKDIR/image/`` directory is where "make |
@@ -593,9 +595,9 @@ install" places its output that is then split into sub-packages within | |||
593 | .. _structure-build-tmp-work-tunearch-recipename-version: | 595 | .. _structure-build-tmp-work-tunearch-recipename-version: |
594 | 596 | ||
595 | ``build/tmp/work/tunearch/recipename/version/`` | 597 | ``build/tmp/work/tunearch/recipename/version/`` |
596 | ----------------------------------------------- | 598 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
597 | 599 | ||
598 | The recipe work directory - ``${WORKDIR}``. | 600 | The recipe work directory --- ``${WORKDIR}``. |
599 | 601 | ||
600 | As described earlier in the | 602 | As described earlier in the |
601 | ":ref:`structure-build-tmp-sysroots`" section, | 603 | ":ref:`structure-build-tmp-sysroots`" section, |
@@ -607,7 +609,7 @@ constructed using the architecture of the given build (e.g. | |||
607 | name, and the version of the recipe (i.e. | 609 | name, and the version of the recipe (i.e. |
608 | :term:`PE`\ ``:``\ :term:`PV`\ ``-``\ :term:`PR`). | 610 | :term:`PE`\ ``:``\ :term:`PV`\ ``-``\ :term:`PR`). |
609 | 611 | ||
610 | A number of key subdirectories exist within each recipe work directory: | 612 | Here are key subdirectories within each recipe work directory: |
611 | 613 | ||
612 | - ``${WORKDIR}/temp``: Contains the log files of each task executed for | 614 | - ``${WORKDIR}/temp``: Contains the log files of each task executed for |
613 | this recipe, the "run" files for each executed task, which contain | 615 | this recipe, the "run" files for each executed task, which contain |
@@ -629,8 +631,8 @@ A number of key subdirectories exist within each recipe work directory: | |||
629 | split into individual packages. | 631 | split into individual packages. |
630 | 632 | ||
631 | - ``${WORKDIR}/packages-split``: Contains the output of the | 633 | - ``${WORKDIR}/packages-split``: Contains the output of the |
632 | ``do_package`` task after the output has been split into individual | 634 | :ref:`ref-tasks-package` task after the output has been split into individual |
633 | packages. Subdirectories exist for each individual package created by | 635 | packages. There are subdirectories for each individual package created by |
634 | the recipe. | 636 | the recipe. |
635 | 637 | ||
636 | - ``${WORKDIR}/recipe-sysroot``: A directory populated with the target | 638 | - ``${WORKDIR}/recipe-sysroot``: A directory populated with the target |
@@ -651,7 +653,7 @@ A number of key subdirectories exist within each recipe work directory: | |||
651 | .. _structure-build-work-shared: | 653 | .. _structure-build-work-shared: |
652 | 654 | ||
653 | ``build/tmp/work-shared/`` | 655 | ``build/tmp/work-shared/`` |
654 | -------------------------- | 656 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
655 | 657 | ||
656 | For efficiency, the OpenEmbedded build system creates and uses this | 658 | For efficiency, the OpenEmbedded build system creates and uses this |
657 | directory to hold recipes that share a work directory with other | 659 | directory to hold recipes that share a work directory with other |
@@ -660,29 +662,30 @@ recipes. In practice, this is only used for ``gcc`` and its variants | |||
660 | 662 | ||
661 | .. _structure-meta: | 663 | .. _structure-meta: |
662 | 664 | ||
663 | The Metadata - ``meta/`` | 665 | The Metadata --- ``meta/`` |
664 | ======================== | 666 | ========================== |
665 | 667 | ||
666 | As mentioned previously, :term:`Metadata` is the core of the | 668 | As mentioned previously, :term:`Metadata` is the core of the |
667 | Yocto Project. Metadata has several important subdivisions: | 669 | Yocto Project. Metadata has several important subdivisions: |
668 | 670 | ||
669 | .. _structure-meta-classes: | 671 | .. _structure-meta-classes: |
670 | 672 | ||
671 | ``meta/classes/`` | 673 | ``meta/classes*/`` |
672 | ----------------- | 674 | ------------------ |
673 | 675 | ||
674 | This directory contains the ``*.bbclass`` files. Class files are used to | 676 | These directories contain the ``*.bbclass`` files. Class files are used to |
675 | abstract common code so it can be reused by multiple packages. Every | 677 | abstract common code so it can be reused by multiple packages. Every |
676 | package inherits the ``base.bbclass`` file. Examples of other important | 678 | package inherits the :ref:`ref-classes-base` file. Examples of other important |
677 | classes are ``autotools.bbclass``, which in theory allows any | 679 | classes are :ref:`ref-classes-autotools`, which in theory allows any |
678 | Autotool-enabled package to work with the Yocto Project with minimal | 680 | Autotool-enabled package to work with the Yocto Project with minimal |
679 | effort. Another example is ``kernel.bbclass`` that contains common code | 681 | effort. Another example is :ref:`ref-classes-kernel` that contains common code |
680 | and functions for working with the Linux kernel. Functions like image | 682 | and functions for working with the Linux kernel. Functions like image |
681 | generation or packaging also have their specific class files such as | 683 | generation or packaging also have their specific class files such as |
682 | ``image.bbclass``, ``rootfs_*.bbclass`` and ``package*.bbclass``. | 684 | :ref:`ref-classes-image`, :ref:`ref-classes-rootfs*` and |
685 | :ref:`package*.bbclass <ref-classes-package>`. | ||
683 | 686 | ||
684 | For reference information on classes, see the | 687 | For reference information on classes, see the |
685 | ":ref:`ref-manual/classes:Classes`" chapter. | 688 | ":doc:`/ref-manual/classes`" chapter. |
686 | 689 | ||
687 | .. _structure-meta-conf: | 690 | .. _structure-meta-conf: |
688 | 691 | ||
@@ -700,7 +703,7 @@ distribution configuration file. | |||
700 | .. _structure-meta-conf-machine: | 703 | .. _structure-meta-conf-machine: |
701 | 704 | ||
702 | ``meta/conf/machine/`` | 705 | ``meta/conf/machine/`` |
703 | ---------------------- | 706 | ~~~~~~~~~~~~~~~~~~~~~~ |
704 | 707 | ||
705 | This directory contains all the machine configuration files. If you set | 708 | This directory contains all the machine configuration files. If you set |
706 | ``MACHINE = "qemux86"``, the OpenEmbedded build system looks for a | 709 | ``MACHINE = "qemux86"``, the OpenEmbedded build system looks for a |
@@ -711,11 +714,11 @@ support for a new machine to the Yocto Project, look in this directory. | |||
711 | .. _structure-meta-conf-distro: | 714 | .. _structure-meta-conf-distro: |
712 | 715 | ||
713 | ``meta/conf/distro/`` | 716 | ``meta/conf/distro/`` |
714 | --------------------- | 717 | ~~~~~~~~~~~~~~~~~~~~~ |
715 | 718 | ||
716 | The contents of this directory controls any distribution-specific | 719 | The contents of this directory controls any distribution-specific |
717 | configurations. For the Yocto Project, the ``defaultsetup.conf`` is the | 720 | configurations. For the Yocto Project, the ``defaultsetup.conf`` is the |
718 | main file here. This directory includes the versions and the ``SRCDATE`` | 721 | main file here. This directory includes the versions and the :term:`SRCDATE` |
719 | definitions for applications that are configured here. An example of an | 722 | definitions for applications that are configured here. An example of an |
720 | alternative configuration might be ``poky-bleeding.conf``. Although this | 723 | alternative configuration might be ``poky-bleeding.conf``. Although this |
721 | file mainly inherits its configuration from Poky. | 724 | file mainly inherits its configuration from Poky. |
@@ -723,7 +726,7 @@ file mainly inherits its configuration from Poky. | |||
723 | .. _structure-meta-conf-machine-sdk: | 726 | .. _structure-meta-conf-machine-sdk: |
724 | 727 | ||
725 | ``meta/conf/machine-sdk/`` | 728 | ``meta/conf/machine-sdk/`` |
726 | -------------------------- | 729 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
727 | 730 | ||
728 | The OpenEmbedded build system searches this directory for configuration | 731 | The OpenEmbedded build system searches this directory for configuration |
729 | files that correspond to the value of | 732 | files that correspond to the value of |
@@ -748,7 +751,9 @@ and lists of files and directories with known permissions. | |||
748 | ------------- | 751 | ------------- |
749 | 752 | ||
750 | This directory contains OpenEmbedded Python library code used during the | 753 | This directory contains OpenEmbedded Python library code used during the |
751 | build process. | 754 | build process. It is enabled via the ``addpylib`` directive in |
755 | ``meta/conf/local.conf``. For more information, see | ||
756 | :ref:`bitbake-user-manual/bitbake-user-manual-metadata:extending python library code`. | ||
752 | 757 | ||
753 | .. _structure-meta-recipes-bsp: | 758 | .. _structure-meta-recipes-bsp: |
754 | 759 | ||
@@ -789,7 +794,7 @@ system. The tools, however, can also be used on targets. | |||
789 | 794 | ||
790 | This directory contains non-essential applications that add features | 795 | This directory contains non-essential applications that add features |
791 | compared to the alternatives in core. You might need this directory for | 796 | compared to the alternatives in core. You might need this directory for |
792 | full tool functionality or for Linux Standard Base (LSB) compliance. | 797 | full tool functionality. |
793 | 798 | ||
794 | .. _structure-meta-recipes-gnome: | 799 | .. _structure-meta-recipes-gnome: |
795 | 800 | ||
@@ -815,14 +820,6 @@ libraries. | |||
815 | This directory contains the kernel and generic applications and | 820 | This directory contains the kernel and generic applications and |
816 | libraries that have strong kernel dependencies. | 821 | libraries that have strong kernel dependencies. |
817 | 822 | ||
818 | .. _structure-meta-recipes-lsb4: | ||
819 | |||
820 | ``meta/recipes-lsb4/`` | ||
821 | ---------------------- | ||
822 | |||
823 | This directory contains recipes specifically added to support the Linux | ||
824 | Standard Base (LSB) version 4.x. | ||
825 | |||
826 | .. _structure-meta-recipes-multimedia: | 823 | .. _structure-meta-recipes-multimedia: |
827 | 824 | ||
828 | ``meta/recipes-multimedia/`` | 825 | ``meta/recipes-multimedia/`` |