summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2017-09-27 13:09:54 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-10-06 12:06:33 +0100
commitfae276ea095f96278e970940840fa61ebcc9ff59 (patch)
tree81dc5f45c6a3c22069608a0da6785982fbafe647 /documentation
parent2e21a56a8a0a933af4fe3f63fa6d921f13e85f4e (diff)
downloadpoky-fae276ea095f96278e970940840fa61ebcc9ff59.tar.gz
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 <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml3
-rw-r--r--documentation/kernel-dev/kernel-dev-advanced.xml6
-rw-r--r--documentation/kernel-dev/kernel-dev-common.xml200
-rw-r--r--documentation/kernel-dev/kernel-dev-faq.xml3
-rw-r--r--documentation/kernel-dev/kernel-dev-intro.xml2
-rw-r--r--documentation/ref-manual/ref-tasks.xml9
6 files changed, 104 insertions, 119 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 3f33a81b12..9c69422038 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -6770,9 +6770,6 @@ Some notes from Cal:
6770 <filename>scripts/kconfig</filename> directory.</para> 6770 <filename>scripts/kconfig</filename> directory.</para>
6771 <para>For more information on configuration fragments, 6771 <para>For more information on configuration fragments,
6772 see the 6772 see the
6773 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#generating-configuration-files'>Generating Configuration Files</ulink>"
6774 section of the Yocto Project Linux Kernel Development
6775 Manual and the
6776 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#creating-config-fragments'>Creating Configuration Fragments</ulink>" 6773 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#creating-config-fragments'>Creating Configuration Fragments</ulink>"
6777 section in the Yocto Project Linux Kernel Development 6774 section in the Yocto Project Linux Kernel Development
6778 Manual. 6775 Manual.
diff --git a/documentation/kernel-dev/kernel-dev-advanced.xml b/documentation/kernel-dev/kernel-dev-advanced.xml
index a6f01a8e2a..3b830fb77f 100644
--- a/documentation/kernel-dev/kernel-dev-advanced.xml
+++ b/documentation/kernel-dev/kernel-dev-advanced.xml
@@ -319,8 +319,6 @@
319 </literallayout> 319 </literallayout>
320 You can find information on configuration fragment files in the 320 You can find information on configuration fragment files in the
321 "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>" 321 "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>"
322 section and in
323 the "<link linkend='generating-configuration-files'>Generating Configuration Files</link>"
324 section. 322 section.
325 </para> 323 </para>
326 324
@@ -347,7 +345,7 @@
347 345
348 <para> 346 <para>
349 As described in the 347 As described in the
350 "<link linkend='generating-configuration-files'>Generating Configuration Files</link>" 348 "<link linkend='validating-configuration'>Validating Configuration</link>"
351 section, you can use the following BitBake command to audit your 349 section, you can use the following BitBake command to audit your
352 configuration: 350 configuration:
353 <literallayout class='monospaced'> 351 <literallayout class='monospaced'>
@@ -634,7 +632,7 @@
634 For information on how to break a complete 632 For information on how to break a complete
635 <filename>.config</filename> file into the various 633 <filename>.config</filename> file into the various
636 configuration fragments, see the 634 configuration fragments, see the
637 "<link linkend='generating-configuration-files'>Generating Configuration Files</link>" 635 "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>"
638 section. 636 section.
639 </para> 637 </para>
640 638
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 @@
1479 <title>Using&nbsp;&nbsp;<filename>menuconfig</filename></title> 1479 <title>Using&nbsp;&nbsp;<filename>menuconfig</filename></title>
1480 1480
1481 <para> 1481 <para>
1482 The easiest way to define kernel configurations is to set them through the 1482 The easiest way to define kernel configurations is to set
1483 <filename>menuconfig</filename> tool. 1483 them through the <filename>menuconfig</filename> tool.
1484 This tool provides an interactive method with which 1484 This tool provides an interactive method with which
1485 to set kernel configurations. 1485 to set kernel configurations.
1486 For general information on <filename>menuconfig</filename>, see 1486 For general information on <filename>menuconfig</filename>, see
@@ -1495,8 +1495,8 @@
1495 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink> 1495 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
1496 script found in the 1496 script found in the
1497 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>. 1497 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
1498 You must also be sure of the state of your build's configuration 1498 You must also be sure of the state of your build's
1499 in the 1499 configuration in the
1500 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>. 1500 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
1501 The following commands initialize the BitBake environment, 1501 The following commands initialize the BitBake environment,
1502 run the 1502 run the
@@ -1516,6 +1516,17 @@
1516 After making your changes, simply exit the tool and save your 1516 After making your changes, simply exit the tool and save your
1517 changes to create an updated version of the 1517 changes to create an updated version of the
1518 <filename>.config</filename> configuration file. 1518 <filename>.config</filename> configuration file.
1519 <note>
1520 You can use the entire <filename>.config</filename> file
1521 as the <filename>defconfig</filename> file.
1522 For information on <filename>defconfig</filename> files,
1523 see the
1524 "<link linkend='changing-the-configuration'>Changing the Configuration</link>",
1525 "<link linkend='using-an-in-tree-defconfig-file'>Using an In-Tree <filename>defconfig</filename> File</link>,
1526 and
1527 "<link linkend='creating-a-defconfig-file'>Creating a <filename>defconfig</filename> File</link>"
1528 sections.
1529 </note>
1519 </para> 1530 </para>
1520 1531
1521 <para> 1532 <para>
@@ -1655,10 +1666,8 @@
1655 after applying the existing defconfig file configurations. 1666 after applying the existing defconfig file configurations.
1656 </note> 1667 </note>
1657 For more information on configuring the kernel, see the 1668 For more information on configuring the kernel, see the
1658 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#changing-the-configuration'>Changing the Configuration</ulink>" 1669 "<link link='changing-the-configuration'>Changing the Configuration</link>"
1659 and 1670 section.
1660 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#generating-configuration-files'>Generating Configuration Files</ulink>"
1661 sections.
1662 </para> 1671 </para>
1663 </section> 1672 </section>
1664 1673
@@ -1695,6 +1704,7 @@
1695 1704
1696 <para> 1705 <para>
1697 It is simple to create a configuration fragment. 1706 It is simple to create a configuration fragment.
1707 One method is to use shell commands.
1698 For example, issuing the following from the shell creates a 1708 For example, issuing the following from the shell creates a
1699 configuration fragment file named 1709 configuration fragment file named
1700 <filename>my_smp.cfg</filename> that enables multi-processor 1710 <filename>my_smp.cfg</filename> that enables multi-processor
@@ -1711,6 +1721,66 @@
1711 </para> 1721 </para>
1712 1722
1713 <para> 1723 <para>
1724 Another method is to create a configuration fragment using the
1725 differences between two configuration files: one previously
1726 created and saved, and one freshly created using the
1727 <filename>menuconfig</filename> tool.
1728 </para>
1729
1730 <para>
1731 To create a configuration fragment using this method, follow
1732 these steps:
1733 <orderedlist>
1734 <listitem><para>
1735 <emphasis>Complete a Build Through Kernel Configuration:</emphasis>
1736 Complete a build at least through the kernel
1737 configuration task as follows:
1738 <literallayout class='monospaced'>
1739 $ bitbake linux-yocto -c kernel_configme -f
1740 </literallayout>
1741 This step ensures that you create a
1742 <filename>.config</filename> file from a known state.
1743 Because situations exist where your build state might
1744 become unknown, it is best to run this task prior
1745 to starting <filename>menuconfig</filename>.
1746 </para></listitem>
1747 <listitem><para>
1748 <emphasis>Launch <filename>menuconfig</filename>:</emphasis>
1749 Run the <filename>menuconfig</filename> command:
1750 <literallayout class='monospaced'>
1751 $ bitbake linux-yocto -c menuconfig
1752 </literallayout>
1753 </para></listitem>
1754 <listitem><para>
1755 <emphasis>Create the Configuration Fragment:</emphasis>
1756 Run the <filename>diffconfig</filename>
1757 command to prepare a configuration fragment.
1758 The resulting file <filename>fragment.cfg</filename>
1759 is placed in the
1760 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}</filename> directory:
1761 <literallayout class='monospaced'>
1762 $ bitbake linux-yocto -c diffconfig
1763 </literallayout>
1764 </para></listitem>
1765 </orderedlist>
1766 </para>
1767
1768 <para>
1769 The <filename>diffconfig</filename> command creates a file
1770 that is a list of Linux kernel <filename>CONFIG_</filename>
1771 assignments.
1772 See the "<link linkend='changing-the-configuration'>Changing the Configuration</link>"
1773 section for additional information on how to use the output
1774 as a configuration fragment.
1775 <note>
1776 You can also use this method to create configuration
1777 fragments for a BSP.
1778 See the "<link linkend='bsp-descriptions'>BSP Descriptions</link>"
1779 section for more information.
1780 </note>
1781 </para>
1782
1783 <para>
1714 Where do you put your configuration fragment files? 1784 Where do you put your configuration fragment files?
1715 You can place these files in an area pointed to by 1785 You can place these files in an area pointed to by
1716 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> 1786 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
@@ -1976,6 +2046,24 @@
1976 </section> 2046 </section>
1977 </section> 2047 </section>
1978 2048
2049 <section id='expanding-variables'>
2050 <title>Expanding Variables</title>
2051
2052 <para>
2053 Sometimes it is helpful to determine what a variable expands
2054 to during a build.
2055 You can do examine the values of variables by examining the
2056 output of the <filename>bitbake -e</filename> command.
2057 The output is long and is more easily managed in a text file,
2058 which allows for easy searches:
2059 <literallayout class='monospaced'>
2060 $ bitbake -e virtual/kernel > <replaceable>some_text_file</replaceable>
2061 </literallayout>
2062 Within the text file, you can see exactly how each variable is
2063 expanded and used by the OpenEmbedded build system.
2064 </para>
2065 </section>
2066
1979 <section id='working-with-a-dirty-kernel-version-string'> 2067 <section id='working-with-a-dirty-kernel-version-string'>
1980 <title>Working with a "Dirty" Kernel Version String</title> 2068 <title>Working with a "Dirty" Kernel Version String</title>
1981 2069
@@ -2045,102 +2133,6 @@
2045 "linux-yocto". 2133 "linux-yocto".
2046 </para> 2134 </para>
2047 2135
2048 <section id='generating-configuration-files'>
2049 <title>Generating Configuration Files</title>
2050
2051 <para>
2052 You can manipulate the <filename>.config</filename> file
2053 used to build a linux-yocto recipe with the
2054 <filename>menuconfig</filename> command as follows:
2055 <literallayout class='monospaced'>
2056 $ bitbake linux-yocto -c menuconfig
2057 </literallayout>
2058 This command starts the Linux kernel configuration tool,
2059 which allows you to prepare a new
2060 <filename>.config</filename> file for the build.
2061 When you exit the tool, be sure to save your changes
2062 at the prompt.
2063 </para>
2064
2065 <para>
2066 The resulting <filename>.config</filename> file is
2067 located in the build directory,
2068 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-B'><filename>B</filename></ulink><filename>}</filename>,
2069 which expands to
2070 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}</filename><filename>/linux-</filename><filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink><filename>}-${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></ulink><filename>}-build</filename>.
2071 You can use the entire <filename>.config</filename> file as the
2072 <filename>defconfig</filename> file as described in the
2073 "<link linkend='changing-the-configuration'>Changing the Configuration</link>" section.
2074 For more information on the <filename>.config</filename> file,
2075 see the
2076 "<link linkend='using-menuconfig'>Using <filename>menuconfig</filename></link>"
2077 section.
2078 <note>
2079 You can determine what a variable expands to by looking
2080 at the output of the <filename>bitbake -e</filename>
2081 command:
2082 <literallayout class='monospaced'>
2083 $ bitbake -e virtual/kernel
2084 </literallayout>
2085 Search the output for the variable in which you are
2086 interested to see exactly how it is expanded and used.
2087 </note>
2088 </para>
2089
2090 <para>
2091 A better method is to create a configuration fragment using the
2092 differences between two configuration files: one previously
2093 created and saved, and one freshly created using the
2094 <filename>menuconfig</filename> tool.
2095 </para>
2096
2097 <para>
2098 To create a configuration fragment using this method, follow
2099 these steps:
2100 <orderedlist>
2101 <listitem><para>Complete a build at least through the kernel
2102 configuration task as follows:
2103 <literallayout class='monospaced'>
2104 $ bitbake linux-yocto -c kernel_configme -f
2105 </literallayout>
2106 This step ensures that you will be creating a
2107 <filename>.config</filename> file from a known state.
2108 Because situations exist where your build state might
2109 become unknown, it is best to run the previous
2110 command prior to starting up
2111 <filename>menuconfig</filename>.
2112 </para></listitem>
2113 <listitem><para>Run the <filename>menuconfig</filename>
2114 command:
2115 <literallayout class='monospaced'>
2116 $ bitbake linux-yocto -c menuconfig
2117 </literallayout></para></listitem>
2118 <listitem><para>Run the <filename>diffconfig</filename>
2119 command to prepare a configuration fragment.
2120 The resulting file <filename>fragment.cfg</filename>
2121 will be placed in the
2122 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}</filename> directory:
2123 <literallayout class='monospaced'>
2124 $ bitbake linux-yocto -c diffconfig
2125 </literallayout></para></listitem>
2126 </orderedlist>
2127 </para>
2128
2129 <para>
2130 The <filename>diffconfig</filename> command creates a file that is a
2131 list of Linux kernel <filename>CONFIG_</filename> assignments.
2132 See the "<link linkend='changing-the-configuration'>Changing the Configuration</link>"
2133 section for information on how to use the output as a
2134 configuration fragment.
2135 <note>
2136 You can also use this method to create configuration
2137 fragments for a BSP.
2138 See the "<link linkend='bsp-descriptions'>BSP Descriptions</link>"
2139 section for more information.
2140 </note>
2141 </para>
2142 </section>
2143
2144 <section id='modifying-source-code'> 2136 <section id='modifying-source-code'>
2145 <title>Modifying Source Code</title> 2137 <title>Modifying Source Code</title>
2146 2138
diff --git a/documentation/kernel-dev/kernel-dev-faq.xml b/documentation/kernel-dev/kernel-dev-faq.xml
index 9e0517d4af..b2cf2d4d0d 100644
--- a/documentation/kernel-dev/kernel-dev-faq.xml
+++ b/documentation/kernel-dev/kernel-dev-faq.xml
@@ -36,7 +36,8 @@
36 </question> 36 </question>
37 <answer> 37 <answer>
38 <para> 38 <para>
39 Refer to the "<link linkend='generating-configuration-files'>Generating Configuration Files</link>" 39 Refer to the
40 "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>"
40 section for information. 41 section for information.
41 </para> 42 </para>
42 </answer> 43 </answer>
diff --git a/documentation/kernel-dev/kernel-dev-intro.xml b/documentation/kernel-dev/kernel-dev-intro.xml
index 174ab93ab0..885a54ce1e 100644
--- a/documentation/kernel-dev/kernel-dev-intro.xml
+++ b/documentation/kernel-dev/kernel-dev-intro.xml
@@ -212,7 +212,7 @@
212 Applicable:</emphasis> 212 Applicable:</emphasis>
213 If your situation calls for changing the kernel's 213 If your situation calls for changing the kernel's
214 configuration, you can use 214 configuration, you can use
215 <link linkend='generating-configuration-files'><filename>menuconfig</filename></link>, 215 <link linkend='using-menuconfig'><filename>menuconfig</filename></link>,
216 which allows you to interactively develop and test the 216 which allows you to interactively develop and test the
217 configuration changes you are making to the kernel. 217 configuration changes you are making to the kernel.
218 Saving changes you make with <filename>menuconfig</filename> 218 Saving changes you make with <filename>menuconfig</filename>
diff --git a/documentation/ref-manual/ref-tasks.xml b/documentation/ref-manual/ref-tasks.xml
index e145518989..2b3856f5c0 100644
--- a/documentation/ref-manual/ref-tasks.xml
+++ b/documentation/ref-manual/ref-tasks.xml
@@ -883,7 +883,7 @@
883 $ bitbake linux-yocto -c diffconfig 883 $ bitbake linux-yocto -c diffconfig
884 </literallayout> 884 </literallayout>
885 For more information, see the 885 For more information, see the
886 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#generating-configuration-files'>Generating Configuration Files</ulink>" 886 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#creating-config-fragments'>Creating Configuration Fragments</ulink>"
887 section in the Yocto Project Linux Kernel Development Manual. 887 section in the Yocto Project Linux Kernel Development Manual.
888 </para> 888 </para>
889 </section> 889 </section>
@@ -918,7 +918,7 @@
918 $ bitbake linux-yocto -c kernel_configcheck -f 918 $ bitbake linux-yocto -c kernel_configcheck -f
919 </literallayout> 919 </literallayout>
920 For more information, see the 920 For more information, see the
921 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#generating-configuration-files'>Generating Configuration Files</ulink>" 921 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#validating-configuration'>Validating Configuration</ulink>"
922 section in the Yocto Project Linux Kernel Development Manual. 922 section in the Yocto Project Linux Kernel Development Manual.
923 </para> 923 </para>
924 </section> 924 </section>
@@ -956,12 +956,9 @@
956 </literallayout> 956 </literallayout>
957 </note> 957 </note>
958 See the 958 See the
959 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#generating-configuration-files'>Generating Configuration Files</ulink>" 959 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#using-menuconfig'>Using <filename>menuconfig</filename></ulink>"
960 section in the Yocto Project Linux Kernel Development Manual 960 section in the Yocto Project Linux Kernel Development Manual
961 for more information on this configuration tool. 961 for more information on this configuration tool.
962 You can also reference the
963 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#using-menuconfig'>Using <filename>menuconfig</filename></ulink>"
964 section in the Yocto Project Linux Kernel Development Manual.
965 </para> 962 </para>
966 </section> 963 </section>
967 964