LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-27-2004, 02:33 AM   #1
ashlock
Member
 
Registered: Jul 2003
Distribution: Fedora Core 2, RH 9
Posts: 33

Rep: Reputation: 15
Anyone having problems with i8kutils on Kernel 2.6?


i8kutils (fan temp control for Dell inspiron laptops) is included in 2.6 kernels, but the modules would not install for me. I always got an "invalid module format" message when trying to (force) install the module.

After 2 months of occasional messing around with this problem, I finally got it working. There were about 4 different problems with getting it working under Kernel 2.6.8 on Fedora Core 2. Here is my rather jaded 2 am synopsis of my solution procedure.


Getting the i8kutils to work on Kernel 2.6.8-1.521 on an inspiron 8600
--------------------------------------------------------------------------------------------------

(1) i8kutils was included in the kernel. Compiling it as a module or directly into
the kernel didn't work, giving the error;

insmod: error inserting 'i8k.o': -1 Invalid module format

So I Downloaded the source code and had to create the symbolic links /usr/src/linux and
/usr/src/linux-2.6 to point to the current source directory (newer RH Kernels don't do this anymore, I guess). I could have just changed the /usr/src/linux variable in the Makefile but I think some module stuff also needs these links. Then I
ran 'make' and 'make install'.

(2) Then make module was complaining about some crap;

---begin some crap---

/usr/src/linux/include/asm/system.h: In function `__set_64bit_var':
/usr/src/linux/include/asm/system.h:193: warning: dereferencing type-punned pointer
will break strict-aliasing rules
/usr/src/linux/include/asm/system.h:193: warning: dereferencing type-punned pointer
will break strict-aliasing rules
i8k.c:884:2: warning: #warning "compiling unversioned module, load with insmod --force"
strip --strip-unneeded \

---end some crap---

I googled the error message, found out that optimization -O2 was the problem, and changed this to -O in the Makefile. The aliasing error went away and the complaint about
SET_MODULE_OWNER remained.

(3) SET_MODULE_OWNER appears to have been deprecated (see
http://lwn.net/Articles/27756/), so I tried to use patch but couldn't figure it out,
and I just added the line

#define SET_MODULE_OWNER(dev) ((dev)->owner = THIS_MODULE)

after the line containing 'symbol_request', to /usr/src/linux/include/linux/module.h
and this problem went away.


(4) Then the module format was the old i8k.o and we need it to be the current i8k.ko
(see http://lwn.net/Articles/21823/) , so move Makefile to Makefile2 since we are done
with it and can always use 'make -f Makefile2' to use it again, and create a new
Makefile containing the line;

obj-m := i8k.o

and type

make -C /path/to/source SUBDIRS=$PWD modules

then

insmod i8k.ko

And freakin' voila, a 2 month long nagging problem solved that the author probably
could have solved in about 2 seconds if he had the time to look at my (invited)
email. He's probably way to deluged by a flood of similar emails, though.
 
Old 09-27-2004, 11:35 AM   #2
ashlock
Member
 
Registered: Jul 2003
Distribution: Fedora Core 2, RH 9
Posts: 33

Original Poster
Rep: Reputation: 15
After recompiling the kernel, i8kutils will now load at boot time, but I get a lot of warnings because netdevice .h file had already defined SET_MODULE_OWNER(dev).

Is there a better way to take care of this part of the problem?
 
Old 01-13-2005, 11:24 PM   #3
ashlock
Member
 
Registered: Jul 2003
Distribution: Fedora Core 2, RH 9
Posts: 33

Original Poster
Rep: Reputation: 15
Just in case anyone else is using this, it's easier to replace step 3 with the following; just delete the line that mentions SET_MODULE_OWNER from i8k.c
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel compilation problems, distorted video and kernel panic shamrock_uk Linux - Laptop and Netbook 5 08-12-2005 10:53 PM
problems occured after upgrading kernel and kernel-utils parv Fedora 0 05-02-2005 06:21 PM
Kernel Problems. Howto Compile a new kernel from 4.2 with backwards compatibility ? ShoCkwave Linux - General 2 06-19-2004 06:02 AM
i8kutils issue: no /proc/i8k on Dell Inspiron 8500 geraschenko Linux - Newbie 1 05-28-2004 03:50 PM
slack - cpuspeed & i8kutils Dark Carnival Linux - Laptop and Netbook 3 04-05-2004 03:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration