|
[GN][FYI:]LKM version Problem and Solution (fwd)
|
Vijay Kumar
|
Feb 01, 2003 18:27 PST
|
This was a discussion with Alessandro Rubini thru mail
regarding the version mismatch problem when compiling and
insmod'ing an LKM into the kernel. Have forwarded this mail
so that someone could benefit.
P.S It has both the problem and thesolution.
---------- Forwarded message ----------
Date: Fri, 31 Jan 2003 18:02:34 +0100
From: Alessandro Rubini <rub-@gnu.org>
To: vijay-@users.sourceforge.net
Subject: Re: A query on editing linux/version.h
Hi.
| | Can I directly edit the file linux/version.h for
|
No. The file is generated when you compile the kernel.
| | compiling an LKM with the currently running kernel version
for UTS_RELEASE. I had done this for gettin around the version
mismatch problem when insmod'ing a module. Is it safe to do
|
The mismatch problem is a problem. Faking you use a different
version is a very bad workaround, not a fix.
| | P.S. I had tried the -f switch in insmod, is it OK to use this
switch for the LKM that are developed.
|
No. It's useful, sometimes, but if it crashes you know why :)
| | I've also compiled a custom kernel and then compiled the
module and insmod'ed it, which gets inserted into the
kernel fine without any warning.
|
That's the way to go: compile against the same kernel you are running.
Hope this helps
/alessandro
Regards
-vijay
|
|
 |
|