mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-02 22:07:15 +08:00
04af8b245c
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2834 af4574ff-66df-0310-9fd7-8a98e5e911e0
127 lines
4.6 KiB
XML
127 lines
4.6 KiB
XML
<?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">
|
|
]>
|
|
|
|
<sect1 id="libusb" xreflabel="libusb-&libusb-version;">
|
|
<sect1info>
|
|
<othername>$LastChangedBy$</othername>
|
|
<date>$Date$</date>
|
|
</sect1info>
|
|
<?dbhtml filename="libusb.html"?>
|
|
<title>libusb-&libusb-version;</title>
|
|
|
|
<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><option>--disable-build-docs</option>: This switch avoids building the
|
|
documentation. If you wish to build the documentation, you may need to remove
|
|
the <application>OpenSP</application> catalog definitions from the system
|
|
<acronym>SGML</acronym> catalogs. Use the following command before building
|
|
the package to accomplish this:</para>
|
|
|
|
<screen><userinput><command>sed -i.orig \
|
|
-e "/CATALOG \/etc\/sgml\/OpenSP-1.5.1.cat/d" \
|
|
/etc/sgml/catalog \
|
|
/etc/sgml/sgml-docbook.cat</command></userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2>
|
|
<title>Configuring <application>libusb</application></title>
|
|
|
|
<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. To restrict access to <acronym>USB</acronym> devices,
|
|
ensure the usb group exits on your system. If necessary, create the usb group
|
|
using the following command:</para>
|
|
|
|
<screen><userinput><command>groupadd -g 14 usb</command></userinput></screen>
|
|
|
|
<!-- <para>Compiling the <quote>USB device filesystem</quote> as a kernel module is
|
|
not recommended. However, if you did compile it as a module, you can install an
|
|
init script to mount usbfs at system boot-up. An init script is included in the
|
|
<xref linkend="intro-important-bootscripts"/> package and is installed using
|
|
the following command:</para>
|
|
|
|
<screen><userinput><command>make install-usb</command></userinput></screen> -->
|
|
|
|
<para>Ensure that you have compiled the <quote>USB device filesystem</quote>
|
|
directly into the kernel or compiled it as a module (listing the resulting
|
|
<quote>usbcore</quote> module in the
|
|
<filename>/etc/sysconfig/modules</filename> file). You should also have an
|
|
entry similar to the line below in your <filename>/etc/fstab</filename>
|
|
file:</para>
|
|
|
|
<screen><userinput>usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0</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>
|
|
|
|
</sect1>
|
|
|