summaryrefslogtreecommitdiffstats
path: root/documentation/kernel-dev
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/kernel-dev')
-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
4 files changed, 101 insertions, 110 deletions
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>