yocto-project-qs.xml 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848
  1. <!DOCTYPE article 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. <article id='yocto-project-qs-intro'>
  5. <articleinfo>
  6. <title>Yocto Project Quick Start</title>
  7. <copyright>
  8. <year>&COPYRIGHT_YEAR;</year>
  9. <holder>Linux Foundation</holder>
  10. </copyright>
  11. <legalnotice>
  12. <para>
  13. Permission is granted to copy, distribute and/or modify this document under
  14. the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
  15. </para>
  16. <note>
  17. For the latest version of this manual associated with this
  18. Yocto Project release, see the
  19. <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>
  20. from the Yocto Project website.
  21. </note>
  22. </legalnotice>
  23. <abstract>
  24. <imagedata fileref="figures/yocto-project-transp.png"
  25. width="6in" depth="1in"
  26. align="right" scale="25" />
  27. </abstract>
  28. </articleinfo>
  29. <section id='welcome'>
  30. <title>Welcome!</title>
  31. <para>
  32. Welcome to the Yocto Project!
  33. The Yocto Project is an open-source collaboration project whose
  34. focus is developers of embedded Linux systems.
  35. Among other things, the Yocto Project uses a build host based
  36. on the OpenEmbedded (OE) project, which uses the
  37. <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
  38. tool, to construct complete Linux images.
  39. The BitBake and OE components are combined together to form
  40. a reference build host, historically known as
  41. <ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink>.
  42. </para>
  43. <para>
  44. If you do not have a system that runs Linux and you want to give
  45. the Yocto Project a test run, you might consider using the Yocto
  46. Project Build Appliance.
  47. The Build Appliance allows you to build and boot a custom embedded
  48. Linux image with the Yocto Project using a non-Linux development
  49. system.
  50. See the
  51. <ulink url='https://www.yoctoproject.org/tools-resources/projects/build-appliance'>Yocto Project Build Appliance</ulink>
  52. for more information.
  53. </para>
  54. <para>
  55. This quick start is written so that you can quickly get a
  56. build host set up to use the Yocto Project and then build some
  57. Linux images.
  58. Rather than go into great detail about the Yocto Project and its
  59. many capabilities, this quick start provides the minimal
  60. information you need to try out the Yocto Project using a
  61. supported Linux build host.
  62. Reading and using the quick start should result in you having a
  63. basic understanding of what the Yocto Project is and how to use
  64. some of its core components.
  65. You will also have worked through steps to produce two images:
  66. one that is suitable for emulation and one that boots on actual
  67. hardware.
  68. The examples highlight the ease with which you can use the
  69. Yocto Project to create images for multiple types of hardware.
  70. </para>
  71. <para>
  72. For more detailed information on the Yocto Project, you can
  73. reference these resources:
  74. <itemizedlist>
  75. <listitem><para><emphasis>Website:</emphasis>
  76. The
  77. <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>
  78. provides the latest builds, breaking news, full development
  79. documentation, and access to a rich Yocto Project
  80. Development Community into which you can tap.
  81. </para></listitem>
  82. <listitem><para><emphasis>FAQs:</emphasis>
  83. Lists commonly asked Yocto Project questions and answers.
  84. You can find two FAQs:
  85. <ulink url='&YOCTO_WIKI_URL;/wiki/FAQ'>Yocto Project FAQ</ulink>
  86. on a wiki, and the
  87. "<ulink url='&YOCTO_DOCS_REF_URL;#faq'>FAQ</ulink>"
  88. chapter in the Yocto Project Reference Manual.
  89. </para></listitem>
  90. <listitem><para><emphasis>Developer Screencast:</emphasis>
  91. The
  92. <ulink url='http://vimeo.com/36450321'>Getting Started with the Yocto Project - New Developer Screencast Tutorial</ulink>
  93. provides a 30-minute video created for users unfamiliar
  94. with the Yocto Project but familiar with Linux build
  95. hosts.
  96. While this screencast is somewhat dated, the introductory
  97. and fundamental concepts are useful for the beginner.
  98. </para></listitem>
  99. </itemizedlist>
  100. </para>
  101. </section>
  102. <section id='yp-intro'>
  103. <title>Introducing the Yocto Project Development Environment</title>
  104. <para>
  105. The Yocto Project through the OpenEmbedded build system provides an
  106. open source development environment targeting the ARM, MIPS,
  107. PowerPC, and x86 architectures for a variety of platforms
  108. including x86-64 and emulated ones.
  109. You can use components from the Yocto Project to design, develop,
  110. build, debug, simulate, and test the complete software stack using
  111. Linux, the X Window System, GTK+ frameworks, and Qt frameworks.
  112. </para>
  113. <mediaobject>
  114. <imageobject>
  115. <imagedata fileref="figures/yocto-environment.png"
  116. format="PNG" align='center' scalefit='1' width="100%"/>
  117. </imageobject>
  118. <caption>
  119. <para>The Yocto Project Development Environment</para>
  120. </caption>
  121. </mediaobject>
  122. <para>
  123. Here are some highlights for the Yocto Project:
  124. </para>
  125. <itemizedlist>
  126. <listitem><para>
  127. Provides a recent Linux kernel along with a set of system
  128. commands and libraries suitable for the embedded
  129. environment.
  130. </para></listitem>
  131. <listitem><para>
  132. Makes available system components such as X11, GTK+, Qt,
  133. Clutter, and SDL (among others) so you can create a rich user
  134. experience on devices that have display hardware.
  135. For devices that do not have a display or where you wish to
  136. use alternative UI frameworks, these components need not be
  137. installed.
  138. </para></listitem>
  139. <listitem><para>
  140. Creates a focused and stable core compatible with the
  141. OpenEmbedded project with which you can easily and reliably
  142. build and develop.
  143. </para></listitem>
  144. <listitem><para>
  145. Fully supports a wide range of hardware and device emulation
  146. through the Quick EMUlator (QEMU).
  147. </para></listitem>
  148. <listitem><para>
  149. Provides a layer mechanism that allows you to easily extend
  150. the system, make customizations, and keep them organized.
  151. </para></listitem>
  152. </itemizedlist>
  153. <para>
  154. You can use the Yocto Project to generate images for many kinds
  155. of devices.
  156. As mentioned earlier, the Yocto Project supports creation of
  157. reference images that you can boot within and emulate using QEMU.
  158. The standard example machines target QEMU full-system
  159. emulation for 32-bit and 64-bit variants of x86, ARM, MIPS, and
  160. PowerPC architectures.
  161. Beyond emulation, you can use the layer mechanism to extend
  162. support to just about any platform that Linux can run on and that
  163. a toolchain can target.
  164. </para>
  165. <para>
  166. Another Yocto Project feature is the Sato reference User
  167. Interface.
  168. This optional UI that is based on GTK+ is intended for devices with
  169. restricted screen sizes and is included as part of the
  170. OpenEmbedded Core layer so that developers can test parts of the
  171. software stack.
  172. </para>
  173. </section>
  174. <section id='yp-resources'>
  175. <title>Setting Up to Use the Yocto Project</title>
  176. <para>
  177. The following list shows what you need in order to use a
  178. Linux-based build host to use the Yocto Project to build images:
  179. </para>
  180. <itemizedlist>
  181. <listitem><para><emphasis>Build Host</emphasis>
  182. A build host with a minimum of 50 Gbytes of free disk
  183. space that is running a supported Linux distribution (i.e.
  184. recent releases of Fedora, openSUSE, CentOS, Debian, or
  185. Ubuntu).
  186. </para></listitem>
  187. <listitem><para><emphasis>Build Host Packages</emphasis>
  188. Appropriate packages installed on the build host.
  189. </para></listitem>
  190. <listitem><para><emphasis>The Yocto Project</emphasis>
  191. A release of the Yocto Project.
  192. </para></listitem>
  193. </itemizedlist>
  194. <section id='the-linux-distro'>
  195. <title>The Linux Distribution</title>
  196. <para>
  197. The Yocto Project team verifies each release against recent
  198. versions of the most popular Linux distributions that
  199. provide stable releases.
  200. In general, if you have the current release minus one of the
  201. following distributions, you should have no problems.
  202. <itemizedlist>
  203. <listitem><para>
  204. Ubuntu
  205. </para></listitem>
  206. <listitem><para>
  207. Fedora
  208. </para></listitem>
  209. <listitem><para>
  210. openSUSE
  211. </para></listitem>
  212. <listitem><para>
  213. CentOS
  214. </para></listitem>
  215. <listitem><para>
  216. Debian
  217. </para></listitem>
  218. </itemizedlist>
  219. For a more detailed list of distributions that support the
  220. Yocto Project, see the
  221. "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
  222. section in the Yocto Project Reference Manual.
  223. </para>
  224. <para>
  225. The OpenEmbedded build system should be able to run on any
  226. modern distribution that has the following versions for
  227. Git, tar, and Python.
  228. <itemizedlist>
  229. <listitem><para>
  230. Git 1.8.3.1 or greater
  231. </para></listitem>
  232. <listitem><para>
  233. tar 1.24 or greater
  234. </para></listitem>
  235. <listitem><para>
  236. Python 2.7.3 or greater excluding Python
  237. 3.x, which is not supported.
  238. </para></listitem>
  239. </itemizedlist>
  240. If your build host does not meet any of these three listed
  241. version requirements, you can take steps to prepare the
  242. system so that you can still use the Yocto Project.
  243. See the
  244. "<ulink url='&YOCTO_DOCS_REF_URL;#required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</ulink>"
  245. section in the Yocto Project Reference Manual for information.
  246. </para>
  247. </section>
  248. <section id='packages'>
  249. <title>The Build Host Packages</title>
  250. <para>
  251. Required build host packages vary depending on your
  252. build machine and what you want to do with the Yocto Project.
  253. For example, if you want to build an image that can run
  254. on QEMU in graphical mode (a minimal, basic build
  255. requirement), then the build host package requirements
  256. are different than if you want to build an image on a headless
  257. system or build out the Yocto Project documentation set.
  258. </para>
  259. <para>
  260. Collectively, the number of required packages is large
  261. if you want to be able to cover all cases.
  262. <note>
  263. In general, you need to have root access and then install
  264. the required packages.
  265. Thus, the commands in the following section may or may
  266. not work depending on whether or not your Linux
  267. distribution has <filename>sudo</filename> installed.
  268. </note>
  269. </para>
  270. <para>
  271. The following list shows the required packages needed to build
  272. an image that runs on QEMU in graphical mode (e.g. essential
  273. plus graphics support).
  274. For lists of required packages for other scenarios, see the
  275. "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>"
  276. section in the Yocto Project Reference Manual.
  277. <itemizedlist>
  278. <listitem><para><emphasis>Ubuntu and Debian</emphasis>
  279. <literallayout class='monospaced'>
  280. $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL; libsdl1.2-dev xterm
  281. </literallayout>
  282. </para></listitem>
  283. <listitem><para><emphasis>Fedora</emphasis>
  284. <literallayout class='monospaced'>
  285. $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL; SDL-devel xterm
  286. </literallayout>
  287. </para></listitem>
  288. <listitem><para><emphasis>OpenSUSE</emphasis>
  289. <literallayout class='monospaced'>
  290. $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL; libSDL-devel xterm
  291. </literallayout>
  292. </para></listitem>
  293. <listitem><para><emphasis>CentOS</emphasis>
  294. <literallayout class='monospaced'>
  295. $ sudo yum install &CENTOS_HOST_PACKAGES_ESSENTIAL; SDL-devel xterm
  296. </literallayout>
  297. <note>
  298. CentOS 6.x users need to ensure that the required
  299. versions of Git, tar and Python are available.
  300. For details, See the
  301. "<ulink url='&YOCTO_DOCS_REF_URL;#required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</ulink>"
  302. section in the Yocto Project Reference Manual for
  303. information.
  304. </note>
  305. </para></listitem>
  306. </itemizedlist>
  307. </para>
  308. </section>
  309. <section id='releases'>
  310. <title>Yocto Project Release</title>
  311. <para>
  312. The last requirement you need to meet before using the
  313. Yocto Project is getting a Yocto Project release.
  314. It is recommended that you get the latest Yocto Project release
  315. by setting up (cloning in
  316. <ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink> terms) a
  317. local copy of the <filename>poky</filename> Git repository on
  318. your build host and then checking out the latest release.
  319. Doing so allows you to easily update to newer Yocto Project
  320. releases as well as contribute back to the Yocto Project.
  321. </para>
  322. <para>
  323. Here is an example from an Ubuntu build host that clones the
  324. <filename>poky</filename> repository and then checks out the
  325. latest Yocto Project Release (i.e. &DISTRO;):
  326. <literallayout class='monospaced'>
  327. $ git clone git://git.yoctoproject.org/poky
  328. Cloning into 'poky'...
  329. remote: Counting objects: 226790, done.
  330. remote: Compressing objects: 100% (57465/57465), done.
  331. remote: Total 226790 (delta 165212), reused 225887 (delta 164327)
  332. Receiving objects: 100% (226790/226790), 100.98 MiB | 263 KiB/s, done.
  333. Resolving deltas: 100% (165212/165212), done.
  334. $ git checkout &DISTRO_NAME_NO_CAP;
  335. </literallayout>
  336. You can also get the Yocto Project Files by downloading
  337. Yocto Project releases from the
  338. <ulink url="&YOCTO_HOME_URL;">Yocto Project website</ulink>.
  339. </para>
  340. <para>
  341. For more information on getting set up with the Yocto Project
  342. release, see the
  343. "<ulink url='&YOCTO_DOCS_DEV_URL;#local-yp-release'>Yocto Project Release</ulink>"
  344. item in the Yocto Project Development Manual.
  345. </para>
  346. </section>
  347. </section>
  348. <section id='qs-building-images'>
  349. <title>Building Images</title>
  350. <para>
  351. Now that you have your system requirements in order, you can give
  352. Yocto Project a try.
  353. You can try out Yocto Project using either the command-line
  354. interface or using Toaster, which uses a graphical user
  355. interface.
  356. If you want to try out the Yocto Project using a GUI, see the
  357. <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>
  358. for information on how to install and set up Toaster.
  359. </para>
  360. <para>
  361. You can try out the Yocto Project using the command-line interface
  362. by finishing this quick start, which presents steps that let you
  363. do the following:
  364. <itemizedlist>
  365. <listitem><para>
  366. Build a <filename>qemux86</filename> reference image
  367. and run it in the QEMU emulator.
  368. </para></listitem>
  369. <listitem><para>
  370. Easily change configurations so that you can quickly
  371. create a second image, which would be for MinnowBoard
  372. MAX-compatible boards.
  373. </para></listitem>
  374. </itemizedlist>
  375. <note>
  376. The steps in this section do not provide detail, but rather
  377. provide minimal, working commands and examples designed to
  378. just get you started.
  379. For more details, see the appropriate manuals in the
  380. <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project manual set</ulink>.
  381. </note>
  382. </para>
  383. <para>
  384. Use the following commands to build your image.
  385. The OpenEmbedded build system creates an entire Linux
  386. distribution, including the toolchain, from source.
  387. <note><title>Note about Network Proxies</title>
  388. <para>
  389. By default, the build process searches for source code
  390. using a pre-determined order through a set of
  391. locations.
  392. If you are working behind a firewall and your build
  393. host is not set up for proxies, you could encounter
  394. problems with the build process when fetching source
  395. code (e.g. fetcher failures or Git failures).
  396. </para>
  397. <para>
  398. If you do not know your proxy settings, consult your
  399. local network infrastructure resources and get that
  400. information.
  401. A good starting point could also be to check your web
  402. browser settings.
  403. Finally, you can find more information on using the
  404. Yocto Project behind a firewall in the Yocto Project
  405. Reference Manual
  406. <ulink url='&YOCTO_DOCS_REF_URL;#how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>FAQ</ulink>
  407. and on the
  408. "<ulink url='https://wiki.yoctoproject.org/wiki/Working_Behind_a_Network_Proxy'>Working Behind a Network Proxy</ulink>"
  409. wiki page.
  410. </para>
  411. </note>
  412. </para>
  413. <para>
  414. <orderedlist>
  415. <listitem><para><emphasis>Be Sure Your Build Host is Set Up:</emphasis>
  416. The steps to build an image in this section depend on
  417. your build host being properly set up.
  418. Be sure you have worked through the requirements
  419. described in the
  420. "<link linkend='yp-resources'>Setting Up to Use the Yocto Project</link>"
  421. section.
  422. </para></listitem>
  423. <listitem><para><emphasis>Check Out Your Branch:</emphasis>
  424. Be sure you are in the
  425. <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
  426. (e.g. <filename>poky</filename>) and then check out
  427. the branch associated with the latest Yocto Project
  428. Release:
  429. <literallayout class='monospaced'>
  430. $ cd ~/poky
  431. $ git checkout -b &DISTRO_NAME_NO_CAP; origin/&DISTRO_NAME_NO_CAP;
  432. </literallayout>
  433. Git's <filename>checkout</filename> command checks out
  434. the current Yocto Project release into a local branch
  435. whose name matches the release (i.e.
  436. <filename>&DISTRO_NAME_NO_CAP;</filename>).
  437. The local branch tracks the upstream branch of the
  438. same name.
  439. Creating your own branch based on the released
  440. branch ensures you are using the latest files for
  441. that release.
  442. </para></listitem>
  443. <listitem><para><emphasis>Initialize the Build Environment:</emphasis>
  444. Run the
  445. <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
  446. environment setup script to define the OpenEmbedded
  447. build environment on your build host.
  448. <literallayout class='monospaced'>
  449. $ source &OE_INIT_FILE;
  450. </literallayout>
  451. Among other things, the script creates the
  452. <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
  453. which is <filename>build</filename> in this case
  454. and is located in the
  455. <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
  456. After the script runs, your current working directory
  457. is set to the Build Directory.
  458. Later, when the build completes, the Build Directory
  459. contains all the files created during the build.
  460. <note>
  461. For information on running a memory-resident
  462. <ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-components-bitbake'>BitBake</ulink>,
  463. see the
  464. <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>
  465. setup script.
  466. </note>
  467. </para></listitem>
  468. <listitem><para><emphasis>Examine Your Local Configuration File:</emphasis>
  469. When you set up the build environment, a local
  470. configuration file named
  471. <filename>local.conf</filename> becomes available in
  472. a <filename>conf</filename> subdirectory of the
  473. Build Directory.
  474. Before using BitBake to start the build, you can
  475. look at this file and be sure your general
  476. configurations are how you want them:
  477. <itemizedlist>
  478. <listitem><para>
  479. To help conserve disk space during builds,
  480. you can add the following statement to your
  481. project's configuration file, which for this
  482. example is
  483. <filename>poky/build/conf/local.conf</filename>.
  484. Adding this statement deletes the work
  485. directory used for building a recipe once the
  486. recipe is built.
  487. <literallayout class='monospaced'>
  488. INHERIT += "rm_work"
  489. </literallayout>
  490. </para></listitem>
  491. <listitem><para>
  492. By default, the target machine for the build is
  493. <filename>qemux86</filename>,
  494. which produces an image that can be used in
  495. the QEMU emulator and is targeted at an
  496. <trademark class='registered'>Intel</trademark>
  497. 32-bit based architecture.
  498. Further on in this example, this default is
  499. easily changed through the
  500. <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
  501. variable so that you can quickly
  502. build an image for a different machine.
  503. </para></listitem>
  504. <listitem><para>
  505. Another consideration before you build is the
  506. package manager used when creating the image.
  507. The default <filename>local.conf</filename>
  508. file selects the RPM package manager.
  509. You can control this configuration by using the
  510. <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink></filename>
  511. variable.</para>
  512. <para>Selection of the package manager is separate
  513. from whether package management is used at runtime
  514. in the target image.</para>
  515. <para>For additional package manager selection
  516. information, see the
  517. "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-package'><filename>package.bbclass</filename></ulink>"
  518. section in the Yocto Project Reference Manual.
  519. </para></listitem>
  520. </itemizedlist>
  521. </para></listitem>
  522. <listitem><para><emphasis>Start the Build:</emphasis>
  523. Continue with the following command to build an OS image
  524. for the target, which is
  525. <filename>core-image-sato</filename> in this example:
  526. <note>
  527. Depending on the number of processors and cores, the
  528. amount of RAM, the speed of your Internet connection
  529. and other factors, the build process could take several
  530. hours the first time you run it.
  531. Subsequent builds run much faster since parts of the
  532. build are cached.
  533. </note>
  534. <literallayout class='monospaced'>
  535. $ bitbake core-image-sato
  536. </literallayout>
  537. For information on using the
  538. <filename>bitbake</filename> command, see the
  539. "<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-components-bitbake'>BitBake</ulink>"
  540. section in the Yocto Project Reference Manual, or see the
  541. "<ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-command'>BitBake Command</ulink>"
  542. section in the BitBake User Manual.
  543. For information on other targets, see the
  544. "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
  545. chapter in the Yocto Project Reference Manual.
  546. </para></listitem>
  547. <listitem><para><emphasis>Simulate Your Image Using QEMU:</emphasis>
  548. Once this particular image is built, you can start QEMU
  549. and run the image:
  550. <literallayout class='monospaced'>
  551. $ runqemu qemux86
  552. </literallayout>
  553. If you want to learn more about running QEMU, see the
  554. "<ulink url="&YOCTO_DOCS_DEV_URL;#dev-manual-qemu">Using the Quick EMUlator (QEMU)</ulink>"
  555. chapter in the Yocto Project Development Manual.
  556. </para></listitem>
  557. <listitem><para><emphasis>Exit QEMU:</emphasis>
  558. Exit QEMU by either clicking on the shutdown icon or by
  559. opening a terminal, typing
  560. <filename>poweroff</filename>, and then pressing "Enter".
  561. </para></listitem>
  562. </orderedlist>
  563. </para>
  564. <para id='qs-minnowboard-example'>
  565. The following steps show how easy it is to set up to build an
  566. image for a new machine.
  567. These steps build an image for the MinnowBoard MAX, which is
  568. supported by the Yocto Project and the
  569. <filename>meta-intel</filename> <filename>intel-corei7-64</filename>
  570. and <filename>intel-core2-32</filename> Board Support Packages
  571. (BSPs).
  572. <note>
  573. The MinnowBoard MAX ships with 64-bit firmware.
  574. If you want to use the board in 32-bit mode, you must
  575. download the
  576. <ulink url='http://firmware.intel.com/projects/minnowboard-max'>32-bit firmware</ulink>.
  577. </note>
  578. </para>
  579. <para>
  580. <orderedlist>
  581. <listitem><para><emphasis>Create a Local Copy of the
  582. <filename>meta-intel</filename> Repository:</emphasis>
  583. Building an image for the MinnowBoard MAX requires the
  584. <filename>meta-intel</filename> layer.
  585. Use the <filename>git clone</filename> command to create
  586. a local copy of the repository inside your
  587. <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
  588. which is <filename>poky</filename> in this example:
  589. <literallayout class='monospaced'>
  590. $ cd $HOME/poky
  591. $ git clone git://git.yoctoproject.org/meta-intel
  592. Cloning into 'meta-intel'...
  593. remote: Counting objects: 11988, done.
  594. remote: Compressing objects: 100% (3884/3884), done.
  595. Receiving objects: 100% (11988/11988), 2.93 MiB | 2.51 MiB/s, done.
  596. remote: Total 11988 (delta 6881), reused 11752 (delta 6645)
  597. Resolving deltas: 100% (6881/6881), done.
  598. Checking connectivity... done.
  599. </literallayout>
  600. By default when you clone a Git repository, the
  601. "master" branch is checked out.
  602. Before you build your image that uses the
  603. <filename>meta-intel</filename> layer, you must be
  604. sure that both repositories
  605. (<filename>meta-intel</filename> and
  606. <filename>poky</filename>) are using the same releases.
  607. Consequently, you need to checkout out the
  608. "<filename>&DISTRO_NAME_NO_CAP;</filename>" release after
  609. cloning <filename>meta-intel</filename>:
  610. <literallayout class='monospaced'>
  611. $ cd $HOME/poky/meta-intel
  612. $ git checkout &DISTRO_NAME_NO_CAP;
  613. Branch &DISTRO_NAME_NO_CAP; set up to track remote branch &DISTRO_NAME_NO_CAP; from origin.
  614. Switched to a new branch '&DISTRO_NAME_NO_CAP;'
  615. </literallayout>
  616. </para></listitem>
  617. <listitem><para><emphasis>Configure the Build:</emphasis>
  618. To configure the build, you edit the
  619. <filename>bblayers.conf</filename> and
  620. <filename>local.conf</filename> files, both of which are
  621. located in the <filename>build/conf</filename> directory.
  622. </para>
  623. <para>Here is a quick way to make the edits.
  624. The first command uses the
  625. <filename>bitbake-layers add-layer</filename> command
  626. to add the <filename>meta-intel</filename>
  627. layer, which contains the <filename>intel-core*</filename>
  628. BSPs to the build.
  629. The second command selects the BSP by setting the
  630. <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
  631. variable.
  632. <literallayout class='monospaced'>
  633. $ cd $HOME/poky/build
  634. $ bitbake-layers add-layer "$HOME/poky/meta-intel"
  635. $ echo 'MACHINE = "intel-corei7-64"' >> conf/local.conf
  636. </literallayout>
  637. <note><title>Notes</title>
  638. <para>
  639. If you want a 64-bit build, use the following:
  640. <literallayout class='monospaced'>
  641. $ echo 'MACHINE = "intel-corei7-64"' >> conf/local.conf
  642. </literallayout>
  643. </para>
  644. <para>
  645. If you want 32-bit images, use the following:
  646. <literallayout class='monospaced'>
  647. $ echo 'MACHINE = "intel-core2-32"' >> conf/local.conf
  648. </literallayout>
  649. </para>
  650. </note>
  651. </para></listitem>
  652. <listitem><para><emphasis>Build a Minimal Image for MinnowBoard MAX:</emphasis>
  653. Use the following command to build the minimal image for
  654. MinnowBoard MAX.
  655. Because configuration changes are minimal to set up for
  656. this second build, the OpenEmbedded build system can
  657. re-use files from previous builds as much as possible.
  658. Re-using files means this second build will be much faster
  659. than an initial build.
  660. <literallayout class='monospaced'>
  661. $ bitbake core-image-minimal
  662. </literallayout>
  663. Once the build completes, the resulting basic console image
  664. is located in the Build Directory here:
  665. <literallayout class='monospaced'>
  666. tmp/deploy/images/intel-corei7-64/core-image-minimal-intel-corei7-64.hddimg
  667. </literallayout>
  668. </para></listitem>
  669. <listitem><para><emphasis>Write the Image:</emphasis>
  670. You can write the image to a USB key, SATA drive, or SD
  671. card by using the <filename>mkefidisk.sh</filename> script,
  672. which is included in the <filename>poky</filename>
  673. repository at
  674. <filename>scripts/contrib/mkefidisk.sh</filename>:
  675. <literallayout class='monospaced'>
  676. $ sudo $HOME/source/poky/scripts/contrib/mkefidisk.sh <replaceable>HOST_DEVICE</replaceable> \
  677. tmp/deploy/images/intel-corei7-64/core-image-minimal-intel-corei7-64.hddimg <replaceable>TARGET_DEVICE</replaceable>
  678. </literallayout>
  679. In the previous command,
  680. <replaceable>HOST_DEVICE</replaceable> is the device node
  681. on the build host (e.g. <filename>/dev/sdc</filename> or
  682. <filename>/dev/mmcblk0</filename>).
  683. <replaceable>TARGET_DEVICE</replaceable> is the name of the
  684. device as the MinnowBoard MAX sees it (e.g.
  685. <filename>/dev/sda</filename> or
  686. <filename>/dev/mmcblk0</filename>).
  687. </para></listitem>
  688. <listitem><para><emphasis>Boot the Hardware:</emphasis>
  689. With the boot device provisioned, you can insert the
  690. media into the MinnowBoard MAX and boot the hardware.
  691. The board should automatically detect the media and boot to
  692. the bootloader and subsequently the operating system.
  693. </para>
  694. <para>If the board does not boot automatically, you can
  695. boot it manually from the EFI shell as follows:
  696. <literallayout class='monospaced'>
  697. Shell> connect -r
  698. Shell> map -r
  699. Shell> fs0:
  700. Shell> bootx64
  701. </literallayout>
  702. <note>
  703. For a 32-bit image use the following:
  704. <literallayout class='monospaced'>
  705. Shell> bootia32
  706. </literallayout>
  707. </note>
  708. </para></listitem>
  709. </orderedlist>
  710. </para>
  711. </section>
  712. <section id='qs-next-steps'>
  713. <title>Next Steps</title>
  714. <para>
  715. If you completed all the steps in the previous section then
  716. congratulations!
  717. What now?
  718. </para>
  719. <para>
  720. Depending on what you primary interests are with the Yocto Project,
  721. you could consider any of the following:
  722. <itemizedlist>
  723. <listitem><para><emphasis>Visit the Yocto Project Web Site:</emphasis>
  724. The official
  725. <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink>
  726. web site contains information on the entire project.
  727. Visiting this site is a good way to familiarize yourself
  728. with the overall project.
  729. </para></listitem>
  730. <listitem><para><emphasis>Look Through the Yocto Project Development Manual:</emphasis>
  731. The
  732. <ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-intro'>Yocto Project Development Manual</ulink>
  733. is a great place to get a feel for how to use the Yocto
  734. Project.
  735. The manual contains conceptual and procedural information
  736. that covers
  737. <ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-model'>common development models</ulink>
  738. and introduces
  739. <ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-newbie'>the Yocto Project open source development environment</ulink>.
  740. The manual also contains several targeted sections that
  741. cover specific
  742. <ulink url='&YOCTO_DOCS_DEV_URL;#extendpoky'>common tasks</ulink>
  743. such as understanding and creating layers, customizing
  744. images, writing new recipes, working with libraries, and
  745. configuring and patching the kernel.
  746. </para></listitem>
  747. <listitem><para><emphasis>Look Through the Yocto Project Software Development Kit (SDK) Developer's Guide:</emphasis>
  748. The
  749. <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-intro'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>
  750. describes how to use both the
  751. <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-using-the-standard-sdk'>standard SDK</ulink>
  752. and the
  753. <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>extensible SDK</ulink>,
  754. which are used primarily for application development.
  755. This manual also provides an example workflow that uses
  756. the popular <trademark class='trade'>Eclipse</trademark>
  757. development environment.
  758. See the
  759. "<ulink url='&YOCTO_DOCS_SDK_URL;#workflow-using-eclipse'>Workflow using Eclipse™</ulink>"
  760. section.
  761. </para></listitem>
  762. <listitem><para><emphasis>Learn About Board Support Packages (BSPs):</emphasis>
  763. If you want to learn about BSPs, see the
  764. <ulink url='&YOCTO_DOCS_BSP_URL;#bsp'>Yocto Project Board Support Packages (BSP) Developer's Guide</ulink>.
  765. </para></listitem>
  766. <listitem><para><emphasis>Learn About Toaster:</emphasis>
  767. Toaster is a web interface to the Yocto Project's
  768. OpenEmbedded build system.
  769. If you are interested in using this type of interface to
  770. create images, see the
  771. <ulink url='&YOCTO_DOCS_TOAST_URL;#toaster-manual-intro'>Toaster User Manual</ulink>.
  772. </para></listitem>
  773. <listitem><para><emphasis>Have Available the Yocto Project Reference Manual</emphasis>
  774. The
  775. <ulink url='&YOCTO_DOCS_REF_URL;#ref-manual-intro'>Yocto Project Reference Manual</ulink>,
  776. unlike the rest of the Yocto Project manual set, is
  777. comprised of material suited for reference rather than
  778. procedures.
  779. You can get
  780. <ulink url='&YOCTO_DOCS_REF_URL;#usingpoky'>build details</ulink>,
  781. a
  782. <ulink url='&YOCTO_DOCS_REF_URL;#closer-look'>closer look</ulink>
  783. at how the pieces of the Yocto Project development
  784. environment work together, information on various
  785. <ulink url='&YOCTO_DOCS_REF_URL;#technical-details'>technical details</ulink>,
  786. guidance on
  787. <ulink url='&YOCTO_DOCS_REF_URL;#migration'>migrating to a newer Yocto Project release</ulink>,
  788. reference material on the
  789. <ulink url='&YOCTO_DOCS_REF_URL;#ref-structure'>directory structure</ulink>,
  790. <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes'>classes</ulink>,
  791. and
  792. <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks'>tasks</ulink>.
  793. The Yocto Project Reference Manual also contains a fairly
  794. comprehensive
  795. <ulink url='&YOCTO_DOCS_REF_URL;#ref-variables-glossary'>glossary of variables</ulink>
  796. used within the Yocto Project.
  797. </para></listitem>
  798. </itemizedlist>
  799. </para>
  800. </section>
  801. </article>
  802. <!--
  803. vim: expandtab tw=80 ts=4
  804. -->