Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Feb 2006
Problem In Compiling "hello World " Module
printk("<1>GoodBye World 1.\n");
On compiling the program,the error is as follows.
[root@localhost dd]# gcc -c hello2.c
[root@localhost dd]# insmod ./hello.o
./hello.o: kernel-module version mismatch
./hello.o was compiled for kernel version 2.4.20
while this kernel is version 2.4.22-1.2115.nptl.
Can anyone provide me a solution to solve the above problem.To know the kernel version, the folowing command may help u.
[root@localhost root]# uname -a
Linux localhost.localdomain 2.4.22-1.2115.nptl #1 Wed Oct 29 15:42:51 EST 2003 i 686 i686 i386 GNU/Linux
02-10-2006 #2Originally Posted by sharanu
looks like the hello-word-example from Oreilly's Linux Device Driver book
Try to add
when compilig kernel code.
Another solution is to build and run your own kernel
(without version support)
- Join Date
- Jan 2006
Which kernel version source code you have, and what is the kernel version of the running image.
If it happens to be like you are running the 2.4.20 kernel version and trying to compile your module with the other kernel version source code then you are in trouble.
Let me know if you have any problems.....