# i2c and kernel compile issue

## j7899

I am currently trying to compile my kernel with i2c support, which make dep && make clean bzImage modules is fine, but when make modules_install is executed I get the below error. I need i2c compiled in so Gkrellm can display cpu temp and also voltages. Any adivce? It is listing the error after pcmcia, but I dont have any support enabled since I dont have pcmcia ports.

make[1]: Leaving directory `/usr/src/linux-2.4.19-gentoo-r5/arch/i386/lib'

cd /lib/modules/2.4.19-gentoo-r5; \

mkdir -p pcmcia; \

find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia

if [ -r System.map ]; then /sbin/depmod -ae -F System.map 2.4.19-gentoo-r5; fi

depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r5/misc/i2c-hydra.o

depmod: i2c_bit_add_bus_R8c3bc60e

depmod: i2c_bit_del_bus_R92b18f49

depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r5/misc/i2c-i810.o

depmod: i2c_bit_add_bus_R8c3bc60e

depmod: i2c_bit_del_bus_R92b18f49

depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r5/misc/i2c-via.o

depmod: i2c_bit_add_bus_R8c3bc60e

depmod: i2c_bit_del_bus_R92b18f49

depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r5/misc/i2c-voodoo3.o

depmod: i2c_bit_add_bus_R8c3bc60e

depmod: i2c_bit_del_bus_R92b18f49

make: *** [_modinst_post] Error 1

----------

## Guest

I am getting the same problem compilimg for a p3/celeron with i2c support. 

Could someone offer some suggestions??

----------

## jigma

first  "emerge unmerge lm_sensors"

then "make modules_install"

then "emerge lm_sensors"

----------

## j7899

Well I hosed my system by accident and started over. The modules load fine, but once I install lm_sensors that is when I the errors.

----------

## ronmon

I would forget about the lm_sensors package and use cvs. Go here [url=http://www2.lm-sensors.nu/~lm78/download.html] and follow the instructions for getting the cvs version. Do this as root from you /usr/src directory. Make sure to get the i2c and lm_sensors2 modules, you can update them later by running "cvs update -d" from within the directories that are created when you DL them the first time.

Now, to patch the kernel cd into i2c (you must do this before lm_sensors2) and run the following:

mkpatch/mkpatch.pl . /usr/src/linux | patch -p1 -E -d /usr/src/linux

Then run the same command from lm_sensors2.

Voila, activate i2c and the proper interfaces and the hardware sensors appear magically. I build mine in and avoid the hassle of setting up modules.

(Ed.) Arggh, I hate UBB code. You'll have to copy and paste.

----------

## Kartoffel

I had the same problem this is how I fixed it

rm /lib/modules/2.4.19-gentoo-r5/misc/i2c-hydra.o 

rm /lib/modules/2.4.19-gentoo-r5/misc/i2c-i810.o 

rm /lib/modules/2.4.19-gentoo-r5/misc/i2c-via.o 

rm /lib/modules/2.4.19-gentoo-r5/misc/i2c-voodoo3.o

Of course if you have to actually use those modules to get at the cpu temps then you really do have a problem.  Have you tried ignoring the errors and continuing the install/setup?  I did and it works fine (if I could just figure out why my case temp is at -100C cpu is correct however)

I juste deleted the broken modules because they annoyed me.

Have fun

Jeff

----------

## ronmon

Installing the package is what creates all those bogus modules. Patching the kernel and configuring only what you need, whether built-in or as modules, does a much cleaner job.

----------

## j7899

Thanks for all the replies I will look into it and try it out when I have some time. When I tried an modprobe i2c_ali(whatever it was) also returned insmod errors saying device resource busy, blah blah blah. I am assuming using the CVS build will fix this.

----------

