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 | 316 |
1 files changed, 196 insertions, 120 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 34abda2db3..77dc9668ab 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst | |||
@@ -248,19 +248,23 @@ underlying, similarly-named recipe files. | |||
248 | 248 | ||
249 | When you name an append file, you can use the "``%``" wildcard character | 249 | 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 | 250 | to allow for matching recipe names. For example, suppose you have an |
251 | append file named as follows: busybox_1.21.%.bbappend That append file | 251 | append file named as follows: :: |
252 | |||
253 | busybox_1.21.%.bbappend | ||
254 | |||
255 | That append file | ||
252 | would match any ``busybox_1.21.``\ x\ ``.bb`` version of the recipe. So, | 256 | would match any ``busybox_1.21.``\ x\ ``.bb`` version of the recipe. So, |
253 | the append file would match the following recipe names: | 257 | the append file would match the following recipe names: :: |
254 | busybox_1.21.1.bb busybox_1.21.2.bb busybox_1.21.3.bb | 258 | |
259 | busybox_1.21.1.bb | ||
260 | busybox_1.21.2.bb | ||
261 | busybox_1.21.3.bb | ||
255 | 262 | ||
256 | .. note:: | 263 | .. note:: |
257 | 264 | ||
258 | The use of the " | 265 | The use of the " % " character is limited in that it only works directly in |
259 | % | 266 | front of the .bbappend portion of the append file's name. You cannot use the |
260 | " character is limited in that it only works directly in front of the | 267 | wildcard character in any other location of the name. |
261 | .bbappend | ||
262 | portion of the append file's name. You cannot use the wildcard | ||
263 | character in any other location of the name. | ||
264 | 268 | ||
265 | If the ``busybox`` recipe was updated to ``busybox_1.3.0.bb``, the | 269 | If the ``busybox`` recipe was updated to ``busybox_1.3.0.bb``, the |
266 | append name would not match. However, if you named the append file | 270 | append name would not match. However, if you named the append file |
@@ -274,7 +278,7 @@ Obtaining BitBake | |||
274 | 278 | ||
275 | You can obtain BitBake several different ways: | 279 | You can obtain BitBake several different ways: |
276 | 280 | ||
277 | - *Cloning BitBake:* Using Git to clone the BitBake source code | 281 | - **Cloning BitBake:** Using Git to clone the BitBake source code |
278 | repository is the recommended method for obtaining BitBake. Cloning | 282 | repository is the recommended method for obtaining BitBake. Cloning |
279 | the repository makes it easy to get bug fixes and have access to | 283 | the repository makes it easy to get bug fixes and have access to |
280 | stable branches and the master branch. Once you have cloned BitBake, | 284 | stable branches and the master branch. Once you have cloned BitBake, |
@@ -286,36 +290,42 @@ You can obtain BitBake several different ways: | |||
286 | are using. The metadata is generally backwards compatible but not | 290 | are using. The metadata is generally backwards compatible but not |
287 | forward compatible. | 291 | forward compatible. |
288 | 292 | ||
289 | Here is an example that clones the BitBake repository: $ git clone | 293 | Here is an example that clones the BitBake repository: :: |
290 | git://git.openembedded.org/bitbake This command clones the BitBake | 294 | |
295 | $ git clone git://git.openembedded.org/bitbake | ||
296 | |||
297 | This command clones the BitBake | ||
291 | Git repository into a directory called ``bitbake``. Alternatively, | 298 | Git repository into a directory called ``bitbake``. Alternatively, |
292 | you can designate a directory after the ``git clone`` command if you | 299 | you can designate a directory after the ``git clone`` command if you |
293 | want to call the new directory something other than ``bitbake``. Here | 300 | want to call the new directory something other than ``bitbake``. Here |
294 | is an example that names the directory ``bbdev``: $ git clone | 301 | is an example that names the directory ``bbdev``: :: |
295 | git://git.openembedded.org/bitbake bbdev | 302 | |
303 | $ git clone git://git.openembedded.org/bitbake bbdev | ||
296 | 304 | ||
297 | - *Installation using your Distribution Package Management System:* | 305 | - **Installation using your Distribution Package Management System:** |
298 | This method is not recommended because the BitBake version that is | 306 | This method is not recommended because the BitBake version that is |
299 | provided by your distribution, in most cases, is several releases | 307 | provided by your distribution, in most cases, is several releases |
300 | behind a snapshot of the BitBake repository. | 308 | behind a snapshot of the BitBake repository. |
301 | 309 | ||
302 | - *Taking a snapshot of BitBake:* Downloading a snapshot of BitBake | 310 | - **Taking a snapshot of BitBake:** Downloading a snapshot of BitBake |
303 | from the source code repository gives you access to a known branch or | 311 | from the source code repository gives you access to a known branch or |
304 | release of BitBake. | 312 | release of BitBake. |
305 | 313 | ||
306 | .. note:: | 314 | .. note:: |
315 | |||
316 | Cloning the Git repository, as described earlier, is the preferred | ||
317 | method for getting BitBake. Cloning the repository makes it easier | ||
318 | to update as patches are added to the stable branches. | ||
319 | |||
320 | The following example downloads a snapshot of BitBake version 1.17.0: :: | ||
307 | 321 | ||
308 | Cloning the Git repository, as described earlier, is the preferred | 322 | $ wget http://git.openembedded.org/bitbake/snapshot/bitbake-1.17.0.tar.gz |
309 | method for getting BitBake. Cloning the repository makes it easier | 323 | $ tar zxpvf bitbake-1.17.0.tar.gz |
310 | to update as patches are added to the stable branches. | ||
311 | 324 | ||
312 | The following example downloads a snapshot of BitBake version 1.17.0: | 325 | After extraction of the tarball using |
313 | $ wget | ||
314 | http://git.openembedded.org/bitbake/snapshot/bitbake-1.17.0.tar.gz $ | ||
315 | tar zxpvf bitbake-1.17.0.tar.gz After extraction of the tarball using | ||
316 | the tar utility, you have a directory entitled ``bitbake-1.17.0``. | 326 | the tar utility, you have a directory entitled ``bitbake-1.17.0``. |
317 | 327 | ||
318 | - *Using the BitBake that Comes With Your Build Checkout:* A final | 328 | - **Using the BitBake that Comes With Your Build Checkout:** A final |
319 | possibility for getting a copy of BitBake is that it already comes | 329 | possibility for getting a copy of BitBake is that it already comes |
320 | with your checkout of a larger BitBake-based build system, such as | 330 | with your checkout of a larger BitBake-based build system, such as |
321 | Poky. Rather than manually checking out individual layers and gluing | 331 | Poky. Rather than manually checking out individual layers and gluing |
@@ -337,75 +347,108 @@ execution examples. | |||
337 | Usage and syntax | 347 | Usage and syntax |
338 | ---------------- | 348 | ---------------- |
339 | 349 | ||
340 | Following is the usage and syntax for BitBake: $ bitbake -h Usage: | 350 | Following is the usage and syntax for BitBake: :: |
341 | bitbake [options] [recipename/target recipe:do_task ...] Executes the | 351 | |
342 | specified task (default is 'build') for a given set of target recipes | 352 | $ bitbake -h |
343 | (.bb files). It is assumed there is a conf/bblayers.conf available in | 353 | Usage: bitbake [options] [recipename/target recipe:do_task ...] |
344 | cwd or in BBPATH which will provide the layer, BBFILES and other | 354 | |
345 | configuration information. Options: --version show program's version | 355 | Executes the specified task (default is 'build') for a given set of target recipes (.bb files). |
346 | number and exit -h, --help show this help message and exit -b BUILDFILE, | 356 | It is assumed there is a conf/bblayers.conf available in cwd or in BBPATH which |
347 | --buildfile=BUILDFILE Execute tasks from a specific .bb recipe directly. | 357 | will provide the layer, BBFILES and other configuration information. |
348 | WARNING: Does not handle any dependencies from other recipes. -k, | 358 | |
349 | --continue Continue as much as possible after an error. While the target | 359 | Options: |
350 | that failed and anything depending on it cannot be built, as much as | 360 | --version show program's version number and exit |
351 | possible will be built before stopping. -f, --force Force the specified | 361 | -h, --help show this help message and exit |
352 | targets/task to run (invalidating any existing stamp file). -c CMD, | 362 | -b BUILDFILE, --buildfile=BUILDFILE |
353 | --cmd=CMD Specify the task to execute. The exact options available | 363 | Execute tasks from a specific .bb recipe directly. |
354 | depend on the metadata. Some examples might be 'compile' or | 364 | WARNING: Does not handle any dependencies from other |
355 | 'populate_sysroot' or 'listtasks' may give a list of the tasks | 365 | recipes. |
356 | available. -C INVALIDATE_STAMP, --clear-stamp=INVALIDATE_STAMP | 366 | -k, --continue Continue as much as possible after an error. While the |
357 | Invalidate the stamp for the specified task such as 'compile' and then | 367 | target that failed and anything depending on it cannot |
358 | run the default task for the specified target(s). -r PREFILE, | 368 | be built, as much as possible will be built before |
359 | --read=PREFILE Read the specified file before bitbake.conf. -R POSTFILE, | 369 | stopping. |
360 | --postread=POSTFILE Read the specified file after bitbake.conf. -v, | 370 | -f, --force Force the specified targets/task to run (invalidating |
361 | --verbose Enable tracing of shell tasks (with 'set -x'). Also print | 371 | any existing stamp file). |
362 | bb.note(...) messages to stdout (in addition to writing them to | 372 | -c CMD, --cmd=CMD Specify the task to execute. The exact options |
363 | ${T}/log.do_<task>). -D, --debug Increase the debug level. You can | 373 | available depend on the metadata. Some examples might |
364 | specify this more than once. -D sets the debug level to 1, where only | 374 | be 'compile' or 'populate_sysroot' or 'listtasks' may |
365 | bb.debug(1, ...) messages are printed to stdout; -DD sets the debug | 375 | give a list of the tasks available. |
366 | level to 2, where both bb.debug(1, ...) and bb.debug(2, ...) messages | 376 | -C INVALIDATE_STAMP, --clear-stamp=INVALIDATE_STAMP |
367 | are printed; etc. Without -D, no debug messages are printed. Note that | 377 | Invalidate the stamp for the specified task such as |
368 | -D only affects output to stdout. All debug messages are written to | 378 | 'compile' and then run the default task for the |
369 | ${T}/log.do_taskname, regardless of the debug level. -q, --quiet Output | 379 | specified target(s). |
370 | less log message data to the terminal. You can specify this more than | 380 | -r PREFILE, --read=PREFILE |
371 | once. -n, --dry-run Don't execute, just go through the motions. -S | 381 | Read the specified file before bitbake.conf. |
372 | SIGNATURE_HANDLER, --dump-signatures=SIGNATURE_HANDLER Dump out the | 382 | -R POSTFILE, --postread=POSTFILE |
373 | signature construction information, with no task execution. The | 383 | Read the specified file after bitbake.conf. |
374 | SIGNATURE_HANDLER parameter is passed to the handler. Two common values | 384 | -v, --verbose Enable tracing of shell tasks (with 'set -x'). Also |
375 | are none and printdiff but the handler may define more/less. none means | 385 | print bb.note(...) messages to stdout (in addition to |
376 | only dump the signature, printdiff means compare the dumped signature | 386 | writing them to ${T}/log.do_<task>). |
377 | with the cached one. -p, --parse-only Quit after parsing the BB recipes. | 387 | -D, --debug Increase the debug level. You can specify this more |
378 | -s, --show-versions Show current and preferred versions of all recipes. | 388 | than once. -D sets the debug level to 1, where only |
379 | -e, --environment Show the global or per-recipe environment complete | 389 | bb.debug(1, ...) messages are printed to stdout; -DD |
380 | with information about where variables were set/changed. -g, --graphviz | 390 | sets the debug level to 2, where both bb.debug(1, ...) |
381 | Save dependency tree information for the specified targets in the dot | 391 | and bb.debug(2, ...) messages are printed; etc. |
382 | syntax. -I EXTRA_ASSUME_PROVIDED, --ignore-deps=EXTRA_ASSUME_PROVIDED | 392 | Without -D, no debug messages are printed. Note that |
383 | Assume these dependencies don't exist and are already provided | 393 | -D only affects output to stdout. All debug messages |
384 | (equivalent to ASSUME_PROVIDED). Useful to make dependency graphs more | 394 | are written to ${T}/log.do_taskname, regardless of the |
385 | appealing -l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS Show debug | 395 | debug level. |
386 | logging for the specified logging domains -P, --profile Profile the | 396 | -q, --quiet Output less log message data to the terminal. You can |
387 | command and save reports. -u UI, --ui=UI The user interface to use | 397 | specify this more than once. |
388 | (knotty, ncurses or taskexp - default knotty). --token=XMLRPCTOKEN | 398 | -n, --dry-run Don't execute, just go through the motions. |
389 | Specify the connection token to be used when connecting to a remote | 399 | -S SIGNATURE_HANDLER, --dump-signatures=SIGNATURE_HANDLER |
390 | server. --revisions-changed Set the exit code depending on whether | 400 | Dump out the signature construction information, with |
391 | upstream floating revisions have changed or not. --server-only Run | 401 | no task execution. The SIGNATURE_HANDLER parameter is |
392 | bitbake without a UI, only starting a server (cooker) process. -B BIND, | 402 | passed to the handler. Two common values are none and |
393 | --bind=BIND The name/address for the bitbake xmlrpc server to bind to. | 403 | printdiff but the handler may define more/less. none |
394 | -T SERVER_TIMEOUT, --idle-timeout=SERVER_TIMEOUT Set timeout to unload | 404 | means only dump the signature, printdiff means compare |
395 | bitbake server due to inactivity, set to -1 means no unload, default: | 405 | the dumped signature with the cached one. |
396 | Environment variable BB_SERVER_TIMEOUT. --no-setscene Do not run any | 406 | -p, --parse-only Quit after parsing the BB recipes. |
397 | setscene tasks. sstate will be ignored and everything needed, built. | 407 | -s, --show-versions Show current and preferred versions of all recipes. |
398 | --setscene-only Only run setscene tasks, don't run any real tasks. | 408 | -e, --environment Show the global or per-recipe environment complete |
399 | --remote-server=REMOTE_SERVER Connect to the specified server. -m, | 409 | with information about where variables were |
400 | --kill-server Terminate any running bitbake server. --observe-only | 410 | set/changed. |
401 | Connect to a server as an observing-only client. --status-only Check the | 411 | -g, --graphviz Save dependency tree information for the specified |
402 | status of the remote bitbake server. -w WRITEEVENTLOG, | 412 | targets in the dot syntax. |
403 | --write-log=WRITEEVENTLOG Writes the event log of the build to a bitbake | 413 | -I EXTRA_ASSUME_PROVIDED, --ignore-deps=EXTRA_ASSUME_PROVIDED |
404 | event json file. Use '' (empty string) to assign the name automatically. | 414 | Assume these dependencies don't exist and are already |
405 | --runall=RUNALL Run the specified task for any recipe in the taskgraph | 415 | provided (equivalent to ASSUME_PROVIDED). Useful to |
406 | of the specified target (even if it wouldn't otherwise have run). | 416 | make dependency graphs more appealing |
407 | --runonly=RUNONLY Run only the specified task within the taskgraph of | 417 | -l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS |
408 | the specified targets (and any task dependencies those tasks may have). | 418 | Show debug logging for the specified logging domains |
419 | -P, --profile Profile the command and save reports. | ||
420 | -u UI, --ui=UI The user interface to use (knotty, ncurses or taskexp | ||
421 | - default knotty). | ||
422 | --token=XMLRPCTOKEN Specify the connection token to be used when | ||
423 | connecting to a remote server. | ||
424 | --revisions-changed Set the exit code depending on whether upstream | ||
425 | floating revisions have changed or not. | ||
426 | --server-only Run bitbake without a UI, only starting a server | ||
427 | (cooker) process. | ||
428 | -B BIND, --bind=BIND The name/address for the bitbake xmlrpc server to bind | ||
429 | to. | ||
430 | -T SERVER_TIMEOUT, --idle-timeout=SERVER_TIMEOUT | ||
431 | Set timeout to unload bitbake server due to | ||
432 | inactivity, set to -1 means no unload, default: | ||
433 | Environment variable BB_SERVER_TIMEOUT. | ||
434 | --no-setscene Do not run any setscene tasks. sstate will be ignored | ||
435 | and everything needed, built. | ||
436 | --setscene-only Only run setscene tasks, don't run any real tasks. | ||
437 | --remote-server=REMOTE_SERVER | ||
438 | Connect to the specified server. | ||
439 | -m, --kill-server Terminate any running bitbake server. | ||
440 | --observe-only Connect to a server as an observing-only client. | ||
441 | --status-only Check the status of the remote bitbake server. | ||
442 | -w WRITEEVENTLOG, --write-log=WRITEEVENTLOG | ||
443 | Writes the event log of the build to a bitbake event | ||
444 | json file. Use '' (empty string) to assign the name | ||
445 | automatically. | ||
446 | --runall=RUNALL Run the specified task for any recipe in the taskgraph | ||
447 | of the specified target (even if it wouldn't otherwise | ||
448 | have run). | ||
449 | --runonly=RUNONLY Run only the specified task within the taskgraph of | ||
450 | the specified targets (and any task dependencies those | ||
451 | tasks may have). | ||
409 | 452 | ||
410 | .. _bitbake-examples: | 453 | .. _bitbake-examples: |
411 | 454 | ||
@@ -426,9 +469,13 @@ default task, which is "build”. BitBake obeys inter-task dependencies | |||
426 | when doing so. | 469 | when doing so. |
427 | 470 | ||
428 | The following command runs the build task, which is the default task, on | 471 | The following command runs the build task, which is the default task, on |
429 | the ``foo_1.0.bb`` recipe file: $ bitbake -b foo_1.0.bb The following | 472 | the ``foo_1.0.bb`` recipe file: :: |
430 | command runs the clean task on the ``foo.bb`` recipe file: $ bitbake -b | 473 | |
431 | foo.bb -c clean | 474 | $ bitbake -b foo_1.0.bb |
475 | |||
476 | The following command runs the clean task on the ``foo.bb`` recipe file: :: | ||
477 | |||
478 | $ bitbake -b foo.bb -c clean | ||
432 | 479 | ||
433 | .. note:: | 480 | .. note:: |
434 | 481 | ||
@@ -450,9 +497,15 @@ functionality, or when there are multiple versions of a recipe. | |||
450 | The ``bitbake`` command, when not using "--buildfile" or "-b" only | 497 | The ``bitbake`` command, when not using "--buildfile" or "-b" only |
451 | accepts a "PROVIDES". You cannot provide anything else. By default, a | 498 | accepts a "PROVIDES". You cannot provide anything else. By default, a |
452 | recipe file generally "PROVIDES" its "packagename" as shown in the | 499 | recipe file generally "PROVIDES" its "packagename" as shown in the |
453 | following example: $ bitbake foo This next example "PROVIDES" the | 500 | following example: :: |
501 | |||
502 | $ bitbake foo | ||
503 | |||
504 | This next example "PROVIDES" the | ||
454 | package name and also uses the "-c" option to tell BitBake to just | 505 | package name and also uses the "-c" option to tell BitBake to just |
455 | execute the ``do_clean`` task: $ bitbake -c clean foo | 506 | execute the ``do_clean`` task: :: |
507 | |||
508 | $ bitbake -c clean foo | ||
456 | 509 | ||
457 | Executing a List of Task and Recipe Combinations | 510 | Executing a List of Task and Recipe Combinations |
458 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 511 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
@@ -461,8 +514,9 @@ The BitBake command line supports specifying different tasks for | |||
461 | individual targets when you specify multiple targets. For example, | 514 | individual targets when you specify multiple targets. For example, |
462 | suppose you had two targets (or recipes) ``myfirstrecipe`` and | 515 | suppose you had two targets (or recipes) ``myfirstrecipe`` and |
463 | ``mysecondrecipe`` and you needed BitBake to run ``taskA`` for the first | 516 | ``mysecondrecipe`` and you needed BitBake to run ``taskA`` for the first |
464 | recipe and ``taskB`` for the second recipe: $ bitbake | 517 | recipe and ``taskB`` for the second recipe: :: |
465 | myfirstrecipe:do_taskA mysecondrecipe:do_taskB | 518 | |
519 | $ bitbake myfirstrecipe:do_taskA mysecondrecipe:do_taskB | ||
466 | 520 | ||
467 | Generating Dependency Graphs | 521 | Generating Dependency Graphs |
468 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 522 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
@@ -474,10 +528,10 @@ You can convert these graphs into images using the ``dot`` tool from | |||
474 | When you generate a dependency graph, BitBake writes two files to the | 528 | When you generate a dependency graph, BitBake writes two files to the |
475 | current working directory: | 529 | current working directory: |
476 | 530 | ||
477 | - *``task-depends.dot``:* Shows dependencies between tasks. These | 531 | - ``task-depends.dot``: Shows dependencies between tasks. These |
478 | dependencies match BitBake's internal task execution list. | 532 | dependencies match BitBake's internal task execution list. |
479 | 533 | ||
480 | - *``pn-buildlist``:* Shows a simple list of targets that are to be | 534 | - ``pn-buildlist``: Shows a simple list of targets that are to be |
481 | built. | 535 | built. |
482 | 536 | ||
483 | To stop depending on common depends, use the "-I" depend option and | 537 | To stop depending on common depends, use the "-I" depend option and |
@@ -486,8 +540,11 @@ produce more readable graphs. This way, you can remove from the graph | |||
486 | ``DEPENDS`` from inherited classes such as ``base.bbclass``. | 540 | ``DEPENDS`` from inherited classes such as ``base.bbclass``. |
487 | 541 | ||
488 | Here are two examples that create dependency graphs. The second example | 542 | Here are two examples that create dependency graphs. The second example |
489 | omits depends common in OpenEmbedded from the graph: $ bitbake -g foo $ | 543 | omits depends common in OpenEmbedded from the graph: :: |
490 | bitbake -g -I virtual/kernel -I eglibc foo | 544 | |
545 | $ bitbake -g foo | ||
546 | |||
547 | $ bitbake -g -I virtual/kernel -I eglibc foo | ||
491 | 548 | ||
492 | Executing a Multiple Configuration Build | 549 | Executing a Multiple Configuration Build |
493 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 550 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
@@ -504,6 +561,9 @@ files is specific. They must reside in the current build directory in a | |||
504 | sub-directory of ``conf`` named ``multiconfig``. Following is an example | 561 | sub-directory of ``conf`` named ``multiconfig``. Following is an example |
505 | for two separate targets: | 562 | for two separate targets: |
506 | 563 | ||
564 | .. image:: figures/bb_multiconfig_files.png | ||
565 | :align: center | ||
566 | |||
507 | The reason for this required file hierarchy is because the ``BBPATH`` | 567 | The reason for this required file hierarchy is because the ``BBPATH`` |
508 | variable is not constructed until the layers are parsed. Consequently, | 568 | variable is not constructed until the layers are parsed. Consequently, |
509 | using the configuration file as a pre-configuration file is not possible | 569 | using the configuration file as a pre-configuration file is not possible |
@@ -522,14 +582,19 @@ accomplished by setting the | |||
522 | configuration files for ``target1`` and ``target2`` defined in the build | 582 | configuration files for ``target1`` and ``target2`` defined in the build |
523 | directory. The following statement in the ``local.conf`` file both | 583 | directory. The following statement in the ``local.conf`` file both |
524 | enables BitBake to perform multiple configuration builds and specifies | 584 | enables BitBake to perform multiple configuration builds and specifies |
525 | the two extra multiconfigs: BBMULTICONFIG = "target1 target2" | 585 | the two extra multiconfigs: :: |
586 | |||
587 | BBMULTICONFIG = "target1 target2" | ||
526 | 588 | ||
527 | Once the target configuration files are in place and BitBake has been | 589 | Once the target configuration files are in place and BitBake has been |
528 | enabled to perform multiple configuration builds, use the following | 590 | enabled to perform multiple configuration builds, use the following |
529 | command form to start the builds: $ bitbake [mc:multiconfigname:]target | 591 | command form to start the builds: :: |
530 | [[[mc:multiconfigname:]target] ... ] Here is an example for two extra | 592 | |
531 | multiconfigs: ``target1`` and ``target2``: $ bitbake mc::target | 593 | $ bitbake [mc:multiconfigname:]target [[[mc:multiconfigname:]target] ... ] |
532 | mc:target1:target mc:target2:target | 594 | |
595 | Here is an example for two extra multiconfigs: ``target1`` and ``target2``: :: | ||
596 | |||
597 | $ bitbake mc::target mc:target1:target mc:target2:target | ||
533 | 598 | ||
534 | .. _bb-enabling-multiple-configuration-build-dependencies: | 599 | .. _bb-enabling-multiple-configuration-build-dependencies: |
535 | 600 | ||
@@ -548,26 +613,37 @@ multiconfig. | |||
548 | 613 | ||
549 | To enable dependencies in a multiple configuration build, you must | 614 | To enable dependencies in a multiple configuration build, you must |
550 | declare the dependencies in the recipe using the following statement | 615 | declare the dependencies in the recipe using the following statement |
551 | form: task_or_package[mcdepends] = | 616 | form: :: |
552 | "mc:from_multiconfig:to_multiconfig:recipe_name:task_on_which_to_depend" | 617 | |
618 | task_or_package[mcdepends] = "mc:from_multiconfig:to_multiconfig:recipe_name:task_on_which_to_depend" | ||
619 | |||
553 | To better show how to use this statement, consider an example with two | 620 | To better show how to use this statement, consider an example with two |
554 | multiconfigs: ``target1`` and ``target2``: image_task[mcdepends] = | 621 | multiconfigs: ``target1`` and ``target2``: :: |
555 | "mc:target1:target2:image2:rootfs_task" In this example, the | 622 | |
556 | from_multiconfig is "target1" and the to_multiconfig is "target2". The | 623 | image_task[mcdepends] = "mc:target1:target2:image2:rootfs_task" |
624 | |||
625 | In this example, the | ||
626 | ``from_multiconfig`` is "target1" and the ``to_multiconfig`` is "target2". The | ||
557 | task on which the image whose recipe contains image_task depends on the | 627 | task on which the image whose recipe contains image_task depends on the |
558 | completion of the rootfs_task used to build out image2, which is | 628 | completion of the rootfs_task used to build out image2, which is |
559 | associated with the "target2" multiconfig. | 629 | associated with the "target2" multiconfig. |
560 | 630 | ||
561 | Once you set up this dependency, you can build the "target1" multiconfig | 631 | Once you set up this dependency, you can build the "target1" multiconfig |
562 | using a BitBake command as follows: $ bitbake mc:target1:image1 This | 632 | using a BitBake command as follows: :: |
563 | command executes all the tasks needed to create image1 for the "target1" | 633 | |
634 | $ bitbake mc:target1:image1 | ||
635 | |||
636 | This command executes all the tasks needed to create ``image1`` for the "target1" | ||
564 | multiconfig. Because of the dependency, BitBake also executes through | 637 | multiconfig. Because of the dependency, BitBake also executes through |
565 | the rootfs_task for the "target2" multiconfig build. | 638 | the ``rootfs_task`` for the "target2" multiconfig build. |
566 | 639 | ||
567 | Having a recipe depend on the root filesystem of another build might not | 640 | Having a recipe depend on the root filesystem of another build might not |
568 | seem that useful. Consider this change to the statement in the image1 | 641 | seem that useful. Consider this change to the statement in the image1 |
569 | recipe: image_task[mcdepends] = "mc:target1:target2:image2:image_task" | 642 | recipe: :: |
570 | In this case, BitBake must create image2 for the "target2" build since | 643 | |
644 | image_task[mcdepends] = "mc:target1:target2:image2:image_task" | ||
645 | |||
646 | In this case, BitBake must create ``image2`` for the "target2" build since | ||
571 | the "target1" build depends on it. | 647 | the "target1" build depends on it. |
572 | 648 | ||
573 | Because "target1" and "target2" are enabled for multiple configuration | 649 | Because "target1" and "target2" are enabled for multiple configuration |