All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Documentation: Add a couple examples to conditional data.
@ 2014-07-09 12:20 Robert P. J. Day
  2014-07-10  7:44 ` Rifenbark, Scott M
  0 siblings, 1 reply; 3+ messages in thread
From: Robert P. J. Day @ 2014-07-09 12:20 UTC (permalink / raw)
  To: BitBake developer list


Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---

  i think having a couple real-life examples here would make a huge
difference.

diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
index a9f5072..e433d85 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
+++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
@@ -372,6 +372,23 @@
                         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>
+                            As a practical example, the following lines from
+                            one of the Linux kernel recipe files will 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
@@ -385,6 +402,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>

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Documentation: Add a couple examples to conditional data.
  2014-07-09 12:20 [PATCH] Documentation: Add a couple examples to conditional data Robert P. J. Day
@ 2014-07-10  7:44 ` Rifenbark, Scott M
  2014-07-10 10:05   ` Robert P. J. Day
  0 siblings, 1 reply; 3+ messages in thread
From: Rifenbark, Scott M @ 2014-07-10  7:44 UTC (permalink / raw)
  To: Robert P. J. Day, BitBake developer list

Applied.  I added some wording to call out the examples as being OpenEmbedded metadata-based examples.  I am assuming the examples were pulled from the poky area.  For the BB manual, we want to try to keep the manual isolated as much as possible from YP.  This is difficult but that is the intent.   Also, for future patches, I use a 5-space indentation convention for any code examples between the <literallayout> and </literallayout> tags. 

Change needs to be merged into the bitbake repo.

Scott

>-----Original Message-----
>From: bitbake-devel-bounces@lists.openembedded.org [mailto:bitbake-
>devel-bounces@lists.openembedded.org] On Behalf Of Robert P. J. Day
>Sent: Wednesday, July 09, 2014 5:21 AM
>To: BitBake developer list
>Subject: [bitbake-devel] [PATCH] Documentation: Add a couple examples to
>conditional data.
>
>
>Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
>
>---
>
>  i think having a couple real-life examples here would make a huge
>difference.
>
>diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
>b/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
>index a9f5072..e433d85 100644
>--- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
>+++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
>@@ -372,6 +372,23 @@
>                         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>
>+                            As a practical example, the following lines from
>+                            one of the Linux kernel recipe files will 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 @@ -
>385,6 +402,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>
>
>--
>
>===========================================================
>=============
>Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                        http://crashcourse.ca
>
>Twitter:                                       http://twitter.com/rpjday
>LinkedIn:                               http://ca.linkedin.com/in/rpjday
>===========================================================
>=============
>--
>_______________________________________________
>bitbake-devel mailing list
>bitbake-devel@lists.openembedded.org
>http://lists.openembedded.org/mailman/listinfo/bitbake-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Documentation: Add a couple examples to conditional data.
  2014-07-10  7:44 ` Rifenbark, Scott M
@ 2014-07-10 10:05   ` Robert P. J. Day
  0 siblings, 0 replies; 3+ messages in thread
From: Robert P. J. Day @ 2014-07-10 10:05 UTC (permalink / raw)
  To: Rifenbark, Scott M; +Cc: BitBake developer list

On Thu, 10 Jul 2014, Rifenbark, Scott M wrote:

> Applied.  I added some wording to call out the examples as being
> OpenEmbedded metadata-based examples.  I am assuming the examples
> were pulled from the poky area.  For the BB manual, we want to try
> to keep the manual isolated as much as possible from YP.  This is
> difficult but that is the intent.

  i know, but every so often, a concept cries out for an actual
example from the code base. i'll try to keep it to a minimum. :-)


> Also, for future patches, I use a 5-space indentation convention for
> any code examples between the <literallayout> and </literallayout>
> tags.

  oh, for some reason, i thought it was four. my apologies.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-10 10:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-09 12:20 [PATCH] Documentation: Add a couple examples to conditional data Robert P. J. Day
2014-07-10  7:44 ` Rifenbark, Scott M
2014-07-10 10:05   ` Robert P. J. Day

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.