Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Mar 2004 11:59:44 +0100
From:      Uwe Doering <gemini@geminix.org>
To:        FreeBSD Mailing list <freebsd-questions@freebsd.org>
Subject:   Re: Kernel Questions
Message-ID:  <405046A0.9080702@geminix.org>
In-Reply-To: <20040311090126.GA19147@alzatex.com>
References:  <20040311090126.GA19147@alzatex.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Loren M. Lang wrote:
> A few questions on the FreeBSD kernel:
> 
> 1.  If I specify a driver in the config file with a device command, does
> that always mean that it's compiled in staticly and not as a module?

It will then be compiled in statically, but this doesn't affect the 
module (see below).

> 2.  How does make decide what to compile as a module?  Is it everything
> not compiled into the kernel that it can compile as a module?  And how
> would I tell what can only be compiled staticly and won't be compiled if
> it's not included with a device entry?

Per default all devices get compiled and installed as modules, 
regardless of whether you compile some of the devices statically into 
the kernel or not.

You can use

   makeoptions MODULES_OVERRIDE="..."

to limit the modules to be compiled and installed to the list you 
provide with this option.  See the comments in the 'LINT' file.

> 3.  The handbook seems to suggest to use the config, make, make install
> procedure for installing the kernel if you have no other reason for not
> using it, what is the reason for this?  (The paragraph immediately
> following procedure 2)

This sequence takes care that all the modules get installed together 
with the matching kernel, that a backup of both the kernel and the 
modules is available (suffix '.old') in case the new kernel doesn't work 
properly, and it also deals with the system immutable flag ('schg') that 
protects '/kernel' from being deleted or clobbered by accident.  You 
would have to do all these things by hand if you didn't use the 
recommended sequence.

    Uwe
-- 
Uwe Doering         |  EscapeBox - Managed On-Demand UNIX Servers
gemini@geminix.org  |  http://www.escapebox.net



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