From 7cf64ab59404b6514a754e8093b5ca196214f05b Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Mon, 18 May 2015 15:12:26 -0600 Subject: dev-manual: Added new section on "defconfig" files. The "Configuring the Kernel" section did not address "defconfig" files. In my opinion, this is a hole in the docs for this section. I added a new section titled "Creating a defconfig File" that is a sub-section of the "Configuring the Kernel" section. Additionally, I added a brief sentence in the introductory paragraph to include the fact that this new information exists. Finally, I included the bitbake command that ensures that the proper configuration steps are minimally run before a user attempts to use bitbake to get into menuconfig. Fixes [#YOCTO 7474] (From yocto-docs rev: 3e982a4f19402a941583a9a8708eeb6dbaf8fad5) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 106 ++++++++++++++++++--- 1 file changed, 92 insertions(+), 14 deletions(-) diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 362fce1..a929481 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -4624,13 +4624,22 @@ Configuring the Kernel - Configuring the Yocto Project kernel consists of making sure the .config - file has all the right information in it for the image you are building. - You can use the menuconfig tool and configuration fragments to - make sure your .config file is just how you need it. - This section describes how to use menuconfig, create and use - configuration fragments, and how to interactively modify your .config - file to create the leanest kernel configuration file possible. + Configuring the Yocto Project kernel consists of making sure the + .config file has all the right information + in it for the image you are building. + You can use the menuconfig tool and + configuration fragments to make sure your + .config file is just how you need it. + You can also save known configurations in a + defconfig file that the build system can use + for kernel configuration. + + + + This section describes how to use menuconfig, + create and use configuration fragments, and how to interactively + modify your .config file to create the + leanest kernel configuration file possible. @@ -4660,18 +4669,23 @@ oe-init-build-env-memres script found in the Build Directory. - The following commands run menuconfig assuming the - Source Directory - top-level folder is ~/poky: + You must also be sure of the state of your build in the + Source Directory. + The following commands run menuconfig + assuming the Source Directory's top-level folder is + ~/poky: $ cd poky $ source oe-init-build-env + $ bitbake linux-yocto -c kernel_configme -f $ bitbake linux-yocto -c menuconfig - Once menuconfig comes up, its standard interface allows you to - interactively examine and configure all the kernel configuration parameters. - After making your changes, simply exit the tool and save your changes to - create an updated version of the .config configuration file. + Once menuconfig comes up, its standard + interface allows you to interactively examine and configure + all the kernel configuration parameters. + After making your changes, simply exit the tool and save your + changes to create an updated version of the + .config configuration file. @@ -4752,6 +4766,70 @@ +
+ Creating a  <filename>defconfig</filename> File + + + A defconfig file is simply a + .config renamed to "defconfig". + You can use a defconfig file + to retain a known set of kernel configurations from which the + OpenEmbedded build system can draw to create the final + .config file. + + Out-of-the-box, the Yocto Project never ships a + defconfig or + .config file. + The OpenEmbedded build system creates the final + .config file used to configure the + kernel. + + + + + To create a defconfig, start with a + complete, working Linux kernel .config + file. + Copy that file to the appropriate + ${PN} + directory in your layer's + recipes-kernel/linux directory, and rename + the copied file to "defconfig". + Then, add the following lines to the linux-yocto + .bbappend file in your layer: + + FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + SRC_URI += "file://defconfig" + + The + SRC_URI + tells the build system how to search for the file, while the + FILESEXTRAPATHS + extends the + FILESPATH + variable (search directories) to include the + ${PN} directory you created to hold the + configuration changes. + + The build system applies the configurations from the + defconfig file before applying any + subsequent configuration fragments. + The final kernel configuration is a combination of the + configurations in the defconfig + file and any configuration fragments you provide. + You need to realize that if you have any configuration + fragments, the build system applies these on top of and + after applying the existing defconfig file configurations. + + For more information on configuring the kernel, see the + "Changing the Configuration" + and + "Generating Configuration Files" + sections, both in the Yocto Project Linux Kernel Development + Manual. + +
+
Creating Configuration Fragments -- cgit v1.1