From fae276ea095f96278e970940840fa61ebcc9ff59 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Wed, 27 Sep 2017 13:09:54 -0700 Subject: kernel-dev: Eliminated "Generating Configuration Files" section. This section was largely redundant now. The small things that did add value I placed in other areas of the chapter 2. One was a new section on expanding variables using bitbake -e. Another was a bit about the defconfig file. And a small procedure on how to create config fragments using the "diffconfig" command was retained. Links from the dev-manual and the ref-manual were adjusted as well. (From yocto-docs rev: 7059d3eac1fec20089cabf197503f1bec747686d) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/kernel-dev/kernel-dev-common.xml | 200 ++++++++++++------------- 1 file changed, 96 insertions(+), 104 deletions(-) (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 494f6af117..9be49848e4 100644 --- a/documentation/kernel-dev/kernel-dev-common.xml +++ b/documentation/kernel-dev/kernel-dev-common.xml @@ -1479,8 +1479,8 @@ Using  <filename>menuconfig</filename> - The easiest way to define kernel configurations is to set them through the - menuconfig tool. + The easiest way to define kernel configurations is to set + them through the menuconfig tool. This tool provides an interactive method with which to set kernel configurations. For general information on menuconfig, see @@ -1495,8 +1495,8 @@ &OE_INIT_FILE; script found in the Build Directory. - You must also be sure of the state of your build's configuration - in the + You must also be sure of the state of your build's + configuration in the Source Directory. The following commands initialize the BitBake environment, run the @@ -1516,6 +1516,17 @@ After making your changes, simply exit the tool and save your changes to create an updated version of the .config configuration file. + + You can use the entire .config file + as the defconfig file. + For information on defconfig files, + see the + "Changing the Configuration", + "Using an In-Tree defconfig File, + and + "Creating a defconfig File" + sections. + @@ -1655,10 +1666,8 @@ after applying the existing defconfig file configurations. For more information on configuring the kernel, see the - "Changing the Configuration" - and - "Generating Configuration Files" - sections. + "Changing the Configuration" + section. @@ -1695,6 +1704,7 @@ It is simple to create a configuration fragment. + One method is to use shell commands. For example, issuing the following from the shell creates a configuration fragment file named my_smp.cfg that enables multi-processor @@ -1710,6 +1720,66 @@ + + Another method is to create a configuration fragment using the + differences between two configuration files: one previously + created and saved, and one freshly created using the + menuconfig tool. + + + + To create a configuration fragment using this method, follow + these steps: + + + Complete a Build Through Kernel Configuration: + Complete a build at least through the kernel + configuration task as follows: + + $ bitbake linux-yocto -c kernel_configme -f + + This step ensures that you create a + .config file from a known state. + Because situations exist where your build state might + become unknown, it is best to run this task prior + to starting menuconfig. + + + Launch menuconfig: + Run the menuconfig command: + + $ bitbake linux-yocto -c menuconfig + + + + Create the Configuration Fragment: + Run the diffconfig + command to prepare a configuration fragment. + The resulting file fragment.cfg + is placed in the + ${WORKDIR} directory: + + $ bitbake linux-yocto -c diffconfig + + + + + + + The diffconfig command creates a file + that is a list of Linux kernel CONFIG_ + assignments. + See the "Changing the Configuration" + section for additional information on how to use the output + as a configuration fragment. + + You can also use this method to create configuration + fragments for a BSP. + See the "BSP Descriptions" + section for more information. + + + Where do you put your configuration fragment files? You can place these files in an area pointed to by @@ -1976,6 +2046,24 @@ +
+ Expanding Variables + + + Sometimes it is helpful to determine what a variable expands + to during a build. + You can do examine the values of variables by examining the + output of the bitbake -e command. + The output is long and is more easily managed in a text file, + which allows for easy searches: + + $ bitbake -e virtual/kernel > some_text_file + + Within the text file, you can see exactly how each variable is + expanded and used by the OpenEmbedded build system. + +
+
Working with a "Dirty" Kernel Version String @@ -2045,102 +2133,6 @@ "linux-yocto". -
- Generating Configuration Files - - - You can manipulate the .config file - used to build a linux-yocto recipe with the - menuconfig command as follows: - - $ bitbake linux-yocto -c menuconfig - - This command starts the Linux kernel configuration tool, - which allows you to prepare a new - .config file for the build. - When you exit the tool, be sure to save your changes - at the prompt. - - - - The resulting .config file is - located in the build directory, - ${B}, - which expands to - ${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build. - You can use the entire .config file as the - defconfig file as described in the - "Changing the Configuration" section. - For more information on the .config file, - see the - "Using menuconfig" - section. - - You can determine what a variable expands to by looking - at the output of the bitbake -e - command: - - $ bitbake -e virtual/kernel - - Search the output for the variable in which you are - interested to see exactly how it is expanded and used. - - - - - A better method is to create a configuration fragment using the - differences between two configuration files: one previously - created and saved, and one freshly created using the - menuconfig tool. - - - - To create a configuration fragment using this method, follow - these steps: - - Complete a build at least through the kernel - configuration task as follows: - - $ bitbake linux-yocto -c kernel_configme -f - - This step ensures that you will be creating a - .config file from a known state. - Because situations exist where your build state might - become unknown, it is best to run the previous - command prior to starting up - menuconfig. - - Run the menuconfig - command: - - $ bitbake linux-yocto -c menuconfig - - Run the diffconfig - command to prepare a configuration fragment. - The resulting file fragment.cfg - will be placed in the - ${WORKDIR} directory: - - $ bitbake linux-yocto -c diffconfig - - - - - - The diffconfig command creates a file that is a - list of Linux kernel CONFIG_ assignments. - See the "Changing the Configuration" - section for information on how to use the output as a - configuration fragment. - - You can also use this method to create configuration - fragments for a BSP. - See the "BSP Descriptions" - section for more information. - - -
-
Modifying Source Code -- cgit v1.2.3-54-g00ecf