2004-06-13 06:56:28 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
|
|
|
<!ENTITY libusb-download-http "http://prdownloads.sourceforge.net/libusb/libusb-&libusb-version;.tar.gz">
|
|
|
|
<!ENTITY libusb-download-ftp " ">
|
|
|
|
<!ENTITY libusb-size "314 KB">
|
|
|
|
<!ENTITY libusb-buildsize "2.1 MB">
|
|
|
|
<!ENTITY libusb-time "0.03 SBU">
|
|
|
|
|
|
|
|
]>
|
|
|
|
|
2004-05-10 22:58:36 +08:00
|
|
|
<sect1 id="libusb" xreflabel="libusb-&libusb-version;">
|
|
|
|
<?dbhtml filename="libusb.html"?>
|
|
|
|
<title>libusb-&libusb-version;</title>
|
|
|
|
|
2004-06-13 06:56:28 +08:00
|
|
|
<sect2>
|
|
|
|
<title>Introduction to <application>libusb</application></title>
|
|
|
|
|
|
|
|
<para>The <application>libusb</application> package contains a library
|
|
|
|
used by some applications for <acronym>USB</acronym> device access.</para>
|
|
|
|
|
|
|
|
<sect3><title>Package information</title>
|
|
|
|
<itemizedlist spacing='compact'>
|
|
|
|
<listitem><para>Download (HTTP): <ulink url="&libusb-download-http;"/></para></listitem>
|
|
|
|
<listitem><para>Download (FTP): <ulink url="&libusb-download-ftp;"/></para></listitem>
|
|
|
|
<listitem><para>Download size: &libusb-size;</para></listitem>
|
|
|
|
<listitem><para>Estimated Disk space required: &libusb-buildsize;</para></listitem>
|
|
|
|
<listitem><para>Estimated build time: &libusb-time;</para></listitem></itemizedlist>
|
|
|
|
</sect3>
|
|
|
|
|
|
|
|
<sect3><title><application>libusb</application> dependencies</title>
|
|
|
|
<sect4><title>Optional</title>
|
|
|
|
<para><xref linkend="openjade"/> and <xref linkend="sgml-dtd-3"/></para></sect4>
|
|
|
|
</sect3>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2>
|
|
|
|
<title>Installation of <application>libusb</application></title>
|
|
|
|
|
|
|
|
<para>Install <application>libusb</application> by running the following commands:</para>
|
|
|
|
|
|
|
|
<screen><userinput><command>./configure --prefix=/usr --disable-build-docs &&
|
|
|
|
make &&
|
|
|
|
make install</command></userinput></screen>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2>
|
|
|
|
<title>Command explanations</title>
|
|
|
|
|
|
|
|
<para><parameter>--disable-build-docs</parameter>: This switch turns off
|
|
|
|
the default enabled building of documentation since it requires
|
|
|
|
<application>OpenJade</application>.</para>
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2>
|
|
|
|
<title>Configuring <application>libusb</application></title>
|
|
|
|
|
|
|
|
<!-- To be reviewed when hotplug enters the LFS book -->
|
|
|
|
|
|
|
|
<para>libusb requires the usbfs kernel filesystem to be mounted on
|
|
|
|
<filename class="directory">/proc/bus/usb</filename>. Applications
|
|
|
|
require the files in this directory to be accessible to the user,
|
|
|
|
sometimes for both reading and writing.</para>
|
|
|
|
|
|
|
|
<para>To restrict access to <acronym>USB</acronym> devices, create the
|
|
|
|
usb group:</para>
|
|
|
|
|
|
|
|
<screen><userinput><command>groupadd -g 15 usb</command></userinput></screen>
|
|
|
|
|
|
|
|
<para>To get usbfs mounted on boot, we will create a special init script,
|
|
|
|
because just putting an extra line into
|
|
|
|
<filename>/etc/fstab</filename> does not work for those who compiled
|
|
|
|
"USB device filesystem" as a kernel module.
|
|
|
|
Install <filename>/etc/rc.d/init.d/usb</filename>
|
|
|
|
init script included in the
|
|
|
|
<xref linkend="intro-important-bootscripts"/> package.</para>
|
|
|
|
|
|
|
|
|
|
|
|
<screen><userinput><command>make install-usb</command></userinput></screen>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2>
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<para>The <application>libusb</application> package contains
|
|
|
|
<filename class="libraryfile">libusb</filename> libraries,
|
|
|
|
the <filename>/usr/include/usb.h</filename> header,
|
|
|
|
and a <command>usb-config</command> script.</para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2><title>Description</title>
|
|
|
|
|
|
|
|
<sect3><title>libusb libraries</title>
|
|
|
|
<para><filename class="libraryfile">libusb</filename> libraries contain C functions for
|
|
|
|
accessing <acronym>USB</acronym> hardware.</para></sect3>
|
|
|
|
|
|
|
|
<sect3><title>usb-config</title>
|
|
|
|
<para>The <command>usb-config</command> script provides the right
|
|
|
|
compiler and linker flags for programs using
|
|
|
|
this library.</para></sect3>
|
|
|
|
|
|
|
|
</sect2>
|
2004-05-10 22:58:36 +08:00
|
|
|
|
|
|
|
</sect1>
|
2004-06-13 06:56:28 +08:00
|
|
|
|