overview-manual-yp-intro.xml 72 KB

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