overview-manual-yp-intro.xml 73 KB

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