diff options
Diffstat (limited to 'documentation/kernel-dev/kernel-dev-common.xml')
-rw-r--r-- | documentation/kernel-dev/kernel-dev-common.xml | 154 |
1 files changed, 105 insertions, 49 deletions
diff --git a/documentation/kernel-dev/kernel-dev-common.xml b/documentation/kernel-dev/kernel-dev-common.xml index bfc82e2451..494f6af117 100644 --- a/documentation/kernel-dev/kernel-dev-common.xml +++ b/documentation/kernel-dev/kernel-dev-common.xml | |||
@@ -1748,6 +1748,111 @@ | |||
1748 | </para> | 1748 | </para> |
1749 | </section> | 1749 | </section> |
1750 | 1750 | ||
1751 | <section id='validating-configuration'> | ||
1752 | <title>Validating Configuration</title> | ||
1753 | |||
1754 | <para> | ||
1755 | You can use the | ||
1756 | <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-kernel_configcheck'><filename>do_kernel_configcheck</filename></ulink> | ||
1757 | task to provide configuration validation: | ||
1758 | <literallayout class='monospaced'> | ||
1759 | $ bitbake linux-yocto -c kernel_configcheck -f | ||
1760 | </literallayout> | ||
1761 | Running this task produces warnings for when a | ||
1762 | requested configuration does not appear in the final | ||
1763 | <filename>.config</filename> file or when you override a | ||
1764 | policy configuration in a hardware configuration fragment. | ||
1765 | </para> | ||
1766 | |||
1767 | <para> | ||
1768 | In order to run this task, you must have an existing | ||
1769 | <filename>.config</filename> file. | ||
1770 | See the | ||
1771 | "<link linkend='using-menuconfig'>Using <filename>menuconfig</filename></link>" | ||
1772 | section for information on how to create a configuration file. | ||
1773 | </para> | ||
1774 | |||
1775 | <para> | ||
1776 | Following is sample output from the | ||
1777 | <filename>do_kernel_configcheck</filename> task: | ||
1778 | <literallayout class='monospaced'> | ||
1779 | Loading cache: 100% |########################################################| Time: 0:00:00 | ||
1780 | Loaded 1275 entries from dependency cache. | ||
1781 | NOTE: Resolving any missing task queue dependencies | ||
1782 | |||
1783 | Build Configuration: | ||
1784 | . | ||
1785 | . | ||
1786 | . | ||
1787 | |||
1788 | NOTE: Executing SetScene Tasks | ||
1789 | NOTE: Executing RunQueue Tasks | ||
1790 | WARNING: linux-yocto-4.12.12+gitAUTOINC+eda4d18ce4_16de014967-r0 do_kernel_configcheck: | ||
1791 | [kernel config]: specified values did not make it into the kernel's final configuration: | ||
1792 | |||
1793 | ---------- CONFIG_X86_TSC ----------------- | ||
1794 | Config: CONFIG_X86_TSC | ||
1795 | From: /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/bsp/common-pc/common-pc-cpu.cfg | ||
1796 | Requested value: CONFIG_X86_TSC=y | ||
1797 | Actual value: | ||
1798 | |||
1799 | |||
1800 | ---------- CONFIG_X86_BIGSMP ----------------- | ||
1801 | Config: CONFIG_X86_BIGSMP | ||
1802 | From: /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/cfg/smp.cfg | ||
1803 | /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/defconfig | ||
1804 | Requested value: # CONFIG_X86_BIGSMP is not set | ||
1805 | Actual value: | ||
1806 | |||
1807 | |||
1808 | ---------- CONFIG_NR_CPUS ----------------- | ||
1809 | Config: CONFIG_NR_CPUS | ||
1810 | From: /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/cfg/smp.cfg | ||
1811 | /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/bsp/common-pc/common-pc.cfg | ||
1812 | /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/defconfig | ||
1813 | Requested value: CONFIG_NR_CPUS=8 | ||
1814 | Actual value: CONFIG_NR_CPUS=1 | ||
1815 | |||
1816 | |||
1817 | ---------- CONFIG_SCHED_SMT ----------------- | ||
1818 | Config: CONFIG_SCHED_SMT | ||
1819 | From: /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/cfg/smp.cfg | ||
1820 | /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/defconfig | ||
1821 | Requested value: CONFIG_SCHED_SMT=y | ||
1822 | Actual value: | ||
1823 | |||
1824 | |||
1825 | |||
1826 | NOTE: Tasks Summary: Attempted 288 tasks of which 285 didn't need to be rerun and all succeeded. | ||
1827 | |||
1828 | Summary: There were 3 WARNING messages shown. | ||
1829 | </literallayout> | ||
1830 | <note> | ||
1831 | The previous output example has artificial line breaks | ||
1832 | to make it more readable. | ||
1833 | </note> | ||
1834 | </para> | ||
1835 | |||
1836 | <para> | ||
1837 | The output describes the various problems that you can | ||
1838 | encounter along with where to find the offending configuration | ||
1839 | items. | ||
1840 | You can use the information in the logs to adjust your | ||
1841 | configuration files and then repeat the | ||
1842 | <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-kernel_configme'><filename>do_kernel_configme</filename></ulink> | ||
1843 | and | ||
1844 | <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-kernel_configcheck'><filename>do_kernel_configcheck</filename></ulink> | ||
1845 | tasks until they produce no warnings. | ||
1846 | </para> | ||
1847 | |||
1848 | <para> | ||
1849 | For more information on how to use the | ||
1850 | <filename>menuconfig</filename> tool, see the | ||
1851 | "<link linkend='using-menuconfig'>Using <filename>menuconfig</filename></link>" | ||
1852 | section. | ||
1853 | </para> | ||
1854 | </section> | ||
1855 | |||
1751 | <section id='fine-tuning-the-kernel-configuration-file'> | 1856 | <section id='fine-tuning-the-kernel-configuration-file'> |
1752 | <title>Fine-Tuning the Kernel Configuration File</title> | 1857 | <title>Fine-Tuning the Kernel Configuration File</title> |
1753 | 1858 | ||
@@ -2034,55 +2139,6 @@ | |||
2034 | section for more information. | 2139 | section for more information. |
2035 | </note> | 2140 | </note> |
2036 | </para> | 2141 | </para> |
2037 | |||
2038 | <para> | ||
2039 | The kernel tools also provide configuration validation. | ||
2040 | You can use these tools to produce warnings for when a | ||
2041 | requested configuration does not appear in the final | ||
2042 | <filename>.config</filename> file or when you override a | ||
2043 | policy configuration in a hardware configuration fragment. | ||
2044 | Here is an example with some sample output of the command | ||
2045 | that runs these tools: | ||
2046 | <literallayout class='monospaced'> | ||
2047 | $ bitbake linux-yocto -c kernel_configcheck -f | ||
2048 | |||
2049 | ... | ||
2050 | |||
2051 | NOTE: validating kernel configuration | ||
2052 | This BSP sets 3 invalid/obsolete kernel options. | ||
2053 | These config options are not offered anywhere within this kernel. | ||
2054 | The full list can be found in your kernel src dir at: | ||
2055 | meta/cfg/standard/mybsp/invalid.cfg | ||
2056 | |||
2057 | This BSP sets 21 kernel options that are possibly non-hardware related. | ||
2058 | The full list can be found in your kernel src dir at: | ||
2059 | meta/cfg/standard/mybsp/specified_non_hdw.cfg | ||
2060 | |||
2061 | WARNING: There were 2 hardware options requested that do not | ||
2062 | have a corresponding value present in the final ".config" file. | ||
2063 | This probably means you are not getting the config you wanted. | ||
2064 | The full list can be found in your kernel src dir at: | ||
2065 | meta/cfg/standard/mybsp/mismatch.cfg | ||
2066 | </literallayout> | ||
2067 | </para> | ||
2068 | |||
2069 | <para> | ||
2070 | The output describes the various problems that you can | ||
2071 | encounter along with where to find the offending configuration | ||
2072 | items. | ||
2073 | You can use the information in the logs to adjust your | ||
2074 | configuration files and then repeat the | ||
2075 | <filename>kernel_configme</filename> and | ||
2076 | <filename>kernel_configcheck</filename> commands until | ||
2077 | they produce no warnings. | ||
2078 | </para> | ||
2079 | |||
2080 | <para> | ||
2081 | For more information on how to use the | ||
2082 | <filename>menuconfig</filename> tool, see the | ||
2083 | "<link linkend='using-menuconfig'>Using <filename>menuconfig</filename></link>" | ||
2084 | section. | ||
2085 | </para> | ||
2086 | </section> | 2142 | </section> |
2087 | 2143 | ||
2088 | <section id='modifying-source-code'> | 2144 | <section id='modifying-source-code'> |