summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2012-12-19 09:09:35 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-16 15:59:06 +0000
commit2e106f9caa9f7e7884706b2e4111cf54f128d57f (patch)
tree51e2399a27191d461830d0427bd0c3db5ce640e2 /documentation
parent2c0358ccc7db0f232f70a0910368f391b9004782 (diff)
downloadpoky-2e106f9caa9f7e7884706b2e4111cf54f128d57f.tar.gz
kernel-dev: Re-write of the "Generating Configuration Files" section.
(From yocto-docs rev: 5f5bbdf42bd7e53ca9332b662999a3f3cd73db71) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/kernel-dev/kernel-dev-common.xml124
1 files changed, 123 insertions, 1 deletions
diff --git a/documentation/kernel-dev/kernel-dev-common.xml b/documentation/kernel-dev/kernel-dev-common.xml
index 6c55a572b0..063867dd70 100644
--- a/documentation/kernel-dev/kernel-dev-common.xml
+++ b/documentation/kernel-dev/kernel-dev-common.xml
@@ -290,7 +290,128 @@ working with.
290 <title>Generating Configuration Files</title> 290 <title>Generating Configuration Files</title>
291 291
292 <para> 292 <para>
293 You can manipulate the config used to build a linux-yocto recipe with the 293 You can manipulate the <filename>.config</filename> file
294 used to build a linux-yocto recipe with the
295 <filename>menuconfig</filename> command as follows:
296 <literallayout class='monospaced'>
297 $ bitbake linux-yocto -c menuconfig
298 </literallayout>
299 This command starts the Linux kernel configuration tool,
300 which allows you to prepare a new
301 <filename>.config</filename> file for the build.
302 When you exit the tool, be sure to save your changes
303 at the prompt.
304 </para>
305
306 <para>
307 The resulting <filename>.config</filename> file is
308 located in
309 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}</filename> under the
310 <filename>linux-${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink><filename>}-${KTYPE}-build</filename> directory.
311 You can use the entire <filename>.config</filename> file as the
312 <filename>defconfig</filename> file as described in the
313 "<link linkend='changing-the-configuration'>Changing the Configuration</link>" section.
314 </para>
315
316 <para>
317 A better method is to create a configuration fragment using the
318 differences between two configuration files: one previously
319 created and saved, and one freshly created using the
320 <filename>menuconfig</filename> tool.
321 </para>
322
323 <para>
324 To create a configuration fragment using this method, follow
325 these steps:
326 <orderedlist>
327 <listitem><para>Complete a build at least through the kernel
328 configuration task as follows:
329 <literallayout class='monospaced'>
330 $ bitbake linux-yocto -c kernel_configme -f
331 </literallayout></para></listitem>
332 <listitem><para>Create a renamed copy of the resulting
333 <filename>.config</filename> file (e.g.
334 <filename>config.orig</filename>).
335 </para></listitem>
336 <listitem><para>Run the <filename>menuconfig</filename>
337 command:
338 <literallayout class='monospaced'>
339 $ bitbake linux-yocto -c menuconfig
340 </literallayout></para></listitem>
341 <listitem><para>Prepare a configuration fragment from
342 using the differences between the two files.
343 </para></listitem>
344 </orderedlist>
345 </para>
346
347 <para>
348 Ultimately, the configuration fragment file needs to be a
349 list of Linux kernel <filename>CONFIG_</filename> assignments.
350 It cannot be in <filename>diff</filename> format.
351 Here is an example of a command that creates your
352 configuration fragment file.
353 Regardless of the exact command you use, plan on reviewing
354 the output as you can usually remove some of the defaults:
355 <literallayout class='monospaced'>
356 $ diff -Nurp config.orig .config | sed -n "s/^\+//p" > frag.cfg
357 </literallayout>
358 See the "<link linkend='changing-the-configuration'>Changing the Configuration</link>"
359 section for information on how to use the output as a
360 configuration fragment.
361 <note>
362 You can also use this method to create configuration
363 fragments for a BSP.
364 See the "<link linkend='bsp-descriptions'>BSP Descriptions</link>"
365 for more information.
366 </note>
367 </para>
368
369 <para>
370 The kernel tools also provide configuration validation.
371 You can use these tools to produce warnings for when a
372 requested configuration does not appear in the final
373 <filename>.config</filename> file or when you override a
374 policy configuration in a hardware configuration fragment.
375 Following is the command that runs these tools and some
376 sample output:
377 <literallayout class='monospaced'>
378 $ bitbake linux-yocto -c kernel_configcheck -f
379
380 ...
381
382 NOTE: validating kernel configuration
383 This BSP sets 3 invalid/obsolete kernel options.
384 These config options are not offered anywhere within this kernel.
385 The full list can be found in your kernel src dir at:
386 meta/cfg/standard/mybsp/invalid.cfg
387
388 This BSP sets 21 kernel options that are possibly non-hardware related.
389 The full list can be found in your kernel src dir at:
390 meta/cfg/standard/mybsp/specified_non_hdw.cfg
391
392 WARNING: There were 2 hardware options requested that do not
393 have a corresponding value present in the final ".config" file.
394 This probably means you aren't getting the config you wanted.
395 The full list can be found in your kernel src dir at:
396 meta/cfg/standard/mybsp/mismatch.cfg
397 </literallayout>
398 </para>
399
400 <para>
401 The output describes the various problems that you can
402 encounter along with where to find the offending configuration
403 items.
404 You can use the information in the logs to adjust your
405 configuration files and then repeat the
406 <filename>kernel_configme</filename> and
407 <filename>kernel_configcheck</filename> commands until
408 they produce no warnings.
409 </para>
410
411 <para>
412 Original Text:
413 <literallayout class='monospaced'>
414You can manipulate the config used to build a linux-yocto recipe with the
294"menuconfig" command. 415"menuconfig" command.
295 416
296 $ bitbake linux-yocto -c menuconfig 417 $ bitbake linux-yocto -c menuconfig
@@ -349,6 +470,7 @@ The various problems that you can encounter are described in the output along
349with where to find the offending configuration items. You can use these logs to 470with where to find the offending configuration items. You can use these logs to
350adjust your configuration files and repeat the "kernel_configme" and 471adjust your configuration files and repeat the "kernel_configme" and
351"kernel_configcheck" commands until no warnings are produced. 472"kernel_configcheck" commands until no warnings are produced.
473 </literallayout>
352 </para> 474 </para>
353 </section> 475 </section>
354 476