diff options
| author | Scott Rifenbark <srifenbark@gmail.com> | 2017-08-18 15:12:33 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-02 00:52:48 +0100 |
| commit | a64831cad79e46c50509aad89f6fefad71123b60 (patch) | |
| tree | 4b8e92879e4a6444efd696f2caf9dd7bd92297d9 /documentation/kernel-dev/kernel-dev-common.xml | |
| parent | 25aacfe1dadad0e762dccd1c1d061ea77c25a3a3 (diff) | |
| download | poky-a64831cad79e46c50509aad89f6fefad71123b60.tar.gz | |
kernel-dev, dev-manual: Moved Kernel prep steps
The dev-manual had a place-holder section for getting the
build host ready for using YP and then doing kernel
development. This stuff is better suited for the actual
kernel development manual. I moved the section. Moving
created several broken links in the manual set that had to
be fixed.
In the dev-manual, I updated the introductory list to include
the newly moved kernel stuff.
(From yocto-docs rev: 2e21260bb5f84e9e30eb353ec841d5962e8a7642)
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/kernel-dev/kernel-dev-common.xml')
| -rw-r--r-- | documentation/kernel-dev/kernel-dev-common.xml | 76 |
1 files changed, 69 insertions, 7 deletions
diff --git a/documentation/kernel-dev/kernel-dev-common.xml b/documentation/kernel-dev/kernel-dev-common.xml index c55f68bc24..8c8fe05711 100644 --- a/documentation/kernel-dev/kernel-dev-common.xml +++ b/documentation/kernel-dev/kernel-dev-common.xml | |||
| @@ -474,15 +474,15 @@ | |||
| 474 | </para> | 474 | </para> |
| 475 | 475 | ||
| 476 | <para> | 476 | <para> |
| 477 | The example assumes a clean build exists for the <filename>qemux86</filename> | 477 | The example builds an extensible SDK, which is then used to |
| 478 | machine in a | 478 | build, using <filename>devtool</filename>, a clean image for the |
| 479 | default <filename>qemux86</filename> machine in a | ||
| 479 | <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink> | 480 | <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink> |
| 480 | named <filename>poky</filename>. | 481 | named <filename>poky</filename>. |
| 481 | Furthermore, the | 482 | In the example, the |
| 482 | <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink> | 483 | <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink> |
| 483 | is <filename>build</filename> and is located in | 484 | is <filename>build</filename> and is located in the default |
| 484 | <filename>poky</filename> and the kernel is based on the | 485 | <filename>poky_sdk</filename> directory. |
| 485 | Linux 3.4 kernel. | ||
| 486 | </para> | 486 | </para> |
| 487 | 487 | ||
| 488 | <para> | 488 | <para> |
| @@ -491,12 +491,74 @@ | |||
| 491 | section. | 491 | section. |
| 492 | </para> | 492 | </para> |
| 493 | 493 | ||
| 494 | <section id='patch-kernel-set-up-the-build-host'> | ||
| 495 | <title>Set Up the Build Host</title> | ||
| 496 | |||
| 497 | <para> | ||
| 498 | Prior to creating any actual patches for your kernel, you | ||
| 499 | need to prepare the build host. | ||
| 500 | This example builds an extensible SDK. | ||
| 501 | Follow these steps: | ||
| 502 | <itemizedlist> | ||
| 503 | <listitem><para> | ||
| 504 | <emphasis>Set Up the Build Environment:</emphasis> | ||
| 505 | Be sure you are set up to use BitBake in a shell. | ||
| 506 | See the | ||
| 507 | "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-the-development-host-to-use-the-yocto-project'>Setting Up the Development Host to Use the Yocto Project</ulink>" | ||
| 508 | section in the Yocto Project Development Manual for information | ||
| 509 | on how to get a build host ready that is either a native | ||
| 510 | Linux machine or a machine that uses CROPS. | ||
| 511 | </para></listitem> | ||
| 512 | <listitem><para> | ||
| 513 | <emphasis>Clone the <filename>poky</filename> Repository:</emphasis> | ||
| 514 | You need to have a local copy of the Yocto Project | ||
| 515 | <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink> | ||
| 516 | (i.e. a local <filename>poky</filename> repository). | ||
| 517 | See the | ||
| 518 | "<ulink url='&YOCTO_DOCS_DEV_URL;#cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</ulink>" | ||
| 519 | and possibly the | ||
| 520 | "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking Out by Branch in Poky</ulink>" | ||
| 521 | and | ||
| 522 | "<ulink url='&YOCTO_DOCS_DEV_URL;#checkout-out-by-tag-in-poky'>Checking Out by Tag in Poky</ulink>" | ||
| 523 | sections all in the Yocto Project Development Manual for | ||
| 524 | information on how to clone the <filename>poky</filename> | ||
| 525 | repository and check out the appropriate branch for your work. | ||
| 526 | </para></listitem> | ||
| 527 | <listitem><para> | ||
| 528 | <emphasis>Initialize the Build Environment:</emphasis> | ||
| 529 | While in the root directory of the Source Directory (i.e. | ||
| 530 | <filename>poky</filename>), run the | ||
| 531 | <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink> | ||
| 532 | environment setup script to define the OpenEmbedded | ||
| 533 | build environment on your build host. | ||
| 534 | <literallayout class='monospaced'> | ||
| 535 | $ source &OE_INIT_FILE; | ||
| 536 | </literallayout> | ||
| 537 | Among other things, the script creates the | ||
| 538 | <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>, | ||
| 539 | which is <filename>build</filename> in this case | ||
| 540 | and is located in the | ||
| 541 | <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>. | ||
| 542 | After the script runs, your current working directory | ||
| 543 | is set to the <filename>build</filename> directory. | ||
| 544 | <note> | ||
| 545 | For information on running a memory-resident | ||
| 546 | <ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-components-bitbake'>BitBake</ulink>, | ||
| 547 | see the | ||
| 548 | <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink> | ||
| 549 | setup script. | ||
| 550 | </note> | ||
| 551 | </para></listitem> | ||
| 552 | </itemizedlist> | ||
| 553 | </para> | ||
| 554 | </section> | ||
| 555 | |||
| 494 | <section id='create-a-layer-for-your-changes'> | 556 | <section id='create-a-layer-for-your-changes'> |
| 495 | <title>Create a Layer for your Changes</title> | 557 | <title>Create a Layer for your Changes</title> |
| 496 | 558 | ||
| 497 | <para> | 559 | <para> |
| 498 | The first step is to create a layer so you can isolate your | 560 | The first step is to create a layer so you can isolate your |
| 499 | changes. | 561 | changes to the kernel. |
| 500 | Rather than use the <filename>yocto-layer</filename> script | 562 | Rather than use the <filename>yocto-layer</filename> script |
| 501 | to create the layer, this example steps through the process | 563 | to create the layer, this example steps through the process |
| 502 | by hand. | 564 | by hand. |
