From d9f293892174ffb8a7c3e3dc23e58f4ba1b09ee4 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Tue, 21 Mar 2017 12:52:09 -0700 Subject: kernel-dev: Reorganized Kernel Metadata Location and Syntax sections It seems that the two sections "Kernel Metadata Location" and "Kernel Metadata Syntax" were flipped regarding their order of apperance in the kernel-dev manual. I belive that syntax should be first and then followed by a discussion on the location. I have swapped these section's ordering in the manual. (From yocto-docs rev: 167b088f459c7128bdc1abddd0b948be8f3bf5fe) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/kernel-dev/kernel-dev-advanced.xml | 338 +++++++++++------------ 1 file changed, 169 insertions(+), 169 deletions(-) (limited to 'documentation') diff --git a/documentation/kernel-dev/kernel-dev-advanced.xml b/documentation/kernel-dev/kernel-dev-advanced.xml index 266ef3aba8..1c1b6366db 100644 --- a/documentation/kernel-dev/kernel-dev-advanced.xml +++ b/documentation/kernel-dev/kernel-dev-advanced.xml @@ -170,175 +170,6 @@ -
- Kernel Metadata Location - - - Kernel Metadata always exists outside of the kernel tree either - defined in a kernel recipe (recipe-space) or outside of the recipe. - Where you choose to define the Metadata depends on what you want - to do and how you intend to work. - Regardless of where you define the kernel Metadata, the syntax used - applies equally. - - - - If you are unfamiliar with the Linux kernel and only wish - to apply a configuration and possibly a couple of patches provided to - you by others, the recipe-space method is recommended. - This method is also a good approach if you are working with Linux kernel - sources you do not control or if you just do not want to maintain a - Linux kernel Git repository on your own. - For partial information on how you can define kernel Metadata in - the recipe-space, see the - "Modifying an Existing Recipe" - section. - - - - Conversely, if you are actively developing a kernel and are already - maintaining a Linux kernel Git repository of your own, you might find - it more convenient to work with kernel Metadata kept outside the - recipe-space. - Working with Metadata in this area can make iterative development of - the Linux kernel more efficient outside of the BitBake environment. - - -
- Recipe-Space Metadata - - - When stored in recipe-space, the kernel Metadata files reside in a - directory hierarchy below - FILESEXTRAPATHS. - For a linux-yocto recipe or for a Linux kernel recipe derived - by copying and modifying - oe-core/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb - to a recipe in your layer, FILESEXTRAPATHS - is typically set to - ${THISDIR}/${PN}. - See the "Modifying an Existing Recipe" - section for more information. - - - - Here is an example that shows a trivial tree of kernel Metadata - stored in recipe-space within a BSP layer: - - meta-my_bsp_layer/ - `-- recipes-kernel - `-- linux - `-- linux-yocto - |-- bsp-standard.scc - |-- bsp.cfg - `-- standard.cfg - - - - - When the Metadata is stored in recipe-space, you must take - steps to ensure BitBake has the necessary information to decide - what files to fetch and when they need to be fetched again. - It is only necessary to specify the .scc - files on the - SRC_URI. - BitBake parses them and fetches any files referenced in the - .scc files by the include, - patch, or kconf commands. - Because of this, it is necessary to bump the recipe - PR - value when changing the content of files not explicitly listed - in the SRC_URI. - -
- -
- Metadata Outside the Recipe-Space - - - When stored outside of the recipe-space, the kernel Metadata - files reside in a separate repository. - The OpenEmbedded build system adds the Metadata to the build as - a "ktype=meta" repository through the - SRC_URI - variable. - As an example, consider the following SRC_URI - statement from the linux-yocto_4.4.bb - kernel recipe: - - SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;name=machine;branch=${KBRANCH}; \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}" - - ${KMETA}, in this context, is simply used to - name the directory into which the Git fetcher places the Metadata. - This behavior is no different than any multi-repository - SRC_URI statement used in a recipe. - - - - You can keep kernel Metadata in a "kernel-cache", which is a - directory containing configuration fragments. - As with any Metadata kept outside the recipe-space, you simply - need to use the SRC_URI statement with the - "type=kmeta" attribute. - Doing so makes the kernel Metadata available during the - configuration phase. - - - - - - If you modify the Metadata, you must not forget to update the - SRCREV - statements in the kernel's recipe. - In particular, you need to update the - SRCREV_meta variable to match the commit in - the KMETA branch you wish to use. - Changing the data in these branches and not updating the - SRCREV statements to match will cause the - build to fetch an older commit. - -
-
-
Kernel Metadata Syntax @@ -884,6 +715,175 @@
+
+ Kernel Metadata Location + + + Kernel Metadata always exists outside of the kernel tree either + defined in a kernel recipe (recipe-space) or outside of the recipe. + Where you choose to define the Metadata depends on what you want + to do and how you intend to work. + Regardless of where you define the kernel Metadata, the syntax used + applies equally. + + + + If you are unfamiliar with the Linux kernel and only wish + to apply a configuration and possibly a couple of patches provided to + you by others, the recipe-space method is recommended. + This method is also a good approach if you are working with Linux kernel + sources you do not control or if you just do not want to maintain a + Linux kernel Git repository on your own. + For partial information on how you can define kernel Metadata in + the recipe-space, see the + "Modifying an Existing Recipe" + section. + + + + Conversely, if you are actively developing a kernel and are already + maintaining a Linux kernel Git repository of your own, you might find + it more convenient to work with kernel Metadata kept outside the + recipe-space. + Working with Metadata in this area can make iterative development of + the Linux kernel more efficient outside of the BitBake environment. + + +
+ Recipe-Space Metadata + + + When stored in recipe-space, the kernel Metadata files reside in a + directory hierarchy below + FILESEXTRAPATHS. + For a linux-yocto recipe or for a Linux kernel recipe derived + by copying and modifying + oe-core/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb + to a recipe in your layer, FILESEXTRAPATHS + is typically set to + ${THISDIR}/${PN}. + See the "Modifying an Existing Recipe" + section for more information. + + + + Here is an example that shows a trivial tree of kernel Metadata + stored in recipe-space within a BSP layer: + + meta-my_bsp_layer/ + `-- recipes-kernel + `-- linux + `-- linux-yocto + |-- bsp-standard.scc + |-- bsp.cfg + `-- standard.cfg + + + + + When the Metadata is stored in recipe-space, you must take + steps to ensure BitBake has the necessary information to decide + what files to fetch and when they need to be fetched again. + It is only necessary to specify the .scc + files on the + SRC_URI. + BitBake parses them and fetches any files referenced in the + .scc files by the include, + patch, or kconf commands. + Because of this, it is necessary to bump the recipe + PR + value when changing the content of files not explicitly listed + in the SRC_URI. + +
+ +
+ Metadata Outside the Recipe-Space + + + When stored outside of the recipe-space, the kernel Metadata + files reside in a separate repository. + The OpenEmbedded build system adds the Metadata to the build as + a "ktype=meta" repository through the + SRC_URI + variable. + As an example, consider the following SRC_URI + statement from the linux-yocto_4.4.bb + kernel recipe: + + SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;name=machine;branch=${KBRANCH}; \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}" + + ${KMETA}, in this context, is simply used to + name the directory into which the Git fetcher places the Metadata. + This behavior is no different than any multi-repository + SRC_URI statement used in a recipe. + + + + You can keep kernel Metadata in a "kernel-cache", which is a + directory containing configuration fragments. + As with any Metadata kept outside the recipe-space, you simply + need to use the SRC_URI statement with the + "type=kmeta" attribute. + Doing so makes the kernel Metadata available during the + configuration phase. + + + + + + If you modify the Metadata, you must not forget to update the + SRCREV + statements in the kernel's recipe. + In particular, you need to update the + SRCREV_meta variable to match the commit in + the KMETA branch you wish to use. + Changing the data in these branches and not updating the + SRCREV statements to match will cause the + build to fetch an older commit. + +
+
+
Organizing Your Source -- cgit v1.2.3-54-g00ecf