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

next in thread | previous in thread | raw e-mail | index | archive | help
Loren M. Lang wrote:
> On Thu, Mar 11, 2004 at 11:59:44AM +0100, Uwe Doering wrote:
>>Loren M. Lang wrote:
> [...]
> 
>>>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.
> 
> I mean why use that procedure over a make buildkernel installkernel, I
> thought they both did all that.

Well, as far as the result is concerned, both methods are identical. 
However, if you use the step-by-step procedure the object files remain 
intact after a kernel build, or at least until you delete them 
deliberately.  So if you then have to make just a minor patch to one of 
the source files, possibly in the course of a security advisory, 'make' 
recompiles only the source file that changed.

With the 'buildkernel' target, on the other hand, a complete kernel 
build takes place, that is, it compiles all source files again, 
regardless of how small the change you made actually was.  This costs 
considerably more time.

That's why the (selectively executed) step-by-step method makes sense 
for kernel development work and even the occasional security patch.

    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?40510622.7020906>