mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-17 10:59:31 +00:00
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@217 7894878c-1315-0410-8ee3-d5d059ff63e0
145 lines
6.9 KiB
Plaintext
145 lines
6.9 KiB
Plaintext
Please read this file thoroughly before you try to install and run things. It
|
|
will safe you many headaches. Installation is not really difficult, but there
|
|
are a few pitfalls.
|
|
|
|
ALWAYS READ THE `BUGS' FILE! This file contains a list of known
|
|
incompatibilities with this package. Most are highly kernel-dependent and
|
|
usually not fatal, but still.
|
|
|
|
COMPILATION AND INSTALLATION
|
|
============================
|
|
|
|
Basic installation is uncomplicated. Run 'make all', followed by an optional
|
|
'make install'. Everything is compiled using the Makefile in the root of
|
|
this package. Some interesting variables:
|
|
|
|
* SMP
|
|
This must be set to 1 if your kernel was compiled with SMP set to 1. There
|
|
is a sort of magic invocation which tries to check this; it will fail if
|
|
you do not have the correct kernel tree in /usr/src/linux. If you set it,
|
|
a '-D__SMP__' argument will be added to all module compiles.
|
|
* MODVER
|
|
This must be set to 1 if your kernel was compiled with CONFIG_MODVERSIONS
|
|
enabled. There is some magic which tries to retrieve this information
|
|
from /usr/include/linux/config.h and /usr/include/linux/autoconf.h.
|
|
* I2C
|
|
If you already have Simon Vogl's i2c package installed, you may not have
|
|
to compile the version included in this package. In that case, check
|
|
the file i2c/MODIFICATIONS in this package to see what versions are
|
|
safe.
|
|
* WARN, DEBUG
|
|
These options should only be needed if you are an active developer of
|
|
this package.
|
|
* PREFIX (/usr/local)
|
|
The prefix which is added to most directory locations below.
|
|
* MODDIR (/lib/modules/extra/misc)
|
|
The directory where 'make install' installs your modules.
|
|
* ETCDIR (/etc)
|
|
The directory where 'make install' installs the example configuration file
|
|
if none is found there.
|
|
* LIBDIR ($(PREFIX)/lib)
|
|
The directory where 'make install' installs the shared and static libraries.
|
|
* BINDIR ($(PREFIX)/bin)
|
|
The directory where 'make install' installs all executables.
|
|
* INCLUDEDIR ($(PREFIX)/include)
|
|
The base directory where 'make install' installs your include files.
|
|
Actually, SYSINCLUDEDIR ($(INCLUDEDIR)/linux) is used for kernel header
|
|
files, and LIBINCLUDEDIR ($(INCLUDEDIR)/sensors) is used for library
|
|
header files.
|
|
* MANDIR ($(PREFIX)/man)
|
|
The base directory where manual pages are installed.
|
|
* MANOWN, MANGRP (root, root)
|
|
Owner and group of installed manual pages
|
|
|
|
Warning! In 2.2 and newer 2.1 kernels, there is support for I2C. This support
|
|
is NOT compatible with this module! Actually, Simon Vogl's modules package
|
|
(which IS compatible) is scheduled to replace the current support. If you
|
|
actually use these modules, you have a problem; they can not coexist
|
|
with Simon's modules. Theoretically, you should be able to replace
|
|
the old modules in the kernel tree with the new stuff in our i2c directory,
|
|
recompile the kernel, and then compile our modules with I2C=0. If you try
|
|
this, please share the results with us! There have also been some rumors
|
|
about the peaceful coexistence of both sets of modules, but others found
|
|
some problems with it.
|
|
|
|
Please make sure that /usr/include/linux and /usr/include/asm are symlinks
|
|
into the kernel tree which corresponds with the kernel version you are using
|
|
now (or more exactly, the kernel which you will use the compiled modules
|
|
with). If the tree and the running kernel do not match, you will either
|
|
be unable to insert the modules at all, or you can expect strange
|
|
behaviour (probably leading to crashes).
|
|
|
|
|
|
TESTING AND RUNNING
|
|
===================
|
|
|
|
When you have compiled this package, you will be left with a lot of modules.
|
|
It can be tricky to know which modules you need to insert. For this reason,
|
|
I suggest you go the 'modprobe' way, as described within doc/modules.
|
|
If you just want to run a test without installing them, try the following:
|
|
insmod i2c/i2c-core.o
|
|
insmod kernel/i2c-proc.o
|
|
insmod kernel/i2c-dev.o
|
|
insmod kernel/smbus.o
|
|
insmod kernel/sensors.o
|
|
insmod kernel/busses/isa.o
|
|
insmod kernel/busses/piix4.o # Or whatever SMBus controller you have
|
|
insmod kernel/chips/lm78.o # Or whatever hardware monitoring chip you have
|
|
Now you should have new directories under /proc/sys/dev/sensors and some files
|
|
beginning with i2c in /proc/bus.
|
|
|
|
If you have installed the modules, as described within doc/modules, you can
|
|
do 'modprobe isa && modprobe piix4 && modprobe lm78 && modprobe i2c-proc'
|
|
(the last is optional) from any directory to reach the same situation.
|
|
|
|
There is a program 'detect.pl' in prog/detect which should tell you at least
|
|
what bus driver you should insert. This program is not completely failsafe,
|
|
but it may at least help. It will be expanded to cover chip detection too,
|
|
in the future.
|
|
|
|
Do not panic if some (or all) of the values in the /proc/sys/dev/sensors/*/*
|
|
files do not seem to correspond to anything in earlier versions. Starting
|
|
with lm_sensors version 2.1.0, these files will reflect the real chip
|
|
measurements, without any scaling or adjusting. This is most obvious for
|
|
the voltage files. You can specify the conversion factors in a configuration
|
|
file. Use an application linked to libsensors to read these real values.
|
|
|
|
This package contains a library of functions which can be used to
|
|
access sensor data in a more programmer-friendly way. It will be built as
|
|
both a shared and a static library, and installed in your LIB directory
|
|
(normally /usr/local/lib). It needs a configuration file, which is usually
|
|
called 'sensors.conf', and can be placed in /etc, /usr/lib/sensors,
|
|
/usr/local/lib/sensors, /usr/lib, or /usr/local/lib.
|
|
|
|
Note that if you already have a config file, it is NOT overwritten! You
|
|
may still want to do this by hand (`cp etc/sensors.conf.eg /etc/sensors.conf')
|
|
as the example config file may be updated.
|
|
|
|
Where version 1 of this package had the human-readable /proc/sensors file,
|
|
this version includes a user-space program which gathers all data
|
|
and displays it in a comparable format. This program is called 'sensors'.
|
|
Everybody can use it to read sensors values; only root can use it to
|
|
set minimum and maximum values (using the `-s' switch).
|
|
|
|
If you want to run 'sensors' without installing the package, you must
|
|
use the following command to make it able to find its shared library:
|
|
(bash) export LD_LIBRARY_PATH=/WHEREVER/lm_sensors-2.X.Y/lib:$LD_LIBRARY_PATH
|
|
(tcsh) setenv LD_LIBRARYPATH /WHEREVER/lm_sensors-2.X.Y/lib:$LD_LIBRARY_PATH
|
|
Replace /WHEREVER/lm_sensors-2.X.Y with the base directory of the package
|
|
source code.
|
|
|
|
Please examine the files in the doc subdirectory for more information,
|
|
especially about individual drivers. You can always mail us at
|
|
<lm78@stimpy.netroedge.com>. Alternatively, consider useing the (free)
|
|
support site at http://www.netroedge.com/~lm78/support.html. Good luck!
|
|
|
|
|
|
USEFUL PROGRAMS
|
|
===============
|
|
|
|
The prog subdirectory contains lots of useful programs, many of which are
|
|
not installed. doc/progs contains some documentation for each of them.
|
|
Most important are prog/mkdev/mkdev.sh, which creates /dev/i2c-* files,
|
|
and prog/detect/dectect.pl, which tries to detect what adapters are
|
|
present on your system.
|