diff options
Diffstat (limited to 'bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst')
-rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst | 64 |
1 files changed, 33 insertions, 31 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst index 6f9d392935..35ffb88b02 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst | |||
@@ -27,7 +27,7 @@ Linux software stacks using a task-oriented approach. | |||
27 | Conceptually, BitBake is similar to GNU Make in some regards but has | 27 | Conceptually, BitBake is similar to GNU Make in some regards but has |
28 | significant differences: | 28 | significant differences: |
29 | 29 | ||
30 | - BitBake executes tasks according to provided metadata that builds up | 30 | - BitBake executes tasks according to the provided metadata that builds up |
31 | the tasks. Metadata is stored in recipe (``.bb``) and related recipe | 31 | the tasks. Metadata is stored in recipe (``.bb``) and related recipe |
32 | "append" (``.bbappend``) files, configuration (``.conf``) and | 32 | "append" (``.bbappend``) files, configuration (``.conf``) and |
33 | underlying include (``.inc``) files, and in class (``.bbclass``) | 33 | underlying include (``.inc``) files, and in class (``.bbclass``) |
@@ -60,11 +60,10 @@ member Chris Larson split the project into two distinct pieces: | |||
60 | - OpenEmbedded, a metadata set utilized by BitBake | 60 | - OpenEmbedded, a metadata set utilized by BitBake |
61 | 61 | ||
62 | Today, BitBake is the primary basis of the | 62 | Today, BitBake is the primary basis of the |
63 | `OpenEmbedded <http://www.openembedded.org/>`__ project, which is being | 63 | `OpenEmbedded <https://www.openembedded.org/>`__ project, which is being |
64 | used to build and maintain Linux distributions such as the `Angstrom | 64 | used to build and maintain Linux distributions such as the `Poky |
65 | Distribution <http://www.angstrom-distribution.org/>`__, and which is | 65 | Reference Distribution <https://www.yoctoproject.org/software-item/poky/>`__, |
66 | also being used as the build tool for Linux projects such as the `Yocto | 66 | developed under the umbrella of the `Yocto Project <https://www.yoctoproject.org>`__. |
67 | Project <http://www.yoctoproject.org>`__. | ||
68 | 67 | ||
69 | Prior to BitBake, no other build tool adequately met the needs of an | 68 | Prior to BitBake, no other build tool adequately met the needs of an |
70 | aspiring embedded Linux distribution. All of the build systems used by | 69 | aspiring embedded Linux distribution. All of the build systems used by |
@@ -248,13 +247,13 @@ underlying, similarly-named recipe files. | |||
248 | 247 | ||
249 | When you name an append file, you can use the "``%``" wildcard character | 248 | When you name an append file, you can use the "``%``" wildcard character |
250 | to allow for matching recipe names. For example, suppose you have an | 249 | to allow for matching recipe names. For example, suppose you have an |
251 | append file named as follows: :: | 250 | append file named as follows:: |
252 | 251 | ||
253 | busybox_1.21.%.bbappend | 252 | busybox_1.21.%.bbappend |
254 | 253 | ||
255 | That append file | 254 | That append file |
256 | would match any ``busybox_1.21.``\ x\ ``.bb`` version of the recipe. So, | 255 | would match any ``busybox_1.21.``\ x\ ``.bb`` version of the recipe. So, |
257 | the append file would match the following recipe names: :: | 256 | the append file would match the following recipe names:: |
258 | 257 | ||
259 | busybox_1.21.1.bb | 258 | busybox_1.21.1.bb |
260 | busybox_1.21.2.bb | 259 | busybox_1.21.2.bb |
@@ -290,7 +289,7 @@ You can obtain BitBake several different ways: | |||
290 | are using. The metadata is generally backwards compatible but not | 289 | are using. The metadata is generally backwards compatible but not |
291 | forward compatible. | 290 | forward compatible. |
292 | 291 | ||
293 | Here is an example that clones the BitBake repository: :: | 292 | Here is an example that clones the BitBake repository:: |
294 | 293 | ||
295 | $ git clone git://git.openembedded.org/bitbake | 294 | $ git clone git://git.openembedded.org/bitbake |
296 | 295 | ||
@@ -298,7 +297,7 @@ You can obtain BitBake several different ways: | |||
298 | Git repository into a directory called ``bitbake``. Alternatively, | 297 | Git repository into a directory called ``bitbake``. Alternatively, |
299 | you can designate a directory after the ``git clone`` command if you | 298 | you can designate a directory after the ``git clone`` command if you |
300 | want to call the new directory something other than ``bitbake``. Here | 299 | want to call the new directory something other than ``bitbake``. Here |
301 | is an example that names the directory ``bbdev``: :: | 300 | is an example that names the directory ``bbdev``:: |
302 | 301 | ||
303 | $ git clone git://git.openembedded.org/bitbake bbdev | 302 | $ git clone git://git.openembedded.org/bitbake bbdev |
304 | 303 | ||
@@ -317,9 +316,9 @@ You can obtain BitBake several different ways: | |||
317 | method for getting BitBake. Cloning the repository makes it easier | 316 | method for getting BitBake. Cloning the repository makes it easier |
318 | to update as patches are added to the stable branches. | 317 | to update as patches are added to the stable branches. |
319 | 318 | ||
320 | The following example downloads a snapshot of BitBake version 1.17.0: :: | 319 | The following example downloads a snapshot of BitBake version 1.17.0:: |
321 | 320 | ||
322 | $ wget http://git.openembedded.org/bitbake/snapshot/bitbake-1.17.0.tar.gz | 321 | $ wget https://git.openembedded.org/bitbake/snapshot/bitbake-1.17.0.tar.gz |
323 | $ tar zxpvf bitbake-1.17.0.tar.gz | 322 | $ tar zxpvf bitbake-1.17.0.tar.gz |
324 | 323 | ||
325 | After extraction of the tarball using | 324 | After extraction of the tarball using |
@@ -347,7 +346,7 @@ execution examples. | |||
347 | Usage and syntax | 346 | Usage and syntax |
348 | ---------------- | 347 | ---------------- |
349 | 348 | ||
350 | Following is the usage and syntax for BitBake: :: | 349 | Following is the usage and syntax for BitBake:: |
351 | 350 | ||
352 | $ bitbake -h | 351 | $ bitbake -h |
353 | Usage: bitbake [options] [recipename/target recipe:do_task ...] | 352 | Usage: bitbake [options] [recipename/target recipe:do_task ...] |
@@ -417,8 +416,8 @@ Following is the usage and syntax for BitBake: :: | |||
417 | -l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS | 416 | -l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS |
418 | Show debug logging for the specified logging domains | 417 | Show debug logging for the specified logging domains |
419 | -P, --profile Profile the command and save reports. | 418 | -P, --profile Profile the command and save reports. |
420 | -u UI, --ui=UI The user interface to use (knotty, ncurses or taskexp | 419 | -u UI, --ui=UI The user interface to use (knotty, ncurses, taskexp or |
421 | - default knotty). | 420 | teamcity - default knotty). |
422 | --token=XMLRPCTOKEN Specify the connection token to be used when | 421 | --token=XMLRPCTOKEN Specify the connection token to be used when |
423 | connecting to a remote server. | 422 | connecting to a remote server. |
424 | --revisions-changed Set the exit code depending on whether upstream | 423 | --revisions-changed Set the exit code depending on whether upstream |
@@ -433,6 +432,9 @@ Following is the usage and syntax for BitBake: :: | |||
433 | Environment variable BB_SERVER_TIMEOUT. | 432 | Environment variable BB_SERVER_TIMEOUT. |
434 | --no-setscene Do not run any setscene tasks. sstate will be ignored | 433 | --no-setscene Do not run any setscene tasks. sstate will be ignored |
435 | and everything needed, built. | 434 | and everything needed, built. |
435 | --skip-setscene Skip setscene tasks if they would be executed. Tasks | ||
436 | previously restored from sstate will be kept, unlike | ||
437 | --no-setscene | ||
436 | --setscene-only Only run setscene tasks, don't run any real tasks. | 438 | --setscene-only Only run setscene tasks, don't run any real tasks. |
437 | --remote-server=REMOTE_SERVER | 439 | --remote-server=REMOTE_SERVER |
438 | Connect to the specified server. | 440 | Connect to the specified server. |
@@ -469,11 +471,11 @@ default task, which is "build". BitBake obeys inter-task dependencies | |||
469 | when doing so. | 471 | when doing so. |
470 | 472 | ||
471 | The following command runs the build task, which is the default task, on | 473 | The following command runs the build task, which is the default task, on |
472 | the ``foo_1.0.bb`` recipe file: :: | 474 | the ``foo_1.0.bb`` recipe file:: |
473 | 475 | ||
474 | $ bitbake -b foo_1.0.bb | 476 | $ bitbake -b foo_1.0.bb |
475 | 477 | ||
476 | The following command runs the clean task on the ``foo.bb`` recipe file: :: | 478 | The following command runs the clean task on the ``foo.bb`` recipe file:: |
477 | 479 | ||
478 | $ bitbake -b foo.bb -c clean | 480 | $ bitbake -b foo.bb -c clean |
479 | 481 | ||
@@ -497,13 +499,13 @@ functionality, or when there are multiple versions of a recipe. | |||
497 | The ``bitbake`` command, when not using "--buildfile" or "-b" only | 499 | The ``bitbake`` command, when not using "--buildfile" or "-b" only |
498 | accepts a "PROVIDES". You cannot provide anything else. By default, a | 500 | accepts a "PROVIDES". You cannot provide anything else. By default, a |
499 | recipe file generally "PROVIDES" its "packagename" as shown in the | 501 | recipe file generally "PROVIDES" its "packagename" as shown in the |
500 | following example: :: | 502 | following example:: |
501 | 503 | ||
502 | $ bitbake foo | 504 | $ bitbake foo |
503 | 505 | ||
504 | This next example "PROVIDES" the | 506 | This next example "PROVIDES" the |
505 | package name and also uses the "-c" option to tell BitBake to just | 507 | package name and also uses the "-c" option to tell BitBake to just |
506 | execute the ``do_clean`` task: :: | 508 | execute the ``do_clean`` task:: |
507 | 509 | ||
508 | $ bitbake -c clean foo | 510 | $ bitbake -c clean foo |
509 | 511 | ||
@@ -514,7 +516,7 @@ The BitBake command line supports specifying different tasks for | |||
514 | individual targets when you specify multiple targets. For example, | 516 | individual targets when you specify multiple targets. For example, |
515 | suppose you had two targets (or recipes) ``myfirstrecipe`` and | 517 | suppose you had two targets (or recipes) ``myfirstrecipe`` and |
516 | ``mysecondrecipe`` and you needed BitBake to run ``taskA`` for the first | 518 | ``mysecondrecipe`` and you needed BitBake to run ``taskA`` for the first |
517 | recipe and ``taskB`` for the second recipe: :: | 519 | recipe and ``taskB`` for the second recipe:: |
518 | 520 | ||
519 | $ bitbake myfirstrecipe:do_taskA mysecondrecipe:do_taskB | 521 | $ bitbake myfirstrecipe:do_taskA mysecondrecipe:do_taskB |
520 | 522 | ||
@@ -534,13 +536,13 @@ current working directory: | |||
534 | - ``pn-buildlist``: Shows a simple list of targets that are to be | 536 | - ``pn-buildlist``: Shows a simple list of targets that are to be |
535 | built. | 537 | built. |
536 | 538 | ||
537 | To stop depending on common depends, use the "-I" depend option and | 539 | To stop depending on common depends, use the ``-I`` depend option and |
538 | BitBake omits them from the graph. Leaving this information out can | 540 | BitBake omits them from the graph. Leaving this information out can |
539 | produce more readable graphs. This way, you can remove from the graph | 541 | produce more readable graphs. This way, you can remove from the graph |
540 | ``DEPENDS`` from inherited classes such as ``base.bbclass``. | 542 | :term:`DEPENDS` from inherited classes such as ``base.bbclass``. |
541 | 543 | ||
542 | Here are two examples that create dependency graphs. The second example | 544 | Here are two examples that create dependency graphs. The second example |
543 | omits depends common in OpenEmbedded from the graph: :: | 545 | omits depends common in OpenEmbedded from the graph:: |
544 | 546 | ||
545 | $ bitbake -g foo | 547 | $ bitbake -g foo |
546 | 548 | ||
@@ -564,7 +566,7 @@ for two separate targets: | |||
564 | .. image:: figures/bb_multiconfig_files.png | 566 | .. image:: figures/bb_multiconfig_files.png |
565 | :align: center | 567 | :align: center |
566 | 568 | ||
567 | The reason for this required file hierarchy is because the ``BBPATH`` | 569 | The reason for this required file hierarchy is because the :term:`BBPATH` |
568 | variable is not constructed until the layers are parsed. Consequently, | 570 | variable is not constructed until the layers are parsed. Consequently, |
569 | using the configuration file as a pre-configuration file is not possible | 571 | using the configuration file as a pre-configuration file is not possible |
570 | unless it is located in the current working directory. | 572 | unless it is located in the current working directory. |
@@ -582,17 +584,17 @@ accomplished by setting the | |||
582 | configuration files for ``target1`` and ``target2`` defined in the build | 584 | configuration files for ``target1`` and ``target2`` defined in the build |
583 | directory. The following statement in the ``local.conf`` file both | 585 | directory. The following statement in the ``local.conf`` file both |
584 | enables BitBake to perform multiple configuration builds and specifies | 586 | enables BitBake to perform multiple configuration builds and specifies |
585 | the two extra multiconfigs: :: | 587 | the two extra multiconfigs:: |
586 | 588 | ||
587 | BBMULTICONFIG = "target1 target2" | 589 | BBMULTICONFIG = "target1 target2" |
588 | 590 | ||
589 | Once the target configuration files are in place and BitBake has been | 591 | Once the target configuration files are in place and BitBake has been |
590 | enabled to perform multiple configuration builds, use the following | 592 | enabled to perform multiple configuration builds, use the following |
591 | command form to start the builds: :: | 593 | command form to start the builds:: |
592 | 594 | ||
593 | $ bitbake [mc:multiconfigname:]target [[[mc:multiconfigname:]target] ... ] | 595 | $ bitbake [mc:multiconfigname:]target [[[mc:multiconfigname:]target] ... ] |
594 | 596 | ||
595 | Here is an example for two extra multiconfigs: ``target1`` and ``target2``: :: | 597 | Here is an example for two extra multiconfigs: ``target1`` and ``target2``:: |
596 | 598 | ||
597 | $ bitbake mc::target mc:target1:target mc:target2:target | 599 | $ bitbake mc::target mc:target1:target mc:target2:target |
598 | 600 | ||
@@ -613,12 +615,12 @@ multiconfig. | |||
613 | 615 | ||
614 | To enable dependencies in a multiple configuration build, you must | 616 | To enable dependencies in a multiple configuration build, you must |
615 | declare the dependencies in the recipe using the following statement | 617 | declare the dependencies in the recipe using the following statement |
616 | form: :: | 618 | form:: |
617 | 619 | ||
618 | task_or_package[mcdepends] = "mc:from_multiconfig:to_multiconfig:recipe_name:task_on_which_to_depend" | 620 | task_or_package[mcdepends] = "mc:from_multiconfig:to_multiconfig:recipe_name:task_on_which_to_depend" |
619 | 621 | ||
620 | To better show how to use this statement, consider an example with two | 622 | To better show how to use this statement, consider an example with two |
621 | multiconfigs: ``target1`` and ``target2``: :: | 623 | multiconfigs: ``target1`` and ``target2``:: |
622 | 624 | ||
623 | image_task[mcdepends] = "mc:target1:target2:image2:rootfs_task" | 625 | image_task[mcdepends] = "mc:target1:target2:image2:rootfs_task" |
624 | 626 | ||
@@ -629,7 +631,7 @@ completion of the rootfs_task used to build out image2, which is | |||
629 | associated with the "target2" multiconfig. | 631 | associated with the "target2" multiconfig. |
630 | 632 | ||
631 | Once you set up this dependency, you can build the "target1" multiconfig | 633 | Once you set up this dependency, you can build the "target1" multiconfig |
632 | using a BitBake command as follows: :: | 634 | using a BitBake command as follows:: |
633 | 635 | ||
634 | $ bitbake mc:target1:image1 | 636 | $ bitbake mc:target1:image1 |
635 | 637 | ||
@@ -639,7 +641,7 @@ the ``rootfs_task`` for the "target2" multiconfig build. | |||
639 | 641 | ||
640 | Having a recipe depend on the root filesystem of another build might not | 642 | Having a recipe depend on the root filesystem of another build might not |
641 | seem that useful. Consider this change to the statement in the image1 | 643 | seem that useful. Consider this change to the statement in the image1 |
642 | recipe: :: | 644 | recipe:: |
643 | 645 | ||
644 | image_task[mcdepends] = "mc:target1:target2:image2:image_task" | 646 | image_task[mcdepends] = "mc:target1:target2:image2:image_task" |
645 | 647 | ||