377-381.html
来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 202 行
HTML
202 行
<HTML>
<HEAD>
<TITLE>Linux Unleashed, Third Edition:Multimedia Linux</TITLE>
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!--ISBN=0672313723//-->
<!--TITLE=Linux Unleashed, Third Edition//-->
<!--AUTHOR=Tim Parker//-->
<!--PUBLISHER=Macmillan Computer Publishing//-->
<!--IMPRINT=Sams//-->
<!--CHAPTER=21//-->
<!--PAGES=377-381//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="373-377.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="381-383.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<P>Go ahead and save the configuration to prevent hassles whenever you rebuild your kernel in the future.
</P>
<P>After a few more prompts about components to be compiled into the new kernel, the system starts the compilation process. Some systems have extra steps involved here, depending on how LILO is configured on your machine. The compilation can take anywhere from a couple of minutes to thirty minutes, depending on the speed of your machine and the number of components that have to be compiled.</P>
<P>You’re not finished yet! After recompiling the kernel you have to configure the device files properly. Again, this process might be explained in a README that came with your sound card drivers. Rather than do the device file configuration manually, a better approach is to look for the <TT>Readme.linux</TT> file that is usually stored in the <TT>/usr/src/linux/drivers/sound</TT> directory. The bottom of this file contains a short shell script that can do the device file settings painlessly for you. Cut these lines out and paste them into another file, make it executable, then run the script. After the kernel is recompiled and the device files configured, you can reboot the machine.</P>
<P>The script that should be run (cut from the <TT>Readme.linux</TT> file) looks like this (superfluous comment lines have been removed for clarity):</P>
<!-- CODE //-->
<PRE>
#!/bin/sh
AUDIOPERMS=622
# Create the devices
# Mixer devices
if [ -e /dev/mixer ]; then
rm -f /dev/mixer
fi
if [ -e /dev/mixer0 ]; then
rm -f /dev/mixer0
fi
mknod -m 666 /dev/mixer0 c 14 0
ln -sf /dev/mixer0 /dev/mixer
if [ -e /dev/mixer1 ]; then
rm -f /dev/mixer1
fi
mknod -m 666 /dev/mixer1 c 14 16
# Sequencer (14, 1)
#
if [ -e /dev/sequencer ]; then
rm -f /dev/sequencer
fi
mknod -m 666 /dev/sequencer c 14 1
if [ -e /dev/patmgr0 ]; then
rm -f /dev/patmgr0
fi
mknod -m 666 /dev/patmgr0 c 14 17
if [ -e /dev/patmgr1 ]; then
rm -f /dev/patmgr1
fi
mknod -m 666 /dev/patmgr1 c 14 33
# music (14, 8)
#
if [ -e /dev/music ]; then
rm -f /dev/music
fi
mknod -m 666 /dev/music c 14 8
if [ -e /dev/sequencer2 ]; then
rm -f /dev/sequencer2
fi
ln -s /dev/music /dev/sequencer2
# Midi devices
if [ -e /dev/midi ]; then
rm -f /dev/midi # Old name. Don’t use it
fi
if [ -e /dev/midi00 ]; then
rm -f /dev/midi00
fi
mknod -m 666 /dev/midi00 c 14 2
ln -sf /dev/midi00 /dev/midi
if [ -e /dev/midi01 ]; then
rm -f /dev/midi01
fi
mknod -m 666 /dev/midi01 c 14 18
if [ -e /dev/midi02 ]; then
rm -f /dev/midi02
fi
mknod -m 666 /dev/midi02 c 14 34
if [ -e /dev/midi03 ]; then
rm -f /dev/midi03
fi
mknod -m 666 /dev/midi03 c 14 50
# DSP (14, 3)
if [ -e /dev/dsp ]; then
rm -f /dev/dsp
fi
if [ -e /dev/dsp0 ]; then
rm -f /dev/dsp0
fi
mknod -m $AUDIOPERMS /dev/dsp0 c 14 3
ln -s /dev/dsp0 /dev/dsp
# DSPW (14, 5)
if [ -e /dev/dspW ]; then
rm -f /dev/dspW
fi
if [ -e /dev/dspW0 ]; then
rm -f /dev/dspW0
fi
mknod -m $AUDIOPERMS /dev/dspW0 c 14 5
ln -s /dev/dspW0 /dev/dspW
if [ -e /dev/dspW1 ]; then
rm -f /dev/dspW1
fi
mknod -m $AUDIOPERMS /dev/dspW1 c 14 37
# SPARC compatible /dev/audio (14, 4)
#
if [ -e /dev/audio ]; then
rm -f /dev/audio
fi
if [ -e /dev/audio0 ]; then
rm -f /dev/audio0
fi
mknod -m $AUDIOPERMS /dev/audio0 c 14 4
ln -s /dev/audio0 /dev/audio
# DSP1 (14, 19) /dev/dsp for the second soundcard.
# Also the SB emulation part of the
# PAS16 card.
if [ -e /dev/dsp1 ]; then
rm -f /dev/dsp1
fi
mknod -m $AUDIOPERMS /dev/dsp1 c 14 19
# SPARC audio1 (14, 20)
# /dev/audio for the second soundcard.
# Also the SB emulation part of the
# PAS16 card.
if [ -e /dev/audio1 ]; then
rm -f /dev/audio1
fi
mknod -m $AUDIOPERMS /dev/audio1 c 14 20
# /dev/sndstat (14,6) For debugging purposes
if [ -e /dev/sndstat ]; then
rm -f /dev/sndstat
fi
mknod -m 666 /dev/sndstat c 14 6
exit 0
</PRE>
<!-- END CODE //-->
<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="373-377.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="381-383.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?