kernel configuration file

Polytropon freebsd at edvax.de
Sun May 6 18:43:30 UTC 2012


On Sun, 6 May 2012 13:23:08 -0500 (CDT), Robert Bonomi wrote:
> > From owner-freebsd-questions at freebsd.org  Sun May  6 08:36:52 2012
> > Date: Sun, 6 May 2012 09:34:12 -0400
> > From: Carmel <carmel_ny at hotmail.com>
> > To: FreeBSD <freebsd-questions at 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, ...


More information about the freebsd-questions mailing list