root/lm-sensors/tags/V2-3-0/INSTALL

Revision 408, 8.0 kB (checked in by frodo, 10 years ago)

Many documentation updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 Please read this file thoroughly before you try to install and run things. It
2 will safe you many headaches. Installation is not really difficult, but there
3 are a few pitfalls.
4
5 ALWAYS READ THE `BUGS' FILE! This file contains a list of known
6 incompatibilities with this package. Most are highly kernel-dependent and
7 usually not fatal, but still.
8
9 COMPILATION AND INSTALLATION
10 ============================
11
12 Basic installation is uncomplicated. Run 'make all', followed by an optional
13 'make install'. Everything is compiled using the Makefile in the root of
14 this package.
15
16 You need flex and bison (reportedly a version newer than 1.22). You must
17 also make sure you have all kernel headers installed properly, including
18 the ones created during the kernel compilation. Some of the additional
19 programs in the prog/ subdirectory need Perl and GAWK to run, but you
20 don't need them to use this package. And you need a fully working compilation
21 environment, of course; the program should compile against both libc5
22 and glibc2. Like always, we recommend gcc-2.7.2.3 as the compiler for
23 kernel modules, but 2.8.1 and any non-buggy egcs version will very
24 probably work too. The modules in this package should work with any 2.0,
25 2.1 or 2.2 kernel.
26
27 Some interesting Makefile variables:
28
29 * SMP
30   This must be set to 1 if your kernel was compiled with SMP set to 1. There
31   is a sort of magic invocation which tries to check this; it will fail if
32   you do not have the correct kernel tree in /usr/src/linux. If you set it,
33   a '-D__SMP__' argument will be added to all module compiles.
34 * MODVER
35   This must be set to 1 if your kernel was compiled with CONFIG_MODVERSIONS
36   enabled. There is some magic which tries to retrieve this information
37   from /usr/include/linux/config.h and /usr/include/linux/autoconf.h.
38 * I2C
39   If you already have Simon Vogl's i2c package installed, you may not have
40   to compile the version included in this package. In that case, check
41   the file i2c/MODIFICATIONS in this package to see what versions are
42   safe.
43 * WARN, DEBUG
44   These options should only be needed if you are an active developer of
45   this package.
46 * PREFIX (/usr/local)
47   The prefix which is added to most directory locations below.
48 * MODDIR (/lib/modules/extra/misc)
49   The directory where 'make install' installs your modules.
50 * ETCDIR (/etc)
51   The directory where 'make install' installs the example configuration file
52   if none is found there.
53 * LIBDIR ($(PREFIX)/lib)
54   The directory where 'make install' installs the shared and static libraries.
55 * BINDIR ($(PREFIX)/bin)
56   The directory where 'make install' installs all executables.
57 * SBINDIR ($(PREFIX)/sbin)
58   The directory where 'make install' installs all system programs (programs
59   which can only be run by root).
60 * INCLUDEDIR ($(PREFIX)/include)
61   The base directory where 'make install' installs your include files.
62   Actually, SYSINCLUDEDIR ($(INCLUDEDIR)/linux) is used for kernel header
63   files, and LIBINCLUDEDIR ($(INCLUDEDIR)/sensors) is used for library
64   header files.
65 * MANDIR ($(PREFIX)/man)
66   The base directory where manual pages are installed.
67 * MANOWN, MANGRP (root, root)
68   Owner and group of installed manual pages
69
70 Warning! In 2.2 and newer 2.1 kernels, there is support for I2C. This support
71 is NOT compatible with this module! Actually, Simon Vogl's modules package
72 (which IS compatible) is scheduled to replace the current support. If you
73 actually use these modules, you have a problem; they can not coexist
74 with Simon's modules. Theoretically, you should be able to replace
75 the old modules in the kernel tree with the new stuff in our i2c directory,
76 recompile the kernel, and then compile our modules with I2C=0. If you try
77 this, please share the results with us! There have also been some rumors
78 about the peaceful coexistence of both sets of modules, but others found
79 some problems with it.
80
81 Please make sure that /usr/include/linux and /usr/include/asm are symlinks
82 into the kernel tree which corresponds with the kernel version you are using
83 now (or more exactly, the kernel which you will use the compiled modules
84 with). If the tree and the running kernel do not match, you will either
85 be unable to insert the modules at all, or you can expect strange
86 behaviour (probably leading to crashes).
87
88 If you do a 'make install', remember to do a 'depmod -a' and a 'ldconfig'
89 to make sure the new modules and shared libraries are recognized.
90
91
92 TESTING AND RUNNING
93 ===================
94
95 When you have compiled this package, you will be left with a lot of modules.
96 It can be tricky to know which modules you need to insert. For this reason,
97 I suggest you go the 'modprobe' way, as described within doc/modules.
98
99 If you just want to run a test without installing them, try the following:
100   insmod i2c/i2c-core.o
101   insmod kernel/smbus.o
102   insmod kernel/i2c-proc.o
103   insmod kernel/i2c-dev.o
104   insmod kernel/sensors.o
105   insmod kernel/busses/i2c-isa.o
106   insmod kernel/busses/i2c-piix4.o # Or whatever SMBus controller you have
107   insmod kernel/chips/lm78.o   # Or whatever hardware monitoring chip you have
108 Now you should have new directories under /proc/sys/dev/sensors and some files
109 beginning with i2c in /proc/bus.
110
111 If you have installed the modules, as described within doc/modules, you can
112 do:
113   modprobe i2c-isa && modprobe i2c-piix4 && modprobe lm78 && modprobe i2c-proc
114 (the last is optional) from any directory to reach the same situation.
115
116 But instead of doing any of the above things, please read doc/modules and
117 do a 'make install'. After that, you can run 'sensors-detect'. This Perl
118 program will detect all hardware available on your system, and tell you
119 what drivers you need to insert. First check whether you have /dev/i2c-*
120 files (at least 4 of them), and if not, create them by running 'mkdev.sh'
121 in directory prog/mkdev.
122
123 Do not panic if some (or all) of the values in the /proc/sys/dev/sensors/*/*
124 files do not seem to correspond to anything in earlier versions. Starting
125 with lm_sensors version 2.1.0, these files will reflect the real chip
126 measurements, without any scaling or adjusting. This is most obvious for
127 the voltage files. You can specify the conversion factors in a configuration
128 file.  Use an application linked to libsensors to read these real values.
129
130 This package contains a library of functions which can be used to
131 access sensor data in a more programmer-friendly way. It will be built as
132 both a shared and a static library, and installed in your LIB directory
133 (normally /usr/local/lib). It needs a configuration file, which is usually
134 called 'sensors.conf', and can be placed in /etc, /usr/lib/sensors,
135 /usr/local/lib/sensors, /usr/lib, or /usr/local/lib.
136
137 Note that if you already have a config file, it is NOT overwritten! You
138 may still want to do this by hand (`cp etc/sensors.conf.eg /etc/sensors.conf')
139 as the example config file may be updated.
140
141 Where version 1 of this package had the human-readable /proc/sensors file,
142 this version includes a user-space program which gathers all data
143 and displays it in a comparable format. This program is called 'sensors'.
144 Everybody can use it to read sensors values; only root can use it to
145 set minimum and maximum values (using the `-s' switch).
146
147 If you want to run 'sensors' without installing the package, you must
148 use the following command to make it able to find its shared library:
149   (bash) export LD_LIBRARY_PATH=/WHEREVER/lm_sensors-2.X.Y/lib:$LD_LIBRARY_PATH
150   (tcsh) setenv LD_LIBRARYPATH /WHEREVER/lm_sensors-2.X.Y/lib:$LD_LIBRARY_PATH
151 Replace /WHEREVER/lm_sensors-2.X.Y with the base directory of the package
152 source code.
153
154 Please examine the files in the doc subdirectory for more information,
155 especially about individual drivers. You can always mail us at
156 <lm78@stimpy.netroedge.com>. Alternatively, consider useing the (free)
157 support site at http://www.netroedge.com/~lm78/support.html. Good luck!
158
159
160 USEFUL PROGRAMS
161 ===============
162
163 The prog subdirectory contains lots of useful programs, many of which are
164 not installed. doc/progs contains some documentation for each of them.
165 Most important are prog/mkdev/mkdev.sh, which creates /dev/i2c-* files,
166 and prog/detect/dectect.pl, which tries to detect what adapters are
167 present on your system.
Note: See TracBrowser for help on using the browser.