summaryrefslogtreecommitdiff
path: root/INSTALL
blob: 8020648e2698da0fa0f4735be995d366f4efafec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
=============================================================================

DETAILED INSTALLATION INSTRUCTIONS
See QUICKSTART for the simple version.

The driver modules in this package are ONLY for 2.4 kernels 2.4.10 or later!

This package REQUIRES i2c-2.9.0 or later! The i2c subsystem found in the
Linux 2.4 kernel trees, even the latest ones, is outdated and won't work.

FOR 2.5/2.6 KERNELS, do not attempt to compile the modules in this package.
    Use the drivers already in the 2.5/2.6 kernel tree.
    If you are running a 2.5/2.6 kernel, the ONLY thing you need to
    do is 'make user' and 'make user_install'. Do NOT follow the rest
    of these instructions. Please check the QUICKSTART instead.


=============================================================================
These are the installation instruction for the lm_sensors package.

NOTE: MAKE SURE YOU HAVE THE I2C-ALGO-BIT DRIVER (PART OF THE I2C PACKAGE)
      COMPILED INTO YOUR KERNEL OR AVAILABLE AS A MODULE; SOME I2C/SMBUS
      MASTER DRIVERS DEPEND ON IT!

NOTE: YOU WILL HAVE TO GET AND INSTALL THE I2C PACKAGE FIRST!

NOTE: PLEASE READ THE DOCUMENTATION IN THE DOC SUBDIRECTORY IF YOU GET STUCK!


Installing the i2c package
==========================

This lm_sensors release REQUIRES i2c-2.9.0 or later, which is not in
any 2.4 kernel (and will never be).
Therefore, you must download and install the i2c package with
the same version number or higher as this lm_sensors package.

You
will have to make very sure the correct i2c header files are found. If you
get weird compilation errors, this is almost certainly going wrong. The
i2c header files are in a i2c subdirectory of either /usr/local/include 
(i2c compilation option 1) or /usr/src/linux*/include (i2c compilation
options 2 and 3). Especially if you have in the past placed the header
files in /usr/local/include, this will probably go wrong. See below on
how to fix this.


Mixing old and new, and using beta drivers
==========================================

It is possible that you are running a previously patched kernel, or
a very new kernel which already has limited or full i2c or lm_sensors
support, but you want to use newer versions of the drivers. This is
possible, but there are some pitfalls.

If you had compiled all i2c and lm_sensors drivers as modules, you are 
in luck. You can simply compile the newest versions of i2c and
lm_sensors and install them. Just make sure the right modules are
loaded (best bet: remove the old ones first).

If you have a certain driver compiled into your kernel, you may
encounter bad problems. We do not guarantee to keep internal kernel
interfaces unchanged. In plain language, this means that an older driver
may not work together with a newer driver, and your kernel may crash. 
On the other hand, if you know what you are doing, compilation will 
be smart. Drivers that are compiled right into your kernel will not 
be compiled as a module again.  You could do nothing with them anyway.


Having a proper kernel tree
===========================

Usually, if you compile a user-space application, you can get away with
having a different version of the kernel running than the version of the
kernel header files against which you compiled it. But a perfect match
is needed here.

Let's say you want to use the lm_sensors modules with the kernel 2.4.32 you
are running now. What you need, is the original tree in which you
compiled that 2.4.32 kernel. A freshly unpacked 2.4.32 kernel will not
cut it, because `make *config dep' creates some files that are needed.
And even then, you will run into trouble, because you may not have
selected the exact same configuration variables. Plain advise: if you
do not have your original kernel tree anymore, recompile your kernel
first.

Note that there is no need for a perfect match at compilation time, just
at run-time. This means you can cross-compile against a different kernel
version, and the Makefile does not check for this.

Usually problems if the match is imperfect, is that either this package
won't compile at all (because it was a freshly unpacked tree without
some files generated by `make *config dep'), or that you can't insert
modules because of either a `kernel-module version mismatch' or because
of `unresolved kernel symbols'. If you get either of these messages,
check your kernel tree!

To keep problems to a minimum, please use a 'vanilla' kernel tree,
as distributed on ftp://ftp.kernel/org/pub/linux/kernel, and not one
patched by your distribution.


Compilation
===========

This will compile and install the complete lm_sensors package. At the
top of the Makefile are a couple of configuration variables that you may
want to change. A list is found below.

Compilation is done by `make all'; `make install' installs the package.
You will get a lot of warnings about files which are not found, all 
ending on `.*d'. You can safely ignore this; they contain dependency
information, which is regenerated on the spot.

Please continue reading this file before you start compiling.


Makefile configuration variables
================================

SHELL (default: /bin/sh)
  You may have to specify the full path to Bash here, if /bin/sh is some
  other shell. There have been conflicting reports on whether this is 
  needed.
WARN (default: 0)
  Generate additional compilation warnings; mainly interesting for
  developers.
DEBUG (default: 0)
  Some drivers will issue more debug information if you set this to
  1. Don't do it, unless you are a developer or are instructed to do
  so by the lm_sensors team.
PREFIX (default: /usr/local)
  Prefix for almost all installation directories.
ETCDIR (default: /etc)
  Installation location of the sensors.conf configuration file.
LIBDIR (default: $(PREFIX)/lib)
  Installation location of all static and shared libraries.
BINDIR (default: $(PREFIX)/bin)
  Installation directory of programs useful for users.
SBINDIR (default: $(PREFIX)/sbin)
  Installation directory of system administrator-only programs.
INCLUDEDIR (default: $(PREFIX)/include)
  Base installation directory for include files (see next two vars).
LIBINCLUDEDIR (default: $(INCLUDEDIR)/sensors)
  Installation directory for libsensors include files.
MANDIR (default: $(PREFIX)/man)
  Base installation directory for manual pages.


Using the sensors package
=========================

You can now load the modules by using `modprobe'. For example,
`modprobe i2c-piix4' will load the i2c-piix4 module, and all i2c modules
on which it depends.

You can not use demand-loading; you will have to issue explicit modprobe
instructions. 

If you have an older installation, you will probably have to create the
i2c device files in the /dev directory. They are called /dev/i2c-%d,
and are character devices with major device number 89 and minor device 
number %d. The script prog/mkdev/mkdev.sh will create the files for you.

There is a scanning program installed called sensors-detect. It
will scan all available I2C and SMBus adapters for all known devices,
and will also look for ISA, PCI and Super-I/O chips with sensors,
and give you a list of what modules you need to insert.

You can use the installed sensors program to get a report of all detected
sensor devices. There is also a manual page for this program. Calling
`sensors -s' will set the limits and other configuration settings 
specified in /etc/sensors.conf. Again, read the manual pages for more
information.

There are many auxiliary programs not installed. You can find them under
the prog subdirectory. A list can be found in doc/progs.