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