From fe76c380ccafcdf95bc5f859cc26bd5b5788445f Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Wed, 10 Aug 2011 16:27:45 -0700 Subject: documentation/dev-manual/dev-manual-model.xml: re-write of the kernel dev overview After getting the example in kenerl example appendix working I discovered much that was wrong in this overview. The overview attempts to generalize all the situations for kernel modification. These include code changes, configuration changes, and the addition of new recipes. It also includes the situation where a developer wants to gather all the changes into a separate layer for distribution and for when they want to push them up the tree. (From yocto-docs rev: 5498d7b38d3a2f14befa82b66af9919a449e0f04) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/dev-manual/dev-manual-model.xml | 85 +++++++++++++++------------ 1 file changed, 48 insertions(+), 37 deletions(-) (limited to 'documentation/dev-manual/dev-manual-model.xml') diff --git a/documentation/dev-manual/dev-manual-model.xml b/documentation/dev-manual/dev-manual-model.xml index fbdc2f0321..9607ab870b 100644 --- a/documentation/dev-manual/dev-manual-model.xml +++ b/documentation/dev-manual/dev-manual-model.xml @@ -299,50 +299,57 @@ Yocto Project Release in Getting Setup earlier in this manual. - Establish a local copy of the Linux Yocto kernel files on your - system: In order to make modifications to the kernel you need a base - kernel with which to work. - You can set up a local Git repository of the kernel on which you are basing your - modifications. + Setting up the poky-extras Git + repository: This repository is the area for your configuration + fragments, new kernel recipes, and the kernel .bbappend + file used during the build. + It is good practice to set this repository up inside the local Yocto + Project files Git repository. For information on how to get these files, see the bulleted item + The + poky-extras Git Repository in + Getting Setup earlier in this manual. + + Establish a local copy of the Linux Yocto kernel files on your + system: In order to make modifications to the kernel you need two things: + a bare clone of the Linux Yocto kernel you are modifying and a copy of that + bare clone. + The bare clone is required by the build process and is the area to which you + push your kernel source changes. + The copy of the bare clone is a local Git repository that contains all the kernel's + source files. + You make your changes to the files in this copy of the bare clone. + For information on how to set these two items up, see the bulleted item Linux Yocto Kernel in Getting Setup earlier in this manual. - Establish a local kernel layer by copying the - meta-skeleton layer: When you set up a kernel layer - for your changes you should follow a standard layout. - For kernel layers you can start with meta-skeleton, which - is a minimal, base kernel layer in the local Yocto Project files. - You can examine meta-skeleton - in the poky Git repository. - A layer is really just a location or area in which you place configuration - fragments and recipes that modify your kernel. - The layer, in this case, would be where all the recipes that define those dependencies - are kept. - The key point for a layer is that it is an isolated area that contains - all the relevant information for the project that the Yocto Project build - system knows about. - - Prepare to use the menuconfig tool: - The tool menuconfig used within Bitbake provides an - interactive method with which you can configure the kernel. - In order to use menuconfig you need to first source an environment - setup script found in the local poky Git repository. - The script is named oe-init-build-env. + 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 then you make the changes in the local + Git repository you set up to hold the source files (i.e. the copy of the + bare clone). + Once the changes are made you need to use Git commands to commit the changes + and then push them to the bare clone. Make kernel configuration changes - to your local kernel layer: Use menuconfig - to enable and disable the configurations to the Linux Yocto kernel. + to your local kernel layer if applicable: + If your situation calls for changing the kernel's configuration you can + use menuconfig + to enable and disable kernel configurations. Using menuconfig allows you to develop and test the configuration changes you are making to the kernel. - Make kernel recipe changes to your new kernel - layer: The standard layer structure organizes recipe files you - need to edit in several recipes-* directories within the - kernel layer. - Recipe changes include altering recipes (.bb files), removing - recipes you don't use, and adding new recipes that you need to support your hardware. + Add new kernel recipes: The standard + layer structure organizes recipe files inside the + meta-kernel-dev layer that is within the + poky-extras Git repository. + If you need to add new kernel recipes you add them within this layer. + Also within this area you will find the .bbappend + file that appends information to the kernel's recipe file used during the + build. Prepare for the build: Once you have made all the - changes to your kernel layer there remains a few things + changes to your kernel (configurations, source code changes, recipe additions, + or recipe changes) there remains a few things you need to do for the Yocto Project build system in order for it to create your image. If you have not done so you need to get the build environment ready by sourcing the environment setup script described earlier. @@ -350,7 +357,9 @@ The entire process for building an image is overviewed in the Building an Image section of the Yocto Project Quick Start. - You might want to reference this information. + You might want to reference this information. + Also, you should look at the detailed examples found in the appendices at + end of this manual. Build the image: The Yocto Project uses the BitBake tool to build images based on the type of image you want to create. You can find more information on BitBake @@ -366,7 +375,9 @@ in the kernel layer: Up to this point all the configuration changes to the kernel have been done and tested iteratively. Once they are tested and ready to go you can move them into the kernel layer, - which allows you to distribute the layer. + which allows you to distribute the layer. + [WRITER'S NOTE: Not sure if the layer is meta-kernel-dev or if it would be + a new layer copied from the work done there.] Push your configuration and recipe changes upstream to the linux Yocto Git repository (in-tree changes): If the changes you made are suited for all Linux Yocto users you might want to push the changes up into -- cgit v1.2.3-54-g00ecf