diff options
| author | Scott Rifenbark <srifenbark@gmail.com> | 2018-04-23 17:07:03 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-05-24 17:17:55 +0100 |
| commit | ffd352ae2a070ac3ec02bb37f589e7028c6aa47c (patch) | |
| tree | 8fdcfb0ba394928cdad98477743247208960f990 /documentation | |
| parent | 01fd8fcd50c30d2e663660ad5ad6bd4f0a5fbd57 (diff) | |
| download | poky-ffd352ae2a070ac3ec02bb37f589e7028c6aa47c.tar.gz | |
brief-yoctoprojectqs: Added sections on layers
Added a section on adding a machine layer. Used Altera as an
example. Also, added a section on creating a general layer.
(From yocto-docs rev: fc36f006bd483a5c26d2b79a18431d16ec27dc00)
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
| -rw-r--r-- | documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml | 138 |
1 files changed, 137 insertions, 1 deletions
diff --git a/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml b/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml index 116dfbd145..1fae145bbc 100644 --- a/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml +++ b/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml | |||
| @@ -33,6 +33,8 @@ | |||
| 33 | Welcome! | 33 | Welcome! |
| 34 | This short document steps you through the process for a typical | 34 | This short document steps you through the process for a typical |
| 35 | image build using the Yocto Project. | 35 | image build using the Yocto Project. |
| 36 | The document also introduces how to add a machine layer and a | ||
| 37 | general layer to your Yocto Project development environment. | ||
| 36 | You will use Yocto Project to build a reference embedded OS | 38 | You will use Yocto Project to build a reference embedded OS |
| 37 | called Poky. | 39 | called Poky. |
| 38 | <note> | 40 | <note> |
| @@ -200,7 +202,7 @@ | |||
| 200 | Later, when the build completes, the Build Directory | 202 | Later, when the build completes, the Build Directory |
| 201 | contains all the files created during the build. | 203 | contains all the files created during the build. |
| 202 | </para></listitem> | 204 | </para></listitem> |
| 203 | <listitem><para> | 205 | <listitem><para id='conf-file-step'> |
| 204 | <emphasis>Examine Your Local Configuration File:</emphasis> | 206 | <emphasis>Examine Your Local Configuration File:</emphasis> |
| 205 | When you set up the build environment, a local | 207 | When you set up the build environment, a local |
| 206 | configuration file named | 208 | configuration file named |
| @@ -270,6 +272,140 @@ | |||
| 270 | </para> | 272 | </para> |
| 271 | </section> | 273 | </section> |
| 272 | 274 | ||
| 275 | <section id='adding-a-hardware-layer'> | ||
| 276 | <title>Adding a Hardware Layer</title> | ||
| 277 | |||
| 278 | <para> | ||
| 279 | So far, all you have done is quickly built an image suitable | ||
| 280 | for emulation only. | ||
| 281 | This section shows you how you can add a hardware layer into | ||
| 282 | the Yocto Project development environment. | ||
| 283 | </para> | ||
| 284 | |||
| 285 | <para> | ||
| 286 | A hardware layer provides the metadata to support specific | ||
| 287 | hardware. | ||
| 288 | By convention, hardware layers (i.e. Board Support Packages) | ||
| 289 | start with the string "meta-". | ||
| 290 | </para> | ||
| 291 | |||
| 292 | <para> | ||
| 293 | Follow these steps to add a hardware layer: | ||
| 294 | <orderedlist> | ||
| 295 | <listitem><para> | ||
| 296 | <emphasis>Find a Layer:</emphasis> | ||
| 297 | Lots of hardware layers exist. | ||
| 298 | The Yocto Project | ||
| 299 | <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink> | ||
| 300 | has many hardware layers. | ||
| 301 | This example adds the | ||
| 302 | <ulink url='https://github.com/kraj/meta-altera'>meta-altera</ulink> | ||
| 303 | hardware layer. | ||
| 304 | </para></listitem> | ||
| 305 | <listitem><para> | ||
| 306 | <emphasis>Clone the Layer</emphasis> | ||
| 307 | Use Git to make a local copy of the layer on your machine. | ||
| 308 | You can put the copy in the top level of the copy of the | ||
| 309 | Poky repository created earlier: | ||
| 310 | <literallayout class='monospaced'> | ||
| 311 | $ cd ~/poky | ||
| 312 | $ git clone https://github.com/kraj/meta-altera.git | ||
| 313 | Cloning into 'meta-altera'... | ||
| 314 | remote: Counting objects: 25170, done. | ||
| 315 | remote: Compressing objects: 100% (350/350), done. | ||
| 316 | remote: Total 25170 (delta 645), reused 719 (delta 538), pack-reused 24219 | ||
| 317 | Receiving objects: 100% (25170/25170), 41.02 MiB | 1.64 MiB/s, done. | ||
| 318 | Resolving deltas: 100% (13385/13385), done. | ||
| 319 | Checking connectivity... done. | ||
| 320 | </literallayout> | ||
| 321 | The hardware layer now exists inside as | ||
| 322 | <filename>meta-altera</filename> and contains all the | ||
| 323 | metadata needed to support hardware from Altera, which | ||
| 324 | is owned by Intel. | ||
| 325 | </para></listitem> | ||
| 326 | <listitem><para> | ||
| 327 | <emphasis>Change the Configuration to Build for a Specific Machine:</emphasis> | ||
| 328 | The | ||
| 329 | <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink> | ||
| 330 | variable in the <filename>local.conf</filename> file | ||
| 331 | specifies the machine for the build. | ||
| 332 | For this example, set the <filename>MACHINE</filename> | ||
| 333 | variable to "cyclone5". | ||
| 334 | The build system will use the machine configurations here: | ||
| 335 | <ulink url='https://github.com/kraj/meta-altera/blob/master/conf/machine/cyclone5.conf'></ulink>. | ||
| 336 | <note> | ||
| 337 | See the | ||
| 338 | "<link linkend='conf-file-step'>Examine Your Local Configuration File</link>" | ||
| 339 | step earlier for more information on configuring the | ||
| 340 | build. | ||
| 341 | </note> | ||
| 342 | </para></listitem> | ||
| 343 | <listitem><para> | ||
| 344 | <emphasis>Add Your Layer to the Layer Configuration File:</emphasis> | ||
| 345 | Before you can use a layer during a build, you must add it | ||
| 346 | to your <filename>bblayers.conf</filename> file, which | ||
| 347 | is found in the | ||
| 348 | <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory's</ulink> | ||
| 349 | <filename>conf</filename> directory.</para> | ||
| 350 | |||
| 351 | <para>Use the <filename>bitbake-layers add-layer</filename> | ||
| 352 | command: | ||
| 353 | <literallayout class='monospaced'> | ||
| 354 | $ cd ~/poky/build | ||
| 355 | $ bitbake-layers add-layer ../meta-altera | ||
| 356 | NOTE: Starting bitbake server... | ||
| 357 | Parsing recipes: 100% |##################################################################| Time: 0:00:32 | ||
| 358 | Parsing of 918 .bb files complete (0 cached, 918 parsed). 1401 targets, 123 skipped, 0 masked, 0 errors. | ||
| 359 | </literallayout> | ||
| 360 | You can find more information on adding layers in the | ||
| 361 | "<ulink url='&YOCTO_DOCS_DEV_URL;#adding-a-layer-using-the-bitbake-layers-script'>Adding a Layer Using the <filename>bitbake-layers</filename> Script</ulink>" | ||
| 362 | section. | ||
| 363 | </para></listitem> | ||
| 364 | </orderedlist> | ||
| 365 | Completing these steps has added the | ||
| 366 | <filename>meta-altera</filename> layer to your Yocto Project | ||
| 367 | development environment and configured it to build for the | ||
| 368 | "imx6sxsabresd" machine. | ||
| 369 | <note> | ||
| 370 | The previous steps are for demonstration purposes only. | ||
| 371 | If you were to attempt to build an image for the | ||
| 372 | "cyclone5" build, you should read the Altera | ||
| 373 | <filename>README</filename>. | ||
| 374 | </note> | ||
| 375 | </para> | ||
| 376 | </section> | ||
| 377 | |||
| 378 | <section id='adding-your-own-layer'> | ||
| 379 | <title>Adding Your Own Layer</title> | ||
| 380 | |||
| 381 | <para> | ||
| 382 | Maybe you have an application or specific set of behaviors you | ||
| 383 | need to isolate. | ||
| 384 | You can create your own layer using the | ||
| 385 | <filename>bitbake-layers create-layer</filename> command. | ||
| 386 | The tool automates layer creation by setting up a | ||
| 387 | subdirectory with a <filename>layer.conf</filename> | ||
| 388 | configuration file, a <filename>recipes-example</filename> | ||
| 389 | subdirectory that contains an <filename>example.bb</filename> | ||
| 390 | recipe, a licensing file, and a <filename>README</filename>. | ||
| 391 | </para> | ||
| 392 | |||
| 393 | <para> | ||
| 394 | The following commands run the tool to create a layer named | ||
| 395 | <filename>meta-mylayer</filename> in the | ||
| 396 | <filename>poky</filename> directory: | ||
| 397 | <literallayout class='monospaced'> | ||
| 398 | $ cd ~/poky | ||
| 399 | $ bitbake-layers create-layer meta-mylayer | ||
| 400 | NOTE: Starting bitbake server... | ||
| 401 | Add your new layer with 'bitbake-layers add-layer meta-mylayer' | ||
| 402 | </literallayout> | ||
| 403 | For more information on layers and how to create them, see the | ||
| 404 | "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>" | ||
| 405 | section in the Yocto Project Development Tasks Manual. | ||
| 406 | </para> | ||
| 407 | </section> | ||
| 408 | |||
| 273 | <section id='brief-where-to-go-next'> | 409 | <section id='brief-where-to-go-next'> |
| 274 | <title>Where To Go Next</title> | 410 | <title>Where To Go Next</title> |
| 275 | 411 | ||
