[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 | ]>
|
---|
| 14 |
|
---|
[bdf5806e] | 15 | <sect1 id="libusb" xreflabel="libusb-&libusb-version;">
|
---|
| 16 | <?dbhtml filename="libusb.html"?>
|
---|
| 17 | <title>libusb-&libusb-version;</title>
|
---|
| 18 |
|
---|
[52d29f7] | 19 | <sect2>
|
---|
| 20 | <title>Introduction to <application>libusb</application></title>
|
---|
| 21 |
|
---|
| 22 | <para>The <application>libusb</application> package contains a library
|
---|
| 23 | used by some applications for <acronym>USB</acronym> device access.</para>
|
---|
| 24 |
|
---|
| 25 | <sect3><title>Package information</title>
|
---|
| 26 | <itemizedlist spacing='compact'>
|
---|
| 27 | <listitem><para>Download (HTTP): <ulink url="&libusb-download-http;"/></para></listitem>
|
---|
| 28 | <listitem><para>Download (FTP): <ulink url="&libusb-download-ftp;"/></para></listitem>
|
---|
| 29 | <listitem><para>Download size: &libusb-size;</para></listitem>
|
---|
| 30 | <listitem><para>Estimated Disk space required: &libusb-buildsize;</para></listitem>
|
---|
| 31 | <listitem><para>Estimated build time: &libusb-time;</para></listitem></itemizedlist>
|
---|
| 32 | </sect3>
|
---|
| 33 |
|
---|
| 34 | <sect3><title><application>libusb</application> dependencies</title>
|
---|
| 35 | <sect4><title>Optional</title>
|
---|
| 36 | <para><xref linkend="openjade"/> and <xref linkend="sgml-dtd-3"/></para></sect4>
|
---|
| 37 | </sect3>
|
---|
| 38 |
|
---|
| 39 | </sect2>
|
---|
| 40 |
|
---|
| 41 | <sect2>
|
---|
| 42 | <title>Installation of <application>libusb</application></title>
|
---|
| 43 |
|
---|
| 44 | <para>Install <application>libusb</application> by running the following commands:</para>
|
---|
| 45 |
|
---|
| 46 | <screen><userinput><command>./configure --prefix=/usr --disable-build-docs &&
|
---|
| 47 | make &&
|
---|
| 48 | make install</command></userinput></screen>
|
---|
| 49 |
|
---|
| 50 | </sect2>
|
---|
| 51 |
|
---|
| 52 | <sect2>
|
---|
| 53 | <title>Command explanations</title>
|
---|
| 54 |
|
---|
| 55 | <para><parameter>--disable-build-docs</parameter>: This switch turns off
|
---|
| 56 | the default enabled building of documentation since it requires
|
---|
| 57 | <application>OpenJade</application>.</para>
|
---|
| 58 | </sect2>
|
---|
| 59 |
|
---|
| 60 | <sect2>
|
---|
| 61 | <title>Configuring <application>libusb</application></title>
|
---|
| 62 |
|
---|
| 63 | <!-- To be reviewed when hotplug enters the LFS book -->
|
---|
| 64 |
|
---|
| 65 | <para>libusb requires the usbfs kernel filesystem to be mounted on
|
---|
| 66 | <filename class="directory">/proc/bus/usb</filename>. Applications
|
---|
| 67 | require the files in this directory to be accessible to the user,
|
---|
| 68 | sometimes for both reading and writing.</para>
|
---|
| 69 |
|
---|
| 70 | <para>To restrict access to <acronym>USB</acronym> devices, create the
|
---|
| 71 | usb group:</para>
|
---|
| 72 |
|
---|
| 73 | <screen><userinput><command>groupadd -g 15 usb</command></userinput></screen>
|
---|
| 74 |
|
---|
| 75 | <para>To get usbfs mounted on boot, we will create a special init script,
|
---|
| 76 | because just putting an extra line into
|
---|
| 77 | <filename>/etc/fstab</filename> does not work for those who compiled
|
---|
| 78 | "USB device filesystem" as a kernel module.
|
---|
| 79 | Install <filename>/etc/rc.d/init.d/usb</filename>
|
---|
| 80 | init script included in the
|
---|
| 81 | <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
| 82 |
|
---|
| 83 |
|
---|
| 84 | <screen><userinput><command>make install-usb</command></userinput></screen>
|
---|
| 85 |
|
---|
| 86 | </sect2>
|
---|
| 87 |
|
---|
| 88 | <sect2>
|
---|
| 89 | <title>Contents</title>
|
---|
| 90 |
|
---|
| 91 | <para>The <application>libusb</application> package contains
|
---|
| 92 | <filename class="libraryfile">libusb</filename> libraries,
|
---|
| 93 | the <filename>/usr/include/usb.h</filename> header,
|
---|
| 94 | and a <command>usb-config</command> script.</para>
|
---|
| 95 |
|
---|
| 96 | </sect2>
|
---|
| 97 |
|
---|
| 98 | <sect2><title>Description</title>
|
---|
| 99 |
|
---|
| 100 | <sect3><title>libusb libraries</title>
|
---|
| 101 | <para><filename class="libraryfile">libusb</filename> libraries contain C functions for
|
---|
| 102 | accessing <acronym>USB</acronym> hardware.</para></sect3>
|
---|
| 103 |
|
---|
| 104 | <sect3><title>usb-config</title>
|
---|
| 105 | <para>The <command>usb-config</command> script provides the right
|
---|
| 106 | compiler and linker flags for programs using
|
---|
| 107 | this library.</para></sect3>
|
---|
| 108 |
|
---|
| 109 | </sect2>
|
---|
[bdf5806e] | 110 |
|
---|
| 111 | </sect1>
|
---|
[52d29f7] | 112 |
|
---|