linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Module Load order
@ 2012-02-26  8:08 Prasanna Kumar T S M
  2012-02-26 13:40 ` Alan Cox
  2012-02-26 14:29 ` Kay Sievers
  0 siblings, 2 replies; 3+ messages in thread
From: Prasanna Kumar T S M @ 2012-02-26  8:08 UTC (permalink / raw)
  To: linux-kernel

Is there any specific module load order in Linux? If there is a GPL
driver and binary driver for a particular device which will be loaded?
Is there any logic to load GPL driver built inside the kernel? Or is the
module search and load is handled by some other component (like udev)
and not the kernel? Sorry for my ignorance if I have asked this to a
wrong list.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Module Load order
  2012-02-26  8:08 Module Load order Prasanna Kumar T S M
@ 2012-02-26 13:40 ` Alan Cox
  2012-02-26 14:29 ` Kay Sievers
  1 sibling, 0 replies; 3+ messages in thread
From: Alan Cox @ 2012-02-26 13:40 UTC (permalink / raw)
  To: Prasanna Kumar T S M; +Cc: linux-kernel

On Sun, 26 Feb 2012 13:38:27 +0530
Prasanna Kumar T S M <prasannatsmkumar@gmail.com> wrote:

> Is there any specific module load order in Linux? If there is a GPL
> driver and binary driver for a particular device which will be loaded?
> Is there any logic to load GPL driver built inside the kernel? Or is the
> module search and load is handled by some other component (like udev)
> and not the kernel? Sorry for my ignorance if I have asked this to a
> wrong list.

There should never be two drivers for one piece of hardware. There may be
two for the same PCI ID however which grab different device versions. In
that case both drivers get loaded and the probe routine figures out which
to bind.

Alan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Module Load order
  2012-02-26  8:08 Module Load order Prasanna Kumar T S M
  2012-02-26 13:40 ` Alan Cox
@ 2012-02-26 14:29 ` Kay Sievers
  1 sibling, 0 replies; 3+ messages in thread
From: Kay Sievers @ 2012-02-26 14:29 UTC (permalink / raw)
  To: Prasanna Kumar T S M; +Cc: linux-kernel

On Sun, Feb 26, 2012 at 09:08, Prasanna Kumar T S M
<prasannatsmkumar@gmail.com> wrote:
> Is there any specific module load order in Linux? If there is a GPL
> driver and binary driver for a particular device which will be loaded?
> Is there any logic to load GPL driver built inside the kernel? Or is the
> module search and load is handled by some other component (like udev)
> and not the kernel? Sorry for my ignorance if I have asked this to a
> wrong list.

The order is defined by the link-order of the kernel build, the order
of appearance in the Makefile. The kernel build system creates
compiled-in modules which always have a defined link-order of init
functions. Loadable modules create a file modules.order which is
installed along with the kernel modules. The modules.order file read
by the modprobe tool, and if multiple modules match on the same
hardware alias, the modules are always loaded in the order specified
by that file.

In general, the compiled-in order and the loadable-module order are
always predictable and reflect the order of appearance in the kernel
Makefile.

Out-of-tree/proprietary modules do not hook into that facility and
there is usually no predictable order.

It is possible though, that the out-of-tree module can be installed in
a separate directory in lib/modules and the search order is defined in
/etc/depmod.d/*.conf. Not sure, if that always works, it's something
that usually only enterprise Linux versions use, need and test, and
which might not be available and doesn't get tested in usual
distributions which do not care at all about driver priorities.

Kay

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-26 14:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-26  8:08 Module Load order Prasanna Kumar T S M
2012-02-26 13:40 ` Alan Cox
2012-02-26 14:29 ` Kay Sievers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).