-
Notifications
You must be signed in to change notification settings - Fork 7
/
ch08.xml
1912 lines (1625 loc) · 54.7 KB
/
ch08.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
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<chapter id="LKN-recipe">
<title>
Kernel Configuration Recipes
</title>
<!--
AO: Most of the commands you show should be run as root, right? We
should show the root prompt as #, not $. This is a subtle little
convention, but one a lot of readers will recognize. It's also being
a little more realistic, since those are default prompts.
gkh: No, you can run lspci and lsusb just fine as a user. The only
thing that is needed to be done as root is install the kernel,
nothing else.
-->
<!--
AO: Some general notes to remember:
I think it could get tiresome to keep saying "Then..." or "Also..."
I think you can just list steps. Readers will assume the steps are
done in order. Sometimes, readers may even want to skip around, so
order is not that important (for xconfig and menuconfig builds). I
did keep one "Also" below because it seemed to fit in well.
Avoid future tense; talk about what the kernel does in the present
(even though it will happen in the future, after building and
booting).
Refer to options such as "SCSI disk support" without any "the." You
can also say 'the "SCSI disk support" option' but there's no need to
add that extra text.
-->
<!--
AO: A couple more general notes:
About "which" and "that." You should use "which" for an extra clause
that isn't strictly needed for the sentence to make sense. If the
clause could be removed and the sentence would still work, use
"which." Also use commas around the clause, as shown here:
I can't stand being outside when my neighber uses a
gas-powered lawn mower, which runs at about 110 decibels.
When the clause is required, use "that" and no commas:
I can't stand being outside when my neighber uses a
gas-powered lawn mower that runs at about 110 decibels.
(In other words, I can tolerate other kinds of gas-powered lawn mowers.)
To use English-teacher jargon, one uses "that" for descriptive clauses and "which" for restrictive ones.
The British tend to use "which" a lot where American usage is "that."
...
Using "such as" and "like": this is not very important, but our style
guide distinguishes between these. If you are citing EXAMPLES of
something, use "such as." For instance:
Large companies such as IBM and Hewlett Packard promote
Linux...
Reserve "like" for more metaphorical situations; these are NOT
examples.
People treat the claims of these large companies like
politicians.
...
The word "only." Very important and valuable, but I like to use it in
the right place as defined by English experts. Most writers aren't
sticklers as much as I am, but I think doing it right really makes
things clear for the reader. The rule is: "Use 'only' before the word
that it modifies." Here are two sentences that show how the location
of "only" makes a difference:
This network layer only reads the headers on the packets.
This network layer reads only the headers on the packets.
The first sentence implies, "The layer reads the headers but does not
create or write them." The second sentence implies, "The layer reads
headers but not the contents of the data (for the purposes of
check-summing, etc.)." Probably the writer in this case wants the
latter meaning. But many writers would write the first sentence, which
is formally incorrect and could confuse the reader.
-->
<para>
Previous chapters taught the mechanics of reconfiguring the kernel;
the payoff comes in this chapter where you can find all the most
common kinds of changes people need to make to their kernels, with
specific instructions on how to do so.
</para>
<sect1>
<title>Disks</title>
<!--
AO: We should have a little text between sect1 and sect2, although
it's not absolutely required in a reference work. I just put in some
junk that I thought might set a context; you can change it.
-->
<para>
The Linux kernel supports a wide range of different disk types.
This section shows how to configure the kernel so that it supports most of
the more common types of disk controllers.
</para>
<sect2 id="lkn_usb_storage">
<title>USB storage</title>
<para>
To use a USB storage device (commonly referred to as USB "flash"
device, or an external USB disk drive) USB support must be first working
properly. Refer to the recipe in <xref linkend="lkn_usb" /> for how to do
this.
</para>
<para>
A USB storage device can be identified by using the
<command>lsusb</command> program. If the following command sequence
produces the results shown, a USB storage device is present on the
system:
</para>
<!-- gkh -
What is the proper formatting for typing things on the command
line and the result?
-->
<screen>
$ <userinput>/usr/sbin/lsusb -v | grep Storage</userinput>
bInterfaceClass 8 Mass Storage
</screen>
<!--
AO: I don't want to add a lot of extra work for you, but it occurred
to me when looking at the HTML output that a lot of instructions
might look better as numbered lists. Try it out. Would it be a lot
of work to use numbered lists as I've done in this one example?
-->
<para>
Enable it as follows.
</para>
<orderedlist>
<listitem>
<para>
A USB Storage device is in reality a USB SCSI device that talks over a
USB connection. Because of this, the SCSI subsystem must be enabled:
<screen>
Device Drivers
SCSI Device Support
[*] SCSI Device Support
</screen>
</para>
</listitem>
<listitem>
<para>
Also in the SCSI system, the "SCSI disk support" must be enabled in
order for the device to be mounted properly:
<screen>
Device Drivers
SCSI Device Support
[*] SCSI disk support
</screen>
</para>
</listitem>
<listitem><para>
Enable USB Storage support:
<screen>
Device Drivers
USB Support
[M] USB Mass Storage support
</screen>
</para></listitem>
</orderedlist>
<para>
A number of specific USB storage devices are listed as separate
configuration items, as they do not follow the standard USB
specification and require special code. If you have one of these
devices, please enable support for them.
</para>
</sect2>
<sect2 id="lkn_ide">
<title>IDE Disks</title>
<para>
IDE disks are the most common type of PC disks. The device that enables
them to work properly is an IDE disk controller. To determine if you have
a IDE disk controller on the system, use the <command>lspci</command>
command in the following manner:
<footnote>
<para>
Almost all distributions place the <command>lspci</command> program in the
<filename>/usr/sbin/</filename> directory, but some place it in other
locations. To find out where it is located, do:
<screen>
$ <userinput>which lspci</userinput>
/usr/sbin/lspci
</screen>
If you are using a distribution that puts it somewhere else,
please use that path for whenever we discuss using <command>lspci</command>
</para>
</footnote>
<screen>
$ <userinput>/usr/sbin/lspci | grep IDE</userinput>
00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02)
</screen>
Note that your response will probably not be identical; what is
important is that the command shows some an IDE Controller (the first
<!--
AO: Is plural "controllers" accurate here?
gkh: yes, that's fine.
-->
device in the previous example.) If you find only SATA controllers, please
see <xref linkend="lkn_sata" />.
</para>
<para>
Enable PCI support for the kernel:
<screen>
Bus options (PCI, PCMCIA, EISA, MCA, ISA)
[*] PCI Support
</screen>
Enable the IDE subsystem, and IDE support:
<screen>
Device Drivers
[*] ATA/ATAPI/MFM/RLL support
[*] Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
</screen>
In the ATA system, the specific type of IDE controller that you have must
be enabled in order for it to work properly. To provide a good backup
in case you choose the wrong type, select the "generic" IDE controller:
<screen>
Device Drivers
ATA/ATAPI/MFM/RLL support
[*] generic/default IDE chipset support
</screen>
Enable the different PCI IDE controllers:
<screen>
Device Drivers
ATA/ATAPI/MFM/RLL support
[*] PCI IDE chipset support
</screen>
This opens up a lengthy submenu of the different IDE controller types.
Select the proper one based on the name of the device you found in the
lspci step.
</para>
</sect2>
<sect2 id="lkn_sata">
<title>Serial ATA (SATA)</title>
<para>
SATA is a type of disk controller that is the successor to the IDE disk
controller.
To determine if you have a SATA disk controller on the system, run the
following command:
<screen>
$ <userinput>/usr/sbin/lspci | grep SATA</userinput>
00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02)
</screen>
Note that your response will probably not be identical; what is
important is that the command shows some SATA devices.
</para>
<para>
SATA disks use a kernel library called <emphasis>libata</emphasis> that handles most of the
SATA-specific functionality. That library uses the SCSI layer to talk
to the block layer, so many different kernel options need to be enabled
in order for SATA disks to work properly.
Enable PCI support for the kernel:
<screen>
Bus options (PCI, PCMCIA, EISA, MCA, ISA)
[*] PCI Support
</screen>
Enable the SCSI subsystem:
<screen>
Device Drivers
SCSI Device Support
[*] SCSI Device Support
</screen>
Also in the SCSI system, the "SCSI disk support" option must be enabled in
order for the device to be mounted properly:
<screen>
Device Drivers
SCSI Device Support
[*] SCSI disk support
</screen>
The SATA options are under the "SCSI low-level drivers" section:
<screen>
Device Drivers
SCSI Device Support
SCSI low-level drivers
[*] Serial ATA (SATA) support
</screen>
In that section, enable the specific SATA controller type that you have.
Look at the output of the previously mentioned <command>lspci</command>
command for a list of the types of SATA controllers that are present on
your system. For example, most motherboards from Intel require the PIIX/ICH
SATA driver (as the previous example showed.)
<screen>
Device Drivers
SCSI Device Support
SCSI low-level drivers
[*] Serial ATA (SATA) support
[*] Intel PIIX/ICH SATA support
</screen>
</para>
</sect2>
<sect2 id="lkn_burn_cdrom">
<title>Burning a CD-ROM</title>
<para>
Burning a CD-ROM is very simple on Linux. If your kernel can support
reading from a CD-ROM, it can also support burning a CD-ROM. There are
two ways to enable CD-ROM support in Linux, one for IDE drives and one for
SCSI and SATA drives.
</para>
<sect3>
<title>IDE CD-ROM drives</title>
<para>
IDE CD-ROM drives are controlled by the same IDE controller as your main IDE
disk drives. Make sure the IDE controller is properly supported as
described in <xref linkend="lkn_ide" />. If it is properly supported,
then only one other configuration item need to be selected:
<screen>
Device Drivers
[*] ATA/ATAPI/MFM/RLL support
[*] Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
[M] Include IDE/ATAPI CDROM support
</screen>
</para>
</sect3>
<sect3>
<title>SCSI and SATA CD-ROM drives</title>
<para>
SATA and SCSI CD-ROM drives are controlled by the same controller as your
main disk drives. Make sure the SATA or SCSI controller is properly
supported. For SATA disks, see <xref linkend="lkn_sata" />.
</para>
<para>
To support SATA or SCSI CD-ROM drives, the SCSI CD-ROM driver must be
enabled:
<screen>
Device Drivers
SCSI Device Support
[*] SCSI CDROM support
</screen>
Once that is enabled, the SATA or SCSI CD-ROM drive should work properly.
</para>
</sect3>
</sect2>
</sect1>
<sect1>
<title>Devices</title>
<para>
Linux supports a vast range of different types of devices (more than any
other operating system ever has). This section shows how to enable
some of the more common types.
</para>
<sect2 id="lkn_usb">
<title>USB</title>
<para>
Linux supports many different types of USB devices. To enable USB
support, you must first enable support for a USB controller, which
drives the USB connection on the machine.
</para>
<para>
To determine if your machine has a USB controller, and which type
it is, run the following command:
<screen>
$ <userinput>/usr/sbin/lspci | grep USB</userinput>
00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)
</screen>
Note that your response will probably not be identical; what is
important is that the command shows some USB controllers.
</para>
<para>
Enable PCI support for the kernel:
<screen>
Bus options (PCI, PCMCIA, EISA, MCA, ISA)
[*] PCI Support
</screen>
Enable USB support for the kernel:
<screen>
Device Drivers
USB Support
[M] Support for Host-side USB
</screen>
Enable the specific USB Host controllers for your machine (it is safe to
enable them all if you do not know which you have):
<screen>
Device Drivers
USB Support
--- USB Host Controller Drivers
[M] EHCI HCD (USB 2.0) support
[M] OHCI HCD support
[M] UHCI HCD (most Intel and VIA) support
</screen>
Individual USB devices also need their drivers to be enabled. A large
majority of them are under the main USB driver section:
<screen>
Device Drivers
USB Support
</screen>
<!--
AO: I think it's a good idea to put names of menu items in <literal>
tags. That's because some names may be long phrases that look odd
when dropped in a sentence; they need a font change. On the other
hand, something such "main USB driver section" is a generic
reference to USB; it's safe to leave that in plain font. Use what
feels right in each case.
-->
But some devices, such as USB video and DVB and sound, are listed in the
section controlling all of these types of devices. For example, the USB
sound driver can be found under the <literal>Sound</literal> menu:
<screen>
Device drivers
Sound
[*] Sound card support
[*] Advanced Linux Sound Architecture
USB Devices
[M] USB Audio/MIDI driver
</screen>
</para>
<!--
AO: I thought it would be nice to point readers to the next step,
should they need it. Would it load the book down too much to put
"next step" paragraphs like this in?
-->
<para>
If you want to insert USB storage devices (USB flash), look now at
<xref linkend="lkn_usb_storage" />.
</para>
</sect2>
<sect2 id="lkn_firewire">
<title>IEEE 1394 (FireWire)</title>
<para>
IEEE 1394 is commonly known by the name FireWire, the name by which Apple
Computer publicized it. IEEE 1394 is a
high-speed bus that connects external devices, much as USB does.
</para>
<para>
<!--
AO: Notice how I use "whether" instead of "if" when you're trying to
determine whether something is true. A minor nit.
-->
To determine whether your machine has a FireWire controller, and which type
is is, run the following command:
<screen>
$ <userinput>/usr/sbin/lspci | grep FireWire</userinput>
06:0c.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)
06:0d.2 FireWire (IEEE 1394): Creative Labs SB Audigy FireWire Port (rev 04)
</screen>
Note that your response will probably not be identical; what is
important is that the command shows some FireWire controllers.
</para>
<para>
Enable PCI support for the kernel:
<screen>
Bus options (PCI, PCMCIA, EISA, MCA, ISA)
[*] PCI Support
</screen>
Enable IEEE 1394 support for the kernel:
<screen>
Device Drivers
IEEE 1394 (FireWire) support
[*] IEEE 1394 (FireWire) support
</screen>
Enable the specific type of Firewire host controller you have:
<screen>
Device Drivers
IEEE 1394 (FireWire) support
[*] IEEE 1394 (FireWire) support
--- Device Drivers
[M] Texas Instruments PCILynx support
[M] OHCI-1394 support
</screen>
Finally, enable the specific type of Firewire devices you have:
<screen>
Device Drivers
IEEE 1394 (FireWire) support
[*] IEEE 1394 (FireWire) support
--- Protocol Drivers
[M] OHCI-1394 Video support
[M] SBP-2 support (Harddisks etc.)
[ ] Enable Phys DMA support for SBP2 (Debug)
[M] Ethernet over 1394
[M] OHCI-DV I/O support
[M] Raw IEEE1394 I/O support
</screen>
</para>
</sect2>
<sect2 id="lkn_pci_hotplug">
<title>PCI hotplug</title>
<para>
PCI hotplug systems are becoming more popular with the use of
ExpressCard and laptop docking stations.
</para>
<para>
To determine whether your machine has an ExpressCard controller, look
at the hardware to see whether an ExpressCard card can be plugged into it.
</para>
<para>
Enable PCI support for the kernel:
<screen>
Bus options (PCI, PCMCIA, EISA, MCA, ISA)
[*] PCI Support
</screen>
Enable PCI Hotplug support for the kernel:
<screen>
Bus options (PCI, PCMCIA, EISA, MCA, ISA)
[*] PCI Support
PCI Hotplug Support
[M] Support for PCI Hotplug (EXPERIMENTAL)
</screen>
There is a wide range of different types of PCI Hotplug controllers.
For most laptops and for ExpressCard support, enable the ACPI
controller:
<screen>
Bus options (PCI, PCMCIA, EISA, MCA, ISA)
[*] PCI Support
PCI Hotplug Support
[M] Support for PCI Hotplug (EXPERIMENTAL)
[M] ACPI PCI Hotplug driver
</screen>
as well as the PCI Express controller:
<screen>
Bus options (PCI, PCMCIA, EISA, MCA, ISA)
[*] PCI Support
[*] PCI Express Support
[M] PCI Express Hotplug driver
</screen>
</para>
</sect2>
<sect2 id="lkn_pcmcia">
<title>PCMCIA / CardBus</title>
<!--
AO: Let's make sure to do cross-references in a way that will
translate during conversion; see what I did with xref.
-->
<para>
PCMCIA and CardBus device support is in almost every laptop manufactured. Newer
laptops, however, are switching to the ExpressCard format (see the PCI Hotplug
recipe in <xref linkend="lkn_pci_hotplug" />).
</para>
<para>
To determine whether your machine has a PCMCIA controller, look at
the hardware to see whether a PCMCIA card can be plugged into it.
</para>
<para>
Enable PCI support for the kernel:
<screen>
Bus options (PCI, PCMCIA, EISA, MCA, ISA)
[*] PCI Support
</screen>
Enable PCCARD support for the kernel:
<screen>
Bus options (PCI, PCMCIA, EISA, MCA, ISA)
PCCARD (PCMCIA/CardBus) support
[M] PCCard (PCMCIA/CardBus) support
</screen>
Enable both PCMCIA and CardBus support to cover the widest range of
devices:
<screen>
Bus options (PCI, PCMCIA, EISA, MCA, ISA)
PCCARD (PCMCIA/CardBus) support
[M] PCCard (PCMCIA/CardBus) support
[M] 16-bit PCMCIA support
[*] 32-bit CardBus support
</screen>
Enable the card bridge type for your laptop. The most common one is the
"yenta-like" controller:
<screen>
Bus options (PCI, PCMCIA, EISA, MCA, ISA)
PCCARD (PCMCIA/CardBus) support
[M] PCCard (PCMCIA/CardBus) support
[M] CardBus yenta-compatible bridge support
[ ] Cirrus PD6729 compatible bridge support
[ ] i82092 compatible bridge support
[ ] i82365 compatible bridge support
[ ] Databook TCIC host bridge support
</screen>
</para>
</sect2>
<sect2 id="sound">
<title>Sound (ALSA)</title>
<para>
ALSA (Advanced Linux Sound Architecture) is the current sound
system for the Linux kernel. An earlier sound system (OSS) has
been deprecated, and almost all of the older drivers have been removed
from the kernel source tree.
</para>
<para>
To determine which type of sound controller is present in your machine,
and what type it is, run the following command:
<screen>
$ <userinput>/usr/sbin/lspci | grep -i audio</userinput>
00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
06:0d.0 Multimedia audio controller: Creative Labs SB Audigy (rev 04)
</screen>
Note that your response will probably not be identical; what is
important is that the command shows some Audio controllers.
</para>
<para>
Enable basic sound support:
<screen>
Device Drivers
Sound
[M] Sound Card Support
</screen>
Enable ALSA:
<screen>
Device Drivers
Sound
[M] Sound Card Support
[M] Advanced Linux Sound Architecture
</screen>
There are a number of different base ALSA options, such as support for
the older <literal>OSS</literal> sound protocol. If you have older
applications, you should enable the related options:
<screen>
Device Drivers
Sound
[M] Sound Card Support
[M] Advanced Linux Sound Architecture
[M] OSS Mixer API
[M] OSS PCM (digital audio) API
[ ] OSS PCM (digital audio) API - Include plugin system
</screen>
Enable the specific type of sound device that you have. PCI sound cards
are under the PCI submenu:
<screen>
Device Drivers
Sound
[M] Sound Card Support
[M] Advanced Linux Sound Architecture
PCI Devices
</screen>
</para>
</sect2>
</sect1>
<sect1>
<title>CPU</title>
<para>
If you wish to have the Linux kernel run as fast as possible for your specific
processor and hardware type, there are a few options that you can
set to get the last bit of performance out of the hardware. This section
will show some of the different processor-specific options that you can
tune for your processor.
<!--
AO: One option, concerning SMP, seems particularly important. It
sounds like if you don't enable it, you could waste half or more of
your computer. Is that worth saying?
gkh: yes, is a section down below.
-->
</para>
<sect2 id="processor">
<title>Processor Types</title>
<para>
A wide range of specific processor options are available to
be changed in the Linux kernel. The most important one for our
purpose specifies the
exact type of CPU you are using this kernel for. To determine the type of
processor you are using, run the following command:
<screen>
$ <userinput>cat /proc/cpuinfo | grep "model name"</userinput>
model name : Intel(R) Xeon(TM) CPU 3.20GHz
</screen>
Note that your response will probably not be identical; what is
important is that the command shows the model name of the processor present
on the system.
</para>
<!--
AO: The following paragraph seems to apply to Intel chips. Because
this book might have a following among people using other chips,
maybe you should say something about what PC-compatible means. Does
it assume Intel/AMD?
gkh: Yes it does, but all of these processors are compatible with the
Intel/AMD ones. I don't think it's necessary to go into the different
types of processors here, do you?
-->
<para>
Select the subarchitecture type of the processor:
<screen>
Processor type and features
Subarchitecture Type
(X) PC-compatible
( ) AMD Elan
( ) Voyager (NCR)
( ) NUMAQ (IBM/Sequent)
( ) Summit/EXA (IBM x440)
( ) Support for other sub-arch SMP systems with more than 8 CPUs
( ) SGI 320/540 (Visual Workstation)
( ) Generic architecture (Summit, bigsmp, ES7000, default)
( ) Support for Unisys ES7000 IA32 series
</screen>
Only if your machine is one of the other types in the preceding list should you
select anything other than the <literal>PC-compatible</literal> option.
However, if you wish to create a single kernel that will run on all of the
types of machines shown, select the <literal>Generic architecture</literal>
option. Some of the above options might not be present if you have not
also selected the <literal>Symmetric multi-processing support</literal>
option.
</para>
<para>
Select the processor family type. The <literal>PC-compatible</literal>
option needs to be selected from the previous options for this submenu
to be displayed:
<screen>
Processor type and features
Processor family
( ) 386
( ) 486
( ) 586/K5/5x86/6x86/6x86MX
( ) Pentium-Classic
( ) Pentium-MMX
( ) Pentium-Pro
( ) Pentium-II/Celeron(pre-Coppermine)
( ) Pentium-III/Celeron(Coppermine)/Pentium-III Xeon
( ) Pentium M
(X) Pentium-4/Celeron(P4-based)/Pentium-4 M/Xeon
( ) K6/K6-II/K6-III
( ) Athlon/Duron/K7
( ) Opteron/Athlon64/Hammer/K8
( ) Crusoe
( ) Efficeon
( ) Winchip-C6
( ) Winchip-2
( ) Winchip-2A/Winchip-3
( ) GeodeGX1
( ) Geode GX/LX
( ) CyrixIII/VIA-C3
( ) VIA C3-2 (Nehemiah)
( ) Generic x86 support
</screen>
For more details on this configuration item, please refer to
<xref linkend="CONFIG_M386" /> for a full description of how to pick
the proper processor type depending on what processor you have, and what
range of machines you wish the kernel to run on.
</para>
</sect2>
<sect2 id="smp">
<title>SMP</title>
<para>
If your system contains more than one CPU, or a
Hyperthreaded or Dual Core CPU, you should select the multiprocessor
option for the Linux kernel in order to take advantage of the additional
processors. Unless you do, you will be wasting the other
processors by not using them at all.
</para>
<para>
Enable multiprocessing:
<screen>
Processor type and features
[*] Symmetric multi-processing support
</screen>
</para>
</sect2>
<sect2 id="preempt">
<title>Preemption</title>
<para>
Systems running as servers have very different workload requirements from
those being used as a desktop for video and audio applications. The kernel
allows different modes of "preemption" in order to handle these different
workloads. Preemption is the ability of the kernel to interrupt itself
while it is doing something else, in order to work on something with a
higher priority, such as updating a sound or video program.
</para>
<para>
To change to a different preemption model, use this menu:
<screen>
Processor type and features
Preemption Model
(X) No Forced Preemption (Server)
( ) Voluntary Kernel Preemption (Desktop)
( ) Preemptible Kernel (Low-Latency Desktop)
</screen>
</para>
<para>
If you wish to make the kernel even more responsive to higher priority
tasks than the general preemption option provides, you can also allow
interruptions to
one of the main internal kernel locks:
<screen>
Processor type and features
[*] Preempt The Big Kernel Lock
</screen>
This option is able to be selected only if you have already selected
either the <literal>Preemptible Kernel</literal> or <literal>Symmetric
multi-processing support</literal> options.
</para>
</sect2>
<sect2 id="suspend">
<title>Suspend</title>
<para>
The Linux kernel has the ability to suspend itself to disk, allowing you to
disconnect the power, and then at a later time, power up and resume exactly
where the machine was when it was suspended. This functionality is very
useful on laptops that run Linux.
</para>
<para>
Enable this by selecting:
<screen>
Power management options (ACPI, APM)
[*] Software Suspend
</screen>
The kernel needs to know where to save the suspended kernel image to, and
then later where to resume it from. This location is usually a kernel swap
partition on the disk. To specify which partition this should be:
<screen>
Power management options (ACPI, APM)
(/dev/hda3) Default resume partition
</screen>
</para>
<note>
<para>
Make sure you specify the proper partition to suspend the machine to,
and do not use a partition that is being used by the system for data.
The proper
partition name can be found by running the following command:
<screen>
$ <userinput>/sbin/swapon -s | grep dev | cut -f 1 -d ' '</userinput>
/dev/hda3
</screen>
Use the output of the preceding command in this kernel configuration option,
and on the kernel boot line where it specifies where the kernel should be resumed
from. After the machine has been suspended, to have it resume properly,
pass the
<literal>resume=/dev/swappartition</literal> argument to the kernel command
line to have it use the proper image. If you do not want to have the
suspended image restored, use the <literal>noresume</literal> kernel
command line argument.
</para>
</note>
</sect2>
<sect2 id="cpufreq">
<title>CPU Frequency Scaling</title>
<para>
Most modern processors can slow down the internal clock of the
processor to conserve power and battery life. Linux supports this
ability and offers a variety of power "governors."
Different governors implement different heuristics in order to determine how
to vary the processor speed depending on the system load and
other variables.
</para>
<para>
Enable the basic frequency scaling functionality:
<screen>
Power management options (ACPI, APM)
[*] CPU Frequency scaling
</screen>
Select the different type of frequency governors you wish to use:
<screen>
Power management options (ACPI, APM)
[*] CPU Frequency scaling
[*] 'performance' governor
[*] 'powersave' governor
[*] 'userspace' governor for userspace frequency scaling
[*] 'ondemand' cpufreq policy governor
[*] 'conservative' cpufreq governor
</screen>
For more information on what the different governors do, see
<xref linkend="CONFIG_CPU_FREQ" />.