summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2012-02-28 12:13:06 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-08 12:08:04 -0800
commitad5de9715af23781fc11891d87014c74d5b80206 (patch)
tree66d1729b45197748031d176cd8a4d812991395e6 /documentation
parent6aeeeba08fe307e8c790386d5eb3d006162acf13 (diff)
downloadpoky-ad5de9715af23781fc11891d87014c74d5b80206.tar.gz
documentation/dev-manual/dev-manual-common-tasks.xml: New section
Added a new section on building from an external source tree. This addition was driven by a need through two community members whose feedback was picked up by Darren. Reported-by: Inaky Perez-Gonzales <inaky.perez-gonzales@intel.com> Reported-by: Mohamed Abbas <mohamed.abbas@intel.com> (From yocto-docs rev: c9548803f58e5055d6686dbc16c94308296ccf2a) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml55
1 files changed, 55 insertions, 0 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index f631f98e18..80c47b0f64 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -1436,6 +1436,61 @@ so that there are some definite steps on how to do this. I need more detail her
1436 </para> 1436 </para>
1437 </section> 1437 </section>
1438 1438
1439 <section id="building-software-from-an-external-source">
1440 <title>Building Software from an External Source</title>
1441
1442 <para>
1443 By default, the Yocto Project build system does its work from within the
1444 <link linkend='yocto-project-build-directory'>Yocto Project Build Directory</link>.
1445 The build process involves fetching the source files, unpacking them, and then patching them
1446 if necessary before the build takes place.
1447 </para>
1448
1449 <para>
1450 Situations exist where you might want to build software from source files that are external to
1451 and thus outside of the <link linkend='yocto-project-files'>Yocto Project Files</link>.
1452 For example, suppose you have a project that includes a new BSP with a heavily customized
1453 kernel, a very minimal image, and some new user-space recipes.
1454 And, you want to minimize the exposure to the Yocto Project build system to the
1455 development team so that they can focus on their project and maintain everyone's workflow
1456 as much as possible.
1457 In this case, you want a kernel source directory on the development machine where the
1458 development occurs.
1459 You want the recipe's
1460 <ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'><filename>SRC_URI</filename></ulink>
1461 variable to point to the external directory and use it as is, not copy it.
1462 </para>
1463
1464 <para>
1465 To build from software that comes from an external source, all you need to do is
1466 change your recipe so that it inherits the
1467 <ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></ulink>
1468 class and then sets the
1469 <ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'><filename>S</filename></ulink>
1470 variable to point to your external source code.
1471 Here are the statements to put in your recipe:
1472 <literallayout class='monospaced'>
1473 inherit externalsrc
1474 S = "/some/path/to/your/package/source"
1475 </literallayout>
1476 </para>
1477
1478 <para>
1479 It is important to know that the <filename>externalsrc.bbclass</filename> assumes that the
1480 source directory <filename>S</filename> and the build directory
1481 <ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-B'><filename>B</filename></ulink>
1482 are different even though by default these directories are the same.
1483 This assumption is important because it supports building different variants of the recipe
1484 by using the
1485 <ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual#var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></ulink>
1486 variable.
1487 You could allow the build directory to be the same as the source directory but you would
1488 not be able to build more than one variant of the recipe.
1489 Consequently, if you are building multiple variants of the recipe, you need to establish a
1490 build directory that is different than the source directory.
1491 </para>
1492 </section>
1493
1439 <section id="usingpoky-changes"> 1494 <section id="usingpoky-changes">
1440 <title>Making and Maintaining Changes</title> 1495 <title>Making and Maintaining Changes</title>
1441 <para> 1496 <para>