Is it safe to interrupt (Ctrl + C) while building a port or kernel?

Robert Bonomi bonomi at mail.r-bonomi.com
Thu Nov 3 18:49:30 UTC 2011


On Thu, 03 Nov 2011 18:29:06 +0100, Damien Fleuriot <ml at my.gd) wrote:
> On 11/3/11 6:20 PM, Robert Bonomi wrote:
> >> From owner-freebsd-questions at freebsd.org  Thu Nov  3 12:10:08 2011
> >> From: =?koi8-r?B?4c7Uz84g68zF09M=?= <rc5hack at yandex.ru>
> >> To: freebsd-questions at freebsd.org
> >> Date: Thu, 03 Nov 2011 21:10:19 +0400
> >> Subject: Is it safe to interrupt (Ctrl + C) while building a port or kernel?
> >>
> >> Sometimes, while building process of some port or system kernel are in progress, you suddenly remember that you did something wrong and have to stop, solve your mistake and start one more time.
> >>
> >> Is it clear to interrupt the building process just by pressing Ctrl + <C>?
> > 
> > Yes.
> > 
> >> If it's so, do I need to run "make clean" before I start "make" one more time?
> > 
> > Authoritative answer:  "It depends".
> > 
> > On what you 'did wrong", and what it takes to fix it.
> > 
> > e.g.,  if you're building a kernel the 'classial' way, that is 'configure,
> > make depend, cd , make',  and realize you left something out of the config
> > file, after you edit the config file, you have to rerun _all_ those steps.
> > 
>
> Is it even advisable to build the kernel the "old" way ?

On a slow processor, it makes a *BIG* differnence.
Even more so if you build everything you need into the kernel.

'make buildkernel' always recompiles an relinks *everything*. whether or
not any dependenies for the module have changed.

I've tried 'make buildkernel' on a 'loaded' 486 box, and had it take
close to TWENTY FOUR HOURS to complete.  With one minor tweak to the
config file, e.g. changing one of the 'shared memory' constants,  and
it is _another_ 24+ hours.  *Lots* of it building loadable modules that
I have no need for, nor any intention of ever useing.

Using the 'old' way, a first-time kernel build was under 40 minutes, and
a 'tweak' re-build was under 15.

That box is long gone, but on a 733mhz PIII I can go from editing a config
file to running on the new kernel in less than 5 minutes (wall clock).  The 
largest part of that time is running 'make depend'. (Second-largest is the
rebooting. :)

I don't know about anybody else, but _I_ consider that speed differential
a *big* advantage to the 'old way'. :)

I am likely _not_ the typical user -- I run a monolithic kernel, with 
everything I need 'compiled in'; *no* loadable modules.  Yeah, it can
be a nuisance if I need something that isn't compiled in, but I don't
get ny unexpected surprises.  It also does wonders as far as reducing
the required 'root partition' size.  I run a 64mb(!!) partition, with
less than 1/2 of it occupied by the system install.  With the running
kernel, a copy of the prior running one as a fall-back, and a GENERIC
for worst-case recovery.


More information about the freebsd-questions mailing list