* Kernel-module version mismatch
@ 2001-11-23 7:15 Kashif
2001-11-23 7:17 ` Robert Love
0 siblings, 1 reply; 4+ messages in thread
From: Kashif @ 2001-11-23 7:15 UTC (permalink / raw)
To: linux-kernel
Hi Everybody,
I have recently upgraded from Redhat Linux 7.1 kernel
version 2.4.2 to 2.4.10. I am trying to insert a
driver module "code.o" (which was perfectly fine in the previous kernel)into
the new Kernel. But on insmod i get
an error:-
"kernel-module version mismatch. code.o was compiled
for kernel version 2.4.2-2 while this kernel is
version 2.4.10"
Although i am able to insert the driver module with
the -f(force) switch. But this results in a faulty
operation of the driver module. Rather i get an OOps message
I have tried recompiling the source of gcc in this new kernel but
that has also not solved this problem. Help will be
appreciated! Thank you.
Kashif!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Kernel-module version mismatch
2001-11-23 7:15 Kernel-module version mismatch Kashif
@ 2001-11-23 7:17 ` Robert Love
0 siblings, 0 replies; 4+ messages in thread
From: Robert Love @ 2001-11-23 7:17 UTC (permalink / raw)
To: Kashif; +Cc: linux-kernel
On Fri, 2001-11-23 at 02:15, Kashif wrote:
> I have recently upgraded from Redhat Linux 7.1 kernel
> version 2.4.2 to 2.4.10. I am trying to insert a
> driver module "code.o" (which was perfectly fine in the previous kernel)into
> the new Kernel. But on insmod i get
> an error:-
>
> "kernel-module version mismatch. code.o was compiled
> for kernel version 2.4.2-2 while this kernel is
> version 2.4.10"
>
> Although i am able to insert the driver module with
> the -f(force) switch. But this results in a faulty
> operation of the driver module. Rather i get an OOps message
> I have tried recompiling the source of gcc in this new kernel but
> that has also not solved this problem. Help will be
> appreciated! Thank you.
Not sure what recompiling gcc would achieve ... you need to recompile
this code.o module under your new RedHat kernel.
Robert Love
^ permalink raw reply [flat|nested] 4+ messages in thread
* kernel-module version mismatch
@ 2003-06-30 7:19 Christopher Sly
2003-06-30 8:36 ` Riley Williams
0 siblings, 1 reply; 4+ messages in thread
From: Christopher Sly @ 2003-06-30 7:19 UTC (permalink / raw)
To: linux-newbie
hello,
im trying to run the most simple linux modules and i get the
following error on saing:
/sbin/insmod hello.o
hello.o was compiled for kernel version 2.4.9-9
while this kernel is version 2.4.18-14.
I also tried:
gcc -c hello.c -I /usr/src/linux-2.4.18-14/include
with the same consequences
And:
gcc -c -D__KERNEL__ -DMODULE -I/usr/src/linux-2.4.18-14/include -o hello.o
hello.c
hello.c:1:1: warning: "MODULE" redefined
hello.c:1:1: warning: this is the location of the previous definition
again with the same consequence.
any suggestions?
the code looks like so:
#define MODULE
#include <linux/module.h>
int init_module (void) /* Loads a module in the kernel */
{
printk("Hello kernel n");
return 0;
}
void cleanup_module(void) /* Removes module from kernel */
{
printk("GoodBye Kerneln");
}
*******************************************************************************
Getting crazy on the waltzers but it's the life that I choose
-- Dire Straits
*******************************************************************************
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 4+ messages in thread* RE: kernel-module version mismatch
2003-06-30 7:19 kernel-module " Christopher Sly
@ 2003-06-30 8:36 ` Riley Williams
0 siblings, 0 replies; 4+ messages in thread
From: Riley Williams @ 2003-06-30 8:36 UTC (permalink / raw)
To: Christopher Sly; +Cc: linux-newbie
Hi Christopher.
> I'm trying to run the most simple Linux modules and I get the
> following error on saying:
>
> /sbin/insmod hello.o
>
> hello.o was compiled for kernel version 2.4.9-9
> while this kernel is version 2.4.18-14.
>
> I also tried:
>
> gcc -c hello.c -I /usr/src/linux-2.4.18-14/include
>
> with the same consequences and:
>
> gcc -c -D__KERNEL__ -DMODULE -I/usr/src/linux-2.4.18-14/include
> -o hello.o hello.c
> hello.c:1:1: warning: "MODULE" redefined
> hello.c:1:1: warning: this is the location of the previous
> definition
>
> again with the same consequence.
>
> any suggestions?
IIRR, insmod looks for the module to insert in the standard
modules directories, not in the current directory. Do you have
an old version of the module in there that you're trying to
insert instead of the one you've just compiled? Try...
find /lib/modules/ -name hello.o
...to find out as it could be anywhere under /lib/modules and
insmod would still find it. Also, if that finds nothing, try...
strace insmod hello.o 2>&1 | fgrep open
...and analyse the resulting listing looking for where it loads
that module from.
> the code looks like so:
>
> #define MODULE
> #include <linux/module.h>
>
> int init_module (void) /* Loads a module in the kernel */
> {
> printk("Hello kernel\n");
> return 0;
> }
>
> void cleanup_module(void) /* Removes module from kernel */
> {
> printk("GoodBye Kernel\n");
> }
There's nothing obviously wrong with that code, at least not
to me.
Best wishes from Riley.
---
* Nothing as pretty as a smile, nothing as ugly as a frown.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.493 / Virus Database: 292 - Release Date: 25-Jun-2003
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-06-30 8:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-23 7:15 Kernel-module version mismatch Kashif
2001-11-23 7:17 ` Robert Love
-- strict thread matches above, loose matches on Subject: below --
2003-06-30 7:19 kernel-module " Christopher Sly
2003-06-30 8:36 ` Riley Williams
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.