diff options
| -rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml index 5e1a381fac..45366d5caa 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | |||
| @@ -403,6 +403,25 @@ | |||
| 403 | You select the os-specific version of the <filename>TEST</filename> | 403 | You select the os-specific version of the <filename>TEST</filename> |
| 404 | variable by appending the "os" override to the variable | 404 | variable by appending the "os" override to the variable |
| 405 | (i.e.<filename>TEST_os</filename>). | 405 | (i.e.<filename>TEST_os</filename>). |
| 406 | </para> | ||
| 407 | |||
| 408 | <para> | ||
| 409 | To better understand this, consider a practical example | ||
| 410 | that assumes an OpenEmbedded metadata-based Linux | ||
| 411 | kernel recipe file. | ||
| 412 | The following lines from the recipe file first set | ||
| 413 | the kernel branch variable <filename>KBRANCH</filename> | ||
| 414 | to a default value, then conditionally override that | ||
| 415 | value based on the architecture of the build: | ||
| 416 | <literallayout class='monospaced'> | ||
| 417 | KBRANCH = "standard/base" | ||
| 418 | KBRANCH_qemuarm = "standard/arm-versatile-926ejs" | ||
| 419 | KBRANCH_qemumips = "standard/mti-malta32" | ||
| 420 | KBRANCH_qemuppc = "standard/qemuppc" | ||
| 421 | KBRANCH_qemux86 = "standard/common-pc/base" | ||
| 422 | KBRANCH_qemux86-64 = "standard/common-pc-64/base" | ||
| 423 | KBRANCH_qemumips64 = "standard/mti-malta64" | ||
| 424 | </literallayout> | ||
| 406 | </para></listitem> | 425 | </para></listitem> |
| 407 | <listitem><para><emphasis>Appending and Prepending:</emphasis> | 426 | <listitem><para><emphasis>Appending and Prepending:</emphasis> |
| 408 | BitBake also supports append and prepend operations to | 427 | BitBake also supports append and prepend operations to |
| @@ -416,6 +435,18 @@ | |||
| 416 | </literallayout> | 435 | </literallayout> |
| 417 | In this example, <filename>DEPENDS</filename> becomes | 436 | In this example, <filename>DEPENDS</filename> becomes |
| 418 | "glibc ncurses libmad". | 437 | "glibc ncurses libmad". |
| 438 | </para> | ||
| 439 | |||
| 440 | <para> | ||
| 441 | Again using a kernel recipe file as an example, the | ||
| 442 | following lines will conditionally append to the | ||
| 443 | <filename>KERNEL_FEATURES</filename> variable based | ||
| 444 | on the architecture: | ||
| 445 | <literallayout class='monospaced'> | ||
| 446 | KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" | ||
| 447 | KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" | ||
| 448 | KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" | ||
| 449 | </literallayout> | ||
| 419 | </para></listitem> | 450 | </para></listitem> |
| 420 | </itemizedlist> | 451 | </itemizedlist> |
| 421 | </para> | 452 | </para> |
