README.Debian for lm-sensors-source David Z. Maze $Id: lm-sensors-source.README.Debian,v 1.6 2001/12/15 16:40:32 dmaze Exp $ 1. Building lm-sensors kernel modules ===================================== This package is a source package that can be used to build modules that work with your custom built linux kernel. The source files are located in /usr/src/lm-sensors.tar.gz; unpacking that file in /usr/src will produce a build tree in /usr/src/modules/lm-sensors/. (The tar file can also be unpacked elsewhere; see the paragraph about $MODULE_LOC below.) Building these kernel modules requires also having headers for the separate i2c kernel modules. This support is included in the Linux kernel as of version 2.4.13; you must have "I2C /proc support" enabled in your kernel configuration. You may also use a stand-alone i2c source tree, such as that provided in the i2c-source package. In this case, you must have unpacked /usr/src/i2c.tar.gz before proceeding, and should not have selected any I2C options in your kernel build. You probably want to use kernel-package for building these modules. Install it and read /usr/share/kernel-package/README.modules. Having built a kernel with kernel-package, it should suffice to be in the top directory of your kernel source tree and run: fakeroot make-kpkg modules-image If you don't want to use kernel-package, do the following: Enter /usr/src/modules/lm-sensors/ directory, and as root execute: debian/rules binary-modules KVERS= \ KSRC= This will generate a lm-sensors- .deb file in the parent directory of the kernel source tree. Default location of the kernel source tree is /usr/src/linux, but you can change that by supplying the KSRC variable as a command line option. For example, if your kernel version is 2.2.16, you should run: debian/rules binary-modules KVERS=2.2.16 If the kernel 2.4.0 source is located in /usr/local/src/kernel-2.4.0, the proper command would be: debian/rules binary-modules KVERS=2.4.0 KSRC=/usr/local/src/kernel-2.4.0 If you are unpacking your kernel modules in a non-standard place (e.g. not /usr/src/modules), you need to set the MODULE_LOC variable when building modules. In particular, for lm-sensors, if your kernel does not contain i2c support, then $(MODULE_LOC)/i2c must contain the i2c modules. debian/rules binary-modules KVERS=2.4.4 MODULE_LOC=$HOME/modules 2. Common problems ================== make[1]: *** No rule to make target `linux/i2c-proc.h', needed by `kernel/chips/via686a.d'. Stop. The build process tries to automatically determine dependencies of source files; if this fails, the generated *.d files have wrong information that keeps the package from building. Try running 'make-kpkg modules_clean' from the kernel source directory, or 'make clean' from the top level of the lm-sensors build tree. This should remove the troublesome file, which will be regenerated on the next build. -- David Z. Maze