From bb715c8eb834ab691715de9cee79d9d6a5adcf92 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Wed, 19 Dec 2012 12:54:02 -0600 Subject: kernel-dev: Re-write of "Working With Your Own Sources" section. (From yocto-docs rev: 21b923bcb13cf918ddfad3b1cb449829c43aa3ab) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/kernel-dev/kernel-dev-common.xml | 109 ++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 1 deletion(-) (limited to 'documentation/kernel-dev/kernel-dev-common.xml') diff --git a/documentation/kernel-dev/kernel-dev-common.xml b/documentation/kernel-dev/kernel-dev-common.xml index 0de39d5686..506a45ee11 100644 --- a/documentation/kernel-dev/kernel-dev-common.xml +++ b/documentation/kernel-dev/kernel-dev-common.xml @@ -608,7 +608,113 @@ to the Yocto Project Development Manual, section 5.7.3 Creating the Patch. Working With Your Own Sources - If you find yourself unable to work with one of the Linux kernel versions + If you find yourself unable to work with one of the Linux kernel + versions supported by existing linux-yocto recipes, you can + still make use of the Yocto Project Linux kernel tooling by + working with your own sources. + You will not be able to leverage the existing + Metadata and + stabilization work of the linux-yocto sources, but you will be + able to manage your own Metadata in the same format as the + linux-yocto sources. + Format compatibility facilitates converging with + linux-yocto on a future, mutually-supported kernel version. + + + + The linux-yocto custom recipe is located in the + poky Git repository of the + Yocto Project Source Repository + at: + + poky/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb + + + + + The example recipe uses kernel.org sources + and the Yocto Project Linux kernel tools for managing Metadata. + + + + Here are some basic steps you can use to work with your own sources: + + Copy the linux-yocto-custom.bb + recipe to your layer and give it a meaningful name. + The name should include the version of the Linux kernel you + are using (e.g. linux-yocto-myproject_3.5.bb, + where "3.5" is the base version of the Linux kernel + with which you would be working. + In the same directory inside your layer, + create a matching directory + to store your patches and configuration files (e.g. + linux-yocto-myproject). + + Edit the following variables in your recipe + as appropriate for your project: + + SRC_URI: + The SRC_URI should be a Git + repository that uses one of the supported Git fetcher + protocols (i.e. file, + git, http, + and so forth). + The skeleton recipe provides an example + SRC_URI as a syntax reference. + + LINUX_VERSION: + The Linux kernel version you are using (e.g. + "3.6.3"). + LINUX_VERSION_EXTENSION: + The Linux kernel CONFIG_LOCALVERSION + that is compiled into the resulting kernel and visible + through the uname command. + + SRCREV: + The commit ID from which you want to build. + + PR: + Treat this variable the same as you would in any other + recipe. + Increment the variable to indicate to the OpenEmbedded + build system that the recipe has changed. + + PV: + The default PV assignment is + typically adequate. + It combines the LINUX_VERSION + with the SCM revision (from the SRCPV variable) + and results in a string using the following form: + + 3.4.11+git1+68a635bf8dfb64b02263c1ac80c948647cc76d5f_1+218bd8d2022b9852c60d32f0d770931e3cf343e2 + + While lengthy, the extra verbosity in PV + helps ensure you are using the exact + sources from which you intend to build. + + COMPATIBLE_MACHINE: + A list of the machines supported by your new recipe. + This variable in the example recipe is set + by default to a regular expression that matches + only the empty string, "(^$)". + This default setting triggers an explicit build failure. + You must change it to match a list of the machines + that your new recipe supports (e.g. "qemux86|qemux86-64"). + + + Provide further customizations to your recipe + as needed just as you would customize an existing + linux-yocto recipe. + See the "Modifying + an Existing Recipe" section for information. + + + + + + Original Text: + +If you find yourself unable to work with one of the Linux kernel versions supported by existing linux-yocto recipes, you can still make use of the Yocto Project Linux kernel tooling while working with your own sources. You will not be able to leverage the existing meta-data and stabilization work of the @@ -669,6 +775,7 @@ machines supported by your new recipe, such as "(qemux86|qemux86-64)" With that in place, you can continue to customize this recipe as you would the existing linux-yocto recipes. See Section 2.2 Modifying an Existing Recipe for details. + -- cgit v1.2.3-54-g00ecf