Re: How to compile a module for several kernels

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

 



On Mon, Sep 17, 2001 at 05:17:27PM +0100, John Levon wrote:
> On Mon, Sep 17, 2001 at 04:32:47PM +0200, Erik Mouw wrote:
> > The linux kernel only guarantees _source level_ compatibility for
> > kernel modules, not _binary level_ compatibility (unless there is a
> > very good reason to break the source level compatibility).
> 
> /me coughs
> 
> I wish that were really true ;)

A piece of code I wrote for linux-2.4.0 still compiles for 2.4.9, while
I can't insmod the 2.4.0 module into 2.4.9. I hope you're not promoting
the use of binary-only modules... ;)

> Anyway, people should check out CIPE's autoconf script which handles
> finding the kernel source tree nicely.

Why? /lib/modules/`uname -r`/build/ just *points* to the kernel source
of the kernel you're running right now:

  erik@arthur:~ >uname -a
  Linux arthur 2.4.9-ac10 #1 Mon Sep 10 19:34:09 CEST 2001 i686 unknown
  erik@arthur:~ >ls -l /lib/modules/`uname -r`/build
  lrwxrwxrwx    1 root     root           25 Sep 10 20:07 /lib/modules/2.4.9-ac10/build -> /usr/src/linux-2.4.9-ac10/

The "build" link was introduced to make it trivial to find the kernel
source.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[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