Re: kernel version of module editable where

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

 



> How do I rename the kernel I'm building?
> 
> And is that the same question as:
> 
> How do I build a module to try loading into whatever
> kernel?

Erm, not really.

To rename a kernel, you edit Makefile at the root directory
of your linux kernel.

> My uname-r is "2.4.20-xfs".

-EXTRAVERSION = -xfs
+EXTRAVERSION = -something-else

> >From http://www.kernel.org/ I fetched 2.4.20 and built
> a new drivers/usb/storage/usb-storage.o.
> 
> If I copy what I built to
> /lib/modules/2.4.20-xfs/kernel/ then modprobe chokes
> via:
> 
> ...: couldn't find the kernel version the module was
> compiled for
> ...: insmod ... failed
> ...: insmod usb-storage failed
> 
> I presume I've built a 2.4.20 module and not a
> 2.4.20-xfs module, ouch.

How did you build your usb-storage.o drivers? Make sure you
specify the include files when compiling 
(i.e. -I/usr/src/linux-`uname -r`/include). Make sure you
specify -DMODULE too.

> How do I build a module to try loading into whatever
> kernel?

Just compile, and load it. If you have problems with 
versionings, turn off modversions in your kernel. That
should work.

Eugene
-- 
eMail: eugeneteo@removethisplease.null.cc.uic.edu
gpg pub_key: http://tacheon.cc.uic.edu/~eugeneteo/eugeneteo.asc
main(i){putchar(182623909>>(i-1)*5&31|!!(i<7)<<6)&&main(++i);}

Attachment: pgp00420.pgp
Description: PGP signature


[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