[52d29f7] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY libusb-download-http "http://prdownloads.sourceforge.net/libusb/libusb-&libusb-version;.tar.gz">
|
---|
| 8 | <!ENTITY libusb-download-ftp " ">
|
---|
[dcd4bfb7] | 9 | <!ENTITY libusb-md5sum "75655870fb7bb661e6fbd57cbfe81bb2">
|
---|
[52d29f7] | 10 | <!ENTITY libusb-size "314 KB">
|
---|
[fa0eb91a] | 11 | <!ENTITY libusb-buildsize "4.5 MB (includes HTML documentation installation)">
|
---|
| 12 | <!ENTITY libusb-time "0.25 SBU">
|
---|
[52d29f7] | 13 | ]>
|
---|
| 14 |
|
---|
[bdf5806e] | 15 | <sect1 id="libusb" xreflabel="libusb-&libusb-version;">
|
---|
[a0f03b0] | 16 | <sect1info>
|
---|
[5cd0959d] | 17 | <othername>$LastChangedBy$</othername>
|
---|
| 18 | <date>$Date$</date>
|
---|
[a0f03b0] | 19 | </sect1info>
|
---|
[bdf5806e] | 20 | <?dbhtml filename="libusb.html"?>
|
---|
| 21 | <title>libusb-&libusb-version;</title>
|
---|
[fa0eb91a] | 22 | <indexterm zone="libusb">
|
---|
| 23 | <primary sortas="a-Libusb">Libusb</primary>
|
---|
| 24 | </indexterm>
|
---|
[bdf5806e] | 25 |
|
---|
[52d29f7] | 26 | <sect2>
|
---|
| 27 | <title>Introduction to <application>libusb</application></title>
|
---|
[aa9bc4f] | 28 |
|
---|
[52d29f7] | 29 | <para>The <application>libusb</application> package contains a library
|
---|
| 30 | used by some applications for <acronym>USB</acronym> device access.</para>
|
---|
[aa9bc4f] | 31 |
|
---|
[52d29f7] | 32 | <sect3><title>Package information</title>
|
---|
| 33 | <itemizedlist spacing='compact'>
|
---|
[fa0eb91a] | 34 | <listitem><para>Download (HTTP):
|
---|
| 35 | <ulink url="&libusb-download-http;"/></para></listitem>
|
---|
| 36 | <listitem><para>Download (FTP):
|
---|
| 37 | <ulink url="&libusb-download-ftp;"/></para></listitem>
|
---|
[dcd4bfb7] | 38 | <listitem><para>Download MD5 sum:
|
---|
| 39 | &libusb-md5sum;</para></listitem>
|
---|
[fa0eb91a] | 40 | <listitem><para>Download size:
|
---|
| 41 | &libusb-size;</para></listitem>
|
---|
| 42 | <listitem><para>Estimated disk space required:
|
---|
| 43 | &libusb-buildsize;</para></listitem>
|
---|
| 44 | <listitem><para>Estimated build time:
|
---|
| 45 | &libusb-time;</para></listitem></itemizedlist>
|
---|
[52d29f7] | 46 | </sect3>
|
---|
[aa9bc4f] | 47 |
|
---|
[52d29f7] | 48 | <sect3><title><application>libusb</application> dependencies</title>
|
---|
| 49 | <sect4><title>Optional</title>
|
---|
[fa0eb91a] | 50 | <para><xref linkend="openjade"/> and <xref linkend="sgml-dtd-3"/> (both
|
---|
| 51 | required to build the <acronym>HTML</acronym> documentation)</para>
|
---|
| 52 | </sect4>
|
---|
[52d29f7] | 53 | </sect3>
|
---|
[aa9bc4f] | 54 |
|
---|
[52d29f7] | 55 | </sect2>
|
---|
| 56 |
|
---|
| 57 | <sect2>
|
---|
| 58 | <title>Installation of <application>libusb</application></title>
|
---|
[aa9bc4f] | 59 |
|
---|
| 60 | <para>Install <application>libusb</application> by running the following
|
---|
| 61 | commands:</para>
|
---|
| 62 |
|
---|
[fa0eb91a] | 63 | <screen><userinput><command>libtoolize -f &&
|
---|
| 64 | autoreconf -f &&
|
---|
| 65 | ./configure --prefix=/usr --disable-build-docs &&
|
---|
| 66 | make</command></userinput></screen>
|
---|
| 67 |
|
---|
| 68 | <para>Now, as the root user:</para>
|
---|
| 69 |
|
---|
| 70 | <screen><userinput role='root'><command>make install</command></userinput></screen>
|
---|
| 71 |
|
---|
| 72 | <para>If you built the <acronym>HTML</acronym> documentation, install it using
|
---|
| 73 | the following commands:</para>
|
---|
| 74 |
|
---|
| 75 | <screen><userinput role='root'><command>install -v -d -m755 /usr/share/doc/libusb-&libusb-version;/html &&
|
---|
| 76 | install -v -m644 doc/html/* /usr/share/doc/libusb-&libusb-version;/html</command></userinput></screen>
|
---|
[aa9bc4f] | 77 |
|
---|
[52d29f7] | 78 | </sect2>
|
---|
| 79 |
|
---|
| 80 | <sect2>
|
---|
| 81 | <title>Command explanations</title>
|
---|
[aa9bc4f] | 82 |
|
---|
[fa0eb91a] | 83 | <para><command>libtoolize -f</command>: There is a mismatch in the Autotools
|
---|
| 84 | with <acronym>LFS</acronym>-6.0. This command forces the build to use the
|
---|
| 85 | system installed <command>libtool</command> tools so that the shared library
|
---|
| 86 | is created correctly.</para>
|
---|
| 87 |
|
---|
| 88 | <para><command>autoreconf -f</command>: This command recreates some of the
|
---|
| 89 | Autotools, required by running <command>libtoolize</command>.</para>
|
---|
| 90 |
|
---|
[aa9bc4f] | 91 | <para><option>--disable-build-docs</option>: This switch avoids building the
|
---|
[04af8b24] | 92 | documentation. If you wish to build the documentation, you may need to remove
|
---|
[aa9bc4f] | 93 | the <application>OpenSP</application> catalog definitions from the system
|
---|
[04af8b24] | 94 | <acronym>SGML</acronym> catalogs. Use the following command before building
|
---|
[aa9bc4f] | 95 | the package to accomplish this:</para>
|
---|
| 96 |
|
---|
[fa0eb91a] | 97 | <screen><userinput role='root'><command>sed -i.orig \
|
---|
[04af8b24] | 98 | -e "/CATALOG \/etc\/sgml\/OpenSP-1.5.1.cat/d" \
|
---|
| 99 | /etc/sgml/catalog \
|
---|
[aa9bc4f] | 100 | /etc/sgml/sgml-docbook.cat</command></userinput></screen>
|
---|
| 101 |
|
---|
[52d29f7] | 102 | </sect2>
|
---|
| 103 |
|
---|
| 104 | <sect2>
|
---|
| 105 | <title>Configuring <application>libusb</application></title>
|
---|
[aa9bc4f] | 106 |
|
---|
[52d29f7] | 107 | <para>libusb requires the usbfs kernel filesystem to be mounted on
|
---|
[2d935de] | 108 | <filename class="directory">/proc/bus/usb</filename>. Applications require the
|
---|
| 109 | files in this directory to be accessible to the user, sometimes for both
|
---|
| 110 | reading and writing. To restrict access to <acronym>USB</acronym> devices,
|
---|
| 111 | ensure the usb group exits on your system. If necessary, create the usb group
|
---|
| 112 | using the following command:</para>
|
---|
[aa9bc4f] | 113 |
|
---|
[fa0eb91a] | 114 | <screen><userinput role='root'><command>groupadd -g 14 usb</command></userinput></screen>
|
---|
[aa9bc4f] | 115 |
|
---|
[fa0eb91a] | 116 | <para id="libusb-kernel">Ensure that you have compiled the <quote>USB device
|
---|
| 117 | filesystem</quote> directly into the kernel or compiled it as a module
|
---|
| 118 | (listing the resulting <quote>usbcore</quote> module in the
|
---|
[e231e7c] | 119 | <filename>/etc/sysconfig/modules</filename> file). You should also have an
|
---|
| 120 | entry similar to the line below in your <filename>/etc/fstab</filename>
|
---|
| 121 | file:</para>
|
---|
[fa0eb91a] | 122 | <indexterm zone="libusb libusb-kernel">
|
---|
| 123 | <primary sortas="d-USB-device-filesystem">USB device filesystem</primary>
|
---|
| 124 | </indexterm>
|
---|
[2d935de] | 125 |
|
---|
[fa0eb91a] | 126 | <screen><userinput role='root'>usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0</userinput></screen>
|
---|
[2d935de] | 127 |
|
---|
[52d29f7] | 128 | </sect2>
|
---|
| 129 |
|
---|
| 130 | <sect2>
|
---|
| 131 | <title>Contents</title>
|
---|
[aa9bc4f] | 132 |
|
---|
[fa0eb91a] | 133 | <segmentedlist>
|
---|
| 134 | <segtitle>Installed Program</segtitle>
|
---|
| 135 | <segtitle>Installed Library</segtitle>
|
---|
| 136 | <segtitle>Installed Directory</segtitle>
|
---|
| 137 |
|
---|
| 138 | <seglistitem>
|
---|
| 139 | <seg>usb-config</seg>
|
---|
| 140 | <seg>libusb.[so,a]</seg>
|
---|
| 141 | <seg>/usr/share/doc/libusb-&libusb-version;</seg>
|
---|
| 142 | </seglistitem>
|
---|
| 143 | </segmentedlist>
|
---|
| 144 |
|
---|
| 145 | <variablelist>
|
---|
| 146 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 147 | <?dbfo list-presentation="list"?>
|
---|
| 148 |
|
---|
| 149 | <varlistentry id="usb-config">
|
---|
| 150 | <term><command>usb-config</command></term>
|
---|
| 151 | <listitem><para>is a script that provides the right compiler and linker
|
---|
| 152 | flags for programs using
|
---|
| 153 | <filename class='libraryfile'>libusb</filename>.</para>
|
---|
| 154 | <indexterm zone="libusb usb-config">
|
---|
| 155 | <primary sortas="b-usb-config">usb-config</primary>
|
---|
| 156 | </indexterm></listitem>
|
---|
| 157 | </varlistentry>
|
---|
| 158 |
|
---|
| 159 | <varlistentry id="libusb-lib">
|
---|
| 160 | <term><filename class='libraryfile'>libusb.[so,a]</filename></term>
|
---|
| 161 | <listitem><para> libraries contain C functions for accessing
|
---|
| 162 | <acronym>USB</acronym> hardware.</para>
|
---|
| 163 | <indexterm zone="libusb libusb-lib">
|
---|
| 164 | <primary sortas="c-libusb">libusb.[so,a]</primary>
|
---|
| 165 | </indexterm></listitem>
|
---|
| 166 | </varlistentry>
|
---|
| 167 | </variablelist>
|
---|
[aa9bc4f] | 168 |
|
---|
[52d29f7] | 169 | </sect2>
|
---|
[bdf5806e] | 170 |
|
---|
| 171 | </sect1>
|
---|
[52d29f7] | 172 |
|
---|