| 1 | ============================================================================= |
|---|
| 2 | |
|---|
| 3 | DETAILED INSTALLATION INSTRUCTIONS |
|---|
| 4 | See QUICKSTART for the simple version. |
|---|
| 5 | |
|---|
| 6 | The driver modules in this package are ONLY for 2.4 kernels 2.4.10 or later! |
|---|
| 7 | |
|---|
| 8 | This package REQUIRES i2c-2.9.0 or later! The i2c subsystem found in the |
|---|
| 9 | Linux 2.4 kernel trees, even the latest ones, is outdated and won't work. |
|---|
| 10 | |
|---|
| 11 | FOR 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 | ============================================================================= |
|---|
| 19 | These are the installation instruction for the lm_sensors package. |
|---|
| 20 | |
|---|
| 21 | NOTE: 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 | |
|---|
| 25 | NOTE: YOU WILL HAVE TO GET AND INSTALL THE I2C PACKAGE FIRST! |
|---|
| 26 | |
|---|
| 27 | NOTE: PLEASE READ THE DOCUMENTATION IN THE DOC SUBDIRECTORY IF YOU GET STUCK! |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | Installing the i2c package |
|---|
| 31 | ========================== |
|---|
| 32 | |
|---|
| 33 | This lm_sensors release REQUIRES i2c-2.9.0 or later, which is not in |
|---|
| 34 | any 2.4 kernel (and will never be). |
|---|
| 35 | Therefore, you must download and install the i2c package with |
|---|
| 36 | the same version number or higher as this lm_sensors package. |
|---|
| 37 | |
|---|
| 38 | You |
|---|
| 39 | will have to make very sure the correct i2c header files are found. If you |
|---|
| 40 | get weird compilation errors, this is almost certainly going wrong. The |
|---|
| 41 | i2c header files are in a i2c subdirectory of either /usr/local/include |
|---|
| 42 | (i2c compilation option 1) or /usr/src/linux*/include (i2c compilation |
|---|
| 43 | options 2 and 3). Especially if you have in the past placed the header |
|---|
| 44 | files in /usr/local/include, this will probably go wrong. See below on |
|---|
| 45 | how to fix this. |
|---|
| 46 | |
|---|
| 47 | |
|---|
| 48 | Mixing old and new, and using beta drivers |
|---|
| 49 | ========================================== |
|---|
| 50 | |
|---|
| 51 | It is possible that you are running a previously patched kernel, or |
|---|
| 52 | a very new kernel which already has limited or full i2c or lm_sensors |
|---|
| 53 | support, but you want to use newer versions of the drivers. This is |
|---|
| 54 | possible, but there are some pitfalls. |
|---|
| 55 | |
|---|
| 56 | If you had compiled all i2c and lm_sensors drivers as modules, you are |
|---|
| 57 | in luck. You can simply compile the newest versions of i2c and |
|---|
| 58 | lm_sensors and install them. Just make sure the right modules are |
|---|
| 59 | loaded (best bet: remove the old ones first). |
|---|
| 60 | |
|---|
| 61 | If you have a certain driver compiled into your kernel, you may |
|---|
| 62 | encounter bad problems. We do not guarantee to keep internal kernel |
|---|
| 63 | interfaces unchanged. In plain language, this means that an older driver |
|---|
| 64 | may not work together with a newer driver, and your kernel may crash. |
|---|
| 65 | On the other hand, if you know what you are doing, compilation will |
|---|
| 66 | be smart. Drivers that are compiled right into your kernel will not |
|---|
| 67 | be compiled as a module again. You could do nothing with them anyway. |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | Having a proper kernel tree |
|---|
| 71 | =========================== |
|---|
| 72 | |
|---|
| 73 | Usually, if you compile a user-space application, you can get away with |
|---|
| 74 | having a different version of the kernel running than the version of the |
|---|
| 75 | kernel header files against which you compiled it. But a perfect match |
|---|
| 76 | is needed here. |
|---|
| 77 | |
|---|
| 78 | Let's say you want to use the lm_sensors modules with the kernel 2.4.32 you |
|---|
| 79 | are running now. What you need, is the original tree in which you |
|---|
| 80 | compiled that 2.4.32 kernel. A freshly unpacked 2.4.32 kernel will not |
|---|
| 81 | cut it, because `make *config dep' creates some files that are needed. |
|---|
| 82 | And even then, you will run into trouble, because you may not have |
|---|
| 83 | selected the exact same configuration variables. Plain advise: if you |
|---|
| 84 | do not have your original kernel tree anymore, recompile your kernel |
|---|
| 85 | first. |
|---|
| 86 | |
|---|
| 87 | Note that there is no need for a perfect match at compilation time, just |
|---|
| 88 | at run-time. This means you can cross-compile against a different kernel |
|---|
| 89 | version, and the Makefile does not check for this. |
|---|
| 90 | |
|---|
| 91 | Usually problems if the match is imperfect, is that either this package |
|---|
| 92 | won't compile at all (because it was a freshly unpacked tree without |
|---|
| 93 | some files generated by `make *config dep'), or that you can't insert |
|---|
| 94 | modules because of either a `kernel-module version mismatch' or because |
|---|
| 95 | of `unresolved kernel symbols'. If you get either of these messages, |
|---|
| 96 | check your kernel tree! |
|---|
| 97 | |
|---|
| 98 | To keep problems to a minimum, please use a 'vanilla' kernel tree, |
|---|
| 99 | as distributed on ftp://ftp.kernel/org/pub/linux/kernel, and not one |
|---|
| 100 | patched by your distribution. |
|---|
| 101 | |
|---|
| 102 | |
|---|
| 103 | Compilation |
|---|
| 104 | =========== |
|---|
| 105 | |
|---|
| 106 | This will compile and install the complete lm_sensors package. At the |
|---|
| 107 | top of the Makefile are a couple of configuration variables that you may |
|---|
| 108 | want to change. A list is found below. |
|---|
| 109 | |
|---|
| 110 | Compilation is done by `make all'; `make install' installs the package. |
|---|
| 111 | You will get a lot of warnings about files which are not found, all |
|---|
| 112 | ending on `.*d'. You can safely ignore this; they contain dependency |
|---|
| 113 | information, which is regenerated on the spot. |
|---|
| 114 | |
|---|
| 115 | Please continue reading this file before you start compiling. |
|---|
| 116 | |
|---|
| 117 | |
|---|
| 118 | Makefile configuration variables |
|---|
| 119 | ================================ |
|---|
| 120 | |
|---|
| 121 | SHELL (default: /bin/sh) |
|---|
| 122 | You may have to specify the full path to Bash here, if /bin/sh is some |
|---|
| 123 | other shell. There have been conflicting reports on whether this is |
|---|
| 124 | needed. |
|---|
| 125 | WARN (default: 0) |
|---|
| 126 | Generate additional compilation warnings; mainly interesting for |
|---|
| 127 | developers. |
|---|
| 128 | DEBUG (default: 0) |
|---|
| 129 | Some drivers will issue more debug information if you set this to |
|---|
| 130 | 1. Don't do it, unless you are a developer or are instructed to do |
|---|
| 131 | so by the lm_sensors team. |
|---|
| 132 | PREFIX (default: /usr/local) |
|---|
| 133 | Prefix for almost all installation directories. |
|---|
| 134 | ETCDIR (default: /etc) |
|---|
| 135 | Installation location of the sensors.conf configuration file. |
|---|
| 136 | LIBDIR (default: $(PREFIX)/lib) |
|---|
| 137 | Installation location of all static and shared libraries. |
|---|
| 138 | BINDIR (default: $(PREFIX)/bin) |
|---|
| 139 | Installation directory of programs useful for users. |
|---|
| 140 | SBINDIR (default: $(PREFIX)/sbin) |
|---|
| 141 | Installation directory of system administrator-only programs. |
|---|
| 142 | INCLUDEDIR (default: $(PREFIX)/include) |
|---|
| 143 | Base installation directory for include files (see next two vars). |
|---|
| 144 | LIBINCLUDEDIR (default: $(INCLUDEDIR)/sensors) |
|---|
| 145 | Installation directory for libsensors include files. |
|---|
| 146 | MANDIR (default: $(PREFIX)/man) |
|---|
| 147 | Base installation directory for manual pages. |
|---|
| 148 | |
|---|
| 149 | |
|---|
| 150 | Using the sensors package |
|---|
| 151 | ========================= |
|---|
| 152 | |
|---|
| 153 | You can now load the modules by using `modprobe'. For example, |
|---|
| 154 | `modprobe i2c-piix4' will load the i2c-piix4 module, and all i2c modules |
|---|
| 155 | on which it depends. |
|---|
| 156 | |
|---|
| 157 | You can not use demand-loading; you will have to issue explicit modprobe |
|---|
| 158 | instructions. |
|---|
| 159 | |
|---|
| 160 | If you have an older installation, you will probably have to create the |
|---|
| 161 | i2c device files in the /dev directory. They are called /dev/i2c-%d, |
|---|
| 162 | and are character devices with major device number 89 and minor device |
|---|
| 163 | number %d. The script prog/mkdev/mkdev.sh will create the files for you. |
|---|
| 164 | |
|---|
| 165 | There is a scanning program installed called sensors-detect. It |
|---|
| 166 | will scan all available I2C and SMBus adapters for all known devices, |
|---|
| 167 | and will also look for ISA, PCI and Super-I/O chips with sensors, |
|---|
| 168 | and give you a list of what modules you need to insert. |
|---|
| 169 | |
|---|
| 170 | You can use the installed sensors program to get a report of all detected |
|---|
| 171 | sensor devices. There is also a manual page for this program. Calling |
|---|
| 172 | `sensors -s' will set the limits and other configuration settings |
|---|
| 173 | specified in /etc/sensors.conf. Again, read the manual pages for more |
|---|
| 174 | information. |
|---|
| 175 | |
|---|
| 176 | There are many auxiliary programs not installed. You can find them under |
|---|
| 177 | the prog subdirectory. A list can be found in doc/progs. |
|---|