Linux Kernel Architecture

(Jacob Rumans) #1
Mauerer runapp02.tex V2 - 09/04/2008 6:09pm Page 1152

Appendix B: Working with the Source Code


’(’ <expr> ’)’
’!’ <expr>
<expr> ’&&’ <expr>
<expr> ’||’ <expr>

The possible expressions are listed in the order in which they are interpreted. In other words, the expres-
sions listed first have a higher priority than those that follow.

The meaning of the operations is the same as in the C syntax:y=2,n=0,andm= 1. A menu item is not
visible unless the result of the dependency calculation is not 0.

A particular dependency is specified by ‘‘EXPERIMENTAL.’’ Drivers still in the experimental stage must be
labeled with this dependency (as a&&logical operation if the driver has other dependencies of its own).
Because the kernel provides a configuration option ininit/Kconfigto allow users to set the symbol to
yorn(Prompt for development and/or incomplete code/drivers), it is easy to remove drivers of this
kind from the configuration options for those users who crave stability. The string ‘‘(Experimental)’’
should appear at the end to indicate that the driver code is in fact experimental.

B.2.3 Processing Configuration Information


The configuration information is processed in following steps:


  1. The kernel is first configured by the user. This presupposes that a list of all possible options
    has been prepared and presented in text or graphical form (the available configurations are
    already limited by the choice of architecture without the user having to intervene).

  2. The user selection is then stored in a separate file to ensure that the information is retained
    until the next (re)configuration and to make it available to the tools employed.

  3. The selected configuration symbols must be present, both for the build system implemented
    by a series of Makefiles and for pre-processor statements in the kernel sources.


There are various make destinations (makedestconfig) to initiate kernel configuration. Each serves a
different purpose.

❑ menuconfigprovides a console-driven front end, whilexconfigandgconfigfeature a graphical
user interface that builds on various X11 toolkits (Qt or GTK).
❑ oldconfiganalyzes configuration options already stored in.configand issues prompts that
may have been added after a kernel update and have not yet been assigned to a selection.
❑ defconfigapplies the default configuration defined by the architecture maintainer (the relevant
information is held inarch/arch/defconfig).
❑ allyesconfigcreates a new configuration file in which all selections are set toy(where this is
supported).allmodconfigalso sets all selections toybut usesmif this is a possible alternative.
allnoconfiggenerates a minimum configuration from which additional options not needed to
compile the key kernel components have been removed.
These three targets are used for test purposes when new kernel releases are being created. Nor-
mally, they cannot be sensibly used by end users.
Free download pdf