Difference between revisions of "PCI Utilities"

From CBLFS
Jump to navigationJump to search
 
(22 intermediate revisions by 8 users not shown)
Line 2: Line 2:
 
|-valign="top"
 
|-valign="top"
 
!Download Source:
 
!Download Source:
| http://www.kernel.org/pub/software/utils/pciutils/pciutils-{{PCI Utilities-Version}}.tar.bz2
+
| ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/pciutils-{{PCI Utilities-Version}}.tar.gz
 
|}
 
|}
  
 
----
 
----
  
== Introduction to PCI Utilities ==
+
{{Package-Introduction|PCI Utilities are various utilities that allow inspection and setting of devices connected to the PCI bus.|http://mj.ucw.cz/sw/pciutils/}}
  
The PCI Utilities package is a set of programs for listing PCI devices, inspecting their status and setting their configuration registers.
+
== Dependencies ==
 +
 
 +
=== Required ===
 +
* [[wget]] or [[curl]] for update-pciids
 +
* [[which]] for update-pciids
  
== Dependencies ==
+
=== Optional ===
 +
* [[pkg-config]]
  
 
== Non-Multilib ==
 
== Non-Multilib ==
Line 17: Line 22:
 
Compile the package:
 
Compile the package:
  
sed -i 's/null ;/null 2>\&1 ;/' update-pciids.sh &&
+
  make PREFIX=/usr CC="gcc -fPIC" ZLIB=no SHARED=yes
  make PREFIX=/usr
 
  
 
Install the package
 
Install the package
  
  make PREFIX=/usr install
+
  make PREFIX=/usr SHARED=yes install
  
Some packages require the PCI static library. To install the library and headers, issue the following commands:
+
Some packages require the PCI static library. To install the library and headers, issue the following command:
  
  install -v -m 755 -d /usr/include/pci &&
+
  make PREFIX=/usr SHARED=yes install-lib
install -v -m 644 lib/libpci.a /usr/lib &&
 
install -v -m 644 lib/*.h /usr/include/pci
 
  
 
=== Command Explanations ===
 
=== Command Explanations ===
  
'''sed -i 's/null ;/null 2>\&1 ;/' update-pciids.sh''': This command suppresses some unneeded screen output from the '''update-pciids''' command if you don't have either Lynx or Wget installed by redirecting the stderr output of the embedded '''which''' command to /dev/null.
+
'''ZLIB=no''': This will make the '''pci.ids''' file usable for anything that expects an uncompressed version of the '''pci.ids''' file. Without this command the file would be called '''pci.ids.gz''', which is not compatbile with some programs. Compression of '''pci.ids''' was added with the 2.2.4 release.
 +
If compressed support is enabled by '''ZLIB=yes''', pciutils will use pci.ids.gz in preference to pci.ids, even if the
 +
pci.ids file is newer. If the pci.ids.gz file is missing, it will use pci.ids instead.
 +
You can turn on compression support and uncompress '''pci.ids.gz''' to '''pci.ids''' after every update manually.
  
 
== Multilib ==
 
== Multilib ==
Line 40: Line 45:
 
Compile the package:
 
Compile the package:
  
sed -i 's/null ;/null 2>\&1 ;/' update-pciids.sh &&
+
  make PREFIX=/usr CC="gcc ${BUILD32} -fPIC" ZLIB=no SHARED=yes
  make PREFIX=/usr CC="gcc ${BUILD32}"
 
  
 
Install the package
 
Install the package
  
  make PREFIX=/usr install
+
  make PREFIX=/usr SHARED=yes install
  
 
Some packages require the PCI static library. To install the library and headers, issue the following commands:
 
Some packages require the PCI static library. To install the library and headers, issue the following commands:
  
  install -v -m 755 -d /usr/include/pci &&
+
  make PREFIX=/usr SHARED=yes install-lib
install -v -m 644 lib/libpci.a /usr/lib &&
 
install -v -m 644 lib/*.h /usr/include/pci
 
  
 
=== N32 ===
 
=== N32 ===
Line 57: Line 59:
 
Compile the package:
 
Compile the package:
  
sed -i 's/null ;/null 2>\&1 ;/' update-pciids.sh &&
+
  make PREFIX=/usr LIBDIR=/usr/lib32 CC="gcc ${BUILDN32} -fPIC" ZLIB=no SHARED=yes
  make PREFIX=/usr CC="gcc ${BUILDN32}"
 
  
 
Install the package
 
Install the package
  
  make PREFIX=/usr install
+
  make PREFIX=/usr LIBDIR=/usr/lib32 SHARED=yes install
  
Some packages require the PCI static library. To install the library and headers, issue the following commands:
+
Some packages require the PCI static library. To install the library and headers, issue the following command:
  
  install -v -m 755 -d /usr/include/pci &&
+
  make PREFIX=/usr LIBDIR=/usr/lib32 SHARED=yes install-lib
install -v -m 644 lib/libpci.a /usr/lib32 &&
 
install -v -m 644 lib/*.h /usr/include/pci
 
  
 
=== 64Bit ===
 
=== 64Bit ===
Line 74: Line 73:
 
Compile the package:
 
Compile the package:
  
sed -i 's/null ;/null 2>\&1 ;/' update-pciids.sh &&
+
  make PREFIX=/usr LIBDIR=/usr/lib64 CC="gcc ${BUILD64} -fPIC" ZLIB=no SHARED=yes
  make PREFIX=/usr CC="gcc ${BUILD64}"
 
  
 
Install the package
 
Install the package
  
  make PREFIX=/usr install
+
  make PREFIX=/usr LIBDIR=/usr/lib64 SHARED=yes install
  
Some packages require the PCI static library. To install the library and headers, issue the following commands:
+
Some packages require the PCI static library. To install the library and headers, issue the following command:
  
  install -v -m 755 -d /usr/include/pci &&
+
  make PREFIX=/usr LIBDIR=/usr/lib64 SHARED=yes install-lib
install -v -m 644 lib/libpci.a /usr/lib64 &&
 
install -v -m 644 lib/*.h /usr/include/pci
 
  
 
== Configuring ==
 
== Configuring ==
Line 123: Line 119:
 
| is the static library that allows applications to access the PCI subsystem.
 
| is the static library that allows applications to access the PCI subsystem.
 
|}
 
|}
 +
 +
[[Category:General Utilities]]

Latest revision as of 16:37, 18 February 2013

Download Source: ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/pciutils-3.1.10.tar.gz

Introduction to PCI Utilities

PCI Utilities are various utilities that allow inspection and setting of devices connected to the PCI bus.

Project Homepage: http://mj.ucw.cz/sw/pciutils/

Dependencies

Required

Optional

Non-Multilib

Compile the package:

make PREFIX=/usr CC="gcc -fPIC" ZLIB=no SHARED=yes

Install the package

make PREFIX=/usr SHARED=yes install

Some packages require the PCI static library. To install the library and headers, issue the following command:

make PREFIX=/usr SHARED=yes install-lib

Command Explanations

ZLIB=no: This will make the pci.ids file usable for anything that expects an uncompressed version of the pci.ids file. Without this command the file would be called pci.ids.gz, which is not compatbile with some programs. Compression of pci.ids was added with the 2.2.4 release. If compressed support is enabled by ZLIB=yes, pciutils will use pci.ids.gz in preference to pci.ids, even if the pci.ids file is newer. If the pci.ids.gz file is missing, it will use pci.ids instead. You can turn on compression support and uncompress pci.ids.gz to pci.ids after every update manually.

Multilib

32Bit

Compile the package:

make PREFIX=/usr CC="gcc ${BUILD32} -fPIC" ZLIB=no SHARED=yes

Install the package

make PREFIX=/usr SHARED=yes install

Some packages require the PCI static library. To install the library and headers, issue the following commands:

make PREFIX=/usr SHARED=yes install-lib

N32

Compile the package:

make PREFIX=/usr LIBDIR=/usr/lib32 CC="gcc ${BUILDN32} -fPIC" ZLIB=no SHARED=yes

Install the package

make PREFIX=/usr LIBDIR=/usr/lib32 SHARED=yes install

Some packages require the PCI static library. To install the library and headers, issue the following command:

make PREFIX=/usr LIBDIR=/usr/lib32 SHARED=yes install-lib

64Bit

Compile the package:

make PREFIX=/usr LIBDIR=/usr/lib64 CC="gcc ${BUILD64} -fPIC" ZLIB=no SHARED=yes

Install the package

make PREFIX=/usr LIBDIR=/usr/lib64 SHARED=yes install

Some packages require the PCI static library. To install the library and headers, issue the following command:

make PREFIX=/usr LIBDIR=/usr/lib64 SHARED=yes install-lib

Configuring

pci.ids

The pci.ids data file is constantly being updated. To get a current version of this file run update-pciids. This program requires Which to find Curl, Wget, or Lynx which is used to download the most current file.

Contents

Installed Programs: lspci, setpci and update-pciids
Installed Libraries: libpci.a
Installed Directories: /usr/include/pci

Short Descriptions

lspci is a utility for displaying information about all PCI buses in the system and all devices connected to them.
setpci is a utility for querying and configuring PCI devices.
update-pciids fetches the current version of the PCI ID list. Requires Curl, Wget or Lynx.
libpci.a is the static library that allows applications to access the PCI subsystem.