[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 " ">
|
---|
| 9 | <!ENTITY libusb-size "314 KB">
|
---|
| 10 | <!ENTITY libusb-buildsize "2.1 MB">
|
---|
| 11 | <!ENTITY libusb-time "0.03 SBU">
|
---|
| 12 | ]>
|
---|
| 13 |
|
---|
[bdf5806e] | 14 | <sect1 id="libusb" xreflabel="libusb-&libusb-version;">
|
---|
[a0f03b0] | 15 | <sect1info>
|
---|
[5cd0959d] | 16 | <othername>$LastChangedBy$</othername>
|
---|
| 17 | <date>$Date$</date>
|
---|
[a0f03b0] | 18 | </sect1info>
|
---|
[bdf5806e] | 19 | <?dbhtml filename="libusb.html"?>
|
---|
| 20 | <title>libusb-&libusb-version;</title>
|
---|
| 21 |
|
---|
[52d29f7] | 22 | <sect2>
|
---|
| 23 | <title>Introduction to <application>libusb</application></title>
|
---|
[aa9bc4f] | 24 |
|
---|
[52d29f7] | 25 | <para>The <application>libusb</application> package contains a library
|
---|
| 26 | used by some applications for <acronym>USB</acronym> device access.</para>
|
---|
[aa9bc4f] | 27 |
|
---|
[52d29f7] | 28 | <sect3><title>Package information</title>
|
---|
| 29 | <itemizedlist spacing='compact'>
|
---|
| 30 | <listitem><para>Download (HTTP): <ulink url="&libusb-download-http;"/></para></listitem>
|
---|
| 31 | <listitem><para>Download (FTP): <ulink url="&libusb-download-ftp;"/></para></listitem>
|
---|
| 32 | <listitem><para>Download size: &libusb-size;</para></listitem>
|
---|
| 33 | <listitem><para>Estimated Disk space required: &libusb-buildsize;</para></listitem>
|
---|
| 34 | <listitem><para>Estimated build time: &libusb-time;</para></listitem></itemizedlist>
|
---|
| 35 | </sect3>
|
---|
[aa9bc4f] | 36 |
|
---|
[52d29f7] | 37 | <sect3><title><application>libusb</application> dependencies</title>
|
---|
| 38 | <sect4><title>Optional</title>
|
---|
| 39 | <para><xref linkend="openjade"/> and <xref linkend="sgml-dtd-3"/></para></sect4>
|
---|
| 40 | </sect3>
|
---|
[aa9bc4f] | 41 |
|
---|
[52d29f7] | 42 | </sect2>
|
---|
| 43 |
|
---|
| 44 | <sect2>
|
---|
| 45 | <title>Installation of <application>libusb</application></title>
|
---|
[aa9bc4f] | 46 |
|
---|
| 47 | <para>Install <application>libusb</application> by running the following
|
---|
| 48 | commands:</para>
|
---|
| 49 |
|
---|
[52d29f7] | 50 | <screen><userinput><command>./configure --prefix=/usr --disable-build-docs &&
|
---|
| 51 | make &&
|
---|
| 52 | make install</command></userinput></screen>
|
---|
[aa9bc4f] | 53 |
|
---|
[52d29f7] | 54 | </sect2>
|
---|
| 55 |
|
---|
| 56 | <sect2>
|
---|
| 57 | <title>Command explanations</title>
|
---|
[aa9bc4f] | 58 |
|
---|
| 59 | <para><option>--disable-build-docs</option>: This switch avoids building the
|
---|
[04af8b24] | 60 | documentation. If you wish to build the documentation, you may need to remove
|
---|
[aa9bc4f] | 61 | the <application>OpenSP</application> catalog definitions from the system
|
---|
[04af8b24] | 62 | <acronym>SGML</acronym> catalogs. Use the following command before building
|
---|
[aa9bc4f] | 63 | the package to accomplish this:</para>
|
---|
| 64 |
|
---|
[04af8b24] | 65 | <screen><userinput><command>sed -i.orig \
|
---|
| 66 | -e "/CATALOG \/etc\/sgml\/OpenSP-1.5.1.cat/d" \
|
---|
| 67 | /etc/sgml/catalog \
|
---|
[aa9bc4f] | 68 | /etc/sgml/sgml-docbook.cat</command></userinput></screen>
|
---|
| 69 |
|
---|
[52d29f7] | 70 | </sect2>
|
---|
| 71 |
|
---|
| 72 | <sect2>
|
---|
| 73 | <title>Configuring <application>libusb</application></title>
|
---|
[aa9bc4f] | 74 |
|
---|
[52d29f7] | 75 | <para>libusb requires the usbfs kernel filesystem to be mounted on
|
---|
[2d935de] | 76 | <filename class="directory">/proc/bus/usb</filename>. Applications require the
|
---|
| 77 | files in this directory to be accessible to the user, sometimes for both
|
---|
| 78 | reading and writing. To restrict access to <acronym>USB</acronym> devices,
|
---|
| 79 | ensure the usb group exits on your system. If necessary, create the usb group
|
---|
| 80 | using the following command:</para>
|
---|
[aa9bc4f] | 81 |
|
---|
[2d935de] | 82 | <screen><userinput><command>groupadd -g 14 usb</command></userinput></screen>
|
---|
[aa9bc4f] | 83 |
|
---|
[e231e7c] | 84 | <!-- <para>Compiling the <quote>USB device filesystem</quote> as a kernel module is
|
---|
[2d935de] | 85 | not recommended. However, if you did compile it as a module, you can install an
|
---|
| 86 | init script to mount usbfs at system boot-up. An init script is included in the
|
---|
| 87 | <xref linkend="intro-important-bootscripts"/> package and is installed using
|
---|
| 88 | the following command:</para>
|
---|
[aa9bc4f] | 89 |
|
---|
[e231e7c] | 90 | <screen><userinput><command>make install-usb</command></userinput></screen> -->
|
---|
[aa9bc4f] | 91 |
|
---|
[e231e7c] | 92 | <para>Ensure that you have compiled the <quote>USB device filesystem</quote>
|
---|
| 93 | directly into the kernel or compiled it as a module (listing the resulting
|
---|
| 94 | <quote>usbcore</quote> module in the
|
---|
| 95 | <filename>/etc/sysconfig/modules</filename> file). You should also have an
|
---|
| 96 | entry similar to the line below in your <filename>/etc/fstab</filename>
|
---|
| 97 | file:</para>
|
---|
[2d935de] | 98 |
|
---|
| 99 | <screen><userinput>usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0</userinput></screen>
|
---|
| 100 |
|
---|
[52d29f7] | 101 | </sect2>
|
---|
| 102 |
|
---|
| 103 | <sect2>
|
---|
| 104 | <title>Contents</title>
|
---|
[aa9bc4f] | 105 |
|
---|
[52d29f7] | 106 | <para>The <application>libusb</application> package contains
|
---|
| 107 | <filename class="libraryfile">libusb</filename> libraries,
|
---|
| 108 | the <filename>/usr/include/usb.h</filename> header,
|
---|
| 109 | and a <command>usb-config</command> script.</para>
|
---|
[aa9bc4f] | 110 |
|
---|
[52d29f7] | 111 | </sect2>
|
---|
[aa9bc4f] | 112 |
|
---|
[52d29f7] | 113 | <sect2><title>Description</title>
|
---|
[aa9bc4f] | 114 |
|
---|
[52d29f7] | 115 | <sect3><title>libusb libraries</title>
|
---|
[aa9bc4f] | 116 | <para><filename class="libraryfile">libusb</filename> libraries contain C
|
---|
| 117 | functions for accessing <acronym>USB</acronym> hardware.</para></sect3>
|
---|
| 118 |
|
---|
[52d29f7] | 119 | <sect3><title>usb-config</title>
|
---|
| 120 | <para>The <command>usb-config</command> script provides the right
|
---|
[aa9bc4f] | 121 | compiler and linker flags for programs using this library.</para></sect3>
|
---|
| 122 |
|
---|
[52d29f7] | 123 | </sect2>
|
---|
[bdf5806e] | 124 |
|
---|
| 125 | </sect1>
|
---|
[52d29f7] | 126 |
|
---|