DEST_MODULE_LOCATION must start with /kernel?

John Lau cflau at clustertech.com
Thu Apr 21 20:21:51 CDT 2005


Hi, Matt,

I would like to know where can I find some official doc about kernel
module path so that I can discuss with the myrinet developers. 

And from my experiment on RedHat AS3, depmod and modprobe can find and
load the driver in /lib/modules/<kernel-version>/gm as well.

[root at c303 gm]# depmod -a
[root at c303 gm]# modprobe gm
Warning: loading /lib/modules/2.4.21-15.EL/gm/gm.o will taint the
kernel: non-GPL license - Myricom
  See http://www.tux.org/lkml/#export-tainted for information about
tainted modules
Module gm loaded, with warnings

Best regards,
John Lau

©ó ¥|¡A2005-04-21 ©ó 08:24 -0500¡AMatt Domsch ´£¨ì¡G
> On Thu, Apr 21, 2005 at 09:57:38AM +0800, John Lau wrote:
> > Hi,
> > 
> > I would like to ask if DEST_MODULE_LOCATION must start with /kernel?
> 
> I don't think so.  That's just the traditional location.
> 
> > One driver I am porting to DKMS framework use /lib/modules/<kernel-
> > version>/gm as its default path.
> 
> gigabit myrinet perhaps?
> 
> > And I asked their developer and they said that they put the driver
> > there because they are external module and not belong to kernel
> > source.
> 
> That's OK, there's nothing about the directory name /kernel that
> *requires* that they be part of the kernel source provided by the
> distro.  (insert standard rant about why it's good to submit your
> drivers to kernel.org for inclusion, and why it's painful to maintain
> your drivers outside of the kernel.org tree).
> 
> The thing is, modprobe won't look in /gm for kernel modules, it looks
> in /updates or /kernel.  They must have their own initscripts which
> calls insmod directly w/o caring about modprobe.
> 
> > I would like to know is it a standard that external module should
> > put in the path /lib/modules/<kernel-version>/xxx but not in
> > /lib/modules/<kernel-version>/kernel.
> 
> The standard is that kernel modules go in /kernel.  One can also put
> "updates" to existing modules in /updates.  There isn't a standard to
> put it elsewhere.
> 
> 
> > And if so, should DKMS support installing drivers in such folders?
> 
> Because DKMS calls depmod to ensure module dependencies are met, and
> depmod==modprobe so it won't look outside of /kernel or /updates,
> 'dkms install' may well fail because depmod fails.  
> 
> 
> Thanks,
> Matt
> 
-- 
John Lau Chi Fai
Cluster Technology Ltd.
cflau at clustertech.com
Tel: (852) 2655-6114
Fax: (852) 2994-2101



More information about the DKMS-devel mailing list