diff options
| author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2012-01-24 21:25:11 -0600 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-08 12:07:44 -0800 |
| commit | f8d248e946c07cb20b9f567966b388cac604e362 (patch) | |
| tree | eed00039dd8393b3a14c2f8b44eacc21829a10f5 /documentation/dev-manual | |
| parent | fe11d654b2bc3ef572138ded75bcc4d6937cd3dd (diff) | |
| download | poky-f8d248e946c07cb20b9f567966b388cac604e362.tar.gz | |
documentation/dev-manual/dev-manual-kernel-appendix.xml: edits to example
Poor flow for the config_smp example. Upon reading this example
it did not stand well on its own. I added some text, albeit
redundant but necessary I felt, so that the example would stand on
its own.
(From yocto-docs rev: f8c0c9469eae0788f1bfba309deefb4e03d4bc29)
Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual')
| -rw-r--r-- | documentation/dev-manual/dev-manual-kernel-appendix.xml | 118 |
1 files changed, 82 insertions, 36 deletions
diff --git a/documentation/dev-manual/dev-manual-kernel-appendix.xml b/documentation/dev-manual/dev-manual-kernel-appendix.xml index b4b2087c22..8eed4e63b4 100644 --- a/documentation/dev-manual/dev-manual-kernel-appendix.xml +++ b/documentation/dev-manual/dev-manual-kernel-appendix.xml | |||
| @@ -226,10 +226,8 @@ | |||
| 226 | <filename>PARALLEL_MAKE</filename> to twice the number | 226 | <filename>PARALLEL_MAKE</filename> to twice the number |
| 227 | of cores your machine supports. | 227 | of cores your machine supports. |
| 228 | </note> | 228 | </note> |
| 229 | </para> | 229 | The following two commands <filename>source</filename> the build environment setup script |
| 230 | <para> | 230 | and build the default <filename>qemux86</filename> image. |
| 231 | The following two commands build the default <filename>qemux86</filename> image and | ||
| 232 | <filename>source</filename> build environment setup script. | ||
| 233 | If necessary, the script creates the build directory: | 231 | If necessary, the script creates the build directory: |
| 234 | <literallayout class='monospaced'> | 232 | <literallayout class='monospaced'> |
| 235 | $ cd ~/poky | 233 | $ cd ~/poky |
| @@ -514,46 +512,94 @@ | |||
| 514 | in "<link linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source | 512 | in "<link linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source |
| 515 | Code</link>" you should already have the Yocto Project files set up on your | 513 | Code</link>" you should already have the Yocto Project files set up on your |
| 516 | host machine. | 514 | host machine. |
| 515 | If this is the case, go to then next section titled | ||
| 516 | "<link linkend='examining-the-default-config-smp-behavior'>Examining the Default | ||
| 517 | <filename>CONFIG_SMP</filename> Behavior</link>" and continue with the | ||
| 518 | example. | ||
| 517 | </para> | 519 | </para> |
| 518 | 520 | ||
| 519 | <para> | 521 | <para> |
| 520 | If you don't have the Yocto Project files established on your system, | 522 | If you don't have the Yocto Project files established on your system, |
| 521 | See "<link linkend='setting-up-the-local-yocto-project-files-git-repository'>Setting | 523 | you can get them through tarball extraction or by |
| 522 | Up the Local Yocto Project Files Git Repository</link>" for | 524 | cloning the <filename>poky</filename> Git repository. |
| 523 | information. | 525 | This example uses <filename>poky</filename> as the root directory of the |
| 524 | To reconfigure the kernel, this is the only Git repository you need to have set up. | 526 | local Yocto Project files Git repository. |
| 527 | See the bulleted item | ||
| 528 | "<link linkend='local-yp-release'>Yocto Project Release</link>" | ||
| 529 | for information on how to get these files. | ||
| 525 | </para> | 530 | </para> |
| 526 | 531 | ||
| 527 | <!-- | 532 | <para> |
| 533 | Once you have the repository set up, | ||
| 534 | you have many development branches from which you can work. | ||
| 535 | From inside the repository you can see the branch names and the tag names used | ||
| 536 | in the Git repository using either of the following two commands: | ||
| 537 | <literallayout class='monospaced'> | ||
| 538 | $ cd poky | ||
| 539 | $ git branch -a | ||
| 540 | $ git tag -l | ||
| 541 | </literallayout> | ||
| 542 | This example uses the Yocto Project 1.1.1 Release code named "edison", | ||
| 543 | which maps to the <filename>edison</filename> branch in the repository. | ||
| 544 | The following commands create and checkout the local <filename>edison</filename> | ||
| 545 | branch: | ||
| 546 | <literallayout class='monospaced'> | ||
| 547 | $ git checkout -b edison origin/edison | ||
| 548 | Branch edison set up to track remote branch edison from origin. | ||
| 549 | Switched to a new branch 'edison' | ||
| 550 | </literallayout> | ||
| 551 | </para> | ||
| 528 | 552 | ||
| 529 | <para> | 553 | <para> |
| 530 | If you took the time to work through the example that modifies the kernel source code | 554 | Next, you need to build the default <filename>qemux86</filename> image that you |
| 531 | in "<link linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source | 555 | can boot using QEMU. |
| 532 | Code</link>" you are already set up to quickly work through this example. | 556 | <note> |
| 533 | If not, then work through the following list to prepare: | 557 | Because a full build can take hours, you should check two variables in the |
| 534 | <itemizedlist> | 558 | <filename>build</filename> directory that is created after you source the |
| 535 | <listitem><para><emphasis>Understand the development environment:</emphasis> | 559 | <filename>oe-init-build-env</filename> script. |
| 536 | See "<link linkend='understanding-the-files-you-need'>Understanding | 560 | You can find these variables |
| 537 | the Files You Need</link>" for information.</para></listitem> | 561 | <filename>BB_NUMBER_THREADS</filename> and <filename>PARALLEL_MAKE</filename> |
| 538 | <listitem><para><emphasis>Set up the local Yocto Project files Git | 562 | in the <filename>build/conf</filename> directory in the |
| 539 | repository:</emphasis> | 563 | <filename>local.conf</filename> configuration file. |
| 540 | See "<link linkend='setting-up-the-local-yocto-project-files-git-repository'>Setting | 564 | By default, these variables are commented out. |
| 541 | Up the Local Yocto Project Files Git Repository</link>" for | 565 | If your host development system supports multi-core and multi-thread capabilities, |
| 542 | information.</para></listitem> | 566 | you can uncomment these statements and set the variables to significantly shorten |
| 543 | <listitem><para><emphasis>Set up the <filename>poky-extras</filename> Git | 567 | the full build time. |
| 544 | repository:</emphasis> | 568 | As a guideline, set <filename>BB_NUMBER_THREADS</filename> to twice the number |
| 545 | See "<link linkend='setting-up-the-poky-extras-git-repository'>Setting | 569 | of cores your machine supports and set <filename>PARALLEL_MAKE</filename> to one and |
| 546 | Up <filename>poky-extras</filename> Git repository</link>" for | 570 | a half times the number of cores your machine supports. |
| 547 | information.</para></listitem> | 571 | </note> |
| 548 | <listitem><para><emphasis>Set up the the bare clone and its copy:</emphasis> | 572 | The following two commands <filename>source</filename> the build environment setup script |
| 549 | See "<link linkend='setting-up-the-bare-clone-and-its-copy'>Setting Up the | 573 | and build the default <filename>qemux86</filename> image. |
| 550 | Bare Clone and its Copy</link>" for information.</para></listitem> | 574 | If necessary, the script creates the build directory: |
| 551 | <listitem><para><emphasis>Build the default QEMU kernel image:</emphasis> | 575 | <literallayout class='monospaced'> |
| 552 | See "<link linkend='building-and-booting-the-default-qemu-kernel-image'>Building | 576 | $ cd ~/poky |
| 553 | and Booting the Default QEMU Kernel image</link>" for information. | 577 | $ source oe-init-build-env |
| 554 | Do not boot the image in the QEMU emulator at this point.</para></listitem> | 578 | |
| 555 | </itemizedlist> | 579 | ### Shell environment set up for builds. ### |
| 556 | </para> --> | 580 | |
| 581 | You can now run 'bitbake <target>' | ||
| 582 | |||
| 583 | Common targets are: | ||
| 584 | core-image-minimal | ||
| 585 | core-image-sato | ||
| 586 | meta-toolchain | ||
| 587 | meta-toolchain-sdk | ||
| 588 | adt-installer | ||
| 589 | meta-ide-support | ||
| 590 | |||
| 591 | You can also run generated qemu images with a command like 'runqemu qemux86' | ||
| 592 | </literallayout> | ||
| 593 | </para> | ||
| 594 | |||
| 595 | <para> | ||
| 596 | The following <filename>bitbake</filename> command starts the build: | ||
| 597 | <literallayout class='monospaced'> | ||
| 598 | $ bitbake -k core-image-minimal | ||
| 599 | </literallayout> | ||
| 600 | <note>Be sure to check the settings in the <filename>local.conf</filename> | ||
| 601 | before starting the build.</note> | ||
| 602 | </para> | ||
| 557 | </section> | 603 | </section> |
| 558 | 604 | ||
| 559 | <section id='examining-the-default-config-smp-behavior'> | 605 | <section id='examining-the-default-config-smp-behavior'> |
