summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2018-01-31 13:03:11 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-14 15:25:31 +0000
commit01a70aaea95d4d6d20d196191157f09b3b903d29 (patch)
tree96c6a575f6101531eb6cb4e107d73f67b649e3d1 /documentation
parentd74420e7785777d770a5fc5a001d37fcd57718db (diff)
downloadpoky-01a70aaea95d4d6d20d196191157f09b3b903d29.tar.gz
concepts-manual: General edits
Removed redundant links, changed some wordings. This was a general scrub of the prose. (From yocto-docs rev: 2c0ff0af7df3aa46fc05aaf28039a2ffb380424a) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/concepts-manual/concepts-manual-concepts.xml119
1 files changed, 58 insertions, 61 deletions
diff --git a/documentation/concepts-manual/concepts-manual-concepts.xml b/documentation/concepts-manual/concepts-manual-concepts.xml
index 4ad4ebc74b..010eda6191 100644
--- a/documentation/concepts-manual/concepts-manual-concepts.xml
+++ b/documentation/concepts-manual/concepts-manual-concepts.xml
@@ -5,13 +5,6 @@
5<chapter id=' concepts-manual-concepts'> 5<chapter id=' concepts-manual-concepts'>
6<title>Yocto Project Concepts</title> 6<title>Yocto Project Concepts</title>
7 7
8 <para>
9 This chapter describes concepts for various areas of the Yocto Project.
10 Currently, topics include Yocto Project components, cross-development
11 generation, shared state (sstate) cache, runtime dependencies,
12 Pseudo and Fakeroot, x32 psABI, Wayland support, and Licenses.
13 </para>
14
15 <section id='yocto-project-components'> 8 <section id='yocto-project-components'>
16 <title>Yocto Project Components</title> 9 <title>Yocto Project Components</title>
17 10
@@ -67,8 +60,9 @@
67 <title>BitBake</title> 60 <title>BitBake</title>
68 61
69 <para> 62 <para>
70 BitBake is the tool at the heart of the OpenEmbedded build 63 BitBake is the tool at the heart of the
71 system and is responsible for parsing the 64 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
65 and is responsible for parsing the
72 <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>, 66 <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>,
73 generating a list of tasks from it, and then executing those 67 generating a list of tasks from it, and then executing those
74 tasks. 68 tasks.
@@ -93,8 +87,7 @@
93 The most common usage for BitBake is 87 The most common usage for BitBake is
94 <filename>bitbake <replaceable>packagename</replaceable></filename>, 88 <filename>bitbake <replaceable>packagename</replaceable></filename>,
95 where <filename>packagename</filename> is the name of the 89 where <filename>packagename</filename> is the name of the
96 package you want to build (referred to as the "target" in this 90 package you want to build (referred to as the "target").
97 manual).
98 The target often equates to the first part of a recipe's 91 The target often equates to the first part of a recipe's
99 filename (e.g. "foo" for a recipe named 92 filename (e.g. "foo" for a recipe named
100 <filename>foo_1.3.0-r0.bb</filename>). 93 <filename>foo_1.3.0-r0.bb</filename>).
@@ -180,8 +173,10 @@
180 in the build's configuration file (e.g. 173 in the build's configuration file (e.g.
181 <filename>poky/build/conf/local.conf</filename>). 174 <filename>poky/build/conf/local.conf</filename>).
182 <note> 175 <note>
183 Any recipe that PROVIDES a <filename>virtual/*</filename> 176 Any recipe that
184 item that is ultimately not selected through 177 <ulink url='&YOCTO_DOCS_REF_URL;#var-PROVIDES'><filename>PROVIDES</filename></ulink>
178 a <filename>virtual/*</filename> item that is ultimately
179 not selected through
185 <filename>PREFERRED_PROVIDER</filename> does not get built. 180 <filename>PREFERRED_PROVIDER</filename> does not get built.
186 Preventing these recipes from building is usually the 181 Preventing these recipes from building is usually the
187 desired behavior since this mechanism's purpose is to 182 desired behavior since this mechanism's purpose is to
@@ -224,9 +219,7 @@
224 219
225 <para> 220 <para>
226 Class files (<filename>.bbclass</filename>) contain information 221 Class files (<filename>.bbclass</filename>) contain information
227 that is useful to share between 222 that is useful to share between Metadata files.
228 <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
229 files.
230 An example is the 223 An example is the
231 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-autotools'><filename>autotools</filename></ulink> 224 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-autotools'><filename>autotools</filename></ulink>
232 class, which contains common settings for any application that 225 class, which contains common settings for any application that
@@ -288,16 +281,18 @@
288 281
289 <para> 282 <para>
290 Most of the work occurs on the Build Host. 283 Most of the work occurs on the Build Host.
291 This is the machine used to build images and generally work within the 284 This is the machine used to build images and generally work within
292 the Yocto Project environment. 285 the the Yocto Project environment.
293 When you run BitBake to create an image, the OpenEmbedded build system 286 When you run
287 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
288 to create an image, the OpenEmbedded build system
294 uses the host <filename>gcc</filename> compiler to bootstrap a 289 uses the host <filename>gcc</filename> compiler to bootstrap a
295 cross-compiler named <filename>gcc-cross</filename>. 290 cross-compiler named <filename>gcc-cross</filename>.
296 The <filename>gcc-cross</filename> compiler is what BitBake uses to 291 The <filename>gcc-cross</filename> compiler is what BitBake uses to
297 compile source files when creating the target image. 292 compile source files when creating the target image.
298 You can think of <filename>gcc-cross</filename> simply as an 293 You can think of <filename>gcc-cross</filename> simply as an
299 automatically generated cross-compiler that is used internally within 294 automatically generated cross-compiler that is used internally
300 BitBake only. 295 within BitBake only.
301 <note> 296 <note>
302 The extensible SDK does not use 297 The extensible SDK does not use
303 <filename>gcc-cross-canadian</filename> since this SDK 298 <filename>gcc-cross-canadian</filename> since this SDK
@@ -370,11 +365,11 @@
370 <para> 365 <para>
371 You can use the OpenEmbedded build system to build an installer for 366 You can use the OpenEmbedded build system to build an installer for
372 the relocatable SDK used to develop applications. 367 the relocatable SDK used to develop applications.
373 When you run the installer, it installs the toolchain, which contains 368 When you run the installer, it installs the toolchain, which
374 the development tools (e.g., the 369 contains the development tools (e.g.,
375 <filename>gcc-cross-canadian</filename>), 370 <filename>gcc-cross-canadian</filename>,
376 <filename>binutils-cross-canadian</filename>, and other 371 <filename>binutils-cross-canadian</filename>, and other
377 <filename>nativesdk-*</filename> tools, 372 <filename>nativesdk-*</filename> tools),
378 which are tools native to the SDK (i.e. native to 373 which are tools native to the SDK (i.e. native to
379 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_ARCH'><filename>SDK_ARCH</filename></ulink>), 374 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_ARCH'><filename>SDK_ARCH</filename></ulink>),
380 you need to cross-compile and test your software. 375 you need to cross-compile and test your software.
@@ -476,8 +471,9 @@
476 471
477 <para> 472 <para>
478 By design, the OpenEmbedded build system builds everything from 473 By design, the OpenEmbedded build system builds everything from
479 scratch unless BitBake can determine that parts do not need to be 474 scratch unless
480 rebuilt. 475 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
476 can determine that parts do not need to be rebuilt.
481 Fundamentally, building from scratch is attractive as it means all 477 Fundamentally, building from scratch is attractive as it means all
482 parts are built fresh and there is no possibility of stale data 478 parts are built fresh and there is no possibility of stale data
483 causing problems. 479 causing problems.
@@ -518,9 +514,10 @@
518 </para> 514 </para>
519 515
520 <para> 516 <para>
521 For the first question, the build system detects changes in the 517 For the first question, the
522 "inputs" to a given task by creating a checksum (or signature) of 518 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
523 the task's inputs. 519 detects changes in the "inputs" to a given task by creating a
520 checksum (or signature) of the task's inputs.
524 If the checksum changes, the system assumes the inputs have changed 521 If the checksum changes, the system assumes the inputs have changed
525 and the task needs to be rerun. 522 and the task needs to be rerun.
526 For the second question, the shared state (sstate) code tracks 523 For the second question, the shared state (sstate) code tracks
@@ -607,7 +604,8 @@
607 Also, the build process has the objective of making native 604 Also, the build process has the objective of making native
608 or cross packages relocatable. 605 or cross packages relocatable.
609 <note> 606 <note>
610 Both native and cross packages run on the build host. 607 Both native and cross packages run on the
608 <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>.
611 However, cross packages generate output for the target 609 However, cross packages generate output for the target
612 architecture. 610 architecture.
613 </note> 611 </note>
@@ -629,7 +627,7 @@
629 </para> 627 </para>
630 628
631 <para> 629 <para>
632 So far we have solutions for shell scripts. 630 So far, solutions for shell scripts exist.
633 What about Python tasks? 631 What about Python tasks?
634 The same approach applies even though these tasks are more 632 The same approach applies even though these tasks are more
635 difficult. 633 difficult.
@@ -643,7 +641,7 @@
643 <para> 641 <para>
644 Like the <filename>WORKDIR</filename> case, situations exist 642 Like the <filename>WORKDIR</filename> case, situations exist
645 where dependencies should be ignored. 643 where dependencies should be ignored.
646 For these cases, you can instruct the build process to 644 For these situations, you can instruct the build process to
647 ignore a dependency by using a line like the following: 645 ignore a dependency by using a line like the following:
648 <literallayout class='monospaced'> 646 <literallayout class='monospaced'>
649 PACKAGE_ARCHS[vardepsexclude] = "MACHINE" 647 PACKAGE_ARCHS[vardepsexclude] = "MACHINE"
@@ -656,7 +654,7 @@
656 </para> 654 </para>
657 655
658 <para> 656 <para>
659 Equally, there are cases where we need to add dependencies 657 Equally, there are cases where you need to add dependencies
660 BitBake is not able to find. 658 BitBake is not able to find.
661 You can accomplish this by using a line like the following: 659 You can accomplish this by using a line like the following:
662 <literallayout class='monospaced'> 660 <literallayout class='monospaced'>
@@ -668,7 +666,7 @@
668 </para> 666 </para>
669 667
670 <para> 668 <para>
671 Consider a case with in-line Python, for example, where 669 As an example, consider a case with in-line Python where
672 BitBake is not able to figure out dependencies. 670 BitBake is not able to figure out dependencies.
673 When running in debug mode (i.e. using 671 When running in debug mode (i.e. using
674 <filename>-DDD</filename>), BitBake produces output when it 672 <filename>-DDD</filename>), BitBake produces output when it
@@ -696,9 +694,9 @@
696 </para> 694 </para>
697 695
698 <para> 696 <para>
699 At the code level, there are a variety of ways both the 697 At the code level, a variety of ways exist by which both the
700 basehash and the dependent task hashes can be influenced. 698 basehash and the dependent task hashes can be influenced.
701 Within the BitBake configuration file, we can give BitBake 699 Within the BitBake configuration file, you can give BitBake
702 some extra information to help it construct the basehash. 700 some extra information to help it construct the basehash.
703 The following statement effectively results in a list of 701 The following statement effectively results in a list of
704 global variable dependency excludes - variables never 702 global variable dependency excludes - variables never
@@ -799,8 +797,8 @@
799 </para> 797 </para>
800 798
801 <para> 799 <para>
802 There are two types of output, one is just about creating a 800 Two types of output exist.
803 directory in 801 One type is just about creating a directory in
804 <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>. 802 <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>.
805 A good example is the output of either 803 A good example is the output of either
806 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink> 804 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
@@ -1156,8 +1154,7 @@
1156 current version of the package that provides the shared 1154 current version of the package that provides the shared
1157 library must be used, as if 1155 library must be used, as if
1158 "<replaceable>package</replaceable> (>= <replaceable>version</replaceable>)" 1156 "<replaceable>package</replaceable> (>= <replaceable>version</replaceable>)"
1159 had been added to 1157 had been added to <filename>RDEPENDS</filename>.
1160 <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>.
1161 This forces an upgrade of the package containing the shared 1158 This forces an upgrade of the package containing the shared
1162 library when installing the package that depends on the 1159 library when installing the package that depends on the
1163 library, if needed.</para> 1160 library, if needed.</para>
@@ -1170,18 +1167,15 @@
1170 </para></listitem> 1167 </para></listitem>
1171 <listitem><para> 1168 <listitem><para>
1172 <filename>pcdeps</filename>: 1169 <filename>pcdeps</filename>:
1173 During the 1170 During the <filename>do_package</filename> task of each
1174 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink> 1171 recipe, all pkg-config modules
1175 task of each recipe, all pkg-config modules
1176 (<filename>*.pc</filename> files) installed by the recipe 1172 (<filename>*.pc</filename> files) installed by the recipe
1177 are located. 1173 are located.
1178 For each module, the package that contains the module is 1174 For each module, the package that contains the module is
1179 registered as providing the module. 1175 registered as providing the module.
1180 The resulting module-to-package mapping is saved globally in 1176 The resulting module-to-package mapping is saved globally in
1181 <ulink url='&YOCTO_DOCS_REF_URL;#var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></ulink> 1177 <filename>PKGDATA_DIR</filename> by the
1182 by the 1178 <filename>do_packagedata</filename> task.</para>
1183 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-packagedata'><filename>do_packagedata</filename></ulink>
1184 task.</para>
1185 1179
1186 <para>Simultaneously, all pkg-config modules installed by 1180 <para>Simultaneously, all pkg-config modules installed by
1187 the recipe are inspected to see what other pkg-config 1181 the recipe are inspected to see what other pkg-config
@@ -1238,8 +1232,7 @@
1238 1232
1239 <para> 1233 <para>
1240 The <filename>do_package</filename> task depends on the 1234 The <filename>do_package</filename> task depends on the
1241 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-packagedata'><filename>do_packagedata</filename></ulink> 1235 <filename>do_packagedata</filename> task of each recipe in
1242 task of each recipe in
1243 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink> 1236 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
1244 through use of a 1237 through use of a
1245 <filename>[</filename><ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>deptask</filename></ulink><filename>]</filename> 1238 <filename>[</filename><ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>deptask</filename></ulink><filename>]</filename>
@@ -1268,7 +1261,9 @@
1268 1261
1269 <para> 1262 <para>
1270 One approach to allowing tasks to perform root-only operations 1263 One approach to allowing tasks to perform root-only operations
1271 would be to require BitBake to run as root. 1264 would be to require
1265 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
1266 to run as root.
1272 However, this method is cumbersome and has security issues. 1267 However, this method is cumbersome and has security issues.
1273 The approach that is actually used is to run tasks that benefit 1268 The approach that is actually used is to run tasks that benefit
1274 from root privileges in a "fake" root environment. 1269 from root privileges in a "fake" root environment.
@@ -1288,8 +1283,9 @@
1288 </para> 1283 </para>
1289 1284
1290 <para> 1285 <para>
1291 In the OpenEmbedded build system, the program that implements 1286 In the
1292 fakeroot is known as Pseudo. 1287 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>,
1288 the program that implements fakeroot is known as Pseudo.
1293 Pseudo overrides system calls by using the environment variable 1289 Pseudo overrides system calls by using the environment variable
1294 <filename>LD_PRELOAD</filename>, which results in the illusion 1290 <filename>LD_PRELOAD</filename>, which results in the illusion
1295 of running as root. 1291 of running as root.
@@ -1469,8 +1465,9 @@
1469 <title>Licenses</title> 1465 <title>Licenses</title>
1470 1466
1471 <para> 1467 <para>
1472 This section describes the mechanism by which the OpenEmbedded 1468 This section describes the mechanism by which the
1473 build system tracks changes to licensing text. 1469 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
1470 tracks changes to licensing text.
1474 The section also describes how to enable commercially licensed 1471 The section also describes how to enable commercially licensed
1475 recipes, which by default are disabled. 1472 recipes, which by default are disabled.
1476 </para> 1473 </para>
@@ -1611,7 +1608,9 @@
1611 <itemizedlist> 1608 <itemizedlist>
1612 <listitem><para> 1609 <listitem><para>
1613 If you specify an empty or invalid "md5" 1610 If you specify an empty or invalid "md5"
1614 parameter, BitBake returns an md5 mis-match 1611 parameter,
1612 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
1613 returns an md5 mis-match
1615 error and displays the correct "md5" parameter 1614 error and displays the correct "md5" parameter
1616 value during the build. 1615 value during the build.
1617 The correct parameter is also captured in 1616 The correct parameter is also captured in
@@ -1704,9 +1703,8 @@
1704 License flag matching allows you to control what recipes 1703 License flag matching allows you to control what recipes
1705 the OpenEmbedded build system includes in the build. 1704 the OpenEmbedded build system includes in the build.
1706 Fundamentally, the build system attempts to match 1705 Fundamentally, the build system attempts to match
1707 <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_FLAGS'><filename>LICENSE_FLAGS</filename></ulink> 1706 <filename>LICENSE_FLAGS</filename> strings found in recipes
1708 strings found in recipes against 1707 against <filename>LICENSE_FLAGS_WHITELIST</filename>
1709 <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_FLAGS_WHITELIST'><filename>LICENSE_FLAGS_WHITELIST</filename></ulink>
1710 strings found in the whitelist. 1708 strings found in the whitelist.
1711 A match causes the build system to include a recipe in the 1709 A match causes the build system to include a recipe in the
1712 build, while failure to find a match causes the build 1710 build, while failure to find a match causes the build
@@ -1834,8 +1832,7 @@
1834 Of course, you could also create a matching whitelist 1832 Of course, you could also create a matching whitelist
1835 for those components using the more general "commercial" 1833 for those components using the more general "commercial"
1836 in the whitelist, but that would also enable all the 1834 in the whitelist, but that would also enable all the
1837 other packages with 1835 other packages with <filename>LICENSE_FLAGS</filename>
1838 <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_FLAGS'><filename>LICENSE_FLAGS</filename></ulink>
1839 containing "commercial", which you may or may not want: 1836 containing "commercial", which you may or may not want:
1840 <literallayout class='monospaced'> 1837 <literallayout class='monospaced'>
1841 LICENSE_FLAGS_WHITELIST = "commercial" 1838 LICENSE_FLAGS_WHITELIST = "commercial"