summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2015-05-18 15:12:26 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-28 18:02:30 +0100
commit540b8ef0f705d5776570b55373e8da333f58c6c2 (patch)
tree92b65df436fe0de83dfe065e5225feed5564875e /documentation/dev-manual
parent7b1697bd1583a28d49c1364de079a0f441671d41 (diff)
downloadpoky-540b8ef0f705d5776570b55373e8da333f58c6c2.tar.gz
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: 13c0c7dddca59474ef65dacc12f0bfaa38933887) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml106
1 files 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 362fce1916..a929481633 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -4624,13 +4624,22 @@
4624 <title>Configuring the Kernel</title> 4624 <title>Configuring the Kernel</title>
4625 4625
4626 <para> 4626 <para>
4627 Configuring the Yocto Project kernel consists of making sure the <filename>.config</filename> 4627 Configuring the Yocto Project kernel consists of making sure the
4628 file has all the right information in it for the image you are building. 4628 <filename>.config</filename> file has all the right information
4629 You can use the <filename>menuconfig</filename> tool and configuration fragments to 4629 in it for the image you are building.
4630 make sure your <filename>.config</filename> file is just how you need it. 4630 You can use the <filename>menuconfig</filename> tool and
4631 This section describes how to use <filename>menuconfig</filename>, create and use 4631 configuration fragments to make sure your
4632 configuration fragments, and how to interactively modify your <filename>.config</filename> 4632 <filename>.config</filename> file is just how you need it.
4633 file to create the leanest kernel configuration file possible. 4633 You can also save known configurations in a
4634 <filename>defconfig</filename> file that the build system can use
4635 for kernel configuration.
4636 </para>
4637
4638 <para>
4639 This section describes how to use <filename>menuconfig</filename>,
4640 create and use configuration fragments, and how to interactively
4641 modify your <filename>.config</filename> file to create the
4642 leanest kernel configuration file possible.
4634 </para> 4643 </para>
4635 4644
4636 <para> 4645 <para>
@@ -4660,18 +4669,23 @@
4660 <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink> 4669 <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>
4661 script found in the 4670 script found in the
4662 <link linkend='build-directory'>Build Directory</link>. 4671 <link linkend='build-directory'>Build Directory</link>.
4663 The following commands run <filename>menuconfig</filename> assuming the 4672 You must also be sure of the state of your build in the
4664 <link linkend='source-directory'>Source Directory</link> 4673 <link linkend='source-directory'>Source Directory</link>.
4665 top-level folder is <filename>~/poky</filename>: 4674 The following commands run <filename>menuconfig</filename>
4675 assuming the Source Directory's top-level folder is
4676 <filename>~/poky</filename>:
4666 <literallayout class='monospaced'> 4677 <literallayout class='monospaced'>
4667 $ cd poky 4678 $ cd poky
4668 $ source oe-init-build-env 4679 $ source oe-init-build-env
4680 $ bitbake linux-yocto -c kernel_configme -f
4669 $ bitbake linux-yocto -c menuconfig 4681 $ bitbake linux-yocto -c menuconfig
4670 </literallayout> 4682 </literallayout>
4671 Once <filename>menuconfig</filename> comes up, its standard interface allows you to 4683 Once <filename>menuconfig</filename> comes up, its standard
4672 interactively examine and configure all the kernel configuration parameters. 4684 interface allows you to interactively examine and configure
4673 After making your changes, simply exit the tool and save your changes to 4685 all the kernel configuration parameters.
4674 create an updated version of the <filename>.config</filename> configuration file. 4686 After making your changes, simply exit the tool and save your
4687 changes to create an updated version of the
4688 <filename>.config</filename> configuration file.
4675 </para> 4689 </para>
4676 4690
4677 <para> 4691 <para>
@@ -4752,6 +4766,70 @@
4752 </para> 4766 </para>
4753 </section> 4767 </section>
4754 4768
4769 <section id='creating-a-defconfig-file'>
4770 <title>Creating a&nbsp;&nbsp;<filename>defconfig</filename> File</title>
4771
4772 <para>
4773 A <filename>defconfig</filename> file is simply a
4774 <filename>.config</filename> renamed to "defconfig".
4775 You can use a <filename>defconfig</filename> file
4776 to retain a known set of kernel configurations from which the
4777 OpenEmbedded build system can draw to create the final
4778 <filename>.config</filename> file.
4779 <note>
4780 Out-of-the-box, the Yocto Project never ships a
4781 <filename>defconfig</filename> or
4782 <filename>.config</filename> file.
4783 The OpenEmbedded build system creates the final
4784 <filename>.config</filename> file used to configure the
4785 kernel.
4786 </note>
4787 </para>
4788
4789 <para>
4790 To create a <filename>defconfig</filename>, start with a
4791 complete, working Linux kernel <filename>.config</filename>
4792 file.
4793 Copy that file to the appropriate
4794 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>
4795 directory in your layer's
4796 <filename>recipes-kernel/linux</filename> directory, and rename
4797 the copied file to "defconfig".
4798 Then, add the following lines to the linux-yocto
4799 <filename>.bbappend</filename> file in your layer:
4800 <literallayout class='monospaced'>
4801 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
4802 SRC_URI += "file://defconfig"
4803 </literallayout>
4804 The
4805 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
4806 tells the build system how to search for the file, while the
4807 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
4808 extends the
4809 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
4810 variable (search directories) to include the
4811 <filename>${PN}</filename> directory you created to hold the
4812 configuration changes.
4813 <note>
4814 The build system applies the configurations from the
4815 <filename>defconfig</filename> file before applying any
4816 subsequent configuration fragments.
4817 The final kernel configuration is a combination of the
4818 configurations in the <filename>defconfig</filename>
4819 file and any configuration fragments you provide.
4820 You need to realize that if you have any configuration
4821 fragments, the build system applies these on top of and
4822 after applying the existing defconfig file configurations.
4823 </note>
4824 For more information on configuring the kernel, see the
4825 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#changing-the-configuration'>Changing the Configuration</ulink>"
4826 and
4827 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#generating-configuration-files'>Generating Configuration Files</ulink>"
4828 sections, both in the Yocto Project Linux Kernel Development
4829 Manual.
4830 </para>
4831 </section>
4832
4755 <section id='creating-config-fragments'> 4833 <section id='creating-config-fragments'>
4756 <title>Creating Configuration Fragments</title> 4834 <title>Creating Configuration Fragments</title>
4757 4835