summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2018-05-16 15:00:47 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-24 17:16:35 +0100
commite1b1f83208b52e44bf7b0edff3ebd03a512d24f3 (patch)
tree190281b8240b1bd7caf0a0009529f5506e8c5c4b /documentation/dev-manual
parent0122aced5f23962791c184ae1d1ef6644ff5c148 (diff)
downloadpoky-e1b1f83208b52e44bf7b0edff3ebd03a512d24f3.tar.gz
dev-manual: Moved "Building Software from an External Source" section.
This section is now organized under the parent "Building" section in the common tasks chapter. (From yocto-docs rev: bc1bc9965cda547e45ff09a1c9e77be5e8c0a3d9) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml150
1 files changed, 75 insertions, 75 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 6734b1f4b9..d4b99bc69f 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -6145,6 +6145,81 @@
6145 </itemizedlist> 6145 </itemizedlist>
6146 </para> 6146 </para>
6147 </section> 6147 </section>
6148
6149 <section id="building-software-from-an-external-source">
6150 <title>Building Software from an External Source</title>
6151
6152 <para>
6153 By default, the OpenEmbedded build system uses the
6154 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
6155 when building source code.
6156 The build process involves fetching the source files, unpacking
6157 them, and then patching them if necessary before the build takes
6158 place.
6159 </para>
6160
6161 <para>
6162 Situations exist where you might want to build software from source
6163 files that are external to and thus outside of the
6164 OpenEmbedded build system.
6165 For example, suppose you have a project that includes a new BSP with
6166 a heavily customized kernel.
6167 And, you want to minimize exposing the build system to the
6168 development team so that they can focus on their project and
6169 maintain everyone's workflow as much as possible.
6170 In this case, you want a kernel source directory on the development
6171 machine where the development occurs.
6172 You want the recipe's
6173 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
6174 variable to point to the external directory and use it as is, not
6175 copy it.
6176 </para>
6177
6178 <para>
6179 To build from software that comes from an external source, all you
6180 need to do is inherit the
6181 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-externalsrc'><filename>externalsrc</filename></ulink>
6182 class and then set the
6183 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC'><filename>EXTERNALSRC</filename></ulink>
6184 variable to point to your external source code.
6185 Here are the statements to put in your
6186 <filename>local.conf</filename> file:
6187 <literallayout class='monospaced'>
6188 INHERIT += "externalsrc"
6189 EXTERNALSRC_pn-<replaceable>myrecipe</replaceable> = "<replaceable>path-to-your-source-tree</replaceable>"
6190 </literallayout>
6191 </para>
6192
6193 <para>
6194 This next example shows how to accomplish the same thing by setting
6195 <filename>EXTERNALSRC</filename> in the recipe itself or in the
6196 recipe's append file:
6197 <literallayout class='monospaced'>
6198 EXTERNALSRC = "<replaceable>path</replaceable>"
6199 EXTERNALSRC_BUILD = "<replaceable>path</replaceable>"
6200 </literallayout>
6201 <note>
6202 In order for these settings to take effect, you must globally
6203 or locally inherit the
6204 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-externalsrc'><filename>externalsrc</filename></ulink>
6205 class.
6206 </note>
6207 </para>
6208
6209 <para>
6210 By default, <filename>externalsrc.bbclass</filename> builds
6211 the source code in a directory separate from the external source
6212 directory as specified by
6213 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC'><filename>EXTERNALSRC</filename></ulink>.
6214 If you need to have the source built in the same directory in
6215 which it resides, or some other nominated directory, you can set
6216 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC_BUILD'><filename>EXTERNALSRC_BUILD</filename></ulink>
6217 to point to that directory:
6218 <literallayout class='monospaced'>
6219 EXTERNALSRC_BUILD_pn-<replaceable>myrecipe</replaceable> = "<replaceable>path-to-your-source-tree</replaceable>"
6220 </literallayout>
6221 </para>
6222 </section>
6148 </section> 6223 </section>
6149 6224
6150 6225
@@ -9992,81 +10067,6 @@
9992 </section> 10067 </section>
9993 </section> 10068 </section>
9994 10069
9995 <section id="building-software-from-an-external-source">
9996 <title>Building Software from an External Source</title>
9997
9998 <para>
9999 By default, the OpenEmbedded build system uses the
10000 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
10001 when building source code.
10002 The build process involves fetching the source files, unpacking
10003 them, and then patching them if necessary before the build takes
10004 place.
10005 </para>
10006
10007 <para>
10008 Situations exist where you might want to build software from source
10009 files that are external to and thus outside of the
10010 OpenEmbedded build system.
10011 For example, suppose you have a project that includes a new BSP with
10012 a heavily customized kernel.
10013 And, you want to minimize exposing the build system to the
10014 development team so that they can focus on their project and
10015 maintain everyone's workflow as much as possible.
10016 In this case, you want a kernel source directory on the development
10017 machine where the development occurs.
10018 You want the recipe's
10019 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
10020 variable to point to the external directory and use it as is, not
10021 copy it.
10022 </para>
10023
10024 <para>
10025 To build from software that comes from an external source, all you
10026 need to do is inherit the
10027 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-externalsrc'><filename>externalsrc</filename></ulink>
10028 class and then set the
10029 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC'><filename>EXTERNALSRC</filename></ulink>
10030 variable to point to your external source code.
10031 Here are the statements to put in your
10032 <filename>local.conf</filename> file:
10033 <literallayout class='monospaced'>
10034 INHERIT += "externalsrc"
10035 EXTERNALSRC_pn-<replaceable>myrecipe</replaceable> = "<replaceable>path-to-your-source-tree</replaceable>"
10036 </literallayout>
10037 </para>
10038
10039 <para>
10040 This next example shows how to accomplish the same thing by setting
10041 <filename>EXTERNALSRC</filename> in the recipe itself or in the
10042 recipe's append file:
10043 <literallayout class='monospaced'>
10044 EXTERNALSRC = "<replaceable>path</replaceable>"
10045 EXTERNALSRC_BUILD = "<replaceable>path</replaceable>"
10046 </literallayout>
10047 <note>
10048 In order for these settings to take effect, you must globally
10049 or locally inherit the
10050 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-externalsrc'><filename>externalsrc</filename></ulink>
10051 class.
10052 </note>
10053 </para>
10054
10055 <para>
10056 By default, <filename>externalsrc.bbclass</filename> builds
10057 the source code in a directory separate from the external source
10058 directory as specified by
10059 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC'><filename>EXTERNALSRC</filename></ulink>.
10060 If you need to have the source built in the same directory in
10061 which it resides, or some other nominated directory, you can set
10062 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC_BUILD'><filename>EXTERNALSRC_BUILD</filename></ulink>
10063 to point to that directory:
10064 <literallayout class='monospaced'>
10065 EXTERNALSRC_BUILD_pn-<replaceable>myrecipe</replaceable> = "<replaceable>path-to-your-source-tree</replaceable>"
10066 </literallayout>
10067 </para>
10068 </section>
10069
10070 <section id="selecting-an-initialization-manager"> 10070 <section id="selecting-an-initialization-manager">
10071 <title>Selecting an Initialization Manager</title> 10071 <title>Selecting an Initialization Manager</title>
10072 10072