root/lm-sensors/branches/lm-sensors-3.0.0/INSTALL @ 4383

Revision 4383, 9.3 KB (checked in by khali, 8 years ago)

Delete mkpatch and all references thereto. The kernel modules will soon
be removed from the tree so there won't be anything left to generate a
patch from.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1=============================================================================
2
3DETAILED INSTALLATION INSTRUCTIONS
4See QUICKSTART for the simple version.
5
6The driver modules in this package are ONLY for 2.4 kernels 2.4.10 or later!
7
8This package REQUIRES i2c-2.9.0 or later! The i2c subsystem found in the
9Linux 2.4 kernel trees, even the latest ones, is outdated and won't work.
10
11FOR 2.5/2.6 KERNELS, do not attempt to compile the modules in this package.
12    Use the drivers already in the 2.5/2.6 kernel tree.
13    If you are running a 2.5/2.6 kernel, the ONLY thing you need to
14    do is 'make user' and 'make user_install'. Do NOT follow the rest
15    of these instructions. Please check the QUICKSTART instead.
16
17
18=============================================================================
19These are the installation instruction for the lm_sensors package.
20
21NOTE: MAKE SURE YOU HAVE THE I2C-ALGO-BIT DRIVER (PART OF THE I2C PACKAGE)
22      COMPILED INTO YOUR KERNEL OR AVAILABLE AS A MODULE; SOME I2C/SMBUS
23      MASTER DRIVERS DEPEND ON IT!
24
25NOTE: YOU WILL HAVE TO GET AND INSTALL THE I2C PACKAGE FIRST!
26
27NOTE: PLEASE READ THE DOCUMENTATION IN THE DOC SUBDIRECTORY IF YOU GET STUCK!
28
29
30Installing the i2c package
31==========================
32
33This lm_sensors release REQUIRES i2c-2.9.0 or later, which is not in
34any 2.4 kernel (and will never be).
35Therefore, you must download and install the i2c package with
36the same version number or higher as this lm_sensors package.
37
38You
39will have to make very sure the correct i2c header files are found. If you
40get weird compilation errors, this is almost certainly going wrong. The
41i2c header files are in a i2c subdirectory of either /usr/local/include
42(i2c compilation option 1) or /usr/src/linux*/include (i2c compilation
43options 2 and 3). Especially if you have in the past placed the header
44files in /usr/local/include, this will probably go wrong. See below on
45how to fix this.
46
47
48Mixing old and new, and using beta drivers
49==========================================
50
51It is possible that you are running a previously patched kernel, or
52a very new kernel which already has limited or full i2c or lm_sensors
53support, but you want to use newer versions of the drivers. This is
54possible, but there are some pitfalls.
55
56If you had compiled all i2c and lm_sensors drivers as modules, you are
57in luck. You can simply compile the newest versions of i2c and
58lm_sensors and install them. Just make sure the right modules are
59loaded (best bet: remove the old ones first).
60
61If you have a certain driver compiled into your kernel, you may
62encounter bad problems. We do not guarantee to keep internal kernel
63interfaces unchanged. In plain language, this means that an older driver
64may not work together with a newer driver, and your kernel may crash.
65On the other hand, if you know what you are doing, compilation will
66be smart. Drivers that are compiled right into your kernel will not
67be compiled as a module again.  You could do nothing with them anyway.
68
69
70Having a proper kernel tree
71===========================
72
73Usually, if you compile a user-space application, you can get away with
74having a different version of the kernel running than the version of the
75kernel header files against which you compiled it. But a perfect match
76is needed here.
77
78Let's say you want to use the lm_sensors modules with the kernel 2.4.32 you
79are running now. What you need, is the original tree in which you
80compiled that 2.4.32 kernel. A freshly unpacked 2.4.32 kernel will not
81cut it, because `make *config dep' creates some files that are needed.
82And even then, you will run into trouble, because you may not have
83selected the exact same configuration variables. Plain advise: if you
84do not have your original kernel tree anymore, recompile your kernel
85first.
86
87Note that there is no need for a perfect match at compilation time, just
88at run-time. This means you can cross-compile against a different kernel
89version, and the Makefile does not check for this.
90
91Usually problems if the match is imperfect, is that either this package
92won't compile at all (because it was a freshly unpacked tree without
93some files generated by `make *config dep'), or that you can't insert
94modules because of either a `kernel-module version mismatch' or because
95of `unresolved kernel symbols'. If you get either of these messages,
96check your kernel tree!
97
98To keep problems to a minimum, please use a 'vanilla' kernel tree,
99as distributed on ftp://ftp.kernel/org/pub/linux/kernel, and not one
100patched by your distribution.
101
102
103Compilation
104===========
105
106This will compile and install the complete lm_sensors package. Though
107nothing is written to your kernel tree, a proper tree is still needed
108for this. See earlier for what a proper kernel tree is.
109
110At the top of the Makefile are a couple of configuration variables that
111you may want to change. As far as possible, the Makefile tries to figure
112out by itself their settings, but it is possible to overrule them. A list
113is found below. Most important are the variables that determine where
114your kernel is located (LINUX=/lib/modules/KERNELVERSION/build, usually
115links to /usr/src/linux or something similar), where the i2c header files
116are (I2C_HEADERS=/usr/local/include) and where you want to install
117your modules (MODDIR=/lib/modules/KERNELVERSION) and header files
118(LINUX_INCLUDE_DIR=/usr/local/include/linux). You can see that the
119installation locations are choosen in such a way that they are separate
120from the true kernel.
121
122Compilation is done by `make all'; `make install' installs the package.
123You will get a lot of warnings about files which are not found, all
124ending on `.*d'. You can safely ignore this; they contain dependency
125information, which is regenerated on the spot.
126
127Please continue reading this file before you start compiling.
128
129
130Makefile configuration variables
131================================
132
133SHELL (default: /bin/sh)
134  You may have to specify the full path to Bash here, if /bin/sh is some
135  other shell. There have been conflicting reports on whether this is
136  needed.
137KERNELVERSION
138  The version of the currently running kernel.
139LINUX (default: /lib/modules/$(KERNELVERSION)/build)
140  The location of your kernel tree.
141I2C_HEADERS (default: /usr/local/include)
142  This lists where the i2c headers are found. If you used compilation
143  option 1 for the i2c package, the default will be right. If you used
144  compilation options 2 or 3, it will not, and may actually cause
145  problems if you have the left-overs of a previous installation.
146  If you have weird compilation problems, try to change this to
147  $(LINUX_HEADERS).
148SMP
149  This must be set to 1 for a SMP kernel. The magic invocation should
150  determine this automatically, so you should not have to bother with
151  this.
152MODVER
153  This must be set to 1 if CONFIG_MODVERSIONS is defined. The magic
154  invocation should determine this automatically, so you should not
155  have to bother with this.
156WARN (default: 0)
157  Generate additional compilation warnings; mainly interesting for
158  developers.
159DEBUG (default: 0)
160  Some drivers will issue more debug information if you set this to
161  1. Don't do it, unless you are a developer or are instructed to do
162  so by the lm_sensors team.
163PREFIX (default: /usr/local)
164  Prefix for almost all installation directories.
165MODPREF (default: /lib/modules/$(KERNELVERSION))
166  The location where the kernel modules will be installed.
167ETCDIR (default: /etc)
168  Installation location of the sensors.conf configuration file.
169LIBDIR (default: $(PREFIX)/lib)
170  Installation location of all static and shared libraries.
171BINDIR (default: $(PREFIX)/bin)
172  Installation directory of programs useful for users.
173SBINDIR (default: $(PREFIX)/sbin)
174  Installation directory of system administrator-only programs.
175INCLUDEDIR (default: $(PREFIX)/include)
176  Base installation directory for include files (see next two vars).
177SYSINCLUDEDIR (default: $(INCLUDEDIR)/linux)
178  Installation directory for system include files.
179LIBINCLUDEDIR (default: $(INCLUDEDIR)/sensors)
180  Installation directory for libsensors include files.
181MANDIR (default: $(PREFIX)/man)
182  Base installation directory for manual pages.
183MANOWN (default: root)
184  Owner of manual pages.
185MANGRP (default: root)
186  Group of manual pages.
187
188
189Using the sensors package
190=========================
191
192You can now load the modules by using `modprobe'. For example,
193`modprobe i2c-piix4' will load the i2c-piix4 module, and all i2c modules
194on which it depends.
195
196You can not use demand-loading; you will have to issue explicit modprobe
197instructions.
198
199If you have an older installation, you will probably have to create the
200i2c device files in the /dev directory. They are called /dev/i2c-%d,
201and are character devices with major device number 89 and minor device
202number %d. The script prog/mkdev/mkdev.sh will create the files for you.
203
204There is a scanning program installed called sensors-detect. It
205will scan all available I2C and SMBus adapters for all known devices,
206and will also look for ISA, PCI and Super-I/O chips with sensors,
207and give you a list of what modules you need to insert.
208
209You can use the installed sensors program to get a report of all detected
210sensor devices. There is also a manual page for this program. Calling
211`sensors -s' will set the limits and other configuration settings
212specified in /etc/sensors.conf. Again, read the manual pages for more
213information.
214
215There are many auxiliary programs not installed. You can find them under
216the prog subdirectory. A list can be found in doc/progs.
Note: See TracBrowser for help on using the browser.