Skip to contentSkip to conversation

i2c & lm_sensors for RH

DISCUSSION Axel Thimm 2 participants 14 messages May 19, 2005

lore
Share & tools
lore

Axel Thimm

author
#0 lore raw

Is anyone working on this? If not, I'd be interested (I have been maintaining rpms for kernel and userland parts for i2c/lm_sensors 2.7.0 at atrpms).

I am already trying to patch the i2c core and surrounding patches into the latest RH errata kernel (based on 2.4.21-pre3). I might have a question or two, and could use testers, since I am doing it upon request, and the machines I currently have available aren't that sensor friendly (one is a Thinkpad ...).

Signature · 8 lines
[email protected]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030802/c9949853/attachment.bin
author
#1 lore raw
Quoted 7 lines · Jean Delvare
Quoted 4 lines

Is anyone working on this? If not, I'd be interested (I have been maintaining rpms for kernel and userland parts for i2c/lm_sensors 2.7.0 at atrpms).

We don't build packages anymore, we leave the job to the distribution maitainers.

OK. RH probably will most probably stay with 2.6.5 even with the next release (at least current beta says so). So I will try my luck.

Quoted 6 lines
Quoted 5 lines

I am already trying to patch the i2c core and surrounding patches into the latest RH errata kernel (based on 2.4.21-pre3). I might have a question or two, and could use testers, since I am doing it upon request, and the machines I currently have available aren't that sensor friendly (one is a Thinkpad ...).

Quoted 8 lines

Questions are welcome and will be answered the best we can.

BTW: We would like packagers to report fixes they add to their packages. I have seen many i2c and lm_sensors packages for various distributions (Red Hat and Gentoo come to mind) including bugfixes to our code and not letting us know about it. If you want us to fix the bugs, you have to report, we just can track all packages all the time to see if some bugs have been locally found and fixed.

I always report any fixes upstream, I hope Red Hat does, too.

Signature · 8 lines
[email protected]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030802/e0ef7448/attachment.bin
#2 lore raw
In reply to Axel Thimm
Quoted 4 lines

Is anyone working on this? If not, I'd be interested (I have been maintaining rpms for kernel and userland parts for i2c/lm_sensors 2.7.0 at atrpms).

We don't build packages anymore, we leave the job to the distribution maitainers.

Quoted 5 lines

I am already trying to patch the i2c core and surrounding patches into the latest RH errata kernel (based on 2.4.21-pre3). I might have a question or two, and could use testers, since I am doing it upon request, and the machines I currently have available aren't that sensor friendly (one is a Thinkpad ...).

Questions are welcome and will be answered the best we can.

BTW: We would like packagers to report fixes they add to their packages. I have seen many i2c and lm_sensors packages for various distributions (Red Hat and Gentoo come to mind) including bugfixes to our code and not letting us know about it. If you want us to fix the bugs, you have to report, we just can track all packages all the time to see if some bugs have been locally found and fixed.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
author
#3 lore raw
In reply to Axel Thimm

Hi,

Quoted 4 lines · Axel Thimm
Quoted 3 lines · Jean Delvare
Quoted 3 lines

Is anyone working on this? If not, I'd be interested (I have been maintaining rpms for kernel and userland parts for i2c/lm_sensors 2.7.0 at atrpms).

I managed to merge and build i2c&lm_sensors into the kernel sources for RH 9/8.0/7. The only change to i2c&lm_sensors I had to make were prepatches to get the code base patchable for some parts that changed up to the 2.4.21 release. So no real patches for i2c/lm_sensors in the kernel space. :)

I have now turned to the userspace. In order to build the lm_sensors userland I need to compile against the kernel headers including the patched in i2c headers (so I2C_HEADERS and LINUX_HEADERS point to the same dir).

Since I am building against kernel headers, does that mean that the resulting tools are only applicable to that kernel? Or are they to any kernel that has i2c/lm_sensors 2.8.0 patched in?

I wonder if I need LINUX_HEADERS at all, since I am not building external modules, and whether I should simply "carry" the i2c tarball with the lm_sensors source package and build against the i2c headers in that tarball (in order to build independently of the running kernel or installed kernel sources). Does that make sense?

Signature · 8 lines
[email protected]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030805/8bb0bc44/attachment.bin
#4 lore raw
In reply to Axel Thimm
Quoted 6 lines

I managed to merge and build i2c&lm_sensors into the kernel sources for RH 9/8.0/7. The only change to i2c&lm_sensors I had to make were prepatches to get the code base patchable for some parts that changed up to the 2.4.21 release. So no real patches for i2c/lm_sensors in the kernel space. :)

I'm not sure I understood everything there, but as long as you think there's nothing we should integrate, it's OK ;)

Quoted 8 lines

I have now turned to the userspace. In order to build the lm_sensors userland I need to compile against the kernel headers including the patched in i2c headers (so I2C_HEADERS and LINUX_HEADERS point to the same dir).

Since I am building against kernel headers, does that mean that the resulting tools are only applicable to that kernel? Or are they to any kernel that has i2c/lm_sensors 2.8.0 patched in?

LM Sensors userspace mostly depends on I2C version, not on kernel version (well, you have to stick to Linux 2.4 however). As for the I2C version, a minimal version is required for any given lm_sensors, and the tools compiled using these headers should then be usable with all later versions.

You think you compile against kernel headers because i2c headers are there, but you could as well copy all i2c headers to /usr/local/include and compile against them there.

Quoted 5 lines

I wonder if I need LINUX_HEADERS at all, since I am not building external modules, and whether I should simply "carry" the i2c tarball with the lm_sensors source package and build against the i2c headers in that tarball (in order to build independently of the running kernel or installed kernel sources). Does that make sense?

You do not need LINUX_HEADERS at all. It is used for userspace tools in lm_sensors 2.8.0's Makefile but this is a bug and has been fixed in CVS (you may checkout the new one if you want).

You won't be able to use the headers directly from the i2c tarball because lm_sensors expects them in a linux/ subdirectory. But you can build such a subdirectory rather easily IMHO, and that may suit your needs for the lm_sensors package build process.

Hope that helps.

BTW: We had a Red Hat user reporting he couldn't get lm_sensors to compile on his RH9. The message is available here:
http://archives.andrew.net.au/lm-sensors/msg03872.html
Could you please take a look at the log and tell me if you have any idea?

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
author
#5 lore raw
In reply to Axel Thimm
Quoted 6 lines · Jean Delvare
Quoted 5 lines

I wonder if I need LINUX_HEADERS at all, since I am not building external modules, and whether I should simply "carry" the i2c tarball with the lm_sensors source package and build against the i2c headers in that tarball (in order to build independently of the running kernel or installed kernel sources). Does that make sense?

Quoted 8 lines

You do not need LINUX_HEADERS at all. It is used for userspace tools in lm_sensors 2.8.0's Makefile but this is a bug and has been fixed in CVS (you may checkout the new one if you want).

You won't be able to use the headers directly from the i2c tarball because lm_sensors expects them in a linux/ subdirectory. But you can build such a subdirectory rather easily IMHO, and that may suit your needs for the lm_sensors package build process.

I ended using

make LINUX=`pwd`/empty LINUX_HEADERS=`pwd`/empty I2C_HEADERS=`pwd`i2c-%{version}/kernel \
     COMPILE_KERNEL=0 MODVER:=1 SMP:=0 WARN=1 \
     KERNELCHIPSDIR=kernel/chips SRCDIRS='mkpatch kernel/include lib prog/sensors prog/dump prog/detect ${PROG_EXTRA:%=prog/%} etc'
     PROG_EXTRA=sensord \
     user

and similar for make user_install. Before that I unpackged i2c into lm_sensors topdir. This seems to work, also does the right thing with respect to the missing sensors.h (Ticket 1344).

Quoted 1 line

Hope that helps.

Thanks, I will be testing, whether this works at all, and report some found patches back (by Red Hat, not me). I will be building 2.8.0 enabled kernels & userland for RH 7.3, 8.0 and 9, if I succeed :)

Quoted 5 lines

BTW: We had a Red Hat user reporting he couldn't get lm_sensors to compile on his RH9. The message is available here:
http://archives.andrew.net.au/lm-sensors/msg03872.html
Could you please take a look at the log and tell me if you have any idea?

The first rows of errors/warning is the dependency generation, so it is OK (I also get similar warnings). I never compiled lm_sensors as modules, so I didn't hit the other errors in kernel/busses. But I see stuff like loops_per_jiffy_R_ver_str which should have been resolved by some macros to the usuall R<hash> modhashes. So something is wrong wrt the user's mod versioning configuration. The user should maybe file the output of the preprocessor.

Signature · 8 lines
[email protected]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030807/ab48897b/attachment.bin
#6 lore raw
In reply to Axel Thimm
Quoted 9 lines

I ended using
make LINUX=pwd/empty LINUX_HEADERS=pwd/empty I2C_HEADERS=pwdi2c-%{version}/kernel \
COMPILE_KERNEL=0 MODVER:=1 SMP:=0 WARN=1 \
KERNELCHIPSDIR=kernel/chips SRCDIRS='mkpatch kernel/include lib prog/sensors prog/dump prog/detect ${PROG_EXTRA:%=prog/%} etc' PROG_EXTRA=sensord \ user

Quoted 3 lines

and similar for make user_install. Before that I unpackged i2c into lm_sensors topdir. This seems to work, also does the right thing with respect to the missing sensors.h (Ticket 1344).

Ticket is under resolution. I'd expect you get the same result with:
make LINUX=pwd/empty LINUX_HEADERS=pwd/empty

      I2C_HEADERS=`pwd`i2c-%{version}/kernel \
      MODVER:=1 SMP:=0 WARN=1 \
      PROG_EXTRA=sensord \
      user

(That is, don't use COMPILE_KERNEL nor SRCDIRS.)

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
author
#7 lore raw
In reply to Axel Thimm

Hi,

I have uploaded

o latest RH kernel with i2c/lm_sensors 2.8.0 patched in
o lm_sensors 2.8.0 userland
o bttv with i2c 2.8.0 patches
o ivtv with i2c 2.8.0 patches
o saa7134 with i2c 2.8.0 patches

for the current three RH releases (9, 8.0 and 7.3) at http://atrpms.physik.fu-berlin.de/

Many thanks for all the help!!! I hope those rpms will be helpful to the lm_sensors community!

There is another i2c application that break with the i2c changes:
lirc. At least the current CVS code bails out. Could you provide a patch for the CVS bits (non-CVS is far to old)? :)

Thanks, Axel.

Signature · 8 lines
[email protected]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030810/1a8540d3/attachment.bin
#8 lore raw
In reply to Axel Thimm
Quoted 11 lines

I have uploaded

o latest RH kernel with i2c/lm_sensors 2.8.0 patched in
o lm_sensors 2.8.0 userland
o bttv with i2c 2.8.0 patches
o ivtv with i2c 2.8.0 patches
o saa7134 with i2c 2.8.0 patches

for the current three RH releases (9, 8.0 and 7.3) at http://atrpms.physik.fu-berlin.de/

I linked to it from our news page and our download page.

Quoted 2 lines

Many thanks for all the help!!! I hope those rpms will be helpful to the lm_sensors community!

Well, many thanks to you :)

Quoted 3 lines

There is another i2c application that break with the i2c changes:
lirc. At least the current CVS code bails out. Could you provide a patch for the CVS bits (non-CVS is far to old)? :)

I am currently unable to check the CVS tree out, due to a stale read lock it seems. I'll try again later and let you know when a patch is ready.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
author
#9 lore raw
In reply to Axel Thimm
Quoted 8 lines · Jean Delvare
Quoted 8 lines

I have uploaded

o latest RH kernel with i2c/lm_sensors 2.8.0 patched in
o lm_sensors 2.8.0 userland
o bttv with i2c 2.8.0 patches
o ivtv with i2c 2.8.0 patches
o saa7134 with i2c 2.8.0 patches

Quoted 4 lines
Quoted 2 lines

for the current three RH releases (9, 8.0 and 7.3) at http://atrpms.physik.fu-berlin.de/

I linked to it from our news page and our download page.

Thanks! :)

I forgot to mention: The 2.8.0 enabled kernel and drivers have a tag like 2.4.20-19.23.rhxxx.at, while the non-enabled RH proper stuff has the usual 2.4.20-19.x tag.

Quoted 7 lines
Quoted 3 lines

There is another i2c application that break with the i2c changes:
lirc. At least the current CVS code bails out. Could you provide a patch for the CVS bits (non-CVS is far to old)? :)

I am currently unable to check the CVS tree out, due to a stale read lock it seems. I'll try again later and let you know when a patch is ready.

OK, thanks.
I will be on vacation this week, and lirc is quite a nasty beast to package (all different builds have the same name), so I won't be really looking into it until the end of August, I guess.

BTW the 2.8.0 patched drivers, do they compile against < 2.8.0? I assumed not, so I have built in a 2.8.0 kernel detection in the rpm specfiles, so the patches are only applied if the kernel has 2.8.0 i2c embedded (currently the match checking is exact, so it needs to be reworked for 2.8.1 or 2.9.0).

Signature · 1 line
[email protected]
author
#10 lore raw
In reply to Axel Thimm
Quoted 6 lines · Jean Delvare
Quoted 3 lines

I forgot to mention: The 2.8.0 enabled kernel and drivers have a tag like 2.4.20-19.23.rhxxx.at, while the non-enabled RH proper stuff has the usual 2.4.20-19.x tag.

Is it something we should mention somewhere on our site, or is it obvous on your side?

It is obvious for kernel and userland tools. For driver compiled for a given kernel it is hidden in the tag (needs to match the kernel relase tag), but I think this is also rather obvious, as the kernel module rpm are only installable if you have installed the matching kernel (rpm barks otherwise). So I think it is quite safe.

Quoted 1 line

Have a nice vacation :)

Thanks! :)

Signature · 8 lines
[email protected]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030811/f0e53f9a/attachment.bin
#11 lore raw
In reply to Axel Thimm
Quoted 4 lines

I forgot to mention: The 2.8.0 enabled kernel and drivers have a tag like 2.4.20-19.23.rhxxx.at, while the non-enabled RH proper stuff has the usual 2.4.20-19.x tag.

Is it something we should mention somewhere on our site, or is it obvous on your side?

Quoted 3 lines

I will be on vacation this week, and lirc is quite a nasty beast to package (all different builds have the same name), so I won't be really looking into it until the end of August, I guess.

I finished the patches (one for 0.6.6 on another user's request, one for CVS), they are available on my page.

Quoted 5 lines

BTW the 2.8.0 patched drivers, do they compile against < 2.8.0? I assumed not, so I have built in a 2.8.0 kernel detection in the rpm specfiles, so the patches are only applied if the kernel has 2.8.0 i2c embedded (currently the match checking is exact, so it needs to be reworked for 2.8.1 or 2.9.0).

You assumed just right. The patches we provide are filling the gap between us modifying the structures and these new structures being integrated into the kernel tree. They are not definitive patches, they are just meant to support the users during the transition time. Once our patch is integrated into the kernel (should be in 2.4.23, or at least we hope so), each other project using i2c will have to support the new structures and should support both pre and post transition kernels.

My plan is to release 2.8.1 right after linux 2.4.22, so we can have a real CVS version integrated into the kernel, not just a CVS snapshot at a given point in time, so we'll have to rebuild another set of user-supporting patches on my side, and another set of packages on your side. After that, things should be somewhat easier.

Have a nice vacation :)

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#12 lore raw
In reply to Axel Thimm
Quoted 4 lines

I just went to get them (people are asking for lirc support for these kernels) and the installation guide is blocked (403 permission denied). Even http://www.ensicaen.ismra.fr/ itself is returning 403.

My school's webserver is dead broken, and there's nothing I can do :(

What's more, I'm not at home now and can't send you the files. Please wait until saterday and I'll send them to you. Sorry.

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

author
#13 lore raw
In reply to Axel Thimm

Hi,

Quoted 6 lines · Jean Delvare
Quoted 3 lines

I will be on vacation this week, and lirc is quite a nasty beast to package (all different builds have the same name), so I won't be really looking into it until the end of August, I guess.

I finished the patches (one for 0.6.6 on another user's request, one for CVS), they are available on my page.

I just went to get them (people are asking for lirc support for these kernels) and the installation guide is blocked (403 permission denied). Even http://www.ensicaen.ismra.fr/ itself is returning 403.

Signature · 8 lines
[email protected]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030819/bd640e3e/attachment.bin