[LCP]insmod myself kernel module failed
Emil Tantilov
emocom at yahoo.com
Wed Aug 4 06:02:01 UTC 2004
Sophia,
I presume that you're using RH (based on the kernel
version). When you're trying to compile a module there
are some basic rules that you need to follow:
- To be able to use the module you need to make sure
that the module is built against the kernel source of
the running kernel and also that the configuration of
the kernel source (.config) matches your current
kernel.
In your case it appears that you have the source, but
not the configuration. To fix this copy the config
file for your system (usually in
/usr/src/linux-ver/configs). Then do "make oldconfig"
Also make sure that the version specified in the
Makefile matches your current version. In you case
open /usr/src/linux-ver/Makefile and set "EXTRAVERSION
= -8" if this alone doesn't work then you'll have to
fix the kernel configuration as mentioned above.
Emil
--- daixi <daixi1703163 at 163.com> wrote:
> study linux kernel module programming
> but when i use 'insmod hello-1.o', some error
> messages:
>
> ./hello-1.o: kernel-module version mismatch
> ./hello-1.o was compiled for kernel version 2.4.20
> while this kernel is version 2.4.20-8.
>
> I am newbie to linux kernel programming, help me
> tks
>
> Regards
> Sophia : )
>
>
> _______________________________________________
> This is the Linux C Programming List
> :
> http://lists.linux.org.au/listinfo/linuxcprogramming
> List
>
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
More information about the linuxCprogramming
mailing list