RE: insmod: error inserting

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

 



How did you build the module?
Modules compiled for one version of the kernel cannot be inserted in another version. Generally you got this error "Invalid madule format" when you there is a mis-match between running kernel and kernel-source versions. Here is an URL on how to build a kernel module for 2.6 kernels

http://www.linuxtopia.org/online_books/Linux_Kernel_Module_Programming_Guide/x181.html

--

Regards,

Gaurav Aggarwal


From: kernelnewbies-bounce@xxxxxxxxxxxx [mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of Onkar
Sent: Tuesday, January 29, 2008 12:20 PM
To: Manish Katiyar; kernelnewbies@xxxxxxxxxxxx
Subject: Re: insmod: error inserting

 

let me tell the sequence of step I followed  before I got that error :

(1) I compiled the kernel with the CONFIG_B44=m option
(2) then I booted with this new kernel 2.6.18
(3) at his time lsmod |grep b44 showed b44 (that means module loaded at boot time)
(4) then , I removed the module : modprobe -r b44  (at this point I lost the network connection)
(5) then I took b44.c and b44.h from drivers folder of the kernel and compiled them seperately (away from the kernel) -> this compiled successfully
(6) insmod b44.ko gave me those errors !!!

Any clue , why  ?


Onkar


On Jan 29, 2008 12:05 PM, Manish Katiyar <mkatiyar@xxxxxxxxx> wrote:

Have you compiled with the same kernel version which you are running ?
I guess u are using 2.4 kernel.


On Jan 29, 2008 12:02 PM, Onkar <onkar.n.m@xxxxxxxxx> wrote:
> I was experimenting with the etnernet driver code : Broadcom b44 NIC . I
> took the code from the linux kernel /drivers directory and tried to compile
> it seperately and insert into the running kernel.
> the kernel is just freshly compiled  ??
>
> insmod: error inserting './b44.o': -1 Invalid module format ??
>
> Can I not do it like that ?? I even tried to insert the module compiled
> during kernel compilation in the drivers directoy .. but that too is giving
> the same results.
>
> Please guide me to point out whats going wrong ?
>
>
>


--
Thanks & Regards,
********************************************
Manish Katiyar  ( http://mkatiyar.googlepages.com )
3rd Floor, Fair Winds Block
EGL Software Park
Off Intermediate Ring Road
Bangalore 560071, India
***********************************************

 


[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