Linux Kernel Architecture

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

Appendix B: Working with the Source Code


Thechoiceelement must be used with the following syntax if users are required to selectoneof a group
of options:


choice
<attributes>

config <symbol_1>
<type-name>
<attributes>

...

config <symbol_n>
<type-name>
<attributes>

endchoice

Each configuration option has its own configuration symbol that has the valueyif the option is selected
ornif not.choiceselections are usually indicated by radio buttons in the configuration front ends, as
illustrated in Figure B-3.


The source code for the CPU selection shown in the figure looks like this (the help texts have been omitted
to improve readability):


choice
prompt "Processor family"
default M686 if X86_32

config M386
bool "386"
depends on X86_32 && !UML
---help---
This is the processor type of your CPU. This information is used for
optimizing purposes. In order to compile a kernel that can run on
all x86 CPU types (albeit not optimally fast), you can specify
"386" here.
...

config M486
bool "486"

config M586
bool "586/K5/5x86/6x86/6x86MX"

config M586TSC
bool "Pentium-Classic"

config M586MMX
bool "Pentium-MMX"

config M686
bool "Pentium-Pro"
Free download pdf