<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;

  <!ENTITY pciutils-download-http "https://ftp.kernel.org/pub/software/utils/pciutils/pciutils-&pciutils-version;.tar.xz">
  <!ENTITY pciutils-download-ftp  "ftp://ftp.kernel.org/pub/software/utils/pciutils/pciutils-&pciutils-version;.tar.xz">
  <!ENTITY pciutils-md5sum        "3c19adf32a8457983b71ff376ef7dafe">
  <!ENTITY pciutils-size          "300 KB">
  <!ENTITY pciutils-buildsize     "3.3 MB">
  <!ENTITY pciutils-time          "less than 0.1 SBU">
]>

<sect1 id="pciutils" xreflabel="pciutils-&pciutils-version;">
  <?dbhtml filename="pciutils.html"?>

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2015-02-25 17:44:17 -0500 (Wed, 25 Feb 2015) $</date>
  </sect1info>

  <title>pciutils-&pciutils-version;</title>

  <indexterm zone="pciutils">
    <primary sortas="a-pciutils">pciutils</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to PCI Utils</title>

    <para>
      The <application>PCI Utils</application> package contains
      a set of programs for listing PCI devices, inspecting
      their status and setting their configuration registers.
    </para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Download (HTTP): <ulink url="&pciutils-download-http;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download (FTP): <ulink url="&pciutils-download-ftp;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download MD5 sum: &pciutils-md5sum;
        </para>
      </listitem>
      <listitem>
        <para>
          Download size: &pciutils-size;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated disk space required: &pciutils-buildsize;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated build time: &pciutils-time;
        </para>
      </listitem>
    </itemizedlist>

    <para condition="html" role="usernotes">User Notes:
      <ulink url="&blfs-wiki;/pciutils"/>
    </para>
  </sect2>

  <sect2 role="installation">
    <title>Installation of PCI Utils</title>
    <para> </para>
  </sect2>
  
  <sect2 role="installatrion">
    <title>32-bit Installation</title>
    <para>
      Install <application>PCI Utils</application> by
      running the following commands:
    </para>

<screen><userinput>make PREFIX=/usr              \
     LIBDIR=/usr/lib32        \
     SHAREDIR=/usr/share/misc \
     SHARED=yes               \
     CC="gcc -m32"</userinput></screen>

    <para>
      This package does not come with a test suite.
    </para>

    <para>
      Now, as the <systemitem class="username">root</systemitem> user:
    </para>

<screen role="root"><userinput>make PREFIX=/usr              \
     LIBDIR=/usr/lib32        \
     SHAREDIR=/usr/share/misc \
     SHARED=yes               \
     install install-lib      &amp;&amp;

chmod -v 755 /usr/lib32/libpci.so</userinput></screen>

<para>Clean up the build directory before moving on to the next platform:</para>
<screen><userinput>make clean</userinput></screen>

  </sect2>

  <sect2 role="installatrion">
    <title>x32 ABI Installation</title>
    <para>
      Install <application>PCI Utils</application> by
      running the following commands:
    </para>

<screen><userinput>make PREFIX=/usr              \
     LIBDIR=/usr/libx32       \
     SHAREDIR=/usr/share/misc \
     SHARED=yes               \
     CC="gcc -mx32"</userinput></screen>

    <para>
      This package does not come with a test suite.
    </para>

    <para>
      Now, as the <systemitem class="username">root</systemitem> user:
    </para>

<screen role="root"><userinput>make PREFIX=/usr              \
     LIBDIR=/usr/libx32       \
     SHAREDIR=/usr/share/misc \
     SHARED=yes               \
     install install-lib      &amp;&amp;

chmod -v 755 /usr/libx32/libpci.so</userinput></screen>

<para>Clean up the build directory before moving on to the next platform:</para>
<screen><userinput>make clean</userinput></screen>

  </sect2>

  <sect2 role="installatrion">
    <title>64-bit Installation</title>
    <para>
      Install <application>PCI Utils</application> by
      running the following commands:
    </para>

<screen><userinput>make PREFIX=/usr              \
     SHAREDIR=/usr/share/misc \
     SHARED=yes</userinput></screen>

    <para>
      This package does not come with a test suite.
    </para>

    <para>
      Now, as the <systemitem class="username">root</systemitem> user:
    </para>

<screen role="root"><userinput>make PREFIX=/usr              \
     SHAREDIR=/usr/share/misc \
     SHARED=yes               \
     install install-lib      &amp;&amp;

chmod -v 755 /usr/lib/libpci.so</userinput></screen>

  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <para>
      <parameter>SHARED=yes</parameter>: This parameter enables building of
      shared library instead of static one.
    </para>

    <para>
      <option>ZLIB=no</option>: This option prevents compression of
      the <filename>pci.ids</filename> file.
    </para>

  </sect2>

  <sect2 role="configuration">
    <title>Configuring PCI Utils</title>

    <para>
      The <filename>pci.ids</filename> data file is constantly being
      updated. To get a current version of this file, run
      <command>update-pciids</command> as the <systemitem
      class="username">root</systemitem> user. This program requires the
      <xref linkend="which"/> script or program to find <xref linkend="curl"/>,
      <xref linkend="lynx"/> or <xref linkend="wget"/> which are used to
      download the most current file, and then replace the existing file in
      <filename class="directory">/usr/share/misc</filename>.
    </para>

    <para>
      You may wish to add an entry to
      <systemitem class="username">root</systemitem>'s (or any other user who has
      write privilege to <filename class="directory">/usr/share/misc</filename>)
      crontab to automatically update the <filename>pci.ids</filename> file
      periodically.
    </para>

  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Library</segtitle>
      <segtitle>Installed Directory</segtitle>

      <seglistitem>
        <seg>
          lspci, setpci and update-pciids
        </seg>
        <seg>
          libpci.so
        </seg>
        <seg>
          /usr/include/pci
        </seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="lspci">
        <term><command>lspci</command></term>
        <listitem>
          <para>
            is an utility for displaying information about all PCI buses
            in the system and all devices connected to them.
          </para>
          <indexterm zone="pciutils lspci">
            <primary sortas="b-lspci">lspci</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="setpci">
        <term><command>setpci</command></term>
        <listitem>
          <para>
            is an utility for querying and configuring PCI devices.
          </para>
          <indexterm zone="pciutils setpci">
            <primary sortas="b-setpci">setpci</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="update-pciids">
        <term><command>update-pciids</command></term>
        <listitem>
          <para>
            fetches the current version of the PCI ID list. Requires
            <xref linkend="curl"/>, <xref linkend="lynx"/> or
            <xref linkend="wget"/>.
          </para>
          <indexterm zone="pciutils update-pciids">
            <primary sortas="b-update-pciids">update-pciids</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libpci">
      <term><filename class="libraryfile">libpci.so</filename></term>
      <listitem>
        <para>
          is library that allows applications to access the PCI
          subsystem.
        </para>
        <indexterm zone="pciutils libpci">
          <primary sortas="c-libpci">libpci.so</primary>
        </indexterm>
      </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
