Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 May 2012 20:43:22 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Robert Bonomi <bonomi@mail.r-bonomi.com>
Cc:        carmel_ny@hotmail.com, freebsd-questions@freebsd.org
Subject:   Re: kernel configuration file
Message-ID:  <20120506204322.304c743d.freebsd@edvax.de>
In-Reply-To: <201205061823.q46IN8uu067759@mail.r-bonomi.com>
References:  <BLU0-SMTP39994A10F2F938F4E338B0B93120@phx.gbl> <201205061823.q46IN8uu067759@mail.r-bonomi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 6 May 2012 13:23:08 -0500 (CDT), Robert Bonomi wrote:
> > From owner-freebsd-questions@freebsd.org  Sun May  6 08:36:52 2012
> > Date: Sun, 6 May 2012 09:34:12 -0400
> > From: Carmel <carmel_ny@hotmail.com>
> > To: FreeBSD <freebsd-questions@freebsd.org>
> > Subject: Re: kernel configuration file
> >
> > On Sun, 6 May 2012 08:08:31 -0500 (CDT)
> > Robert Bonomi articulated:
> > >
> > >If you use the "traditional" kernel-huild 'Configure/make depend/make'
> > >sequence, to rebuild the kernel -only-,  its a matter of one minute or
> > >so on a _slow_ (486-class) machine.
> > >
> > >you'll either get a Configure error, a linker error, or it 'just
> > >works'.
> >
> > OK, now you lost me. I use the following basic sequence:
> >
> > make buildworld
> > make buildkernel KERNCONF=CARMEL
> > make installkernel KERNCONF=CARMEL
> > make installworld
> >
> > I am sorry, but I am not fully comprehending what commands you want me
> > to enter.
> 
> That's the 'modern' way. 

The /usr/src/Makefile contains a comment header which
explains the purpose of the "make" targets the current
way supports. One should read it before starting, because
it's quite informative on _that_ way of doing things
(e. g. "make kernel" = "make buildkernel installkernel").



> Note: "make buildkernel" forcibly rebuilds everything, *EVERY* time.
> Including *every* loadable module, whether or not you actually use it.
> Which can be *really* painful on slow hardware  (like 20+ *hours*, on a 
> 486-class machine).

Maybe it's worth mentioning /etc/src.conf and /etc/make.conf
and the "man src.conf" manpage. That is a comfortable means
to avoid building (and therefore also installing) modules one
does not need. The approach "to configure all and _only_ the
stuff I need in a custom kernel" can be followed this way,
and it will even work with the current "make <target>" way.
Have no WLAN? So why bother building it? No ISDN? Omit it!
For minor kernel changes (e. g. if you want to try some
compile-time settings), this approach is really handy as
it minimizes the time required.

This consideration should _boost_ build+install times on
current plentycore multiprocessors with tons of RAM! :-)





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



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