kernel-dev: Updated changing the configuration section.

Robert P. J. Day pointed out some implied meanings in this section
that indicate configurations from .config are exclusive somehow
from configurations applied through config fragments.  That is
not the case.  I have inserted a note to clear up that implied
meaning.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
(From yocto-docs rev: 5ac27e8a2aea662a8e70dda0e852b5ea401b8b00)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark 2013-05-13 09:32:25 +03:00 committed by Richard Purdie
parent 2998ba7fe4
commit 97c48dbc6c
1 changed files with 27 additions and 15 deletions

View File

@ -148,16 +148,16 @@
<para> <para>
You can make wholesale or incremental changes to the Linux You can make wholesale or incremental changes to the Linux
kernel <filename>.config</filename> file by including a kernel <filename>.config</filename> file by including a
<filename>defconfig</filename> or by specifying <filename>defconfig</filename> and by specifying
configuration fragments in the configuration fragments in the
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>. <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>.
</para> </para>
<para> <para>
If you have a complete Linux kernel <filename>.config</filename> If you have a final Linux kernel <filename>.config</filename>
file you want to use, copy it to a directory named file you want to use, copy it to a directory named
<filename>files</filename>, which must be in <filename>files</filename>, which must be in
your layer's <filename>recipes-kernel/linux</filename> your layer's <filename>recipes-kernel/linux</filename>
directory, and name the file "defconfig". directory, and name the file "defconfig".
Then, add the following lines to your linux-yocto Then, add the following lines to your linux-yocto
<filename>.bbappend</filename> file in your layer: <filename>.bbappend</filename> file in your layer:
@ -165,24 +165,36 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:" FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://defconfig" SRC_URI += "file://defconfig"
</literallayout> </literallayout>
The The <filename>SRC_URI</filename> tells the build system how to
<filename>SRC_URI</filename> tells the build system how to search for the file, while the
search for the file, while the
<ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink> <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
extends the extends the
<ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink> <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
variable (search directories) to include the variable (search directories) to include the
<filename>files</filename> directory you created for the <filename>files</filename> directory you created for the
configuration changes. configuration changes.
</para> </para>
<note>
The build system applies the configurations from the
<filename>.config</filename> file before applying any
subsequent configuration fragments.
The final kernel configuration is a combination of the
configurations in the <filename>.config</filename> 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 <filename>.config</filename>
file configurations.
</note>
<para> <para>
Generally speaking, the preferred approach is to determine the Generally speaking, the preferred approach is to determine the
incremental change you want to make and add that as a incremental change you want to make and add that as a
configuration fragment. configuration fragment.
For example, if you want to add support for a basic serial For example, if you want to add support for a basic serial
console, create a file named <filename>8250.cfg</filename> in the console, create a file named <filename>8250.cfg</filename> in
<filename>files</filename> directory with the following the <filename>files</filename> directory with the following
content (without indentation): content (without indentation):
<literallayout class='monospaced'> <literallayout class='monospaced'>
CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250=y
@ -193,8 +205,8 @@
CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_CORE_CONSOLE=y
</literallayout> </literallayout>
Next, include this configuration fragment and extend the Next, include this configuration fragment and extend the
<filename>FILESPATH</filename> variable in your <filename>FILESPATH</filename> variable in your
<filename>.bbappend</filename> file: <filename>.bbappend</filename> file:
<literallayout class='monospaced'> <literallayout class='monospaced'>
FILESEXTRAPATHS_prepend := "${THISDIR}/files:" FILESEXTRAPATHS_prepend := "${THISDIR}/files:"