diff options
author | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2020-06-26 19:10:51 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-17 10:09:33 +0100 |
commit | 9bd69b1f1d71a9692189beeac75af9dfbad816cc (patch) | |
tree | 305347fca899074aed5610e0e82eaec180bf630c /documentation/overview-manual/overview-manual-yp-intro.rst | |
parent | c40a8d5904c29046f1cbbeb998e6cd7c24f9b206 (diff) | |
download | poky-9bd69b1f1d71a9692189beeac75af9dfbad816cc.tar.gz |
sphinx: initial sphinx support
This commit is autogenerated pandoc to generate an inital set
of reST files based on DocBook XML files.
A .rst file is generated for each .xml files in all manuals with this
command:
cd <manual>
for i in *.xml; do \
pandoc -f docbook -t rst --shift-heading-level-by=-1 \
$i -o $(basename $i .xml).rst \
done
The conversion was done with: pandoc 2.9.2.1-91 (Arch Linux).
Also created an initial top level index file for each document, and
added all 'books' to the top leve index.rst file.
The YP manuals layout is organized as:
Book
Chapter
Section
Section
Section
Sphinx uses section headers to create the document structure.
ReStructuredText defines sections headers like that:
To break longer text up into sections, you use section headers. These
are a single line of text (one or more words) with adornment: an
underline alone, or an underline and an overline together, in dashes
"-----", equals "======", tildes "~~~~~~" or any of the
non-alphanumeric characters = - ` : ' " ~ ^ _ * + # < > that you feel
comfortable with. An underline-only adornment is distinct from an
overline-and-underline adornment using the same character. The
underline/overline must be at least as long as the title text. Be
consistent, since all sections marked with the same adornment style
are deemed to be at the same level:
Let's define the following convention when converting from Docbook:
Book => overline === (Title)
Chapter => overline *** (1.)
Section => ==== (1.1)
Section => ---- (1.1.1)
Section => ~~~~ (1.1.1.1)
Section => ^^^^ (1.1.1.1.1)
During the conversion with pandoc, we used --shift-heading-level=-1 to
convert most of DocBook headings automatically. However with this
setting, the Chapter header was removed, so I added it back
manually. Without this setting all headings were off by one, which was
more difficult to manually fix.
At least with this change, we now have the same TOC with Sphinx and
DocBook.
(From yocto-docs rev: 3c73d64a476d4423ee4c6808c685fa94d88d7df8)
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/overview-manual/overview-manual-yp-intro.rst')
-rw-r--r-- | documentation/overview-manual/overview-manual-yp-intro.rst | 941 |
1 files changed, 941 insertions, 0 deletions
diff --git a/documentation/overview-manual/overview-manual-yp-intro.rst b/documentation/overview-manual/overview-manual-yp-intro.rst new file mode 100644 index 0000000000..62257c26b9 --- /dev/null +++ b/documentation/overview-manual/overview-manual-yp-intro.rst | |||
@@ -0,0 +1,941 @@ | |||
1 | ***************************** | ||
2 | Introducing the Yocto Project | ||
3 | ***************************** | ||
4 | |||
5 | What is the Yocto Project? | ||
6 | ========================== | ||
7 | |||
8 | The Yocto Project is an open source collaboration project that helps | ||
9 | developers create custom Linux-based systems that are designed for | ||
10 | embedded products regardless of the product's hardware architecture. | ||
11 | Yocto Project provides a flexible toolset and a development environment | ||
12 | that allows embedded device developers across the world to collaborate | ||
13 | through shared technologies, software stacks, configurations, and best | ||
14 | practices used to create these tailored Linux images. | ||
15 | |||
16 | Thousands of developers worldwide have discovered that Yocto Project | ||
17 | provides advantages in both systems and applications development, | ||
18 | archival and management benefits, and customizations used for speed, | ||
19 | footprint, and memory utilization. The project is a standard when it | ||
20 | comes to delivering embedded software stacks. The project allows | ||
21 | software customizations and build interchange for multiple hardware | ||
22 | platforms as well as software stacks that can be maintained and scaled. | ||
23 | |||
24 | For further introductory information on the Yocto Project, you might be | ||
25 | interested in this | ||
26 | `article <https://www.embedded.com/electronics-blogs/say-what-/4458600/Why-the-Yocto-Project-for-my-IoT-Project->`__ | ||
27 | by Drew Moseley and in this short introductory | ||
28 | `video <https://www.youtube.com/watch?v=utZpKM7i5Z4>`__. | ||
29 | |||
30 | The remainder of this section overviews advantages and challenges tied | ||
31 | to the Yocto Project. | ||
32 | |||
33 | .. _gs-features: | ||
34 | |||
35 | Features | ||
36 | -------- | ||
37 | |||
38 | The following list describes features and advantages of the Yocto | ||
39 | Project: | ||
40 | |||
41 | - *Widely Adopted Across the Industry:* Semiconductor, operating | ||
42 | system, software, and service vendors exist whose products and | ||
43 | services adopt and support the Yocto Project. For a look at the Yocto | ||
44 | Project community and the companies involved with the Yocto Project, | ||
45 | see the "COMMUNITY" and "ECOSYSTEM" tabs on the `Yocto | ||
46 | Project <&YOCTO_HOME_URL;>`__ home page. | ||
47 | |||
48 | - *Architecture Agnostic:* Yocto Project supports Intel, ARM, MIPS, | ||
49 | AMD, PPC and other architectures. Most ODMs, OSVs, and chip vendors | ||
50 | create and supply BSPs that support their hardware. If you have | ||
51 | custom silicon, you can create a BSP that supports that architecture. | ||
52 | |||
53 | Aside from lots of architecture support, the Yocto Project fully | ||
54 | supports a wide range of device emulation through the Quick EMUlator | ||
55 | (QEMU). | ||
56 | |||
57 | - *Images and Code Transfer Easily:* Yocto Project output can easily | ||
58 | move between architectures without moving to new development | ||
59 | environments. Additionally, if you have used the Yocto Project to | ||
60 | create an image or application and you find yourself not able to | ||
61 | support it, commercial Linux vendors such as Wind River, Mentor | ||
62 | Graphics, Timesys, and ENEA could take it and provide ongoing | ||
63 | support. These vendors have offerings that are built using the Yocto | ||
64 | Project. | ||
65 | |||
66 | - *Flexibility:* Corporations use the Yocto Project many different | ||
67 | ways. One example is to create an internal Linux distribution as a | ||
68 | code base the corporation can use across multiple product groups. | ||
69 | Through customization and layering, a project group can leverage the | ||
70 | base Linux distribution to create a distribution that works for their | ||
71 | product needs. | ||
72 | |||
73 | - *Ideal for Constrained Embedded and IoT devices:* Unlike a full Linux | ||
74 | distribution, you can use the Yocto Project to create exactly what | ||
75 | you need for embedded devices. You only add the feature support or | ||
76 | packages that you absolutely need for the device. For devices that | ||
77 | have display hardware, you can use available system components such | ||
78 | as X11, GTK+, Qt, Clutter, and SDL (among others) to create a rich | ||
79 | user experience. For devices that do not have a display or where you | ||
80 | want to use alternative UI frameworks, you can choose to not install | ||
81 | these components. | ||
82 | |||
83 | - *Comprehensive Toolchain Capabilities:* Toolchains for supported | ||
84 | architectures satisfy most use cases. However, if your hardware | ||
85 | supports features that are not part of a standard toolchain, you can | ||
86 | easily customize that toolchain through specification of | ||
87 | platform-specific tuning parameters. And, should you need to use a | ||
88 | third-party toolchain, mechanisms built into the Yocto Project allow | ||
89 | for that. | ||
90 | |||
91 | - *Mechanism Rules Over Policy:* Focusing on mechanism rather than | ||
92 | policy ensures that you are free to set policies based on the needs | ||
93 | of your design instead of adopting decisions enforced by some system | ||
94 | software provider. | ||
95 | |||
96 | - *Uses a Layer Model:* The Yocto Project `layer | ||
97 | infrastructure <#the-yocto-project-layer-model>`__ groups related | ||
98 | functionality into separate bundles. You can incrementally add these | ||
99 | grouped functionalities to your project as needed. Using layers to | ||
100 | isolate and group functionality reduces project complexity and | ||
101 | redundancy, allows you to easily extend the system, make | ||
102 | customizations, and keep functionality organized. | ||
103 | |||
104 | - *Supports Partial Builds:* You can build and rebuild individual | ||
105 | packages as needed. Yocto Project accomplishes this through its | ||
106 | `shared-state cache <#shared-state-cache>`__ (sstate) scheme. Being | ||
107 | able to build and debug components individually eases project | ||
108 | development. | ||
109 | |||
110 | - *Releases According to a Strict Schedule:* Major releases occur on a | ||
111 | `six-month cycle <&YOCTO_DOCS_REF_URL;#ref-release-process>`__ | ||
112 | predictably in October and April. The most recent two releases | ||
113 | support point releases to address common vulnerabilities and | ||
114 | exposures. This predictability is crucial for projects based on the | ||
115 | Yocto Project and allows development teams to plan activities. | ||
116 | |||
117 | - *Rich Ecosystem of Individuals and Organizations:* For open source | ||
118 | projects, the value of community is very important. Support forums, | ||
119 | expertise, and active developers who continue to push the Yocto | ||
120 | Project forward are readily available. | ||
121 | |||
122 | - *Binary Reproducibility:* The Yocto Project allows you to be very | ||
123 | specific about dependencies and achieves very high percentages of | ||
124 | binary reproducibility (e.g. 99.8% for ``core-image-minimal``). When | ||
125 | distributions are not specific about which packages are pulled in and | ||
126 | in what order to support dependencies, other build systems can | ||
127 | arbitrarily include packages. | ||
128 | |||
129 | - *License Manifest:* The Yocto Project provides a `license | ||
130 | manifest <&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle>`__ | ||
131 | for review by people who need to track the use of open source | ||
132 | licenses (e.g.legal teams). | ||
133 | |||
134 | .. _gs-challenges: | ||
135 | |||
136 | Challenges | ||
137 | ---------- | ||
138 | |||
139 | The following list presents challenges you might encounter when | ||
140 | developing using the Yocto Project: | ||
141 | |||
142 | - *Steep Learning Curve:* The Yocto Project has a steep learning curve | ||
143 | and has many different ways to accomplish similar tasks. It can be | ||
144 | difficult to choose how to proceed when varying methods exist by | ||
145 | which to accomplish a given task. | ||
146 | |||
147 | - *Understanding What Changes You Need to Make For Your Design Requires | ||
148 | Some Research:* Beyond the simple tutorial stage, understanding what | ||
149 | changes need to be made for your particular design can require a | ||
150 | significant amount of research and investigation. For information | ||
151 | that helps you transition from trying out the Yocto Project to using | ||
152 | it for your project, see the "`What I wish I'd | ||
153 | Known <&YOCTO_DOCS_URL;/what-i-wish-id-known/>`__" and | ||
154 | "`Transitioning to a Custom Environment for Systems | ||
155 | Development <&YOCTO_DOCS_URL;/transitioning-to-a-custom-environment/>`__" | ||
156 | documents on the Yocto Project website. | ||
157 | |||
158 | - *Project Workflow Could Be Confusing:* The `Yocto Project | ||
159 | workflow <#overview-development-environment>`__ could be confusing if | ||
160 | you are used to traditional desktop and server software development. | ||
161 | In a desktop development environment, mechanisms exist to easily pull | ||
162 | and install new packages, which are typically pre-compiled binaries | ||
163 | from servers accessible over the Internet. Using the Yocto Project, | ||
164 | you must modify your configuration and rebuild to add additional | ||
165 | packages. | ||
166 | |||
167 | - *Working in a Cross-Build Environment Can Feel Unfamiliar:* When | ||
168 | developing code to run on a target, compilation, execution, and | ||
169 | testing done on the actual target can be faster than running a | ||
170 | BitBake build on a development host and then deploying binaries to | ||
171 | the target for test. While the Yocto Project does support development | ||
172 | tools on the target, the additional step of integrating your changes | ||
173 | back into the Yocto Project build environment would be required. | ||
174 | Yocto Project supports an intermediate approach that involves making | ||
175 | changes on the development system within the BitBake environment and | ||
176 | then deploying only the updated packages to the target. | ||
177 | |||
178 | The Yocto Project `OpenEmbedded build | ||
179 | system <&YOCTO_DOCS_REF_URL;#build-system-term>`__ produces packages | ||
180 | in standard formats (i.e. RPM, DEB, IPK, and TAR). You can deploy | ||
181 | these packages into the running system on the target by using | ||
182 | utilities on the target such as ``rpm`` or ``ipk``. | ||
183 | |||
184 | - *Initial Build Times Can be Significant:* Long initial build times | ||
185 | are unfortunately unavoidable due to the large number of packages | ||
186 | initially built from scratch for a fully functioning Linux system. | ||
187 | Once that initial build is completed, however, the shared-state | ||
188 | (sstate) cache mechanism Yocto Project uses keeps the system from | ||
189 | rebuilding packages that have not been "touched" since the last | ||
190 | build. The sstate mechanism significantly reduces times for | ||
191 | successive builds. | ||
192 | |||
193 | The Yocto Project Layer Model | ||
194 | ============================= | ||
195 | |||
196 | The Yocto Project's "Layer Model" is a development model for embedded | ||
197 | and IoT Linux creation that distinguishes the Yocto Project from other | ||
198 | simple build systems. The Layer Model simultaneously supports | ||
199 | collaboration and customization. Layers are repositories that contain | ||
200 | related sets of instructions that tell the `OpenEmbedded build | ||
201 | system <&YOCTO_DOCS_REF_URL;#build-system-term>`__ what to do. You can | ||
202 | collaborate, share, and reuse layers. | ||
203 | |||
204 | Layers can contain changes to previous instructions or settings at any | ||
205 | time. This powerful override capability is what allows you to customize | ||
206 | previously supplied collaborative or community layers to suit your | ||
207 | product requirements. | ||
208 | |||
209 | You use different layers to logically separate information in your | ||
210 | build. As an example, you could have BSP, GUI, distro configuration, | ||
211 | middleware, or application layers. Putting your entire build into one | ||
212 | layer limits and complicates future customization and reuse. Isolating | ||
213 | information into layers, on the other hand, helps simplify future | ||
214 | customizations and reuse. You might find it tempting to keep everything | ||
215 | in one layer when working on a single project. However, the more modular | ||
216 | your Metadata, the easier it is to cope with future changes. | ||
217 | |||
218 | .. note:: | ||
219 | |||
220 | - Use Board Support Package (BSP) layers from silicon vendors when | ||
221 | possible. | ||
222 | |||
223 | - Familiarize yourself with the `Yocto Project curated layer | ||
224 | index <https://caffelli-staging.yoctoproject.org/software-overview/layers/>`__ | ||
225 | or the `OpenEmbedded layer | ||
226 | index <http://layers.openembedded.org/layerindex/branch/master/layers/>`__. | ||
227 | The latter contains more layers but they are less universally | ||
228 | validated. | ||
229 | |||
230 | - Layers support the inclusion of technologies, hardware components, | ||
231 | and software components. The `Yocto Project | ||
232 | Compatible <&YOCTO_DOCS_DEV_URL;#making-sure-your-layer-is-compatible-with-yocto-project>`__ | ||
233 | designation provides a minimum level of standardization that | ||
234 | contributes to a strong ecosystem. "YP Compatible" is applied to | ||
235 | appropriate products and software components such as BSPs, other | ||
236 | OE-compatible layers, and related open-source projects, allowing | ||
237 | the producer to use Yocto Project badges and branding assets. | ||
238 | |||
239 | To illustrate how layers are used to keep things modular, consider | ||
240 | machine customizations. These types of customizations typically reside | ||
241 | in a special layer, rather than a general layer, called a BSP Layer. | ||
242 | Furthermore, the machine customizations should be isolated from recipes | ||
243 | and Metadata that support a new GUI environment, for example. This | ||
244 | situation gives you a couple of layers: one for the machine | ||
245 | configurations, and one for the GUI environment. It is important to | ||
246 | understand, however, that the BSP layer can still make machine-specific | ||
247 | additions to recipes within the GUI environment layer without polluting | ||
248 | the GUI layer itself with those machine-specific changes. You can | ||
249 | accomplish this through a recipe that is a BitBake append | ||
250 | (``.bbappend``) file, which is described later in this section. | ||
251 | |||
252 | .. note:: | ||
253 | |||
254 | For general information on BSP layer structure, see the | ||
255 | Yocto Project Board Support Packages (BSP) Developer's Guide | ||
256 | . | ||
257 | |||
258 | The `Source Directory <&YOCTO_DOCS_REF_URL;#source-directory>`__ | ||
259 | contains both general layers and BSP layers right out of the box. You | ||
260 | can easily identify layers that ship with a Yocto Project release in the | ||
261 | Source Directory by their names. Layers typically have names that begin | ||
262 | with the string ``meta-``. | ||
263 | |||
264 | .. note:: | ||
265 | |||
266 | It is not a requirement that a layer name begin with the prefix | ||
267 | meta- | ||
268 | , but it is a commonly accepted standard in the Yocto Project | ||
269 | community. | ||
270 | |||
271 | For example, if you were to examine the `tree | ||
272 | view <https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/>`__ of the | ||
273 | ``poky`` repository, you will see several layers: ``meta``, | ||
274 | ``meta-skeleton``, ``meta-selftest``, ``meta-poky``, and | ||
275 | ``meta-yocto-bsp``. Each of these repositories represents a distinct | ||
276 | layer. | ||
277 | |||
278 | For procedures on how to create layers, see the "`Understanding and | ||
279 | Creating | ||
280 | Layers <&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers>`__" | ||
281 | section in the Yocto Project Development Tasks Manual. | ||
282 | |||
283 | Components and Tools | ||
284 | ==================== | ||
285 | |||
286 | The Yocto Project employs a collection of components and tools used by | ||
287 | the project itself, by project developers, and by those using the Yocto | ||
288 | Project. These components and tools are open source projects and | ||
289 | metadata that are separate from the reference distribution | ||
290 | (`Poky <&YOCTO_DOCS_REF_URL;#poky>`__) and the `OpenEmbedded build | ||
291 | system <&YOCTO_DOCS_REF_URL;#build-system-term>`__. Most of the | ||
292 | components and tools are downloaded separately. | ||
293 | |||
294 | This section provides brief overviews of the components and tools | ||
295 | associated with the Yocto Project. | ||
296 | |||
297 | .. _gs-development-tools: | ||
298 | |||
299 | Development Tools | ||
300 | ----------------- | ||
301 | |||
302 | The following list consists of tools that help you develop images and | ||
303 | applications using the Yocto Project: | ||
304 | |||
305 | - *CROPS:* `CROPS <https://github.com/crops/poky-container/>`__ is an | ||
306 | open source, cross-platform development framework that leverages | ||
307 | `Docker Containers <https://www.docker.com/>`__. CROPS provides an | ||
308 | easily managed, extensible environment that allows you to build | ||
309 | binaries for a variety of architectures on Windows, Linux and Mac OS | ||
310 | X hosts. | ||
311 | |||
312 | - *``devtool``:* This command-line tool is available as part of the | ||
313 | extensible SDK (eSDK) and is its cornerstone. You can use ``devtool`` | ||
314 | to help build, test, and package software within the eSDK. You can | ||
315 | use the tool to optionally integrate what you build into an image | ||
316 | built by the OpenEmbedded build system. | ||
317 | |||
318 | The ``devtool`` command employs a number of sub-commands that allow | ||
319 | you to add, modify, and upgrade recipes. As with the OpenEmbedded | ||
320 | build system, “recipes” represent software packages within | ||
321 | ``devtool``. When you use ``devtool add``, a recipe is automatically | ||
322 | created. When you use ``devtool modify``, the specified existing | ||
323 | recipe is used in order to determine where to get the source code and | ||
324 | how to patch it. In both cases, an environment is set up so that when | ||
325 | you build the recipe a source tree that is under your control is used | ||
326 | in order to allow you to make changes to the source as desired. By | ||
327 | default, both new recipes and the source go into a “workspace” | ||
328 | directory under the eSDK. The ``devtool upgrade`` command updates an | ||
329 | existing recipe so that you can build it for an updated set of source | ||
330 | files. | ||
331 | |||
332 | You can read about the ``devtool`` workflow in the Yocto Project | ||
333 | Application Development and Extensible Software Development Kit | ||
334 | (eSDK) Manual in the "`Using ``devtool`` in Your SDK | ||
335 | Workflow' <&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow>`__" | ||
336 | section. | ||
337 | |||
338 | - *Extensible Software Development Kit (eSDK):* The eSDK provides a | ||
339 | cross-development toolchain and libraries tailored to the contents of | ||
340 | a specific image. The eSDK makes it easy to add new applications and | ||
341 | libraries to an image, modify the source for an existing component, | ||
342 | test changes on the target hardware, and integrate into the rest of | ||
343 | the OpenEmbedded build system. The eSDK gives you a toolchain | ||
344 | experience supplemented with the powerful set of ``devtool`` commands | ||
345 | tailored for the Yocto Project environment. | ||
346 | |||
347 | For information on the eSDK, see the `Yocto Project Application | ||
348 | Development and the Extensible Software Development Kit | ||
349 | (eSDK) <&YOCTO_DOCS_SDK_URL;>`__ Manual. | ||
350 | |||
351 | - *Toaster:* Toaster is a web interface to the Yocto Project | ||
352 | OpenEmbedded build system. Toaster allows you to configure, run, and | ||
353 | view information about builds. For information on Toaster, see the | ||
354 | `Toaster User Manual <&YOCTO_DOCS_TOAST_URL;>`__. | ||
355 | |||
356 | .. _gs-production-tools: | ||
357 | |||
358 | Production Tools | ||
359 | ---------------- | ||
360 | |||
361 | The following list consists of tools that help production related | ||
362 | activities using the Yocto Project: | ||
363 | |||
364 | - *Auto Upgrade Helper:* This utility when used in conjunction with the | ||
365 | `OpenEmbedded build | ||
366 | system <&YOCTO_DOCS_REF_URL;#build-system-term>`__ (BitBake and | ||
367 | OE-Core) automatically generates upgrades for recipes that are based | ||
368 | on new versions of the recipes published upstream. | ||
369 | |||
370 | - *Recipe Reporting System:* The Recipe Reporting System tracks recipe | ||
371 | versions available for Yocto Project. The main purpose of the system | ||
372 | is to help you manage the recipes you maintain and to offer a dynamic | ||
373 | overview of the project. The Recipe Reporting System is built on top | ||
374 | of the `OpenEmbedded Layer | ||
375 | Index <http://layers.openembedded.org/layerindex/layers/>`__, which | ||
376 | is a website that indexes OpenEmbedded-Core layers. | ||
377 | |||
378 | - *Patchwork:* `Patchwork <http://jk.ozlabs.org/projects/patchwork/>`__ | ||
379 | is a fork of a project originally started by | ||
380 | `OzLabs <http://ozlabs.org/>`__. The project is a web-based tracking | ||
381 | system designed to streamline the process of bringing contributions | ||
382 | into a project. The Yocto Project uses Patchwork as an organizational | ||
383 | tool to handle patches, which number in the thousands for every | ||
384 | release. | ||
385 | |||
386 | - *AutoBuilder:* AutoBuilder is a project that automates build tests | ||
387 | and quality assurance (QA). By using the public AutoBuilder, anyone | ||
388 | can determine the status of the current "master" branch of Poky. | ||
389 | |||
390 | .. note:: | ||
391 | |||
392 | AutoBuilder is based on | ||
393 | buildbot | ||
394 | . | ||
395 | |||
396 | A goal of the Yocto Project is to lead the open source industry with | ||
397 | a project that automates testing and QA procedures. In doing so, the | ||
398 | project encourages a development community that publishes QA and test | ||
399 | plans, publicly demonstrates QA and test plans, and encourages | ||
400 | development of tools that automate and test and QA procedures for the | ||
401 | benefit of the development community. | ||
402 | |||
403 | You can learn more about the AutoBuilder used by the Yocto Project | ||
404 | `here <&YOCTO_AB_URL;>`__. | ||
405 | |||
406 | - *Cross-Prelink:* Prelinking is the process of pre-computing the load | ||
407 | addresses and link tables generated by the dynamic linker as compared | ||
408 | to doing this at runtime. Doing this ahead of time results in | ||
409 | performance improvements when the application is launched and reduced | ||
410 | memory usage for libraries shared by many applications. | ||
411 | |||
412 | Historically, cross-prelink is a variant of prelink, which was | ||
413 | conceived by `Jakub | ||
414 | Jelínek <http://people.redhat.com/jakub/prelink.pdf>`__ a number of | ||
415 | years ago. Both prelink and cross-prelink are maintained in the same | ||
416 | repository albeit on separate branches. By providing an emulated | ||
417 | runtime dynamic linker (i.e. ``glibc``-derived ``ld.so`` emulation), | ||
418 | the cross-prelink project extends the prelink software’s ability to | ||
419 | prelink a sysroot environment. Additionally, the cross-prelink | ||
420 | software enables the ability to work in sysroot style environments. | ||
421 | |||
422 | The dynamic linker determines standard load address calculations | ||
423 | based on a variety of factors such as mapping addresses, library | ||
424 | usage, and library function conflicts. The prelink tool uses this | ||
425 | information, from the dynamic linker, to determine unique load | ||
426 | addresses for executable and linkable format (ELF) binaries that are | ||
427 | shared libraries and dynamically linked. The prelink tool modifies | ||
428 | these ELF binaries with the pre-computed information. The result is | ||
429 | faster loading and often lower memory consumption because more of the | ||
430 | library code can be re-used from shared Copy-On-Write (COW) pages. | ||
431 | |||
432 | The original upstream prelink project only supports running prelink | ||
433 | on the end target device due to the reliance on the target device’s | ||
434 | dynamic linker. This restriction causes issues when developing a | ||
435 | cross-compiled system. The cross-prelink adds a synthesized dynamic | ||
436 | loader that runs on the host, thus permitting cross-prelinking | ||
437 | without ever having to run on a read-write target filesystem. | ||
438 | |||
439 | - *Pseudo:* Pseudo is the Yocto Project implementation of | ||
440 | `fakeroot <http://man.he.net/man1/fakeroot>`__, which is used to run | ||
441 | commands in an environment that seemingly has root privileges. | ||
442 | |||
443 | During a build, it can be necessary to perform operations that | ||
444 | require system administrator privileges. For example, file ownership | ||
445 | or permissions might need definition. Pseudo is a tool that you can | ||
446 | either use directly or through the environment variable | ||
447 | ``LD_PRELOAD``. Either method allows these operations to succeed as | ||
448 | if system administrator privileges exist even when they do not. | ||
449 | |||
450 | You can read more about Pseudo in the "`Fakeroot and | ||
451 | Pseudo <#fakeroot-and-pseudo>`__" section. | ||
452 | |||
453 | .. _gs-openembedded-build-system: | ||
454 | |||
455 | Open-Embedded Build System Components | ||
456 | ------------------------------------- | ||
457 | |||
458 | The following list consists of components associated with the | ||
459 | `OpenEmbedded build system <&YOCTO_DOCS_REF_URL;#build-system-term>`__: | ||
460 | |||
461 | - *BitBake:* BitBake is a core component of the Yocto Project and is | ||
462 | used by the OpenEmbedded build system to build images. While BitBake | ||
463 | is key to the build system, BitBake is maintained separately from the | ||
464 | Yocto Project. | ||
465 | |||
466 | BitBake is a generic task execution engine that allows shell and | ||
467 | Python tasks to be run efficiently and in parallel while working | ||
468 | within complex inter-task dependency constraints. In short, BitBake | ||
469 | is a build engine that works through recipes written in a specific | ||
470 | format in order to perform sets of tasks. | ||
471 | |||
472 | You can learn more about BitBake in the `BitBake User | ||
473 | Manual <&YOCTO_DOCS_BB_URL;>`__. | ||
474 | |||
475 | - *OpenEmbedded-Core:* OpenEmbedded-Core (OE-Core) is a common layer of | ||
476 | metadata (i.e. recipes, classes, and associated files) used by | ||
477 | OpenEmbedded-derived systems, which includes the Yocto Project. The | ||
478 | Yocto Project and the OpenEmbedded Project both maintain the | ||
479 | OpenEmbedded-Core. You can find the OE-Core metadata in the Yocto | ||
480 | Project `Source | ||
481 | Repositories <&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta>`__. | ||
482 | |||
483 | Historically, the Yocto Project integrated the OE-Core metadata | ||
484 | throughout the Yocto Project source repository reference system | ||
485 | (Poky). After Yocto Project Version 1.0, the Yocto Project and | ||
486 | OpenEmbedded agreed to work together and share a common core set of | ||
487 | metadata (OE-Core), which contained much of the functionality | ||
488 | previously found in Poky. This collaboration achieved a long-standing | ||
489 | OpenEmbedded objective for having a more tightly controlled and | ||
490 | quality-assured core. The results also fit well with the Yocto | ||
491 | Project objective of achieving a smaller number of fully featured | ||
492 | tools as compared to many different ones. | ||
493 | |||
494 | Sharing a core set of metadata results in Poky as an integration | ||
495 | layer on top of OE-Core. You can see that in this | ||
496 | `figure <#yp-key-dev-elements>`__. The Yocto Project combines various | ||
497 | components such as BitBake, OE-Core, script “glue”, and documentation | ||
498 | for its build system. | ||
499 | |||
500 | .. _gs-reference-distribution-poky: | ||
501 | |||
502 | Reference Distribution (Poky) | ||
503 | ----------------------------- | ||
504 | |||
505 | Poky is the Yocto Project reference distribution. It contains the | ||
506 | `Open-Embedded build system <&YOCTO_DOCS_REF_URL;#build-system-term>`__ | ||
507 | (BitBake and OE-Core) as well as a set of metadata to get you started | ||
508 | building your own distribution. See the | ||
509 | `figure <#what-is-the-yocto-project>`__ in "What is the Yocto Project?" | ||
510 | section for an illustration that shows Poky and its relationship with | ||
511 | other parts of the Yocto Project. | ||
512 | |||
513 | To use the Yocto Project tools and components, you can download | ||
514 | (``clone``) Poky and use it to bootstrap your own distribution. | ||
515 | |||
516 | .. note:: | ||
517 | |||
518 | Poky does not contain binary files. It is a working example of how to | ||
519 | build your own custom Linux distribution from source. | ||
520 | |||
521 | You can read more about Poky in the "`Reference Embedded Distribution | ||
522 | (Poky) <#reference-embedded-distribution>`__" section. | ||
523 | |||
524 | .. _gs-packages-for-finished-targets: | ||
525 | |||
526 | Packages for Finished Targets | ||
527 | ----------------------------- | ||
528 | |||
529 | The following lists components associated with packages for finished | ||
530 | targets: | ||
531 | |||
532 | - *Matchbox:* Matchbox is an Open Source, base environment for the X | ||
533 | Window System running on non-desktop, embedded platforms such as | ||
534 | handhelds, set-top boxes, kiosks, and anything else for which screen | ||
535 | space, input mechanisms, or system resources are limited. | ||
536 | |||
537 | Matchbox consists of a number of interchangeable and optional | ||
538 | applications that you can tailor to a specific, non-desktop platform | ||
539 | to enhance usability in constrained environments. | ||
540 | |||
541 | You can find the Matchbox source in the Yocto Project `Source | ||
542 | Repositories <&YOCTO_GIT_URL;>`__. | ||
543 | |||
544 | - *Opkg* Open PacKaGe management (opkg) is a lightweight package | ||
545 | management system based on the itsy package (ipkg) management system. | ||
546 | Opkg is written in C and resembles Advanced Package Tool (APT) and | ||
547 | Debian Package (dpkg) in operation. | ||
548 | |||
549 | Opkg is intended for use on embedded Linux devices and is used in | ||
550 | this capacity in the | ||
551 | `OpenEmbedded <http://www.openembedded.org/wiki/Main_Page>`__ and | ||
552 | `OpenWrt <https://openwrt.org/>`__ projects, as well as the Yocto | ||
553 | Project. | ||
554 | |||
555 | .. note:: | ||
556 | |||
557 | As best it can, opkg maintains backwards compatibility with ipkg | ||
558 | and conforms to a subset of Debian’s policy manual regarding | ||
559 | control files. | ||
560 | |||
561 | .. _gs-archived-components: | ||
562 | |||
563 | Archived Components | ||
564 | ------------------- | ||
565 | |||
566 | The Build Appliance is a virtual machine image that enables you to build | ||
567 | and boot a custom embedded Linux image with the Yocto Project using a | ||
568 | non-Linux development system. | ||
569 | |||
570 | Historically, the Build Appliance was the second of three methods by | ||
571 | which you could use the Yocto Project on a system that was not native to | ||
572 | Linux. | ||
573 | |||
574 | 1. *Hob:* Hob, which is now deprecated and is no longer available since | ||
575 | the 2.1 release of the Yocto Project provided a rudimentary, | ||
576 | GUI-based interface to the Yocto Project. Toaster has fully replaced | ||
577 | Hob. | ||
578 | |||
579 | 2. *Build Appliance:* Post Hob, the Build Appliance became available. It | ||
580 | was never recommended that you use the Build Appliance as a | ||
581 | day-to-day production development environment with the Yocto Project. | ||
582 | Build Appliance was useful as a way to try out development in the | ||
583 | Yocto Project environment. | ||
584 | |||
585 | 3. *CROPS:* The final and best solution available now for developing | ||
586 | using the Yocto Project on a system not native to Linux is with | ||
587 | `CROPS <#gs-crops-overview>`__. | ||
588 | |||
589 | .. _gs-development-methods: | ||
590 | |||
591 | Development Methods | ||
592 | =================== | ||
593 | |||
594 | The Yocto Project development environment usually involves a `Build | ||
595 | Host <&YOCTO_DOCS_REF_URL;#hardware-build-system-term>`__ and target | ||
596 | hardware. You use the Build Host to build images and develop | ||
597 | applications, while you use the target hardware to test deployed | ||
598 | software. | ||
599 | |||
600 | This section provides an introduction to the choices or development | ||
601 | methods you have when setting up your Build Host. Depending on the your | ||
602 | particular workflow preference and the type of operating system your | ||
603 | Build Host runs, several choices exist that allow you to use the Yocto | ||
604 | Project. | ||
605 | |||
606 | .. note:: | ||
607 | |||
608 | For additional detail about the Yocto Project development | ||
609 | environment, see the " | ||
610 | The Yocto Project Development Environment | ||
611 | " chapter. | ||
612 | |||
613 | - *Native Linux Host:* By far the best option for a Build Host. A | ||
614 | system running Linux as its native operating system allows you to | ||
615 | develop software by directly using the | ||
616 | `BitBake <&YOCTO_DOCS_REF_URL;#bitbake-term>`__ tool. You can | ||
617 | accomplish all aspects of development from a familiar shell of a | ||
618 | supported Linux distribution. | ||
619 | |||
620 | For information on how to set up a Build Host on a system running | ||
621 | Linux as its native operating system, see the "`Setting Up a Native | ||
622 | Linux Host <&YOCTO_DOCS_DEV_URL;#setting-up-a-native-linux-host>`__" | ||
623 | section in the Yocto Project Development Tasks Manual. | ||
624 | |||
625 | - *CROss PlatformS (CROPS):* Typically, you use | ||
626 | `CROPS <https://github.com/crops/poky-container/>`__, which leverages | ||
627 | `Docker Containers <https://www.docker.com/>`__, to set up a Build | ||
628 | Host that is not running Linux (e.g. Microsoft Windows or macOS). | ||
629 | |||
630 | .. note:: | ||
631 | |||
632 | You can, however, use CROPS on a Linux-based system. | ||
633 | |||
634 | CROPS is an open source, cross-platform development framework that | ||
635 | provides an easily managed, extensible environment for building | ||
636 | binaries targeted for a variety of architectures on Windows, macOS, | ||
637 | or Linux hosts. Once the Build Host is set up using CROPS, you can | ||
638 | prepare a shell environment to mimic that of a shell being used on a | ||
639 | system natively running Linux. | ||
640 | |||
641 | For information on how to set up a Build Host with CROPS, see the | ||
642 | "`Setting Up to Use CROss PlatformS | ||
643 | (CROPS) <&YOCTO_DOCS_DEV_URL;#setting-up-to-use-crops>`__" section in | ||
644 | the Yocto Project Development Tasks Manual. | ||
645 | |||
646 | - *Windows Subsystem For Linux (WSLv2):* You may use Windows Subsystem | ||
647 | For Linux v2 to set up a build host using Windows 10. | ||
648 | |||
649 | .. note:: | ||
650 | |||
651 | The Yocto Project is not compatible with WSLv1, it is compatible | ||
652 | but not officially supported nor validated with WSLv2, if you | ||
653 | still decide to use WSL please upgrade to WSLv2. | ||
654 | |||
655 | The Windows Subsystem For Linux allows Windows 10 to run a real Linux | ||
656 | kernel inside of a lightweight utility virtual machine (VM) using | ||
657 | virtualization technology. | ||
658 | |||
659 | For information on how to set up a Build Host with WSLv2, see the | ||
660 | "`Setting Up to Use Windows Subsystem For | ||
661 | Linux <&YOCTO_DOCS_DEV_URL;#setting-up-to-use-wsl>`__" section in the | ||
662 | Yocto Project Development Tasks Manual. | ||
663 | |||
664 | - *Toaster:* Regardless of what your Build Host is running, you can use | ||
665 | Toaster to develop software using the Yocto Project. Toaster is a web | ||
666 | interface to the Yocto Project's `Open-Embedded build | ||
667 | system <&YOCTO_DOCS_REF_URL;#build-system-term>`__. The interface | ||
668 | enables you to configure and run your builds. Information about | ||
669 | builds is collected and stored in a database. You can use Toaster to | ||
670 | configure and start builds on multiple remote build servers. | ||
671 | |||
672 | For information about and how to use Toaster, see the `Toaster User | ||
673 | Manual <&YOCTO_DOCS_TOAST_URL;>`__. | ||
674 | |||
675 | .. _reference-embedded-distribution: | ||
676 | |||
677 | Reference Embedded Distribution (Poky) | ||
678 | ====================================== | ||
679 | |||
680 | "Poky", which is pronounced *Pock*-ee, is the name of the Yocto | ||
681 | Project's reference distribution or Reference OS Kit. Poky contains the | ||
682 | `OpenEmbedded Build System <&YOCTO_DOCS_REF_URL;#build-system-term>`__ | ||
683 | (`BitBake <&YOCTO_DOCS_REF_URL;#bitbake-term>`__ and | ||
684 | `OpenEmbedded-Core <&YOCTO_DOCS_REF_URL;#oe-core>`__) as well as a set | ||
685 | of `metadata <&YOCTO_DOCS_REF_URL;#metadata>`__ to get you started | ||
686 | building your own distro. In other words, Poky is a base specification | ||
687 | of the functionality needed for a typical embedded system as well as the | ||
688 | components from the Yocto Project that allow you to build a distribution | ||
689 | into a usable binary image. | ||
690 | |||
691 | Poky is a combined repository of BitBake, OpenEmbedded-Core (which is | ||
692 | found in ``meta``), ``meta-poky``, ``meta-yocto-bsp``, and documentation | ||
693 | provided all together and known to work well together. You can view | ||
694 | these items that make up the Poky repository in the `Source | ||
695 | Repositories <&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/>`__. | ||
696 | |||
697 | .. note:: | ||
698 | |||
699 | If you are interested in all the contents of the | ||
700 | poky | ||
701 | Git repository, see the " | ||
702 | Top-Level Core Components | ||
703 | " section in the Yocto Project Reference Manual. | ||
704 | |||
705 | The following figure illustrates what generally comprises Poky: | ||
706 | |||
707 | - BitBake is a task executor and scheduler that is the heart of the | ||
708 | OpenEmbedded build system. | ||
709 | |||
710 | - ``meta-poky``, which is Poky-specific metadata. | ||
711 | |||
712 | - ``meta-yocto-bsp``, which are Yocto Project-specific Board Support | ||
713 | Packages (BSPs). | ||
714 | |||
715 | - OpenEmbedded-Core (OE-Core) metadata, which includes shared | ||
716 | configurations, global variable definitions, shared classes, | ||
717 | packaging, and recipes. Classes define the encapsulation and | ||
718 | inheritance of build logic. Recipes are the logical units of software | ||
719 | and images to be built. | ||
720 | |||
721 | - Documentation, which contains the Yocto Project source files used to | ||
722 | make the set of user manuals. | ||
723 | |||
724 | .. note:: | ||
725 | |||
726 | While Poky is a "complete" distribution specification and is tested | ||
727 | and put through QA, you cannot use it as a product "out of the box" | ||
728 | in its current form. | ||
729 | |||
730 | To use the Yocto Project tools, you can use Git to clone (download) the | ||
731 | Poky repository then use your local copy of the reference distribution | ||
732 | to bootstrap your own distribution. | ||
733 | |||
734 | .. note:: | ||
735 | |||
736 | Poky does not contain binary files. It is a working example of how to | ||
737 | build your own custom Linux distribution from source. | ||
738 | |||
739 | Poky has a regular, well established, six-month release cycle under its | ||
740 | own version. Major releases occur at the same time major releases (point | ||
741 | releases) occur for the Yocto Project, which are typically in the Spring | ||
742 | and Fall. For more information on the Yocto Project release schedule and | ||
743 | cadence, see the "`Yocto Project Releases and the Stable Release | ||
744 | Process <&YOCTO_DOCS_REF_URL;#ref-release-process>`__" chapter in the | ||
745 | Yocto Project Reference Manual. | ||
746 | |||
747 | Much has been said about Poky being a "default configuration." A default | ||
748 | configuration provides a starting image footprint. You can use Poky out | ||
749 | of the box to create an image ranging from a shell-accessible minimal | ||
750 | image all the way up to a Linux Standard Base-compliant image that uses | ||
751 | a GNOME Mobile and Embedded (GMAE) based reference user interface called | ||
752 | Sato. | ||
753 | |||
754 | One of the most powerful properties of Poky is that every aspect of a | ||
755 | build is controlled by the metadata. You can use metadata to augment | ||
756 | these base image types by adding metadata | ||
757 | `layers <#the-yocto-project-layer-model>`__ that extend functionality. | ||
758 | These layers can provide, for example, an additional software stack for | ||
759 | an image type, add a board support package (BSP) for additional | ||
760 | hardware, or even create a new image type. | ||
761 | |||
762 | Metadata is loosely grouped into configuration files or package recipes. | ||
763 | A recipe is a collection of non-executable metadata used by BitBake to | ||
764 | set variables or define additional build-time tasks. A recipe contains | ||
765 | fields such as the recipe description, the recipe version, the license | ||
766 | of the package and the upstream source repository. A recipe might also | ||
767 | indicate that the build process uses autotools, make, distutils or any | ||
768 | other build process, in which case the basic functionality can be | ||
769 | defined by the classes it inherits from the OE-Core layer's class | ||
770 | definitions in ``./meta/classes``. Within a recipe you can also define | ||
771 | additional tasks as well as task prerequisites. Recipe syntax through | ||
772 | BitBake also supports both ``_prepend`` and ``_append`` operators as a | ||
773 | method of extending task functionality. These operators inject code into | ||
774 | the beginning or end of a task. For information on these BitBake | ||
775 | operators, see the "`Appending and Prepending (Override Style | ||
776 | Syntax) <&YOCTO_DOCS_BB_URL;#appending-and-prepending-override-style-syntax>`__" | ||
777 | section in the BitBake User's Manual. | ||
778 | |||
779 | .. _openembedded-build-system-workflow: | ||
780 | |||
781 | The OpenEmbedded Build System Workflow | ||
782 | ====================================== | ||
783 | |||
784 | The `OpenEmbedded build | ||
785 | system <&YOCTO_DOCS_REF_URL;#build-system-term>`__ uses a "workflow" to | ||
786 | accomplish image and SDK generation. The following figure overviews that | ||
787 | workflow: Following is a brief summary of the "workflow": | ||
788 | |||
789 | 1. Developers specify architecture, policies, patches and configuration | ||
790 | details. | ||
791 | |||
792 | 2. The build system fetches and downloads the source code from the | ||
793 | specified location. The build system supports standard methods such | ||
794 | as tarballs or source code repositories systems such as Git. | ||
795 | |||
796 | 3. Once source code is downloaded, the build system extracts the sources | ||
797 | into a local work area where patches are applied and common steps for | ||
798 | configuring and compiling the software are run. | ||
799 | |||
800 | 4. The build system then installs the software into a temporary staging | ||
801 | area where the binary package format you select (DEB, RPM, or IPK) is | ||
802 | used to roll up the software. | ||
803 | |||
804 | 5. Different QA and sanity checks run throughout entire build process. | ||
805 | |||
806 | 6. After the binaries are created, the build system generates a binary | ||
807 | package feed that is used to create the final root file image. | ||
808 | |||
809 | 7. The build system generates the file system image and a customized | ||
810 | Extensible SDK (eSDK) for application development in parallel. | ||
811 | |||
812 | For a very detailed look at this workflow, see the "`OpenEmbedded Build | ||
813 | System Concepts <#openembedded-build-system-build-concepts>`__" section. | ||
814 | |||
815 | Some Basic Terms | ||
816 | ================ | ||
817 | |||
818 | It helps to understand some basic fundamental terms when learning the | ||
819 | Yocto Project. Although a list of terms exists in the "`Yocto Project | ||
820 | Terms <&YOCTO_DOCS_REF_URL;#ref-terms>`__" section of the Yocto Project | ||
821 | Reference Manual, this section provides the definitions of some terms | ||
822 | helpful for getting started: | ||
823 | |||
824 | - *Configuration Files:* Files that hold global definitions of | ||
825 | variables, user-defined variables, and hardware configuration | ||
826 | information. These files tell the `Open-Embedded build | ||
827 | system <&YOCTO_DOCS_REF_URL;#build-system-term>`__ what to build and | ||
828 | what to put into the image to support a particular platform. | ||
829 | |||
830 | - *Extensible Software Development Kit (eSDK):* A custom SDK for | ||
831 | application developers. This eSDK allows developers to incorporate | ||
832 | their library and programming changes back into the image to make | ||
833 | their code available to other application developers. For information | ||
834 | on the eSDK, see the `Yocto Project Application Development and the | ||
835 | Extensible Software Development Kit (eSDK) <&YOCTO_DOCS_SDK_URL;>`__ | ||
836 | manual. | ||
837 | |||
838 | - *Layer:* A collection of related recipes. Layers allow you to | ||
839 | consolidate related metadata to customize your build. Layers also | ||
840 | isolate information used when building for multiple architectures. | ||
841 | Layers are hierarchical in their ability to override previous | ||
842 | specifications. You can include any number of available layers from | ||
843 | the Yocto Project and customize the build by adding your layers after | ||
844 | them. You can search the Layer Index for layers used within Yocto | ||
845 | Project. | ||
846 | |||
847 | For more detailed information on layers, see the "`Understanding and | ||
848 | Creating | ||
849 | Layers <&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers>`__" | ||
850 | section in the Yocto Project Development Tasks Manual. For a | ||
851 | discussion specifically on BSP Layers, see the "`BSP | ||
852 | Layers <&YOCTO_DOCS_BSP_URL;#bsp-layers>`__" section in the Yocto | ||
853 | Project Board Support Packages (BSP) Developer's Guide. | ||
854 | |||
855 | - *Metadata:* A key element of the Yocto Project is the Metadata that | ||
856 | is used to construct a Linux distribution and is contained in the | ||
857 | files that the OpenEmbedded build system parses when building an | ||
858 | image. In general, Metadata includes recipes, configuration files, | ||
859 | and other information that refers to the build instructions | ||
860 | themselves, as well as the data used to control what things get built | ||
861 | and the effects of the build. Metadata also includes commands and | ||
862 | data used to indicate what versions of software are used, from where | ||
863 | they are obtained, and changes or additions to the software itself | ||
864 | (patches or auxiliary files) that are used to fix bugs or customize | ||
865 | the software for use in a particular situation. OpenEmbedded-Core is | ||
866 | an important set of validated metadata. | ||
867 | |||
868 | - *OpenEmbedded Build System:* The terms "BitBake" and "build system" | ||
869 | are sometimes used for the OpenEmbedded Build System. | ||
870 | |||
871 | BitBake is a task scheduler and execution engine that parses | ||
872 | instructions (i.e. recipes) and configuration data. After a parsing | ||
873 | phase, BitBake creates a dependency tree to order the compilation, | ||
874 | schedules the compilation of the included code, and finally executes | ||
875 | the building of the specified custom Linux image (distribution). | ||
876 | BitBake is similar to the ``make`` tool. | ||
877 | |||
878 | During a build process, the build system tracks dependencies and | ||
879 | performs a native or cross-compilation of the package. As a first | ||
880 | step in a cross-build setup, the framework attempts to create a | ||
881 | cross-compiler toolchain (i.e. Extensible SDK) suited for the target | ||
882 | platform. | ||
883 | |||
884 | - *OpenEmbedded-Core (OE-Core):* OE-Core is metadata comprised of | ||
885 | foundation recipes, classes, and associated files that are meant to | ||
886 | be common among many different OpenEmbedded-derived systems, | ||
887 | including the Yocto Project. OE-Core is a curated subset of an | ||
888 | original repository developed by the OpenEmbedded community that has | ||
889 | been pared down into a smaller, core set of continuously validated | ||
890 | recipes. The result is a tightly controlled and quality-assured core | ||
891 | set of recipes. | ||
892 | |||
893 | You can see the Metadata in the ``meta`` directory of the Yocto | ||
894 | Project `Source | ||
895 | Repositories <http://git.yoctoproject.org/cgit/cgit.cgi>`__. | ||
896 | |||
897 | - *Packages:* In the context of the Yocto Project, this term refers to | ||
898 | a recipe's packaged output produced by BitBake (i.e. a "baked | ||
899 | recipe"). A package is generally the compiled binaries produced from | ||
900 | the recipe's sources. You "bake" something by running it through | ||
901 | BitBake. | ||
902 | |||
903 | It is worth noting that the term "package" can, in general, have | ||
904 | subtle meanings. For example, the packages referred to in the | ||
905 | "`Required Packages for the Build | ||
906 | Host <&YOCTO_DOCS_REF_URL;#required-packages-for-the-build-host>`__" | ||
907 | section in the Yocto Project Reference Manual are compiled binaries | ||
908 | that, when installed, add functionality to your Linux distribution. | ||
909 | |||
910 | Another point worth noting is that historically within the Yocto | ||
911 | Project, recipes were referred to as packages - thus, the existence | ||
912 | of several BitBake variables that are seemingly mis-named, (e.g. | ||
913 | ```PR`` <&YOCTO_DOCS_REF_URL;#var-PR>`__, | ||
914 | ```PV`` <&YOCTO_DOCS_REF_URL;#var-PV>`__, and | ||
915 | ```PE`` <&YOCTO_DOCS_REF_URL;#var-PE>`__). | ||
916 | |||
917 | - *Poky:* Poky is a reference embedded distribution and a reference | ||
918 | test configuration. Poky provides the following: | ||
919 | |||
920 | - A base-level functional distro used to illustrate how to customize | ||
921 | a distribution. | ||
922 | |||
923 | - A means by which to test the Yocto Project components (i.e. Poky | ||
924 | is used to validate the Yocto Project). | ||
925 | |||
926 | - A vehicle through which you can download the Yocto Project. | ||
927 | |||
928 | Poky is not a product level distro. Rather, it is a good starting | ||
929 | point for customization. | ||
930 | |||
931 | .. note:: | ||
932 | |||
933 | Poky is an integration layer on top of OE-Core. | ||
934 | |||
935 | - *Recipe:* The most common form of metadata. A recipe contains a list | ||
936 | of settings and tasks (i.e. instructions) for building packages that | ||
937 | are then used to build the binary image. A recipe describes where you | ||
938 | get source code and which patches to apply. Recipes describe | ||
939 | dependencies for libraries or for other recipes as well as | ||
940 | configuration and compilation options. Related recipes are | ||
941 | consolidated into a layer. | ||