LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   slackware 10.1 lm_sensors (https://www.linuxquestions.org/questions/slackware-14/slackware-10-1-lm_sensors-297766/)

perfect_circle 03-04-2005 06:50 PM

slackware 10.1 lm_sensors
 
Has anybody succeeded to compile i2c/lm_sensors 2.9.0 on slackware 10.1
I get compilation errors....

I patched i2c 2.9.0 to 2.9.0.1, or at least i think i did:
after tar xvzf i2c-2.9.0.tar.gz
I did patch -p0 < i2c-2.9.0.1.patch
and make and checkinstall.
then I uncompressed lm_sensors and i get errors in make:
Code:

kernel/chips/bmcsensors.c: In function `ipmi_sprintf':
kernel/chips/bmcsensors.c:220: warning: operation on `from' may be undefined
kernel/chips/bmcsensors.c:221: warning: operation on `from' may be undefined
kernel/chips/bmcsensors.c: In function `bmcsensors_select_thresholds':
kernel/chips/bmcsensors.c:300: error: `m' undeclared (first use in this function)
kernel/chips/bmcsensors.c:300: error: (Each undeclared identifier is reported only once
kernel/chips/bmcsensors.c:300: error: for each function it appears in.)
kernel/chips/bmcsensors.c: At top level:
kernel/chips/bmcsensors.c:45: warning: `addr_data' defined but not used
make: *** [kernel/chips/bmcsensors.o] Error 1

if i don't patch i2c i get this:
Code:

kernel/busses/i2c-ipmi.c: At top level:
kernel/busses/i2c-ipmi.c:54: error: `I2C_ALGO_IPMI' undeclared here (not in a function)
kernel/busses/i2c-ipmi.c:54: error: initializer element is not constant
kernel/busses/i2c-ipmi.c:54: error: (near initialization for `i2c_ipmi_algorithm.id')
kernel/busses/i2c-ipmi.c:61: error: `I2C_ALGO_IPMI' undeclared here (not in a function)
kernel/busses/i2c-ipmi.c:61: error: `I2C_HW_IPMI' undeclared here (not in a function)
kernel/busses/i2c-ipmi.c:61: error: initializer element is not constant
kernel/busses/i2c-ipmi.c:61: error: (near initialization for `i2c_ipmi_adapter.id')
kernel/busses/i2c-ipmi.c: In function `ipmi_register_bmc':
kernel/busses/i2c-ipmi.c:183: warning: `return' with a value, in function returning void
make: *** [kernel/busses/i2c-ipmi.o] Error 1



egag 03-04-2005 07:10 PM

what kernel do you use ?

egag

perfect_circle 03-04-2005 07:24 PM

the default bare.i 2.4.29

egag 03-04-2005 07:30 PM

oh...i was afraid of that....
( just took a look at the install-instructions for 2.4--- := horror)
i use a 2.6-- kernel.

so i have no experience with that, but maybe compiling a 2.6--- kernel is simpler.
maybe you want to go for that......?

egag

perfect_circle 03-04-2005 08:08 PM

i think it was a bug, because when i downloaded the cvs version, it compiled fine....
Anyway, i did not manage to make it work. when did a sensor detect and added the lines in modules.conf, when i rebooted , i got messages of invalid lines in modules.conf. After i deleted the lines and rebooted i got a segmentation fault in hotplug and the computer stuck there. SO I booted from the cd and removed the packages. checkinstall saved me....The Makefiles of lm_sensors and i2c do not offer a make uninstall option. If i hadn't packed them, I would have a lot more problems. lm-sensors did not work, but at least my slack is bootable again....

*EDIT*
I thing it has to do with not having a proper kernel tree. I did replace the .config with the config-ide-2.4.29 (the configuration file of the kernel) and did "make xconfig" and saved the kernel configuration, and did "make dep" but I guess this wasn't enough. Maybe i need a new kernel compile to make lm_sensors work.
It's a same that it's not installed in slackware by default...:(

perfect_circle 03-04-2005 09:09 PM

I managed to make it work. Last time I added by mistake the modprobe lines in modules.conf, thats why i had the errors. hotplug does seg_fault with lm)sensors and i had to dissable it in order to boot. I don't need it any way.....
I don't know if the values displayed are correct.
The bold ones are the values that could be correct:
Code:

lm90-i2c-0-4c
Adapter: SMBus Via Pro adapter at 5000
M/B Temp:    +49°C  (low  =    +0°C, high =  +70°C)
CPU Temp:  +46.7°C  (low  =  +0.0°C, high = +70.0°C)
M/B Crit:  +104°C  (hyst =  +94°C)
CPU Crit:  +106°C  (hyst =  +96°C)

eeprom-i2c-0-50
Adapter: SMBus Via Pro adapter at 5000
Memory type:            DDR SDRAM DIMM
Memory size (MB):      512

eeprom-i2c-0-51
Adapter: SMBus Via Pro adapter at 5000
Memory type:            DDR SDRAM DIMM
Memory size (MB):      512

it87-isa-0290
Adapter: ISA adapter
VCore 1:  +1.66 V  (min =  +1.42 V, max =  +1.57 V)  ALARM
VCore 2:  +1.26 V  (min =  +2.40 V, max =  +2.61 V)  ALARM
+3.3V:    +6.60 V  (min =  +3.14 V, max =  +3.46 V)  ALARM
+5V:      +4.87 V  (min =  +4.74 V, max =  +5.24 V)
+12V:    +12.08 V  (min = +11.40 V, max = +12.60 V)
-12V:      -6.88 V  (min = -12.63 V, max = -11.41 V)  ALARM
-5V:      -2.21 V  (min =  -5.24 V, max =  -4.76 V)  ALARM
Stdby:    +5.11 V  (min =  +4.74 V, max =  +5.24 V)
VBat:      +0.00 V
fan1:    1721 RPM  (min =    0 RPM, div = 8)
fan2:    1962 RPM  (min = 3013 RPM, div = 8)          ALARM
fan3:        0 RPM  (min = 3013 RPM, div = 8)
M/B Temp:    +33°C  (low  =  +15°C, high =  +40°C)  sensor = thermistor
CPU Temp:    -55°C  (low  =  +15°C, high =  +45°C)  sensor = thermistor
Temp3:      -55°C  (low  =  +15°C, high =  +45°C)  sensor = thermistor

root@darkstar:/home/skalkoto#

The others look wierd.
Any commends?

DaFrawg 03-05-2005 04:40 AM

Re: slackware 10.1 lm_sensors
 
Quote:

Originally posted by perfect_circle
Has anybody succeeded to compile i2c/lm_sensors 2.9.0 on slackware 10.1
I get compilation errors....

I did.
Quote:

Originally posted by perfect_circle
I patched i2c 2.9.0 to 2.9.0.1, or at least i think i did:
after tar xvzf i2c-2.9.0.tar.gz
I did patch -p0 < i2c-2.9.0.1.patch

Yes, you must patch it.
Quote:

Originally posted by perfect_circle
kernel/chips/bmcsensors.c:300: error: `m' undeclared (first use in this function)
kernel/chips/bmcsensors.c:300: error: (Each undeclared identifier is reported only once
kernel/chips/bmcsensors.c:300: error: for each function it appears in.)

That's a bug I had to fix manually. The authors of bmcsensors.c forgot to put 'sd->' before the identifier 'm'. So, open that file with your text editor of choice, go to line 300 and change
Code:

        /* swap lim1/lim2 if m < 0 or function is 1/x (but not both!) */
        if(m < 0 && sd->linear != 7 || m >= 0 && sd->linear == 7) {
                tmp = sd->lim1;

to
Code:

        /* swap lim1/lim2 if m < 0 or function is 1/x (but not both!) */
        if(sd->m < 0 && sd->linear != 7 || sd->m >= 0 && sd->linear == 7) {
                tmp = sd->lim1;

Note: I forgot where I got this from, but I didn't come up with it myself.

perfect_circle 03-05-2005 08:04 AM

Re: Re: slackware 10.1 lm_sensors
 
Quote:

Originally posted by DaFrawg
I did.
Yes, you must patch it.
That's a bug I had to fix manually. The authors of bmcsensors.c forgot to put 'sd->' before the identifier 'm'. So, open that file with your text editor of choice, go to line 300 and change
Code:

        /* swap lim1/lim2 if m < 0 or function is 1/x (but not both!) */
        if(m < 0 && sd->linear != 7 || m >= 0 && sd->linear == 7) {
                tmp = sd->lim1;

to
Code:

        /* swap lim1/lim2 if m < 0 or function is 1/x (but not both!) */
        if(sd->m < 0 && sd->linear != 7 || sd->m >= 0 && sd->linear == 7) {
                tmp = sd->lim1;

Note: I forgot where I got this from, but I didn't come up with it myself.

Does hotplug still work?

DaFrawg 03-05-2005 01:20 PM

Re: Re: Re: slackware 10.1 lm_sensors
 
Quote:

Originally posted by perfect_circle
Does hotplug still work?
What does hotplug have to do with it?

Oh by the way, to use lm_sensors, you must first modprobe all the sensor related modules. I had to load these:

i2c-core
i2c-proc
i2c-isa #yeah, the A7V8X-X has the sensors on the ISA bus
it87

After that, I did sensors -s (something you should always do before you use lm_sensors) and then just 'sensors' gives the sensor outputs. I had to tweak the configuration file a bit for my motherboard and the -5V and the -12V still display incorrect measurements, but it works good enough.

Good luck, it took me a while to get it working :D

perfect_circle 03-05-2005 01:25 PM

Re: Re: Re: Re: slackware 10.1 lm_sensors
 
Quote:

Originally posted by DaFrawg
What does hotplug have to do with it?

Oh by the way, to use lm_sensors, you must first modprobe all the sensor related modules. I had to load these:

i2c-core
i2c-proc
i2c-isa #yeah, the A7V8X-X has the sensors on the ISA bus
it87

After that, I did sensors -s (something you should always do before you use lm_sensors) and then just 'sensors' gives the sensor outputs. I had to tweak the configuration file a bit for my motherboard and the -5V and the -12V still display incorrect measurements, but it works good enough.

Good luck, it took me a while to get it working :D

I did manage to get lm_sensors working. What I'm saying is that after I install i2c and lm_sensors, i cannot use hotplug, because it completely freaks out, causing segmentation fault, and makes my slackware unbootable. If i dissable it, the pc works well. When i uninstall i2c/lm_sensors hotplug works again fine

DaFrawg 03-06-2005 12:56 PM

That's just... odd... I don't have any problems with hotplug (except that the usb part of hotplug script takes 10 seconds to complete, but I'm used to that). I have no idea what segmentation faults are (I'm kind of a newbie), but they sound severe...

perfect_circle 03-06-2005 01:25 PM

segmentation fault is an error an application can get when it tries to access memory outside the its own address space, which would be really dengarous. SO the OS kills it. The fact that you don't get a segmentation fault could be out of luck. I do have a TV card on my system and when hotplug detects it, it tries to load some modules. One of the modules is bttv, and this is the module that causes a seg_fault. When i remove the TV Card hotplug works fine, because it doesn't need bttv any more. If I manually try then to load bttv(witout having the card plugged), i just get this error:
Code:

lib/modules/2.4.29/kernel/drivers/media/video/bttv.o.gz: init_module: No such device
/lib/modules/2.4.29/kernel/drivers/media/video/bttv.o.gz: Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
      You may find more information in syslog or the output from dmesg
/lib/modules/2.4.29/kernel/drivers/media/video/bttv.o.gz: insmod /lib/modules/2.4.29/kernel/drivers/media/video/bttv.o.gz failed
/lib/modules/2.4.29/kernel/drivers/media/video/bttv.o.gz: insmod bttv failed

And if i plug the tv card and manually try to load the module i get a segmentation fault.


All times are GMT -5. The time now is 07:19 AM.