📄 udev.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content= "application/xhtml+xml; charset=iso-8859-1" /> <title> 10.53. Udev-090 </title> <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /> <link rel="stylesheet" href="../stylesheets/lfs-print.css" type= "text/css" media="print" /> </head> <body id="lfs" class="CLFS-SVN-20060417-MIPS"> <div class="navheader"> <div class="headertitles"> <h4> Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS </h4> <h3> Chapter 10. Installing Basic System Software </h3> </div> <ul class="headerlinks"> <li class="prev"> <a accesskey="p" href="util-linux.html" title= "Util-linux-2.12r">Prev</a> <p> Util-linux-2.12r </p> </li> <li class="next"> <a accesskey="n" href="colo.html" title="Colo-1.21">Next</a> <p> Colo-1.21 </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 10. Installing Basic System Software">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS"> Home</a> </li> </ul> </div> <div class="wrap" lang="en" xml:lang="en"> <div class="titlepage"> <h1 class="sect1"> 10.53. Udev-090 </h1> </div> <div class="package" lang="en" xml:lang="en"> <p> The Udev package contains programs for dynamic creation of device nodes. </p> <div class="segmentedlist"> <div class="seglistitem"> <div class="seg"> <strong><span class="segtitle">Installation depends on:</span></strong> <span class="seg">Coreutils, GCC, Make, Perl, and Tree</span> </div> </div> </div> </div> <div class="installation" lang="en" xml:lang="en"> <div class="titlepage"> <h2 class="sect2"> 10.53.1. Installation of Udev </h2> </div> <p> Compile the package: </p> <pre class="userinput"><kbd class="command">make EXTRAS="extras/floppy extras/cdrom_id extras/firmware \ extras/scsi_id extras/volume_id extras/ata_id extras/usb_id \ extras/edd_id extras/dasd_id extras/path_id" udevdir=/dev</kbd></pre> <div class="variablelist"> <p class="title"> <b>The meaning of the make parameter:</b> </p> <dl> <dt> <span class="term"><em class= "parameter"><tt>EXTRAS="extras/floppy extras/cdrom_id extras/firmware extras/scsi_id extras/volume_id extras/ata_id extras/usb_id extras/edd_id extras/dasd_id extras/path_id"</tt></em></span> </dt> <dd> <p> This builds the helper applications that are used with udev. The helper programs assist in correct handling of devices. </p> </dd> </dl> </div> <p> If you want to run the testsuite, you need to change a hardcoded reference to the <span><strong class="command">test</strong></span> program: </p> <pre class="userinput"><kbd class="command">sed -i 's@/usr/bin/test@/bin/test@' test/udev-test.pl</kbd></pre> <p> To test the results, issue: <strong class="userinput"><tt>make test</tt></strong>. </p> <p> Install the package: </p> <pre class="userinput"><kbd class="command">make DESTDIR=/ \ EXTRAS="extras/floppy extras/cdrom_id extras/firmware \ extras/scsi_id extras/volume_id extras/ata_id extras/usb_id \ extras/edd_id extras/dasd_id extras/path_id" udevdir=/dev install</kbd></pre> <div class="variablelist"> <p class="title"> <b>The meaning of the make parameter:</b> </p> <dl> <dt> <span class="term"><em class= "parameter"><tt>DESTDIR=/</tt></em></span> </dt> <dd> <p> This prevents the Udev build process from killing any <span><strong class="command">udevd</strong></span> processes that may be running on the system. </p> </dd> </dl> </div> <p> Install necessary helpers. </p> <pre class="userinput"><kbd class="command">install -Dv extras/eventrecorder.sh /lib/udev</kbd></pre> <p> Install the documentation that explains how to create Udev rules: </p> <pre class="userinput"><kbd class="command">install -v -m644 -D docs/writing_udev_rules/index.html \ /usr/share/doc/udev-090/index.html</kbd></pre> <p> Create a directory for storing firmware that can be loaded by <span><strong class="command">udev</strong></span>: </p> <pre class="userinput"><kbd class="command">install -dv /lib/firmware</kbd></pre> </div> <div class="content" lang="en" xml:lang="en"> <div class="titlepage"> <a id="contents-udev" name="contents-udev"></a> <h2 class="sect2"> 10.53.2. Contents of Udev </h2> </div> <div class="segmentedlist"> <div class="seglistitem"> <div class="seg"> <strong><span class="segtitle">Installed programs:</span></strong> <span class="seg">udevcontrol, udevd, udevinfo, udevmonitor, udevsend, udevtest, and udevtrigger</span> </div> <div class="seg"> <strong><span class="segtitle">Installed directory:</span></strong> <span class="seg">/etc/udev</span> </div> </div> </div> <div class="variablelist"> <h3> <a id="id3691374" name="id3691374"></a>Short Descriptions </h3> <table border="0"> <col align="left" valign="top" /> <tbody> <tr> <td> <a id="udevcontrol" name="udevcontrol"></a><span class= "term"><span><strong class= "command">udevcontrol</strong></span></span> </td> <td> <p> Configures a number of options for the running <span><strong class="command">udevd</strong></span> daemon, such as the log level. </p> </td> </tr> <tr> <td> <a id="udevd" name="udevd"></a><span class= "term"><span><strong class= "command">udevd</strong></span></span> </td> <td> <p> A daemon that reorders hotplug events before submitting them to <span><strong class= "command">udev</strong></span>, thus avoiding various race conditions </p> </td> </tr> <tr> <td> <a id="udevinfo" name="udevinfo"></a><span class= "term"><span><strong class= "command">udevinfo</strong></span></span> </td> <td> <p> Allows users to query the <span><strong class= "command">udev</strong></span> database for information on any device currently present on the system; it also provides a way to query any device in the <tt class= "systemitem">sysfs</tt> tree to help create udev rules </p> </td> </tr> <tr> <td> <a id="udevmonitor" name="udevmonitor"></a><span class= "term"><span><strong class= "command">udevmonitor</strong></span></span> </td> <td> <p> Prints the event received from the kernel and the event which <span><strong class="command">udev</strong></span> sends out after rule processing </p> </td> </tr> <tr> <td> <a id="udevtest" name="udevtest"></a><span class= "term"><span><strong class= "command">udevtest</strong></span></span> </td> <td> <p> Simulates a <span><strong class= "command">udev</strong></span> run for the given device, and prints out the name of the node the real <span><strong class="command">udev</strong></span> would have created or (not in LFS) the name of the renamed network interface </p> </td> </tr> <tr> <td> <a id="udevtrigger" name="udevtrigger"></a><span class= "term"><span><strong class= "command">udevtrigger</strong></span></span> </td> <td> <p> Walks the sysfs tree for devices that need to be added to the system. </p> </td> </tr> <tr> <td> <a id="cdrom_id" name="cdrom_id"></a><span class= "term"><span><strong class= "command">cdrom_id</strong></span></span> </td> <td> <p> To be written </p> </td> </tr> <tr> <td> <a id="firmware_helper" name= "firmware_helper"></a><span class= "term"><span><strong class= "command">firmware_helper</strong></span></span> </td> <td> <p> To be written </p> </td> </tr> <tr> <td> <a id="scsi_id" name="scsi_id"></a><span class= "term"><span><strong class= "command">scsi_id</strong></span></span> </td> <td> <p> To be written </p> </td> </tr> <tr> <td> <a id="volume_id" name="volume_id"></a><span class= "term"><span><strong class= "command">volume_id</strong></span></span> </td> <td> <p> To be written </p> </td> </tr> <tr> <td> <a id="ata_id" name="ata_id"></a><span class= "term"><span><strong class= "command">ata_id</strong></span></span> </td> <td> <p> To be written </p> </td> </tr> <tr> <td> <a id="usb_id" name="usb_id"></a><span class= "term"><span><strong class= "command">usb_id</strong></span></span> </td> <td> <p> To be written </p> </td> </tr> <tr> <td> <a id="edd_id" name="edd_id"></a><span class= "term"><span><strong class= "command">edd_id</strong></span></span> </td> <td> <p> To be written </p> </td> </tr> <tr> <td> <a id="dasd_id" name="dasd_id"></a><span class= "term"><span><strong class= "command">dasd_id</strong></span></span> </td> <td> <p> To be written </p> </td> </tr> <tr> <td> <a id="etc-udev" name="etc-udev"></a><span class= "term"><tt class="filename">/etc/udev</tt></span> </td> <td> <p> Contains <span><strong class= "command">udev</strong></span> configuation files, device permissions, and rules for device naming </p> </td> </tr> <tr> <td> <a id="lib-udev" name="lib-udev"></a><span class= "term"><tt class="filename">/lib/udev</tt></span> </td> <td> <p> Contains <span><strong class= "command">udev</strong></span> helper programs and static devices which get copied to /dev when booted. </p> </td> </tr> </tbody> </table> </div> </div> </div> <div class="navfooter"> <ul> <li class="prev"> <a accesskey="p" href="util-linux.html" title= "Util-linux-2.12r">Prev</a> <p> Util-linux-2.12r </p> </li> <li class="next"> <a accesskey="n" href="colo.html" title="Colo-1.21">Next</a> <p> Colo-1.21 </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 10. Installing Basic System Software">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS"> Home</a>. </li> </ul> </div> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -