Re: Compiling Kernel Modules against the Kernel Source Tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri 6 June 2003 10:50, Christoph Wirz wrote:
> Hello,
>
> I have redhat 9.0 with kernel 2.4.20-8 running and the
> kernel-source-2.4.20-8.i386.rpm installed. The source tree is under
> /usr/linux-2.4/
>
> When I compile a module against the source tree and want to insert it
> thereafter, I get the following message:
>
> root@tuerli dd]# /sbin/insmod ./hello-1.o
> ./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.
>
> with /sbin/insmod -f ./hello-1.o it works.
>
> My attempt:
> ----------
> I recompiled the kernel and gave it an custom name. Result: The problem
> persisted. Only when I recompiled the kernel and gave it the name:
> 2.4.20 . The /sbin/insmod command worked properly. My conclusion: There
> must be a silly version check arround about which I dont' know and which
>   only compares strings.
>
> My questions:
> ------------
> 	-How can I compile the module that this warning doesn't occur
>
>           anymore(because source-tree and compiled kernel in my
> machine 			are the same, they only have different names.)
> 	-Is there a command arround to determine the source tree's
>
> 	version?
> 	-How does the gcc-compiler know where to look for the kernel
>        	header files? Is there a Environment Variable which
> determines 			that? Is there a default location?
>
> Thanks a lot,
> Christoph

go in your source tree and look at the main Makefile.
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 20
EXTRAVERSION =

This one is for a 2.4.20... is there any EXTRAVERSION=-8?





-------------------------------------------------------------------------------------------------------------------------------------------------------------
PGP PKEY      http://pgp.mit.edu:11371/pks/lookup?search=belch76@libero.it&op=index
ICQ#               104896040  
Netphone/Fax  178.605.7063
Homepage       http://web.tiscali.it/bellucda
-------------------------------------------------------------------------------------------------------------------------------------------------------------

Daniele Bellucci



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux