1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY libusb-download-http "&sourceforge-repo;/libusb/libusb-&libusb-version;.tar.bz2">
|
---|
8 | <!ENTITY libusb-download-ftp "&sources-anduin-ftp;/l/libusb-&libusb-version;.tar.bz2">
|
---|
9 | <!ENTITY libusb-md5sum "df2447c23750ef2b4a314200feacc2ee">
|
---|
10 | <!ENTITY libusb-size "304 KB">
|
---|
11 | <!ENTITY libusb-buildsize "3.3 MB">
|
---|
12 | <!ENTITY libusb-time "less than 0.1 SBU">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="libusb" xreflabel="libusb-&libusb-version;">
|
---|
16 | <?dbhtml filename="libusb.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>libusb-&libusb-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="libusb">
|
---|
26 | <primary sortas="a-Libusb">Libusb</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to libusb</title>
|
---|
31 |
|
---|
32 | <para>The <application>libusb</application> package contains a library
|
---|
33 | used by some applications for USB device access.</para>
|
---|
34 |
|
---|
35 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
36 | <itemizedlist spacing="compact">
|
---|
37 | <listitem>
|
---|
38 | <para>Download (HTTP): <ulink url="&libusb-download-http;"/></para>
|
---|
39 | </listitem>
|
---|
40 | <listitem>
|
---|
41 | <para>Download (FTP): <ulink url="&libusb-download-ftp;"/></para>
|
---|
42 | </listitem>
|
---|
43 | <listitem>
|
---|
44 | <para>Download MD5 sum: &libusb-md5sum;</para>
|
---|
45 | </listitem>
|
---|
46 | <listitem>
|
---|
47 | <para>Download size: &libusb-size;</para>
|
---|
48 | </listitem>
|
---|
49 | <listitem>
|
---|
50 | <para>Estimated disk space required: &libusb-buildsize;</para>
|
---|
51 | </listitem>
|
---|
52 | <listitem>
|
---|
53 | <para>Estimated build time: &libusb-time;</para>
|
---|
54 | </listitem>
|
---|
55 | </itemizedlist>
|
---|
56 |
|
---|
57 | <bridgehead renderas="sect3">libusb Dependencies</bridgehead>
|
---|
58 |
|
---|
59 | <bridgehead renderas="sect4">Optional
|
---|
60 | (Required to Build the API Documentation)</bridgehead>
|
---|
61 | <para role="optional"><xref linkend="doxygen"/></para>
|
---|
62 |
|
---|
63 | <para condition="html" role="usernotes">User Notes:
|
---|
64 | <ulink url="&blfs-wiki;/libusb"/></para>
|
---|
65 |
|
---|
66 | </sect2>
|
---|
67 |
|
---|
68 | <sect2 role="installation">
|
---|
69 | <title>Installation of libusb</title>
|
---|
70 |
|
---|
71 | <para>Install <application>libusb</application> by running the following
|
---|
72 | commands:</para>
|
---|
73 |
|
---|
74 | <screen><userinput>./configure --prefix=/usr &&
|
---|
75 | make</userinput></screen>
|
---|
76 |
|
---|
77 | <para>If <application>Doxygen</application> is installed and you wish to
|
---|
78 | build the API documentation, issue the following command:</para>
|
---|
79 |
|
---|
80 | <!-- not sure why we can't just use 'make -C doc docs' -->
|
---|
81 | <screen><userinput>pushd doc &&
|
---|
82 | make docs &&
|
---|
83 | popd</userinput></screen>
|
---|
84 |
|
---|
85 | <para>This package does not come with a test suite.</para>
|
---|
86 |
|
---|
87 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
88 |
|
---|
89 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
90 |
|
---|
91 | <para>If you built the API documentation, install it using the following
|
---|
92 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
93 |
|
---|
94 | <screen role="root"><userinput>install -v -d -m755 /usr/share/doc/libusb-&libusb-version;/apidocs &&
|
---|
95 | install -v -m644 doc/html/* \
|
---|
96 | /usr/share/doc/libusb-&libusb-version;/apidocs</userinput></screen>
|
---|
97 |
|
---|
98 | </sect2>
|
---|
99 |
|
---|
100 | <sect2 role="configuration">
|
---|
101 | <title>Configuring Libusb</title>
|
---|
102 |
|
---|
103 | <!--
|
---|
104 | <para><application>libusb</application> requires the
|
---|
105 | <systemitem class="filesystem">usbfs</systemitem> kernel filesystem
|
---|
106 | to be mounted on <filename class="directory">/proc/bus/usb</filename>.
|
---|
107 | Applications require the files in this directory to be accessible to the user,
|
---|
108 | sometimes for both reading and writing. To restrict access to USB devices,
|
---|
109 | ensure the <systemitem class="filesystem">usb</systemitem> group exits
|
---|
110 | on your system. If necessary, create the <systemitem
|
---|
111 | class="filesystem">usb</systemitem> group using the following command:</para>
|
---|
112 |
|
---|
113 | <screen role='root'><userinput>groupadd -g 14 usb</userinput></screen>
|
---|
114 | -->
|
---|
115 |
|
---|
116 | <para id="libusb-kernel">To access raw USB devices (those not treated as a
|
---|
117 | disk by the mass-storage driver), appropriate support must be available in
|
---|
118 | the kernel. Check your kernel configuration for Device Drivers ⇒ USB
|
---|
119 | support ⇒ Support for Host-side USB. Select any USB hardware device
|
---|
120 | drivers you may need on the same page.</para>
|
---|
121 |
|
---|
122 | <indexterm zone="libusb libusb-kernel">
|
---|
123 | <primary sortas="d-USB-device-filesystem">Support for Host-side USB</primary>
|
---|
124 | </indexterm>
|
---|
125 |
|
---|
126 | <para>To have raw USB devices set up properly, add the following
|
---|
127 | <application>udev</application> rule.</para>
|
---|
128 |
|
---|
129 | <screen><literal>cat > /etc/udev/rules.d/23-usb.rules << "EOF"
|
---|
130 | # Set group ownership for raw USB devices
|
---|
131 | SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
|
---|
132 | EOF</literal></screen>
|
---|
133 |
|
---|
134 | <!--
|
---|
135 | <para>Fine-tuning of permissions is also possible by creating extra rules,
|
---|
136 | matching on something like this (on one line). The vendor and product can
|
---|
137 | be found by searching the <filename
|
---|
138 | class='directory'>/sys/devices</filename> directory entries or using
|
---|
139 | <command>udevinfo</command> after the device has been attached. See the
|
---|
140 | documentation in the current udev directory of <filename
|
---|
141 | class='directory'>/usr/share/doc></filename> for details.</para>
|
---|
142 |
|
---|
143 | <screen><literal>SUBSYSTEM=="usb_device", SYSFS{idVendor}=="05d8",
|
---|
144 | SYSFS{idProduct}=="4002", GROUP:="scanner"</literal></screen>
|
---|
145 |
|
---|
146 | <para>Some older applications, such as <application>VMware</application>,
|
---|
147 | need the following deprecated entry in the <filename>/etc/fstab</filename>
|
---|
148 | file. This is not normally needed.</para>
|
---|
149 |
|
---|
150 | <screen><literal>usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0</literal></screen>
|
---|
151 | -->
|
---|
152 |
|
---|
153 | <para>Add any users that need to access raw USB devices to the
|
---|
154 | <systemitem class="groupname">usb</systemitem> group.</para>
|
---|
155 |
|
---|
156 | <screen role="root"><userinput>usermod -a -G usb <replaceable><username></replaceable></userinput></screen>
|
---|
157 |
|
---|
158 | </sect2>
|
---|
159 |
|
---|
160 | <sect2 role="content">
|
---|
161 | <title>Contents</title>
|
---|
162 |
|
---|
163 | <segmentedlist>
|
---|
164 | <segtitle>Installed Programs</segtitle>
|
---|
165 | <segtitle>Installed Library</segtitle>
|
---|
166 | <segtitle>Installed Directories</segtitle>
|
---|
167 |
|
---|
168 | <seglistitem>
|
---|
169 | <seg>None</seg>
|
---|
170 | <seg>libusb-1.0.{so,a}</seg>
|
---|
171 | <seg>/usr/include/libusb-1.0 and optionally
|
---|
172 | /usr/share/doc/libusb-&libusb-version;</seg>
|
---|
173 | </seglistitem>
|
---|
174 | </segmentedlist>
|
---|
175 |
|
---|
176 | <variablelist>
|
---|
177 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
178 | <?dbfo list-presentation="list"?>
|
---|
179 | <?dbhtml list-presentation="table"?>
|
---|
180 |
|
---|
181 | <varlistentry id="libusb-lib">
|
---|
182 | <term><filename class='libraryfile'>libusb-1.0.{so,a}</filename></term>
|
---|
183 | <listitem>
|
---|
184 | <para> libraries contain C functions for accessing
|
---|
185 | USB hardware.</para>
|
---|
186 | <indexterm zone="libusb libusb-lib">
|
---|
187 | <primary sortas="c-libusb">libusb-1.0.{so,a}</primary>
|
---|
188 | </indexterm>
|
---|
189 | </listitem>
|
---|
190 | </varlistentry>
|
---|
191 |
|
---|
192 | </variablelist>
|
---|
193 |
|
---|
194 | </sect2>
|
---|
195 |
|
---|
196 | </sect1>
|
---|