Re: Problem in inserting module

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

 




--- Rajaram Suryanarayanan <rajaram_linux@xxxxxxxxx>
wrote:

> Hi,
>  
>  I am getting some problem in inserting a module
> even after compiling it for the running kernel.
>  
>  [root@localhost kernel-modules]# insmod hello-1.ko
>  insmod: error inserting 'hello-1.ko': -1 Invalid
> module format
>  [root@localhost kernel-modules]#
>  
>  This does not seem to be related with the common
> vermagic problem, as I see the following message in
> dmesg.
>  hello_1: disagrees about version of symbol
> struct_module
>  
>  Please see the Makefile and make output below.
> Please clarify me what goes wrong.
>  
>  Makefile :
>  
>  obj-m += hello-1.o
>  all:
>          make -C /lib/modules/$(shell uname
> -r)/build M=$(PWD) EXTRA_CFLAGS="-g" modules
>  
>  
>  
>  [root@localhost kernel-modules]# make
>  make -C /lib/modules/2.6.14.4-kdbnew/build
> M=/root/kernel-modules  EXTRA_CFLAGS="-g" modules
>  make[1]: Entering directory
> `/linux-source/linux-2.6.14.4'
>    CC [M]  /root/kernel-modules/hello-1.o
>  /root/kernel-modules/hello-1.c: In function
> `init_module':
>  /root/kernel-modules/hello-1.c:10: warning: int
> format, long unsigned int arg (arg 2)
>    Building modules, stage 2.
>    MODPOST
>    LD [M]  /root/kernel-modules/hello-1.ko
>  make[1]: Leaving directory
> `/linux-source/linux-2.6.14.4'
>  [root@localhost kernel-modules]#
>  
>  [root@localhost kernel-modules]# uname -a
>  Linux localhost.localdomain 2.6.14.4-kdbnew #7 SMP
> PREEMPT Sun Jan 22 17:02:06 IST 2006 i686 i686 i386
> GNU/Linux
>  [root@localhost kernel-modules]#
>  

u r probably trying to insert the module into a
different kernel ,for which u had compiled. for e.g u
might be inserting it into the kernel which had come
with ur installation not the linux-2.6.14.4 compiled
kernel.
so boot into the newly compiled kernel then try
inserting it.

regards
kanishk

>  Thanks,
>  Rajaram.
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> 		
> ---------------------------------
> Relax. Yahoo! Mail virus scanning helps detect nasty
viruses!


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--
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