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

Revision 430, 8.3 kB (checked in by frodo, 10 years ago)

Geert's PPC support and Hydra driver

  • 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. If you
90 set PREFIX to anything different from `/' or `/usr' (it is `usr/local'
91 by default), check whether /etc/ld.so.conf contains the library directory
92 (like `/usr/local/lib') before you do the `ldconfig'.
93
94 Do no worry about the `No such file or directory' warnings when you compile
95 the package the first time. They are harmless.
96
97
98 TESTING AND RUNNING
99 ===================
100
101 When you have compiled this package, you will be left with a lot of modules.
102 It can be tricky to know which modules you need to insert. For this reason,
103 I suggest you go the `modprobe' way, as described within doc/modules.
104
105 If you just want to run a test without installing them, try the following:
106   insmod i2c/i2c-core.o
107   insmod kernel/smbus.o
108   insmod kernel/i2c-proc.o
109   insmod kernel/i2c-dev.o
110   insmod kernel/sensors.o
111   insmod kernel/busses/i2c-isa.o
112   insmod kernel/busses/i2c-piix4.o # Or whatever SMBus controller you have
113   insmod kernel/chips/lm78.o   # Or whatever hardware monitoring chip you have
114 Now you should have new directories under /proc/sys/dev/sensors and some files
115 beginning with i2c in /proc/bus.
116
117 If you have installed the modules, as described within doc/modules, you can
118 do:
119   modprobe i2c-isa && modprobe i2c-piix4 && modprobe lm78 && modprobe i2c-proc
120 (the last is optional) from any directory to reach the same situation.
121
122 But instead of doing any of the above things, please read doc/modules and
123 do a `make install'. After that, you can run `sensors-detect'. This Perl
124 program will detect all hardware available on your system, and tell you
125 what drivers you need to insert. First check whether you have /dev/i2c-*
126 files (at least 4 of them), and if not, create them by running `mkdev.sh'
127 in directory prog/mkdev.
128
129 Do not panic if some (or all) of the values in the /proc/sys/dev/sensors/*/*
130 files do not seem to correspond to anything in earlier versions. Starting
131 with lm_sensors version 2.1.0, these files will reflect the real chip
132 measurements, without any scaling or adjusting. This is most obvious for
133 the voltage files. You can specify the conversion factors in a configuration
134 file.  Use an application linked to libsensors to read these real values.
135
136 This package contains a library of functions which can be used to
137 access sensor data in a more programmer-friendly way. It will be built as
138 both a shared and a static library, and installed in your LIB directory
139 (normally /usr/local/lib). It needs a configuration file, which is usually
140 called `sensors.conf', and can be placed in /etc, /usr/lib/sensors,
141 /usr/local/lib/sensors, /usr/lib, or /usr/local/lib.
142
143 Note that if you already have a config file, it is NOT overwritten! You
144 may still want to do this by hand (`cp etc/sensors.conf.eg /etc/sensors.conf')
145 as the example config file may be updated.
146
147 Where version 1 of this package had the human-readable /proc/sensors file,
148 this version includes a user-space program which gathers all data
149 and displays it in a comparable format. This program is called `sensors'.
150 Everybody can use it to read sensors values; only root can use it to
151 set minimum and maximum values (using the `-s' switch).
152
153 If you want to run `sensors' without installing the package, you must
154 use the following command to make it able to find its shared library:
155   (bash) export LD_LIBRARY_PATH=/WHEREVER/lm_sensors-2.X.Y/lib:$LD_LIBRARY_PATH
156   (tcsh) setenv LD_LIBRARYPATH /WHEREVER/lm_sensors-2.X.Y/lib:$LD_LIBRARY_PATH
157 Replace /WHEREVER/lm_sensors-2.X.Y with the base directory of the package
158 source code.
159
160 Please examine the files in the doc subdirectory for more information,
161 especially about individual drivers. You can always mail us at
162 <lm78@stimpy.netroedge.com>. Alternatively, consider useing the (free)
163 support site at http://www.netroedge.com/~lm78/support.html. Good luck!
164
165
166 USEFUL PROGRAMS
167 ===============
168
169 The prog subdirectory contains lots of useful programs, many of which are
170 not installed. doc/progs contains some documentation for each of them.
171 Most important are prog/mkdev/mkdev.sh, which creates /dev/i2c-* files,
172 and prog/detect/detect.pl, which tries to detect what adapters are
173 present on your system.
Note: See TracBrowser for help on using the browser.