From ad5de9715af23781fc11891d87014c74d5b80206 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Tue, 28 Feb 2012 12:13:06 -0600 Subject: 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 Reported-by: Mohamed Abbas (From yocto-docs rev: c9548803f58e5055d6686dbc16c94308296ccf2a) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'documentation/dev-manual') 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 +
+ Building Software from an External Source + + + By default, the Yocto Project build system does its work from within the + Yocto Project Build Directory. + The build process involves fetching the source files, unpacking them, and then patching them + if necessary before the build takes place. + + + + Situations exist where you might want to build software from source files that are external to + and thus outside of the Yocto Project Files. + For example, suppose you have a project that includes a new BSP with a heavily customized + kernel, a very minimal image, and some new user-space recipes. + And, you want to minimize the exposure to the Yocto Project build system to the + development team so that they can focus on their project and maintain everyone's workflow + as much as possible. + In this case, you want a kernel source directory on the development machine where the + development occurs. + You want the recipe's + SRC_URI + variable to point to the external directory and use it as is, not copy it. + + + + To build from software that comes from an external source, all you need to do is + change your recipe so that it inherits the + externalsrc.bbclass + class and then sets the + S + variable to point to your external source code. + Here are the statements to put in your recipe: + + inherit externalsrc + S = "/some/path/to/your/package/source" + + + + + It is important to know that the externalsrc.bbclass assumes that the + source directory S and the build directory + B + are different even though by default these directories are the same. + This assumption is important because it supports building different variants of the recipe + by using the + BBCLASSEXTEND + variable. + You could allow the build directory to be the same as the source directory but you would + not be able to build more than one variant of the recipe. + Consequently, if you are building multiple variants of the recipe, you need to establish a + build directory that is different than the source directory. + +
+
Making and Maintaining Changes -- cgit v1.2.3-54-g00ecf