Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jun 2001 11:18:42 +0100
From:      Brian Somers <brian@Awfulhak.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        John Baldwin <jhb@FreeBSD.ORG>, Terry Lambert <tlambert2@mindspring.com>, arch@FreeBSD.ORG, Peter Pentchev <roam@orbitel.bg>, Nate Williams <nate@yogotech.com>, brian@Awfulhak.org
Subject:   Re: new kldpath(8): display/modify the module search path 
Message-ID:  <200106201018.f5KAIgh28526@hak.lan.Awfulhak.org>
In-Reply-To: Message from Bruce Evans <bde@zeta.org.au>  of "Wed, 20 Jun 2001 20:01:04 %2B1000." <Pine.BSF.4.21.0106201942360.23554-100000@besplex.bde.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> On Tue, 19 Jun 2001, John Baldwin wrote:
> 
> > On 20-Jun-01 Terry Lambert wrote:
> > > What is the interaction with /etc/modules.old, when you are
> > > booting a /kernel.old?
> > 
> > In -current (which is where kldconfig(8) is going, btw) all modules live with
> > their correspnding kernel in the same directory under /boot.  Thus modules and
> > kernel are in sync for kernel.old, kernel, and
> > kernel.fix_it_after_joe_random_committer_broke_it.
> 
> This means that the existence of a module search path is just a bug.
> The kernel shouldn't use a search path or add a path prefix for
> kldload(2) any more than it should for execve(2), but adding a path
> prefix is necessary for modules loaded directly by the kernel.  I used
> to think that a search path (with one element) was necessary for
> locating the modules, but now the modules are together with the kernel,
> the one-element search path can be derived from kernelname[].

No.  It means that whatever sets the module search path had better be 
careful to use directories that are consistent with the running 
kernel.

For example, if someone creates a mechanism to build ports modules 
just after running buildkernel and install them just after running 
installkernel, they may want to move /usr/local/boot/modules to 
/usr/local/boot/modules.old before installing and set the module 
search path appropriately depending on the running kernel.

It may also be a good idea to investigate the use of a 
/usr/boot/kernel* type component for modules that aren't required 
before /usr is mounted (similar to Solaris's setup).

The existence of a module search path is not a bug.  Its setting may 
currently be wrong though.

> Bruce

-- 
Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@[uk.]OpenBSD.org>
Don't _EVER_ lose your sense of humour !



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106201018.f5KAIgh28526>