| 1 |
I2C TOOLS FOR LINUX |
| 2 |
=================== |
| 3 |
|
| 4 |
This package contains an heterogeneous set of I2C tools for the Linux kernel |
| 5 |
as well as an I2C library. The tools were originally part of the lm-sensors |
| 6 |
project but were finally split into their own package for convenience. The |
| 7 |
library is used by some of the tools, but can also be used by third-party |
| 8 |
applications. The tools and library compile, run and have been tested on |
| 9 |
GNU/Linux. |
| 10 |
|
| 11 |
The latest version of the code can be downloaded from: |
| 12 |
https://i2c.wiki.kernel.org/index.php/I2C_Tools |
| 13 |
|
| 14 |
|
| 15 |
CONTENTS |
| 16 |
-------- |
| 17 |
|
| 18 |
The various tools included in this package are grouped by category, each |
| 19 |
category has its own sub-directory: |
| 20 |
|
| 21 |
* eeprom |
| 22 |
Perl scripts for decoding different types of EEPROMs (SPD, EDID...) These |
| 23 |
scripts rely on the eeprom kernel drivers ("at24" and "ee1004", "eeprom" on |
| 24 |
older kernels). They are installed by default. |
| 25 |
|
| 26 |
* eeprog |
| 27 |
Tools for writing to EEPROMs. These tools rely on the "i2c-dev" kernel |
| 28 |
driver. They are not installed by default. |
| 29 |
|
| 30 |
* include |
| 31 |
C/C++ header files for I2C and SMBus access over i2c-dev. Installed by |
| 32 |
default. |
| 33 |
|
| 34 |
* lib |
| 35 |
The I2C library, used by eeprog, py-smbus and tools. Installed by |
| 36 |
default. |
| 37 |
|
| 38 |
* py-smbus |
| 39 |
Python wrapper for SMBus access over i2c-dev. Not installed by default. |
| 40 |
|
| 41 |
* stub |
| 42 |
A helper script to use with the i2c-stub kernel driver. Installed by |
| 43 |
default. |
| 44 |
|
| 45 |
* tools |
| 46 |
I2C device detection and register dump tools. These tools rely on the |
| 47 |
"i2c-dev" kernel driver. They are installed by default. |
| 48 |
|
| 49 |
|
| 50 |
LICENSE |
| 51 |
------- |
| 52 |
|
| 53 |
Check the documentation of individual tools for licensing information. |
| 54 |
The library is released under the LGPL version 2.1 or later, while most |
| 55 |
tools are released under the GPL version 2 or later, but there are a few |
| 56 |
exceptions. |
| 57 |
|
| 58 |
|
| 59 |
INSTALLATION |
| 60 |
------------ |
| 61 |
|
| 62 |
There's no configure script, so simply run "make" to build the library and |
| 63 |
tools, and "make install" to install them. You also can use "make uninstall" |
| 64 |
to remove all the files you installed. By default, files are installed in |
| 65 |
/usr/local but you can change the location by editing the Makefile file and |
| 66 |
setting PREFIX to wherever you want (or setting its value on the make |
| 67 |
command line). You may change the C compiler and the compilation flags as |
| 68 |
well, and also decide which flavors of the library will be built. |
| 69 |
|
| 70 |
In cases where you need to compile only the static or dynamic variant of |
| 71 |
the library, you can use BUILD_STATIC_LIB and BUILD_DYNAMIC_LIB at compile |
| 72 |
time: |
| 73 |
$ make BUILD_DYNAMIC_LIB=1 BUILD_STATIC_LIB=0 |
| 74 |
If you disable both, the compilation will abort with an error message. |
| 75 |
|
| 76 |
If you want to compile the tools against the static version of the library |
| 77 |
you can do: |
| 78 |
$ make USE_STATIC_LIB=1 |
| 79 |
|
| 80 |
Optionally, you can run "make strip" prior to "make install" if you want |
| 81 |
smaller binaries. However, be aware that this will prevent any further |
| 82 |
attempt to debug the library and tools. |
| 83 |
|
| 84 |
If you wish to include sub-directories that are not enabled by default, then |
| 85 |
just set them via the EXTRA make variable. For example, to build py-smbus, |
| 86 |
do: |
| 87 |
$ make EXTRA="py-smbus" |
| 88 |
|
| 89 |
|
| 90 |
DOCUMENTATION |
| 91 |
------------- |
| 92 |
|
| 93 |
The main tools have manual pages, which are installed by "make install". |
| 94 |
See these manual pages for command line interface details and tool specific |
| 95 |
information. |
| 96 |
|
| 97 |
The other tools come with simple text documentation, which isn't installed. |
| 98 |
|
| 99 |
|
| 100 |
QUESTIONS AND BUG REPORTS |
| 101 |
------------------------- |
| 102 |
|
| 103 |
Please post your questions and bug reports to the linux-i2c mailing list: |
| 104 |
[email protected] |
| 105 |
with Cc to the current maintainer: |
| 106 |
Jean Delvare <[email protected]> |
| 107 |
For additional information about this list, see: |
| 108 |
http://vger.kernel.org/vger-lists.html#linux-i2c |
| 109 |
|
| 110 |
CONTRIBUTIONS |
| 111 |
------------- |
| 112 |
|
| 113 |
Contributions are very welcome. Please send them to the linux-i2c mailing list |
| 114 |
mentioned above. Make sure they include a 'Developer's certificate of origin' |
| 115 |
as used for the Linux Kernel and described here: |
| 116 |
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin |