xref: /pciutils/README (revision 8d1cb3d7)
1This package contains the PCI Utilities, version @VERSION@.
2
3Copyright (c) 1997--2012 Martin Mares <[email protected]>
4
5All files in this package can be freely distributed and used according
6to the terms of the GNU General Public License, either version 2 or
7(at your opinion) any newer version. See http://www.gnu.org/ for details.
8
9
101. What's that?
11~~~~~~~~~~~~~~~
12The PCI Utilities package contains a library for portable access to PCI bus
13configuration registers and several utilities based on this library.
14
15In runs on the following systems:
16
17	Linux		(via /sys/bus/pci, /proc/bus/pci or i386 ports)
18	FreeBSD		(via /dev/pci)
19	NetBSD		(via libpci)
20	OpenBSD		(via /dev/pci)
21	GNU/kFreeBSD	(via /dev/pci)
22	Solaris/i386	(direct port access)
23	Aix		(via /dev/pci and odmget)
24	GNU Hurd	(direct port access)
25	Windows		(direct port access)
26	CYGWIN		(direct port access)
27	BeOS		(via syscalls)
28	Haiku		(via /dev/misc/poke)
29	Darwin		(via IOKit)
30
31It should be very easy to add support for other systems as well (volunteers
32wanted; if you want to try that, I'll be very glad to see the patches and
33include them in the next version).
34
35The utilities include:  (See manual pages for more details)
36
37  - lspci: displays detailed information about all PCI buses and devices.
38
39  - setpci: allows to read from and write to PCI device configuration
40    registers. For example, you can adjust the latency timers with it.
41    CAUTION: There is a couple of dangerous points and caveats, please read
42    the manual page first!
43
44  - update-pciids: download the current version of the pci.ids file.
45
46
472. Compiling and (un)installing
48~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
49Just run "make" to compile the package and then "make install" to install it.
50Please note that GNU make is needed on most platforms.
51
52If you want to change the default installation location, please override
53the PREFIX variable specified in the Makefile -- e.g., you can use
54"make PREFIX=/opt/pciutils install" to create a separate installation
55not interfering with the rest of your system.  Setting the DESTDIR variable
56will allow you to install to a different directory from the one you intend
57to eventually run it from.  This is useful for people who are packaging
58pciutils to install on other computers.
59
60There are several options which can be set in the Makefile or overridden
61when running make:
62
63  ZLIB=yes/no	Enable support for compressed pci.ids (requires zlib).
64		If it is enabled, pciutils will use pci.ids.gz in preference to
65		pci.ids, even if the pci.ids file is newer.  If the pci.ids.gz
66		file is missing, it will use pci.ids instead.  If you do not
67		specify this option, the configure script will try to guess
68		automatically based on the presence of zlib.
69
70  DNS=yes/no	Enable support for querying the central database of PCI IDs
71		using DNS.  Requires libresolv (which is available on most
72		systems as a part of the standard libraries) and tries to
73		autodetect its presence if the option is not specified.
74
75  SHARED=yes/	Build libpci as a shared library.  Requires GCC 4.0 or newer.
76  no/local	The ABI of the shared library is intended to remain backward
77		compatible for a long time (we use symbol versioning to achieve
78		that, like GNU libc does).  The value `local' includes the
79		right directory name in the binaries, so the utilities can be
80		run without installation.  This is not recommended for any
81		production builds.
82
83"make install-lib" installs the library together with its header files
84for use by other programs.
85
86When you are bored of dumping PCI registers, just use "make uninstall".
87
88
893. Getting new IDs
90~~~~~~~~~~~~~~~~~~~
91The database of PCI IDs (the pci.ids file) gets out of date much faster
92than I release new versions of this package, so it is maintained separately.
93
94It lives at http://pci-ids.ucw.cz/, where you can browse the database,
95download the most recent pci.ids file (e.g., by running the update-ids utility)
96and also submit new entries.
97
98Alternatively, you can use `lspci -q' to query the central database
99for new entries via network.
100
101The pci.ids file is also mirrored at http://pciids.sourceforge.net/
102
103
1044. Getting new versions
105~~~~~~~~~~~~~~~~~~~~~~~
106The current version of pciutils is available at:
107
108	http://mj.ucw.cz/sw/pciutils/
109
110The tarball can be downloaded at the following places:
111
112	ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/
113	ftp://ftp.kernel.org/pub/software/utils/pciutils/ (expect a couple of hours delay)
114	ftp://metalab.unc.edu/pub/Linux/hardware/ (expect a couple of days delay)
115
116There is also a public GIT tree at:
117
118	git://git.kernel.org/pub/scm/utils/pciutils/pciutils.git
119
120
1215. Using the library
122~~~~~~~~~~~~~~~~~~~~
123So far, there is only a little documentation for the library except for the
124general introduction in the pcilib(7) man page. If you want to use the
125library in your programs, please follow the comments in lib/pci.h and in
126the example program example.c.
127
128
1296. Feedback
130~~~~~~~~~~~
131If you have any bug reports or suggestions, send them to the author.
132
133If you have any new IDs, I'll be very glad to add them to the database.
134Just submit them at http://pci-ids.ucw.cz/.
135
136Announcements of new versions are sent to [email protected]
137(see http://vger.kernel.org/ for instructions).
138
139					Have fun
140							Martin
141