-
Notifications
You must be signed in to change notification settings - Fork 7
/
ch00.xml
347 lines (290 loc) · 10.4 KB
/
ch00.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
<chapter id="LKN-chapter-preface">
<title>Preface</title>
<para>
When the topic of this book was first presented to me, I dismissed it as
something that was already covered by the plentiful documentation about the
Linux kernel. Surely someone had already written down all of the basics
needed in order to build, install, and customize the Linux kernel, as it
seemed to be a very simple task to me.
<footnote>
<para>
Disclaimer: I'm a Linux kernel developer by trade, so things that seem
basic and simple to me at times are completely incomprehensible by most
people, as my family continues to remind me at times.
</para>
</footnote>
</para>
<para>
After digging through the different HOWTOs and the Linux kernel
<filename>Documentation</filename> directory, I came to the conclusion that
there was not any one place where all of this information could be found.
It could be gleaned by referencing a few files here, and a few outdated
websites there, but this was not acceptable for anyone who did not know
exactly what they were looking in the first place.
</para>
<para>
So this book was created with the goal of consolidating all of the existing
information already scattered around the Internet about building the Linux
kernel, as well as adding a lot of new and useful information that was not written
down anywhere but had been learned by trial and error over my years of
doing kernel development.
</para>
<para>
My secret goal of this book is to bring more people into the Linux kernel
development fold. The act of building a customized kernel for your machine
is one of the basic tasks needed to become a Linux kernel developer. The
more people that try this out, and realize that there is not any real magic
behind the whole Linux kernel process, the more people will be willing to
jump in and help out in making the kernel the best that it can be.
</para>
<sect1>
<title>Audience for the book</title>
<!--
gkh: This section seems a bit light, is more needed here?
AO: This is fine, it's actually comprehensive.
-->
<para>
This book is intended to cover everything that is needed to know in order
to properly build, customize, and install the Linux kernel. No programming
experience is needed to understand and use this book.
</para>
<para>
Some familiarity with how to use Linux, and some basic command-line usage
is expected of the reader.
</para>
<para>
This book is not intended to go into the programming aspects of the Linux
kernel; there are many other good books listed in the Bibliography that
already cover this topic.
</para>
</sect1>
<sect1>
<title>Organization of the material</title>
<para>
There are three major parts to this book. The first part is composed of
Chapters 1 through 6, which cover everything you need to know about
retrieving, building, installing, and upgrading the Linux kernel, in
more or less step-by-step fashion.
</para>
<para>
The second part consists of Chapters 7 and 8, which describe how to properly
configure the kernel based on the hardware present in the system, and
provides a number of different "recipes" for common configurations.
</para>
<para>
The final part consists of Chapters 9 through 11. These chapters provide
a reference to the different kernel command line options, the kernel build
options, and a select few of the different kernel configuration options.
</para>
<para>
Chapter 1, <literal>Introduction</literal>, explains when and why
you would want to build the kernel.
</para>
<para>
Chapter 2, <literal>Requirements For Building and Using the
Kernel</literal>, covers the different programs and tools that are needed
in order to properly build the kernel. It also covers a number of
different programs that are tied very closely to the kernel, how to
determine the needed version of the programs, and where to find them.
</para>
<para>
Chapter 3, <literal>Retrieving the kernel source</literal> discusses how
the different Linux kernel versions relate to each other, where to retrieve
the Linux kernel source code from, and how to download it properly.
</para>
<para>
Chapter 4, <literal>Configuring and Building</literal> explains how to
configure and properly build the Linux kernel.
</para>
<para>
Chapter 5, <literal>Installing and Booting from a Kernel</literal> shows
how to install the kernel that has been built properly, and then boot into
that kernel version.
</para>
<para>
Chapter 6, <literal>Upgrading a Kernel</literal> explains how to upgrade a
kernel that was previously built to a newer version without having to start
over from nothing.
</para>
<para>
Chapter 7, <literal>Customizing a Kernel</literal> discusses how to
customize the kernel for the hardware that is present on the system. It
goes over a variety of different ways to determine what options should be
selected and provides some simple scripts to help with the task.
</para>
<para>
Chapter 8, <literal>Kernel Configuration Recipes</literal> explains how to
configure the kernel for a variety of common situations.
</para>
<para>
Chapter 9, <literal>Kernel boot command-line parameter reference</literal>
details all of the different command-line options that can be passed to the
kernel, and what the different options do.
</para>
<para>
Chapter 10, <literal>Kernel build command line reference</literal>
describes the different command line options that are available when
building the kernel and how to use them.
</para>
<para>
Chapter 11, <literal>Kernel Configuration Option Reference</literal>
focuses on a few of the more popular and important Linux kernel
configuration options.
</para>
<para>
Appendix A, <literal>Helpful Utilities</literal> introduces a number of
very good and handy tools that everyone who wishes to track the latest
Linux kernel version should use.
</para>
</sect1>
<sect1>
<title>Online Version and License</title>
<para>
This book is freely available under the Creative Commons
"Attribution-ShareAlike" license, Version 2.5. This license can be seen in
its entirety in <xref linkend="license" />. The full book is also
available online at
<systemitem role="url">http://www.kroah.com/lkn</systemitem>.
</para>
</sect1>
<sect1>
<title>Conventions Used in This Book</title>
<para>
This book uses the following typographical conventions:
<variablelist>
<varlistentry>
<term><firstterm>Italic</firstterm></term>
<listitem>
<para>
<!--
AO: The following reflects what will happen (I hope) when the
filename, command, and option tags are formatted correctly.
gkh: gotta trust the tools people...
-->
Indicates commands and command options, files, directories, usernames, and
hostnames. Also indicates nomenclature that we've not previously used,
emphasized words, and new terms.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>Constant Width</literal></term>
<listitem>
<para>
Indicates strings used for kernel configuration, as well as a few
special terms such as device names and distribution packages. Also
used to show the command output, and the contents of text
and program files.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><userinput>Constant Width Bold</userinput></term>
<listitem>
<para>
Used in examples to indicate commands or other text that should be typed
literally by the user.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>Constant Width Italic</replaceable></term>
<listitem>
<para>
Indicates text that you should replace with your own values; for example,
your own name or password. When this appears as part of text that you
should type in, it is shown as
<userinput><replaceable>Constant Width Italic Bold</replaceable></userinput>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><prompt>#</prompt>, <prompt>$</prompt></term>
<listitem>
<para>
Used in some examples as the root shell prompt
(<literal>#</literal>) and as the user prompt
(<literal>$</literal>) under the Bourne or
<literal>bash</literal> shell.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term></term>
<listitem>
<para>
<warning role="ora">
<para>Indicates a warning or caution.</para>
</warning>
</para>
</listitem>
</varlistentry>
<!--
<note role="ora">
<para>Signifies a tip, suggestion, or general note.</para>
</note>
-->
</variablelist>
</para>
</sect1>
<sect1>
<title>Contact Information</title>
<para>
Standard O'Reilly contact information goes here...
</para>
</sect1>
<sect1>
<title>Acknowledgments</title>
<para>
Thanks first go to my wonderful wife Shannon and my beautiful children
Madeline and Griffin for their understanding and patience while I took the
time to work on this book. Without their support and prodding, this book
would have never been completed. Special thanks to Shannon for getting me
into Linux kernel development in the first place. Without her effort, I
would be still doing some odd embedded programming job, and would have
never discovered this great community in which to work in.
</para>
<para>
My editor, Andy Oram, is the driving force behing this book, shaping it
into something that is both readable and informative. His editing skills
and patience as deadlines flew by were instrumental in the creation and
completion of this book.
</para>
<para>
Also a big thanks go to the original editor of this book, David Brickner,
for giving me the chance to work on this project and believing that I could
complete it, despite the first version weighing in at over 1000 pages.
</para>
<para>
The technical reviewers for this book were amazing, catching all of the
numerous mistakes and pointing out ommisions that needed to be filled. The
reviewers were (in alphabetic order by first name),
Christian Benvenuti,
Christian Morgner,
Golden G. Richard III,
Jean Delvare,
Jerry Cooperstein,
Michael Boerner,
Rik van Riel, and
Robert Day.
<!-- did I forget anyone?
AO: I just added Rik.
gkh: and I added Jean, so that should be it. -->
Any remaining problems are due to me, and not their excellent skills.
</para>
<para>
A special thanks to Randy Dunlap for going over the kernel boot parameters
with a fine tooth comb and pointing out issues in that chapter. Also to
Kay Sievers, who helped immensely with all of the chapter on customizing
the kernel, and who provided the script at the end of that same chapter.
Without his <literal>sysfs</literal> help and knowledge, that chapter would
not have been feasible.
</para>
<para>
And a final special thanks to my 6th grade English teacher, Ms. Gruber, for
teaching me that writing was something that was possible to do, and showing
me the enjoyment in doing it. Without that start, none of this would have
been attainable.
</para>
</sect1>
</chapter>