summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@crashcourse.ca>2014-07-10 10:23:32 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-21 11:00:57 +0100
commiteb169fe8b392a58bfa02250ac7b8978f89fd904a (patch)
tree74b717c842a9931ab1fb88abe6671da6e5f20fb8 /bitbake
parent49627bbad387791053e50dde02b51a0f16fdc40e (diff)
downloadast2050-yocto-poky-eb169fe8b392a58bfa02250ac7b8978f89fd904a.zip
ast2050-yocto-poky-eb169fe8b392a58bfa02250ac7b8978f89fd904a.tar.gz
bitbake: bitbake-user-manual-metadata.xml: Added second conditional metadata example.
I think having a couple real-life examples here would make a huge difference. Comment from Scott: I modified the example description to indicate that it is from an OpenEmbedded metadata-based recipe (i.e from YP). We have been trying very hard to keep the BitBake User Manual as separate as possible from the YP docs. (Bitbake rev: 834780772a08ecce7ed863e96d0674b47d0e589d) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml31
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 5e1a381..45366d5 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 @@
You select the os-specific version of the <filename>TEST</filename>
variable by appending the "os" override to the variable
(i.e.<filename>TEST_os</filename>).
+ </para>
+
+ <para>
+ To better understand this, consider a practical example
+ that assumes an OpenEmbedded metadata-based Linux
+ kernel recipe file.
+ The following lines from the recipe file first set
+ the kernel branch variable <filename>KBRANCH</filename>
+ to a default value, then conditionally override that
+ value based on the architecture of the build:
+ <literallayout class='monospaced'>
+ KBRANCH = "standard/base"
+ KBRANCH_qemuarm = "standard/arm-versatile-926ejs"
+ KBRANCH_qemumips = "standard/mti-malta32"
+ KBRANCH_qemuppc = "standard/qemuppc"
+ KBRANCH_qemux86 = "standard/common-pc/base"
+ KBRANCH_qemux86-64 = "standard/common-pc-64/base"
+ KBRANCH_qemumips64 = "standard/mti-malta64"
+ </literallayout>
</para></listitem>
<listitem><para><emphasis>Appending and Prepending:</emphasis>
BitBake also supports append and prepend operations to
@@ -416,6 +435,18 @@
</literallayout>
In this example, <filename>DEPENDS</filename> becomes
"glibc ncurses libmad".
+ </para>
+
+ <para>
+ Again using a kernel recipe file as an example, the
+ following lines will conditionally append to the
+ <filename>KERNEL_FEATURES</filename> variable based
+ on the architecture:
+ <literallayout class='monospaced'>
+ KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+ KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+ KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+ </literallayout>
</para></listitem>
</itemizedlist>
</para>
OpenPOWER on IntegriCloud