Re: Insmod error......

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

 



whats the reason that we shud not use /usr/src/*
location to compile the modules. Is the kernel source
code in this directory not complete ? I compiled my
modules with kernel sources in /usr/src/* and they
work fine.

And how does /lib/modules/* have more than one kernel
sources in it ..... when i installed the linux 7.2 on
my machine, it did not create different directories
under /lib/modules/, i can not find any kernel sources
or include files under /lib/modules/. I only have
kernel sources installed in /usr/src/* 

--gd



--- Arjan van de Ven <arjanv@xxxxxxxxxx> wrote:

> On Wed, 2005-01-26 at 10:20 -0800, anil dahiya
> wrote:
> > Hi
> > this is happening because u have compiled your
> module
> > for kernel 2.4.20-8 (redhat 9.0) .now ur
> installing
> > that module on kernel 2.4.20 which is different
> from
> > kernel 2.4.20-8 (redhat 9.0).
> > 
> > please compile ur code with following command (for
> > example i am taking ur source file name as
> module.c) :
> > 
> > gcc -c module.c -D__KERNEL__ -DMODULE
> > -I/usr/src/linux-2.4.20/include
> > 
> > then to install module give command :
> > insmod module.o 
> > 
> > notes:-
> > a> if u have already defined __KERNEL__ & MODULE
> in ur
> > source file then u can skip those here.
> > b>  -I/usr/src/linux-2.4.20/include in this
> > linux-2.4.20 points to ur kernel in /usr/src
> directory
> > .If u have some othername for ur kernel in
> /usr/src
> > e.g linux then u shld define as
> > -I/usr/src/linux/include
> 
> do not use /usr/src/* on RHL/Fedora. It's the WRONG
> location in that you
> really should use
> /lib/modules/<version>/build/include
> ONLY. And nothing else (again on RHL/Fedora).
> 
> 

> ATTACHMENT part 2 application/pgp-signature
name=signature.asc




		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

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