From d7ad579ce547a56fedded2a6b5e531c5c4cda251 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Tue, 3 Oct 2017 13:09:54 -0700 Subject: kernel-dev: Updates to "Working With Your Own Sources" Formatting changes for the list. (From yocto-docs rev: df1201085408eec45d8fbf649e80437299daa0e8) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/kernel-dev/kernel-dev-common.xml | 122 +++++++++++++++---------- 1 file changed, 74 insertions(+), 48 deletions(-) (limited to 'documentation') diff --git a/documentation/kernel-dev/kernel-dev-common.xml b/documentation/kernel-dev/kernel-dev-common.xml index 47a61a1552..2b47eafac8 100644 --- a/documentation/kernel-dev/kernel-dev-common.xml +++ b/documentation/kernel-dev/kernel-dev-common.xml @@ -2258,23 +2258,29 @@ - Here are some basic steps you can use to work with your own sources: + Here are some basic steps you can use to work with your own + sources: - Copy the linux-yocto-custom.bb + + Create a Copy of the Kernel Recipe: + 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.19.bb, - where "3.19" 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). + The name should include the version of the Yocto Linux + kernel you are using (e.g. + linux-yocto-myproject_4.12.bb, + where "4.12" is the base version of the Linux kernel + with which you would be working). + + + Create a Directory for Your Patches: + In the same directory inside your layer, create a matching + directory to store your patches and configuration files + (e.g. linux-yocto-myproject). - Make sure you have either a - defconfig file or configuration - fragment files. + + Ensure You Have Configurations: + Make sure you have either a defconfig + file or configuration fragment files in your layer. When you use the linux-yocto-custom.bb recipe, you must specify a configuration. If you do not have a defconfig file, @@ -2283,27 +2289,32 @@ $ make defconfig After running the command, copy the resulting - .config to the - files directory as "defconfig" and - then add it to the + .config file to the + files directory in your layer + as "defconfig" and then add it to the SRC_URI variable in the recipe. + Running the make defconfig command results in the default configuration for your architecture as defined by your kernel. However, no guarantee exists that this configuration is valid for your use case, or that your board will even boot. - This is particularly true for non-x86 architectures. - To use non-x86 defconfig files, you - need to be more specific and find one that matches your + This is particularly true for non-x86 architectures. + + To use non-x86 defconfig files, + you need to be more specific and find one that matches your board (i.e. for arm, you look in arch/arm/configs and use the one that is the best starting point for your board). - Edit the following variables in your recipe - as appropriate for your project: + + Edit the Recipe: + Edit the following variables in your recipe as appropriate + for your project: - SRC_URI: + + SRC_URI: The SRC_URI should specify a Git repository that uses one of the supported Git fetcher protocols (i.e. file, @@ -2315,24 +2326,32 @@ The skeleton recipe provides an example SRC_URI as a syntax reference. - LINUX_VERSION: + + LINUX_VERSION: The Linux kernel version you are using (e.g. - "3.19"). - LINUX_VERSION_EXTENSION: - The Linux kernel CONFIG_LOCALVERSION - that is compiled into the resulting kernel and visible + "4.12"). + + + LINUX_VERSION_EXTENSION: + The Linux kernel + CONFIG_LOCALVERSION that is + compiled into the resulting kernel and visible through the uname command. - SRCREV: + + 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. + + 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: + + PV: The default PV assignment is typically adequate. It combines the LINUX_VERSION @@ -2340,16 +2359,17 @@ as derived from the SRCPV variable. - The combined results are a string with - the following form: + The combined results are a string with the + following form: 3.19.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. + While lengthy, the extra verbosity in + PV helps ensure you are using + the exact sources from which you intend to build. - COMPATIBLE_MACHINE: + + 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 @@ -2358,18 +2378,24 @@ failure. You must change it to match a list of the machines that your new recipe supports. - For example, to support the qemux86 - and qemux86-64 machines, use + For example, to support the + qemux86 and + qemux86-64 machines, use the following form: COMPATIBLE_MACHINE = "qemux86|qemux86-64" - - - Provide further customizations to your recipe + + + + + + Customize Your Recipe as Needed: + 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. + See the + "Modifying an Existing Recipe" + section for information. -- cgit v1.2.3-54-g00ecf