Changeset 4383
- Timestamp:
- 05/02/07 12:35:14 (6 years ago)
- Location:
- lm-sensors/branches/lm-sensors-3.0.0
- Files:
-
- 2 removed
- 7 modified
-
CHANGES (modified) (1 diff)
-
INSTALL (modified) (8 diffs)
-
Makefile (modified) (1 diff)
-
README.directories (modified) (1 diff)
-
doc/developers/new_drivers (modified) (3 diffs)
-
doc/mkpatch (deleted)
-
kernel/busses/Module.mk (modified) (2 diffs)
-
kernel/chips/Module.mk (modified) (2 diffs)
-
mkpatch (deleted)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/branches/lm-sensors-3.0.0/CHANGES
r4381 r4383 9 9 Man page sensors.conf.5: Update the chip statement section 10 10 Program isadump: Detect when address bit 7 is a busy flag 11 Program mkpatch: Delete 11 12 Program pwmconfig: Use smaller steps for low PWM values 12 13 Program rrd: Support only hwmon class devices -
lm-sensors/branches/lm-sensors-3.0.0/INSTALL
r4174 r4383 19 19 These are the installation instruction for the lm_sensors package. 20 20 21 There are two ways in which you can compile and install this package.22 Option 1 is much easier and is recommended.23 24 1. Complete separate from kernel compilation25 (only for 2.4 kernels 2.4.10 or later)26 This will generate a set of modules which can be inserted and removed27 as needed; nothing will be written into the kernel tree;28 29 2. Patching of the kernel30 (only for 2.4 kernels 2.4.13 or later)31 This will patch your kernel source tree. You must recompile your kernel32 to take advantage of this. But it makes it possible to compile drivers33 into the kernel itself, instead of having to add them as modules.34 ** AFTER YOU COMPILED AND INSTALLED YOUR KERNEL, YOU WILL STILL HAVE TO35 ** COMPILE THIS PACKAGE TO GET THE USERLAND UTILITIES!36 ** NOT ALL MODULES ARE PATCHED INTO THE KERNEL. SEE BELOW.37 38 39 40 Each of these ways will be described below in detail.41 42 21 NOTE: MAKE SURE YOU HAVE THE I2C-ALGO-BIT DRIVER (PART OF THE I2C PACKAGE) 43 22 COMPILED INTO YOUR KERNEL OR AVAILABLE AS A MODULE; SOME I2C/SMBUS 44 23 MASTER DRIVERS DEPEND ON IT! 45 24 46 NOTE: IN EACH CASE, YOU WILL HAVE TO GET AND INSTALL THE I2C PACKAGE FIRST! 47 SET COMPILE_KERNEL TO 0 IN THE MAIN MAKEFILE FOR OPTION 2, UNLESS 48 YOU NEED ALPHA OR BETA DRIVERS (SEE BELOW) 25 NOTE: YOU WILL HAVE TO GET AND INSTALL THE I2C PACKAGE FIRST! 49 26 50 27 NOTE: PLEASE READ THE DOCUMENTATION IN THE DOC SUBDIRECTORY IF YOU GET STUCK! … … 59 36 the same version number or higher as this lm_sensors package. 60 37 61 All i2c components are distributed in 62 a separate package. There are install instructions in that package. If 63 you want to use compilation option 2 (patching the kernel) for lm_sensors, 64 you will have to use compilation option 3 (patching the kernel) for i2c 65 too. If you want to use compilation option 1 (compiling as modules) for 66 lm_sensors, you may use either compilation option 1 or 2 (compiling as 67 modules) or compilation option 3 (patching the kernel for i2c). See the 68 table below. 69 70 LM_SENSORS 71 I2C | option 1 (modules) option 2 (patch kernel) 72 -------------------------+------------------------------------------------ 73 option 1 (modules) | YES NO 74 option 2 (modules) | YES YES 75 option 3 (patch kernel) | YES YES 76 77 78 If you use compilation option 1 (compiling as modules) for lm_sensors, you 38 You 79 39 will have to make very sure the correct i2c header files are found. If you 80 40 get weird compilation errors, this is almost certainly going wrong. The … … 85 45 how to fix this. 86 46 87 NOTE: option 3 only works with 2.4 kernels 2.4.13 or later; 88 options 1 and 2 only work with 2.4 kernels 2.4.10 or later. 89 90 91 Mixing old and new, and using beta drivers (compilation option 1) 92 ================================================================= 47 48 Mixing old and new, and using beta drivers 49 ========================================== 93 50 94 51 It is possible that you are running a previously patched kernel, or … … 110 67 be compiled as a module again. You could do nothing with them anyway. 111 68 112 Sometimes, you want to patch your kernel, but find that certain alpha 113 or beta drivers are not included in the patch. This is on purpose: we 114 do not want to polute the kernel tree with things of which we are not 115 confident they work. In this case, patch the kernel, compile it, and 116 then compile lm_sensors with COMPILE_KERNEL set to 1. 117 118 119 Having a proper kernel tree (compilation option 1) 120 ================================================== 69 70 Having a proper kernel tree 71 =========================== 121 72 122 73 Usually, if you compile a user-space application, you can get away with 123 74 having a different version of the kernel running than the version of the 124 75 kernel header files against which you compiled it. But a perfect match 125 is needed for the first two compilation options above.76 is needed here. 126 77 127 78 Let's say you want to use the lm_sensors modules with the kernel 2.4.32 you … … 150 101 151 102 152 Separate from kernel compilation (compilation option 1) 153 =========== ============================================103 Compilation 104 =========== 154 105 155 106 This will compile and install the complete lm_sensors package. Though … … 177 128 178 129 179 Makefile configuration variables (compilation option 1)180 ================================ ==============================130 Makefile configuration variables 131 ================================ 181 132 182 133 SHELL (default: /bin/sh) … … 188 139 LINUX (default: /lib/modules/$(KERNELVERSION)/build) 189 140 The location of your kernel tree. 190 COMPILE_KERNEL191 Determine whether you want to consider the kernel modules for compilation192 at all. By default, compilation option 1 will only compile and install193 those modules which are not built into the kernel.194 If some modules are built into your kernel, and this package is much195 newer, you may find you can not insert the newly compiled modules.196 Sorry.197 You may want to set this to 0 if you have just patched and compiled198 your kernel using the same version of this package, and just want to199 compile the user-space tools.200 141 I2C_HEADERS (default: /usr/local/include) 201 142 This lists where the i2c headers are found. If you used compilation … … 246 187 247 188 248 Patching the kernel (compilation option 2)249 ==========================================250 251 There is a special script which should be able to generate diffs against252 any 2.4 kernel (2.4.10 or later). Please report any problems to our253 mailing list. It *is* safe to run it if your kernel already has the254 lm_sensors drivers. It will only work if you applied the i2c patches first.255 256 ** Only a subset of the modules in lm_sensors are patched into the **257 ** kernel by the script. See the file mkpatch/FILES to see if the **258 ** modules you need are included. If a module you need is NOT listed **259 ** in mkpatch/FILES, it will not be patched, and you MUST use option 1. **260 ** If you are not sure what modules you need, run `sensors-detect' first. **261 262 The kernel diffs are generated by the program `mkpatch.pl' in the mkpatch263 subdirectory. It needs two arguments: the first one is the root of the264 lm_sensors package, the second one is the root of the kernel tree against265 which the diffs will be generated. For example:266 cd /tmp/lm_sensors-2.10.0267 mkpatch/mkpatch.pl . /usr/src/linux > /tmp/sensors-2.10.0.patch268 You can apply the diffs as usual:269 cd /usr/src/linux270 patch -p1 -E < /tmp/sensors-2.10.0.patch271 Generation and application can easily be done in one step:272 mkpatch/mkpatch.pl . /usr/src/linux | patch -p1 -E -d /usr/src/linux273 The generated diffs are of course only valid for the kernel version274 against which mkpatch.pl was run.275 276 Once you have applied the patches, you can configure and compile your277 kernel as usual. You will see the sensors configuration screen under the278 `Character Devices' menu in menuconfig, but it will only be available279 if you selected base I2C support.280 281 282 189 Using the sensors package 283 190 ========================= -
lm-sensors/branches/lm-sensors-3.0.0/Makefile
r4357 r4383 177 177 ifneq ($(MAKECMDGOALS),userpackage) 178 178 ifneq ($(MAKECMDGOALS),manhtml) 179 SRCDIRS += mkpatch180 179 SRCDIRS += kernel kernel/busses kernel/chips 181 180 endif -
lm-sensors/branches/lm-sensors-3.0.0/README.directories
r4173 r4383 9 9 * lib 10 10 The user-space sensors support library code. 11 * mkpatch12 A script for creating a kernel patch.13 11 * prog 14 12 Several supporting programs. Includes programs for detecting installed -
lm-sensors/branches/lm-sensors-3.0.0/doc/developers/new_drivers
r4170 r4383 59 59 * Add the driver to the Module.mk (the makefile). 60 60 Usually, you can just add it to KERNEL{CHIPS,DRIVERS}TARGETS in the 61 Module.mk file in the directory itself. Put it at the beginning, 62 where the comment says to put drivers NOT included in mkpatch. 61 Module.mk file in the directory itself. 63 62 64 63 * Make sure it compiles cleanly. … … 145 144 146 145 --------------------------------------------------------------------- 147 Checklist for mkpatch support, after the driver is tested and stable:148 149 * Add .c file to mkpatch/FILES.150 151 * Add makefile entry in mkpatch/mkpatch.pl (2 places - old and new formats).152 (don't bother with old format, obsolete)153 154 * Add config help to mkpatch/mkpatch.pl.155 156 * Add config entry to mkpatch/Config.in (chip drivers only)157 158 * Add config entry in mkpatch/mkpatch.pl (bus drivers only)159 160 * Move .o reference in kernel/[chips,busses]/Module.mk161 from first to second section.162 163 164 ---------------------------------------------------------------------165 146 Checklist for _adding_ support for a chip to an _existing_ driver: 166 147 … … 174 155 * Add entries for the new prefix to etc/sensors.conf.eg (chip drivers only). 175 156 176 * Update config help in mkpatch/mkpatch.pl.177 178 * Update config entry in mkpatch/Config.in (chip drivers only)179 180 * Update config entry in mkpatch/mkpatch.pl (bus drivers only)181 182 157 * Update doc/[chips,busses]/xxx file 183 158 -
lm-sensors/branches/lm-sensors-3.0.0/kernel/busses/Module.mk
r2971 r4383 24 24 # Regrettably, even 'simply expanded variables' will not put their currently 25 25 # defined value verbatim into the command-list of rules... 26 # These targets are NOT included in 'mkpatch' ...27 26 KERNELBUSSESTARGETS := 28 27 ifeq ($(shell if grep -q '^CONFIG_IPMI_HANDLER=' $(LINUX)/.config; then echo 1; fi),1) … … 32 31 endif 33 32 34 # These targets ARE included in 'mkpatch' ...35 33 ifneq ($(shell if grep -q '^CONFIG_I2C_ALI1535=y' $(LINUX)/.config; then echo 1; fi),1) 36 34 KERNELBUSSESTARGETS += $(MODULE_DIR)/i2c-ali1535.o -
lm-sensors/branches/lm-sensors-3.0.0/kernel/chips/Module.mk
r4070 r4383 25 25 # defined value verbatim into the command-list of rules... 26 26 27 # These targets are NOT included in 'mkpatch'28 27 KERNELCHIPSTARGETS := 29 28 ifeq ($(shell if grep -q '^CONFIG_IPMI_HANDLER=' $(LINUX)/.config; then echo 1; fi),1) … … 38 37 39 38 40 # These targets ARE included in 'mkpatch'41 39 ifneq ($(shell if grep -q '^CONFIG_SENSORS_ADM1021=y' $(LINUX)/.config; then echo 1; fi),1) 42 40 KERNELCHIPSTARGETS += $(MODULE_DIR)/adm1021.o
