Linux Kernel Architecture

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

Appendix B: Working with the Source Code


Figure B-2: USB configuration structure screen.

menuconfiggenerates a menu item whose heading is given as a string — in this caseUSB support.
When users configure the kernel withmake menuconfigor the graphical equivalentmake xconfigor
make gconfig, this item appears as the root of a new subtree. The choice is stored in a variable, in this
caseUSB_SUPPORT, and two values are possible because the choice is Boolean, as indicated bybool.If
USB_SUPPORTis deselected, then no further customization options will appear in the configuration tree,
which is ensured by theifclause.

sourceenables further configuration files to be linked in (by convention, they are all namedKconfig).
Their contents are interpreted as if the text they contain were held in the configuration file into which
they are linked.

commentcreates a comment in the list of configuration options. The comment text is displayed, but users
cannot make a selection.

The actual configuration options are specified withconfig. There is just one entry of this kind for each
option. The string followingconfigis known as aconfiguration symboland accepts the user selection.
Each option requires a type to define the kind of selection that users can make. In this case, the selection
type istristate; that is, one of three options can be selected — ‘‘compiled in,‘‘ ‘‘modular,‘‘ or ‘‘do not
Free download pdf