root/lm-sensors/trunk/INSTALL @ 230

Revision 230, 7.7 KB (checked in by frodo, 16 years ago)

Added what programs are needed for compilation to the INSTALL file.

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