summaryrefslogtreecommitdiffstats
path: root/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst
diff options
context:
space:
mode:
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.rst64
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.
27Conceptually, BitBake is similar to GNU Make in some regards but has 27Conceptually, BitBake is similar to GNU Make in some regards but has
28significant differences: 28significant 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
62Today, BitBake is the primary basis of the 62Today, 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
64used to build and maintain Linux distributions such as the `Angstrom 64used to build and maintain Linux distributions such as the `Poky
65Distribution <http://www.angstrom-distribution.org/>`__, and which is 65Reference Distribution <https://www.yoctoproject.org/software-item/poky/>`__,
66also being used as the build tool for Linux projects such as the `Yocto 66developed under the umbrella of the `Yocto Project <https://www.yoctoproject.org>`__.
67Project <http://www.yoctoproject.org>`__.
68 67
69Prior to BitBake, no other build tool adequately met the needs of an 68Prior to BitBake, no other build tool adequately met the needs of an
70aspiring embedded Linux distribution. All of the build systems used by 69aspiring embedded Linux distribution. All of the build systems used by
@@ -248,13 +247,13 @@ underlying, similarly-named recipe files.
248 247
249When you name an append file, you can use the "``%``" wildcard character 248When you name an append file, you can use the "``%``" wildcard character
250to allow for matching recipe names. For example, suppose you have an 249to allow for matching recipe names. For example, suppose you have an
251append file named as follows: :: 250append file named as follows::
252 251
253 busybox_1.21.%.bbappend 252 busybox_1.21.%.bbappend
254 253
255That append file 254That append file
256would match any ``busybox_1.21.``\ x\ ``.bb`` version of the recipe. So, 255would match any ``busybox_1.21.``\ x\ ``.bb`` version of the recipe. So,
257the append file would match the following recipe names: :: 256the 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.
347Usage and syntax 346Usage and syntax
348---------------- 347----------------
349 348
350Following is the usage and syntax for BitBake: :: 349Following 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
469when doing so. 471when doing so.
470 472
471The following command runs the build task, which is the default task, on 473The following command runs the build task, which is the default task, on
472the ``foo_1.0.bb`` recipe file: :: 474the ``foo_1.0.bb`` recipe file::
473 475
474 $ bitbake -b foo_1.0.bb 476 $ bitbake -b foo_1.0.bb
475 477
476The following command runs the clean task on the ``foo.bb`` recipe file: :: 478The 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.
497The ``bitbake`` command, when not using "--buildfile" or "-b" only 499The ``bitbake`` command, when not using "--buildfile" or "-b" only
498accepts a "PROVIDES". You cannot provide anything else. By default, a 500accepts a "PROVIDES". You cannot provide anything else. By default, a
499recipe file generally "PROVIDES" its "packagename" as shown in the 501recipe file generally "PROVIDES" its "packagename" as shown in the
500following example: :: 502following example::
501 503
502 $ bitbake foo 504 $ bitbake foo
503 505
504This next example "PROVIDES" the 506This next example "PROVIDES" the
505package name and also uses the "-c" option to tell BitBake to just 507package name and also uses the "-c" option to tell BitBake to just
506execute the ``do_clean`` task: :: 508execute 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
514individual targets when you specify multiple targets. For example, 516individual targets when you specify multiple targets. For example,
515suppose you had two targets (or recipes) ``myfirstrecipe`` and 517suppose 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
517recipe and ``taskB`` for the second recipe: :: 519recipe 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
537To stop depending on common depends, use the "-I" depend option and 539To stop depending on common depends, use the ``-I`` depend option and
538BitBake omits them from the graph. Leaving this information out can 540BitBake omits them from the graph. Leaving this information out can
539produce more readable graphs. This way, you can remove from the graph 541produce 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
542Here are two examples that create dependency graphs. The second example 544Here are two examples that create dependency graphs. The second example
543omits depends common in OpenEmbedded from the graph: :: 545omits 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
567The reason for this required file hierarchy is because the ``BBPATH`` 569The reason for this required file hierarchy is because the :term:`BBPATH`
568variable is not constructed until the layers are parsed. Consequently, 570variable is not constructed until the layers are parsed. Consequently,
569using the configuration file as a pre-configuration file is not possible 571using the configuration file as a pre-configuration file is not possible
570unless it is located in the current working directory. 572unless it is located in the current working directory.
@@ -582,17 +584,17 @@ accomplished by setting the
582configuration files for ``target1`` and ``target2`` defined in the build 584configuration files for ``target1`` and ``target2`` defined in the build
583directory. The following statement in the ``local.conf`` file both 585directory. The following statement in the ``local.conf`` file both
584enables BitBake to perform multiple configuration builds and specifies 586enables BitBake to perform multiple configuration builds and specifies
585the two extra multiconfigs: :: 587the two extra multiconfigs::
586 588
587 BBMULTICONFIG = "target1 target2" 589 BBMULTICONFIG = "target1 target2"
588 590
589Once the target configuration files are in place and BitBake has been 591Once the target configuration files are in place and BitBake has been
590enabled to perform multiple configuration builds, use the following 592enabled to perform multiple configuration builds, use the following
591command form to start the builds: :: 593command 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
595Here is an example for two extra multiconfigs: ``target1`` and ``target2``: :: 597Here 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
614To enable dependencies in a multiple configuration build, you must 616To enable dependencies in a multiple configuration build, you must
615declare the dependencies in the recipe using the following statement 617declare the dependencies in the recipe using the following statement
616form: :: 618form::
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
620To better show how to use this statement, consider an example with two 622To better show how to use this statement, consider an example with two
621multiconfigs: ``target1`` and ``target2``: :: 623multiconfigs: ``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
629associated with the "target2" multiconfig. 631associated with the "target2" multiconfig.
630 632
631Once you set up this dependency, you can build the "target1" multiconfig 633Once you set up this dependency, you can build the "target1" multiconfig
632using a BitBake command as follows: :: 634using 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
640Having a recipe depend on the root filesystem of another build might not 642Having a recipe depend on the root filesystem of another build might not
641seem that useful. Consider this change to the statement in the image1 643seem that useful. Consider this change to the statement in the image1
642recipe: :: 644recipe::
643 645
644 image_task[mcdepends] = "mc:target1:target2:image2:image_task" 646 image_task[mcdepends] = "mc:target1:target2:image2:image_task"
645 647