From 431ceaea6c7786df0b78bf441752229515ac5f0d Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Fri, 30 Jun 2017 14:51:55 -0700 Subject: kernel-dev, dev-manual: Moved Kernel workflow section to kernel-dev Fixes [YOCTO #11630] The overview section of modifying the kernel needed to be in the kernel-dev manual and not in the dev-manual. I moved it and took care of all the links and external references throughout the YP doc set. One figure was involved that had to be moved to the figures folder in kernel-dev from dev-manual. That is why the Makefile had to be edited. (From yocto-docs rev: 3a704b64544678785b883f82d6e82aedac6790c5) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/kernel-dev/kernel-dev-intro.xml | 320 ++++++++++++++++++-------- 1 file changed, 225 insertions(+), 95 deletions(-) (limited to 'documentation/kernel-dev/kernel-dev-intro.xml') diff --git a/documentation/kernel-dev/kernel-dev-intro.xml b/documentation/kernel-dev/kernel-dev-intro.xml index 83ca988acf..9f385d9751 100644 --- a/documentation/kernel-dev/kernel-dev-intro.xml +++ b/documentation/kernel-dev/kernel-dev-intro.xml @@ -5,105 +5,234 @@ Introduction - +
+ Overview -
- Overview + + Regardless of how you intend to make use of the Yocto Project, + chances are you will work with the Linux kernel. + This manual introduces the kernel development process and + provides background information on the Yocto Linux kernel + Metadata, + describes common tasks you can perform using the kernel tools, + and shows you how to use the kernel Metadata needed to work with + the kernel inside the Yocto Project. + - - Regardless of how you intend to make use of the Yocto Project, - chances are you will work with the Linux kernel. - This manual provides background information on the Yocto Linux kernel - Metadata, - describes common tasks you can perform using the kernel tools, - and shows you how to use the kernel Metadata needed to work with - the kernel inside the Yocto Project. - - - - Each Yocto Project release has a set of linux-yocto recipes, whose - Git repositories you can view in the Yocto - Source Repositories under - the "Yocto Linux Kernel" heading. - New recipes for the release track the latest upstream developments - and introduce newly-supported platforms. - Previous recipes in the release are refreshed and supported for at - least one additional release. - As they align, these previous releases are updated to include the - latest from the - Long Term Support Initiative - (LTSI) project. - Also included is a linux-yocto development recipe - (linux-yocto-dev.bb) should you want to work - with the very latest in upstream Linux kernel development and - kernel Metadata development. - + + Each Yocto Project release has a set of Yocto Linux kernel recipes, + whose Git repositories you can view in the Yocto + Source Repositories under + the "Yocto Linux Kernel" heading. + New recipes for the release track the latest Linux kernel + upstream developments from + and introduce + newly-supported platforms. + Previous recipes in the release are refreshed and supported for at + least one additional Yocto Project release. + As they align, these previous releases are updated to include the + latest from the + Long Term Support Initiative + (LTSI) project. + Also included is a Yocto Linux kernel development recipe + (linux-yocto-dev.bb) should you want to work + with the very latest in upstream Yocto Linux kernel development and + kernel Metadata development. + + For more on Yocto Linux kernels, see the + "Yocto Project Kernel Development and Maintenance + section. + + - - The Yocto Project also provides a powerful set of kernel - tools for managing Linux kernel sources and configuration data. - You can use these tools to make a single configuration change, - apply multiple patches, or work with your own kernel sources. - + + The Yocto Project also provides a powerful set of kernel + tools for managing Yocto Linux kernel sources and configuration data. + You can use these tools to make a single configuration change, + apply multiple patches, or work with your own kernel sources. + - - In particular, the kernel tools allow you to generate configuration - fragments that specify only what you must, and nothing more. - Configuration fragments only need to contain the highest level - visible CONFIG options as presented by the Linux - kernel menuconfig system. - Contrast this against a complete Linux kernel - .config, which includes all the automatically - selected CONFIG options. - This efficiency reduces your maintenance effort and allows you - to further separate your configuration in ways that make sense for - your project. - A common split separates policy and hardware. - For example, all your kernels might support - the proc and sys filesystems, - but only specific boards require sound, USB, or specific drivers. - Specifying these configurations individually allows you to aggregate - them together as needed, but maintains them in only one place. - Similar logic applies to separating source changes. - + + In particular, the kernel tools allow you to generate configuration + fragments that specify only what you must, and nothing more. + Configuration fragments only need to contain the highest level + visible CONFIG options as presented by the + Yocto Linux kernel menuconfig system. + Contrast this against a complete Yocto Linux kernel + .config file, which includes all the automatically + selected CONFIG options. + This efficiency reduces your maintenance effort and allows you + to further separate your configuration in ways that make sense for + your project. + A common split separates policy and hardware. + For example, all your kernels might support the + proc and sys filesystems, + but only specific boards require sound, USB, or specific drivers. + Specifying these configurations individually allows you to aggregate + them together as needed, but maintains them in only one place. + Similar logic applies to separating source changes. + - - If you do not maintain your own kernel sources and need to make - only minimal changes to the sources, the released recipes provide a - vetted base upon which to layer your changes. - Doing so allows you to benefit from the continual kernel - integration and testing performed during development of the - Yocto Project. - + + If you do not maintain your own kernel sources and need to make + only minimal changes to the sources, the released recipes provide a + vetted base upon which to layer your changes. + Doing so allows you to benefit from the continual kernel + integration and testing performed during development of the + Yocto Project. + + + + If, instead, you have a very specific Linux kernel source tree + and are unable to align with one of the official Yocto Linux kernel + recipes, an alternative exists by which you can use the Yocto + Project Linux kernel tools with your own kernel sources. + +
+ +
+ Kernel Modification Workflow + + + Kernel modification involves changing the Yocto Project kernel, + which could involve changing configuration options as well as adding + new kernel recipes. + Configuration changes can be added in the form of configuration + fragments, while recipe modification comes through the kernel's + recipes-kernel area in a kernel layer you create. + + + + This section presents a high-level overview of the Yocto Project + kernel modification workflow. + You can find additional information here: + + + "Patching the Kernel" + in the Yocto Project Development Manual. + + + "Configuring the Kernel" + in the Yocto Project Development Manual. + + + This illustration and the following list summarizes the kernel + modification general workflow. + + + + + + + Set up Your Host Development System to Support + Development Using the Yocto Project: + See + "The Linux Distribution" + and + "The Build Host Packages" + sections both in the Yocto Project Quick Start for + requirements. + + + Clone the poky Repository: + Having the + Source Directory + on your system gives you access to the build process and tools + you need. + For information on how to get these files, see the + "Cloning the poky Repository" + section in the Yocto Project Development Manual. + + + Establish the Temporary Kernel Source Files: + Temporary kernel source files are kept in the + Build Directory + created by the OpenEmbedded build system when you run BitBake. + If you have never built the kernel in which you are + interested, you need to run an initial build to + establish local kernel source files. + + If you are building an image for the first time, you + need to get the build environment ready by sourcing an + environment setup script + (i.e. oe-init-build-env or + oe-init-build-env-memres). + You also need to be sure two key configuration files + (local.conf and + bblayers.conf) are configured + appropriately. + + The entire process for building an image is overviewed + in the + "Building Images" + section of the Yocto Project Quick Start. + You might want to reference this information. + You can find more information on BitBake in the + BitBake User Manual. + + + The build process supports several types of images to + satisfy different needs. + See the "Images" + chapter in the Yocto Project Reference Manual for information + on supported images. + + + Make Changes to the Kernel Source Code if + applicable: + Modifying the kernel does not always mean directly + changing source files. + However, if you have to do this, you make the changes to the + files in the Build Directory. + + + Make Kernel Configuration Changes if + Applicable: + If your situation calls for changing the kernel's + configuration, you can use + menuconfig, + which allows you to interactively develop and test the + configuration changes you are making to the kernel. + Saving changes you make with menuconfig + updates the kernel's .config file. + Warning + Try to resist the temptation to directly edit an + existing .config file, which is + found in the Build Directory among the source code + used for the build (e.g. see the workflow illustration + in the + "Kernel Modification Workflow" + section). + Doing so, can produce unexpected results when the + OpenEmbedded build system regenerates the configuration + file. + + Once you are satisfied with the configuration + changes made using menuconfig + and you have saved them, you can directly compare the + resulting .config file against an + existing original and gather those changes into a + configuration fragment file + to be referenced from within the kernel's + .bbappend file. + + Additionally, if you are working in a BSP layer + and need to modify the BSP's kernel's configuration, + you can use the + yocto-kernel + script as well as menuconfig. + The yocto-kernel script lets + you interactively set up kernel configurations. + + + Rebuild the Kernel Image With Your Changes: + Rebuilding the kernel image applies your changes. + + + +
- - If, instead, you have a very specific Linux kernel source tree - and are unable to align with one of the official linux-yocto - recipes, an alternative exists by which you can use the Yocto - Project Linux kernel tools with your own kernel sources. - -
Other Resources @@ -126,8 +255,9 @@ The "Understanding and Creating Layers" section in the Yocto Project Development Manual - The "Modifying the Kernel" section - in the Yocto Project Development Manual. + The "Kernel Modification Workflow" + section. + -- cgit v1.2.3-54-g00ecf