summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2012-02-28 12:19:43 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-08 12:08:04 -0800
commit36e3daf7f924fbf15ab9c1764c424046adffff5e (patch)
treeda22b716ee37498ee8df35ff390405ca869fcac0
parentad5de9715af23781fc11891d87014c74d5b80206 (diff)
downloadpoky-36e3daf7f924fbf15ab9c1764c424046adffff5e.tar.gz
documentation/poky-ref-manual/ref-classes.xml: New externalsrc class
Added a new class description for externalsrc.bbclass. This addition was driven by feedback from two community members inside Intel whose feedback was picked up by Darren Hart. Reported-by: Inaky Perez-Gonzales <inaky.perez-gonzales@intel.com> Reported-by: Mohamed Abbas <mohamed.abbas@intel.com> (From yocto-docs rev: 1217d26993f9e5f3e6914e366b1fed34debbd242) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--documentation/poky-ref-manual/ref-classes.xml60
1 files changed, 60 insertions, 0 deletions
diff --git a/documentation/poky-ref-manual/ref-classes.xml b/documentation/poky-ref-manual/ref-classes.xml
index 9238ba2406..09b3161fb7 100644
--- a/documentation/poky-ref-manual/ref-classes.xml
+++ b/documentation/poky-ref-manual/ref-classes.xml
@@ -519,6 +519,66 @@
519 </para> 519 </para>
520</section> 520</section>
521 521
522<section id='ref-classes-externalsrc'>
523 <title>Using External Source - <filename>externalsrc.bbclass</filename></title>
524
525 <para>
526 You can use this class to build software from source code that is external to the
527 Yocto Project build system.
528 In other words, your source code resides in an external tree outside of the Yocto Project.
529 Building software from an external source tree means that the normal fetch, unpack, and
530 patch process is not used.
531 </para>
532
533 <para>
534 To use the class, you need to define the
535 <link linkend='var-S'><filename>S</filename></link> variable to point to the directory that contains the source files.
536 You also need to have your recipe inherit the <filename>externalsrc.bbclass</filename> class.
537 </para>
538
539 <para>
540 This class expects the source code to support recipe builds that use the
541 <link linkend='var-B'><filename>B</filename></link> variable to point to the directory in
542 which the Yocto Project build system places the generated objects built from the recipes.
543 By default, the <filename>B</filename> directory is set to the following, which is separate from the
544 source directory (<filename>S</filename>):
545 <literallayout class='monospaced'>
546 ${WORKDIR}/${BPN}-{PV}/
547 </literallayout>
548 See the glossary entries for the
549 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>,
550 <link linkend='var-BPN'><filename>BPN</filename></link>,
551 <link linkend='var-PV'><filename>PV</filename></link>,
552 <link linkend='var-S'><filename>S</filename></link>, and
553 <link linkend='var-B'><filename>B</filename></link> for more information.
554 </para>
555
556 <para>
557 You can build object files in the external tree by setting the
558 <filename>B</filename> variable equal to <filename>"${S}"</filename>.
559 However, this practice does not work well if you use the source for more than one variant
560 (i.e., "natives" such as <filename>quilt-native</filename>,
561 or "crosses" such as <filename>gcc-cross</filename>).
562 So, be sure there are no "native", "cross", or "multilib" variants of the recipe.
563 </para>
564
565 <para>
566 If you do want to build different variants of a recipe, you can use the
567 <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> variable.
568 When you do, the <link linkend='var-B'><filename>B</filename></link> variable must support the
569 recipe's ability to build variants in different working directories.
570 Alternatively, you can make sure that separate recipes exist that each
571 use the <filename>BBCLASSEXTEND</filename> variable to build each variant.
572 The separate recipes can inherit a single target recipe.
573 </para>
574
575 <para>
576 For information on how to use this class, see the
577 "<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#building-software-from-an-external-source'>Building
578 Software from an External Source</ulink>" section in the Yocto Project Development Manual.
579 </para>
580</section>
581
522<section id='ref-classes-others'> 582<section id='ref-classes-others'>
523 <title>Other Classes</title> 583 <title>Other Classes</title>
524 584