|
@@ -23,8 +23,7 @@
|
|
<sect2 role="package">
|
|
<sect2 role="package">
|
|
<title/>
|
|
<title/>
|
|
|
|
|
|
- <para>The Eudev package contains programs for dynamic creation of device
|
|
|
|
- nodes.</para>
|
|
|
|
|
|
+ <para>Eudev 软件包包含动态创建设备节点的程序。</para>
|
|
|
|
|
|
<segmentedlist>
|
|
<segmentedlist>
|
|
<segtitle>&buildtime;</segtitle>
|
|
<segtitle>&buildtime;</segtitle>
|
|
@@ -40,7 +39,7 @@
|
|
<sect2 role="installation">
|
|
<sect2 role="installation">
|
|
<title>安装 Eudev</title>
|
|
<title>安装 Eudev</title>
|
|
|
|
|
|
- <para>First, fix a test script:</para>
|
|
|
|
|
|
+ <para>首先修复一个测试脚本:</para>
|
|
|
|
|
|
<screen><userinput remap="pre">sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl</userinput></screen>
|
|
<screen><userinput remap="pre">sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl</userinput></screen>
|
|
<!--
|
|
<!--
|
|
@@ -48,8 +47,8 @@
|
|
|
|
|
|
<screen><userinput remap="pre">sed -i '/keyboard_lookup_key/d' src/udev/udev-builtin-keyboard.c</userinput></screen>
|
|
<screen><userinput remap="pre">sed -i '/keyboard_lookup_key/d' src/udev/udev-builtin-keyboard.c</userinput></screen>
|
|
-->
|
|
-->
|
|
- <para>Next, add a workaround to prevent the /tools directory from being
|
|
|
|
- hard coded into Eudev binary files library locations:</para>
|
|
|
|
|
|
+ <para>然后,采用一个规避措施,防止 /tools 目录被硬编码到
|
|
|
|
+ Eudev 二进制文件的库文件位置中:</para>
|
|
|
|
|
|
<screen><userinput remap="pre">cat > config.cache << "EOF"
|
|
<screen><userinput remap="pre">cat > config.cache << "EOF"
|
|
HAVE_BLKID=1
|
|
HAVE_BLKID=1
|
|
@@ -75,14 +74,18 @@ EOF</userinput></screen>
|
|
|
|
|
|
<screen><userinput remap="make">LIBRARY_PATH=/tools/lib make</userinput></screen>
|
|
<screen><userinput remap="make">LIBRARY_PATH=/tools/lib make</userinput></screen>
|
|
|
|
|
|
-<note><para>The LIBRARY_PATH variable here and the LD_LIBRARY_PATH variable
|
|
|
|
|
|
+<!--note><para>The LIBRARY_PATH variable here and the LD_LIBRARY_PATH variable
|
|
below are needed to allow the use of libraries that were installed in /tools,
|
|
below are needed to allow the use of libraries that were installed in /tools,
|
|
but have not yet been installed in the main system. LIBRARY_PATH is
|
|
but have not yet been installed in the main system. LIBRARY_PATH is
|
|
used to find libraries during the linking process. LD_LIBRARY_PATH is
|
|
used to find libraries during the linking process. LD_LIBRARY_PATH is
|
|
-used to find libraries during program execution.</para></note>
|
|
|
|
|
|
+used to find libraries during program execution.</para></note-->
|
|
|
|
+<note><para>这里的 LIBRARY_PATH 变量和下面的 LD_LIBRARY_PATH 允许使用
|
|
|
|
+ /tools 中存在,但尚未安装到主系统中的库。LIBRARY_PATH
|
|
|
|
+ 被用于在链接过程中查找库,LD_LIBRARY_PATH 用于在程序执行过程中查找库。
|
|
|
|
+</para></note>
|
|
|
|
|
|
-<para>Create some directories now that are needed for tests, but
|
|
|
|
-will also be used as a part of installation:</para>
|
|
|
|
|
|
+<para>创建一些目录,它们目前被用于测试,但之后也会成为安装好的
|
|
|
|
+eudev 的一部分。</para>
|
|
|
|
|
|
<screen><userinput remap="test">mkdir -pv /lib/udev/rules.d
|
|
<screen><userinput remap="test">mkdir -pv /lib/udev/rules.d
|
|
mkdir -pv /etc/udev/rules.d</userinput></screen>
|
|
mkdir -pv /etc/udev/rules.d</userinput></screen>
|
|
@@ -95,8 +98,7 @@ mkdir -pv /etc/udev/rules.d</userinput></screen>
|
|
|
|
|
|
<screen><userinput remap="install">make LD_LIBRARY_PATH=/tools/lib install</userinput></screen>
|
|
<screen><userinput remap="install">make LD_LIBRARY_PATH=/tools/lib install</userinput></screen>
|
|
|
|
|
|
- <para>Install some custom rules and support files useful in an LFS
|
|
|
|
- environment:</para>
|
|
|
|
|
|
+ <para>安装一些在 LFS 环境中很有用的自定义规则和支持文件:</para>
|
|
|
|
|
|
<screen><userinput remap="install">tar -xvf ../&udev-lfs-version;.tar.bz2
|
|
<screen><userinput remap="install">tar -xvf ../&udev-lfs-version;.tar.bz2
|
|
make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
|
|
make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
|
|
@@ -104,7 +106,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
|
|
</sect2>
|
|
</sect2>
|
|
|
|
|
|
<sect2 id="conf-eudev" role="configuration">
|
|
<sect2 id="conf-eudev" role="configuration">
|
|
- <title>Configuring Eudev</title>
|
|
|
|
|
|
+ <title>配置 Eudev</title>
|
|
|
|
|
|
<indexterm zone="conf-eudev">
|
|
<indexterm zone="conf-eudev">
|
|
<primary sortas="a-Eudev">Eudev</primary>
|
|
<primary sortas="a-Eudev">Eudev</primary>
|
|
@@ -115,17 +117,15 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
|
|
<primary sortas="e-/etc/udev/hwdb.bin">/etc/udev/hwdb.bin</primary>
|
|
<primary sortas="e-/etc/udev/hwdb.bin">/etc/udev/hwdb.bin</primary>
|
|
</indexterm>
|
|
</indexterm>
|
|
|
|
|
|
- <para>Information about hardware devices is maintained in the
|
|
|
|
- <filename class="directory">/etc/udev/hwdb.d</filename> and
|
|
|
|
- <filename class="directory">/lib/udev/hwdb.d</filename> directories.
|
|
|
|
- <application>Eudev</application> needs that information to be compiled
|
|
|
|
- into a binary database <filename>/etc/udev/hwdb.bin</filename>. Create the
|
|
|
|
- initial database:</para>
|
|
|
|
|
|
+ <para>硬件设备的相关信息被维护在
|
|
|
|
+ <filename class="directory">/etc/udev/hwdb.d</filename> 和
|
|
|
|
+ <filename class="directory">/lib/udev/hwdb.d</filename> 目录中。
|
|
|
|
+ <application>Eudev</application> 需要将这些信息编译到二进制数据库
|
|
|
|
+ <filename>/etc/udev/hwdb.bin</filename> 中。初始化该数据库:</para>
|
|
|
|
|
|
<screen><userinput>LD_LIBRARY_PATH=/tools/lib udevadm hwdb --update</userinput></screen>
|
|
<screen><userinput>LD_LIBRARY_PATH=/tools/lib udevadm hwdb --update</userinput></screen>
|
|
|
|
|
|
- <para>This command needs to be run each time the hardware information is
|
|
|
|
- updated.</para>
|
|
|
|
|
|
+ <para>每次硬件信息有更新时,都要运行该命令。</para>
|
|
|
|
|
|
</sect2>
|
|
</sect2>
|
|
|
|
|
|
@@ -140,11 +140,11 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
|
|
<seglistitem>
|
|
<seglistitem>
|
|
<seg><!-- These are in /lib/udev and not to be called by the user:
|
|
<seg><!-- These are in /lib/udev and not to be called by the user:
|
|
accelerometer, ata_id, cdrom_id, collect, mtd_probe,
|
|
accelerometer, ata_id, cdrom_id, collect, mtd_probe,
|
|
- scsi_id, v4l_id,--> udevadm and udevd</seg>
|
|
|
|
|
|
+ scsi_id, v4l_id,--> udevadm 和 udevd</seg>
|
|
|
|
|
|
<seg>libudev.so</seg>
|
|
<seg>libudev.so</seg>
|
|
|
|
|
|
- <seg>/etc/udev, /lib/udev, and /usr/share/doc/udev-&udev-lfs-version;</seg>
|
|
|
|
|
|
+ <seg>/etc/udev, /lib/udev, 以及 /usr/share/doc/udev-&udev-lfs-version;</seg>
|
|
</seglistitem>
|
|
</seglistitem>
|
|
</segmentedlist>
|
|
</segmentedlist>
|
|
|
|
|
|
@@ -155,10 +155,9 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
|
|
<varlistentry id="udevadm" revision="sysv">
|
|
<varlistentry id="udevadm" revision="sysv">
|
|
<term><command>udevadm</command></term>
|
|
<term><command>udevadm</command></term>
|
|
<listitem>
|
|
<listitem>
|
|
- <para>Generic udev administration tool: controls the udevd daemon,
|
|
|
|
- provides info from the Udev database, monitors uevents, waits for
|
|
|
|
- uevents to finish, tests Udev configuration, and triggers uevents
|
|
|
|
- for a given device</para>
|
|
|
|
|
|
+ <para>通用 udev 管理工具:控制 udevd 守护进程,
|
|
|
|
+ 从 udev 数据库中提供信息,监视 uevent,等待 uevent 完成,
|
|
|
|
+ 测试 udev 配置,并为指定设备触发 uevent。</para>
|
|
<indexterm zone="ch-system-eudev udevadm">
|
|
<indexterm zone="ch-system-eudev udevadm">
|
|
<primary sortas="b-udevadm">udevadm</primary>
|
|
<primary sortas="b-udevadm">udevadm</primary>
|
|
</indexterm>
|
|
</indexterm>
|
|
@@ -168,9 +167,8 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
|
|
<varlistentry id="udevd">
|
|
<varlistentry id="udevd">
|
|
<term><command>udevd</command></term>
|
|
<term><command>udevd</command></term>
|
|
<listitem>
|
|
<listitem>
|
|
- <para>A daemon that listens for uevents on the netlink socket,
|
|
|
|
- creates devices and runs the configured external programs in
|
|
|
|
- response to these uevents</para>
|
|
|
|
|
|
+ <para>一个守护进程,它在 netlink 套接字上监听 uevent,
|
|
|
|
+ 并创建设备节点、运行配置好的外部程序,以响应这些 uevent。</para>
|
|
<indexterm zone="ch-system-eudev udevd">
|
|
<indexterm zone="ch-system-eudev udevd">
|
|
<primary sortas="b-udevd">udevd</primary>
|
|
<primary sortas="b-udevd">udevd</primary>
|
|
</indexterm>
|
|
</indexterm>
|
|
@@ -180,7 +178,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
|
|
<varlistentry id="libudev">
|
|
<varlistentry id="libudev">
|
|
<term><filename class="libraryfile">libudev</filename></term>
|
|
<term><filename class="libraryfile">libudev</filename></term>
|
|
<listitem>
|
|
<listitem>
|
|
- <para>A library interface to udev device information</para>
|
|
|
|
|
|
+ <para>一个提供 udev 设备信息接口的库</para>
|
|
<indexterm zone="ch-system-eudev libudev">
|
|
<indexterm zone="ch-system-eudev libudev">
|
|
<primary sortas="c-libudev">libudev</primary>
|
|
<primary sortas="c-libudev">libudev</primary>
|
|
</indexterm>
|
|
</indexterm>
|
|
@@ -190,8 +188,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
|
|
<varlistentry id="etc-udev">
|
|
<varlistentry id="etc-udev">
|
|
<term><filename class="directory">/etc/udev</filename></term>
|
|
<term><filename class="directory">/etc/udev</filename></term>
|
|
<listitem>
|
|
<listitem>
|
|
- <para>Contains Udev configuration files,
|
|
|
|
- device permissions, and rules for device naming</para>
|
|
|
|
|
|
+ <para>包含 udev 配置文件、设备权限设置和设备命名规则</para>
|
|
<indexterm zone="ch-system-eudev etc-udev">
|
|
<indexterm zone="ch-system-eudev etc-udev">
|
|
<primary sortas="e-/etc/udev">/etc/udev</primary>
|
|
<primary sortas="e-/etc/udev">/etc/udev</primary>
|
|
</indexterm>
|
|
</indexterm>
|