modules finding order

Mark Johnston markj at FreeBSD.org
Sun Apr 16 22:12:55 UTC 2017


On Sun, Apr 16, 2017 at 10:21:37PM +0200, Baptiste Daroussin wrote:
> Hi all,
> 
> I would like to change in FreeBSD 12 at least the default order the modules are
> found/look up.
> 
> For now the modules are loaded from /boot/kernel first then if not found,
> checked from /boot/modules.
> 
> I think we should revert that to /boot/modules first then /boot/kernel.
> 
> The main reason being to simplify multiple things:
> 1/ If one needs to change a module (like backporting) I could install it from
> package and it would take precedent from the one provided by the default kernel
> I'm using
> 2/ As a hacker I could build my own version of a given module and install it in
> /boot/modules I won't overwrite the default kernel module

This complements r299393. Since that revision went in I've confused myself
several times by building and installing a module from sys/modules, and
then forgetting to explicitly kldload from /boot/modules, so I
instead get a stale copy.

> 3/ as a port maintainer I could provide my own version of the module that would
> take precedence over the one provided by the kernel.

I think we would like this behaviour for a port that installs the DRM
modules.

> 
> As it is a change in the default behaviour I would only do it for 12 (beside I
> would love to do it in earlier version :D)
> 
> Anyone has an opinion on the subject?

It seems reasonable to me.


More information about the freebsd-arch mailing list