Re: Problem setting up lm-sensors

From: P.T. Breuer (ptb_at_oboe.it.uc3m.es)
Date: 06/11/04


Date: Fri, 11 Jun 2004 11:10:03 +0200

Jean-David Beyer <jdbeyer@exit109.com> wrote:
> Richard Stonehouse wrote:
> I hate to seem stupid, having run UNIX since the early 1970s, but when I
> tried to run sensors-detect, it promptly came up with a module I needed
> that I did not have. Since I have the source and .config file for the
> kernel I am using (RHEL 3 ES kernel-smp-2.4.21-15.EL), and I downloaded
> i2c-2.8.4, I thought I might be able to install this. I even diddled the
> i2c makefile enough that it build a bunch of stuff. But I do not know how
> to build the stuff in /usr/src/linux-2.4.21-15.EL. Well, I could get in
> there and type _make_, but it seems pointless to build the entire kernel
> only to get a module from /usr/src/linux-2.4.21-15.EL/drivers/i2c
> And that just to get sensors-detect to run. (It wants i2c-i810 module and
> it does not appear in my system.)

Wel, you probably want to type "make modules" and suffer. But if you
want to do just the one module you'll want to probably run

  gcc -c -O2 -D__KERNEL__ -DMODULE -I /usr/src/linux-2.4.21-15.EL/include ..

on the .c.

If you need several components of the module, you might also need to
make them sepeartely and then compine them with a ld -o foo.o -r ...

You might also need -DEXPORT_SYMTAB if the module reexports its
symbols.

> Can I just go into /usr/src/linux/drivers/i2c and compile i2c-i810.c to
> get i2c-i810.o with the Makefile there and put that in
> /lib/modules--2.4.21-15.EL, run depmod -a, and then try sensors-detect

More or less, yes.

Peter



Relevant Pages

  • Re: recognize UNIX version
    ... You should write a ./configure shell script, which generates makefile, ... which comes with every UNIX platforms. ... echo CCFLAGS=$CCFLAGS>>Makefile ... Have Fun, & Linux! ...
    (comp.unix.programmer)
  • Re: Building Unix based library in windows
    ... I have the source code with me. ... I don't recall whether Visual Fortran comes ... can use a Unix Makefile directly. ... You'd have to look at the Makefile, ...
    (comp.lang.fortran)
  • Re: [slrn] slrnface tarball availability?
    ... the X-Face bitmap in the top right corner of the slrn thread pane. ... I go into slrnface's Makefile and try ... I hate this shit like Captain Hook hates the crocodile. ...
    (news.software.readers)
  • Re: INFOZIP >2Gb
    ... under USS as a Unix executable. ... the 14GB MVS file to USS just to zip it. ... The good news is the the mvs.mki makefile for unzip 6.0 builds just ... For IBM-MAIN subscribe / signoff / archive access instructions, ...
    (bit.listserv.ibm-main)
  • Re: Brand new to VS!
    ... flavors of Unix since I was 13. ... libraries and half as many binaries with four main "application" programs. ... That whole concept seems lost in Visual Studio or maybe I'm just missing ... utility out there to automatically convert a makefile setup to a VC ...
    (microsoft.public.vc.ide_general)