summaryrefslogtreecommitdiffstats
path: root/documentation/overview-manual
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2018-05-02 09:17:22 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-24 17:16:29 +0100
commit304254e8eabfd32a4baf440cffeebcb6619254e8 (patch)
tree85485e8de4cb03ccff47a2077cc71a3ff556aa50 /documentation/overview-manual
parent3391d1d8e287b2ae998ccf97b8cd55b937d2b25a (diff)
downloadpoky-304254e8eabfd32a4baf440cffeebcb6619254e8.tar.gz
overview-manual: Updated "Source Fetching" section.
I scrubbed through this section and provided much better explanations of the inside workings of BitBake fetching source with building recipes. During that, I fixed an error where the PN variable was being used rather than the BPN variable. (From yocto-docs rev: 5765987259ac46f140e099d8e1da2ab33f006d36) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/overview-manual')
-rw-r--r--documentation/overview-manual/overview-manual-concepts.xml105
1 files changed, 73 insertions, 32 deletions
diff --git a/documentation/overview-manual/overview-manual-concepts.xml b/documentation/overview-manual/overview-manual-concepts.xml
index d0b7d96f27..af9c36cc99 100644
--- a/documentation/overview-manual/overview-manual-concepts.xml
+++ b/documentation/overview-manual/overview-manual-concepts.xml
@@ -1083,18 +1083,17 @@
1083 <para> 1083 <para>
1084 The OpenEmbedded build system uses 1084 The OpenEmbedded build system uses
1085 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink> 1085 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
1086 to produce images. 1086 to produce images and Software Development Kits (SDKs).
1087 You can see from the 1087 You can see from the
1088 <link linkend='general-workflow-figure'>general workflow figure</link>, 1088 <link linkend='general-workflow-figure'>general workflow figure</link>,
1089 the BitBake area consists of several functional areas. 1089 the BitBake area consists of several functional areas.
1090 This section takes a closer look at each of those areas. 1090 This section takes a closer look at each of those areas.
1091 </para> 1091 <note>
1092 1092 Separate documentation exists for the BitBake tool.
1093 <para> 1093 See the
1094 Separate documentation exists for the BitBake tool. 1094 <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>
1095 See the 1095 for reference material on BitBake.
1096 <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink> 1096 </note>
1097 for reference material on BitBake.
1098 </para> 1097 </para>
1099 1098
1100 <section id='source-fetching-dev-environment'> 1099 <section id='source-fetching-dev-environment'>
@@ -1111,8 +1110,8 @@
1111 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>do_fetch</filename></ulink> 1110 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>do_fetch</filename></ulink>
1112 and 1111 and
1113 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-unpack'><filename>do_unpack</filename></ulink> 1112 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-unpack'><filename>do_unpack</filename></ulink>
1114 tasks fetch the source files and unpack them into the work 1113 tasks fetch the source files and unpack them into the
1115 directory. 1114 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
1116 <note> 1115 <note>
1117 For every local file (e.g. <filename>file://</filename>) 1116 For every local file (e.g. <filename>file://</filename>)
1118 that is part of a recipe's 1117 that is part of a recipe's
@@ -1120,14 +1119,13 @@
1120 statement, the OpenEmbedded build system takes a 1119 statement, the OpenEmbedded build system takes a
1121 checksum of the file for the recipe and inserts the 1120 checksum of the file for the recipe and inserts the
1122 checksum into the signature for the 1121 checksum into the signature for the
1123 <filename>do_fetch</filename>. 1122 <filename>do_fetch</filename> task.
1124 If any local file has been modified, the 1123 If any local file has been modified, the
1125 <filename>do_fetch</filename> task and all tasks that 1124 <filename>do_fetch</filename> task and all tasks that
1126 depend on it are re-executed. 1125 depend on it are re-executed.
1127 </note> 1126 </note>
1128 By default, everything is accomplished in the 1127 By default, everything is accomplished in the Build
1129 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>, 1128 Directory, which has a defined structure.
1130 which has a defined structure.
1131 For additional general information on the Build Directory, 1129 For additional general information on the Build Directory,
1132 see the 1130 see the
1133 "<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-build'><filename>build/</filename></ulink>" 1131 "<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-build'><filename>build/</filename></ulink>"
@@ -1135,54 +1133,97 @@
1135 </para> 1133 </para>
1136 1134
1137 <para> 1135 <para>
1138 Unpacked source files are pointed to by the
1139 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
1140 variable.
1141 Each recipe has an area in the Build Directory where the 1136 Each recipe has an area in the Build Directory where the
1142 unpacked source code resides. 1137 unpacked source code resides.
1138 The
1139 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
1140 variable points to this area for a recipe's unpacked source
1141 code.
1143 The name of that directory for any given recipe is defined 1142 The name of that directory for any given recipe is defined
1144 from several different variables. 1143 from several different variables.
1145 You can see the variables that define these directories 1144 The preceding figure and the following list describe
1146 by looking at the figure: 1145 the Build Directory's hierarchy:
1147 <itemizedlist> 1146 <itemizedlist>
1148 <listitem><para> 1147 <listitem><para>
1149 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>: 1148 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>:
1150 The base directory where the OpenEmbedded build 1149 The base directory where the OpenEmbedded build
1151 system performs all its work during the build. 1150 system performs all its work during the build.
1151 The default base directory is the
1152 <filename>tmp</filename> directory.
1152 </para></listitem> 1153 </para></listitem>
1153 <listitem><para> 1154 <listitem><para>
1154 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>: 1155 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>:
1155 The architecture of the built package or packages. 1156 The architecture of the built package or packages.
1157 Depending on the eventual destination of the
1158 package or packages (i.e. machine architecture,
1159 <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>,
1160 SDK, or specific machine),
1161 <filename>PACKAGE_ARCH</filename> varies.
1162 See the variable's description for details.
1156 </para></listitem> 1163 </para></listitem>
1157 <listitem><para> 1164 <listitem><para>
1158 <ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_OS'><filename>TARGET_OS</filename></ulink>: 1165 <ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_OS'><filename>TARGET_OS</filename></ulink>:
1159 The operating system of the target device. 1166 The operating system of the target device.
1167 A typical value would be "linux" (e.g.
1168 "qemux86-poky-linux").
1160 </para></listitem> 1169 </para></listitem>
1161 <listitem><para> 1170 <listitem><para>
1162 <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>: 1171 <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>:
1163 The name of the built package. 1172 The name of the recipe used to build the package.
1164 </para></listitem> 1173 This variable can have multiple meanings.
1165 <listitem><para> 1174 However, when used in the context of input files,
1166 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>: 1175 <filename>PN</filename> represents the the name
1167 The version of the recipe used to build the 1176 of the recipe.
1168 package.
1169 </para></listitem>
1170 <listitem><para>
1171 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>:
1172 The revision of the recipe used to build the
1173 package.
1174 </para></listitem> 1177 </para></listitem>
1175 <listitem><para> 1178 <listitem><para>
1176 <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>: 1179 <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>:
1177 The location within <filename>TMPDIR</filename> 1180 The location where the OpenEmbedded build system
1178 where a specific package is built. 1181 builds a recipe (i.e. does the work to create the
1182 package).
1183 <itemizedlist>
1184 <listitem><para>
1185 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>:
1186 The version of the recipe used to build the
1187 package.
1188 </para></listitem>
1189 <listitem><para>
1190 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>:
1191 The revision of the recipe used to build the
1192 package.
1193 </para></listitem>
1194 </itemizedlist>
1179 </para></listitem> 1195 </para></listitem>
1180 <listitem><para> 1196 <listitem><para>
1181 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>: 1197 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>:
1182 Contains the unpacked source files for a given 1198 Contains the unpacked source files for a given
1183 recipe. 1199 recipe.
1200 <itemizedlist>
1201 <listitem><para>
1202 <ulink url='&YOCTO_DOCS_REF_URL;#var-BPN'><filename>BPN</filename></ulink>:
1203 The name of the recipe used to build the
1204 package.
1205 The <filename>BPN</filename> variable is
1206 a version of the <filename>PN</filename>
1207 variable but with common prefixes and
1208 suffixes removed.
1209 </para></listitem>
1210 <listitem><para>
1211 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>:
1212 The version of the recipe used to build the
1213 package.
1214 </para></listitem>
1215 </itemizedlist>
1184 </para></listitem> 1216 </para></listitem>
1185 </itemizedlist> 1217 </itemizedlist>
1218 In the previous figure, notice that two sample
1219 hierarchies exist: one based on package architecture (i.e.
1220 <filename>PACKAGE_ARCH</filename>) and one based on a
1221 machine (i.e. <filename>MACHINE</filename>).
1222 The underlying structures are identical.
1223 The differentiator being what the OpenEmbedded build
1224 system is using as a build target (e.g. general
1225 architecture, a build host, an SDK, or a specific
1226 machine).
1186 </para> 1227 </para>
1187 </section> 1228 </section>
1188 1229