Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Oct 2006 23:56:35 +0300
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        Nadow <el.nadow@gmail.com>
Cc:        freebsd-doc@freebsd.org
Subject:   Re: About compiling a new kernel steps
Message-ID:  <20061018205635.GB5665@gothmog.pc>
In-Reply-To: <bf79ce230610120946v6d481630x47abbb0058557e6f@mail.gmail.com>
References:  <bf79ce230610120946v6d481630x47abbb0058557e6f@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2006-10-12 18:46, Nadow <el.nadow@gmail.com> wrote:
> Hi, in the handbook  Chapter 8 Configuring the FreeBSD Kernel, part 8.3 it
> says
>
> 1. Run config(8) to generate the kernel source code.
>
>        # /usr/sbin/config *MYKERNEL*
>
> 2. Change into the build directory.  config(8) will print the name of
>    this directory after being run as above.
>
>        # cd ../compile/*MYKERNEL*
>
>    For FreeBSD versions prior to 5.0, use the following form instead:
>
>        # cd ../../compile/*MYKERNEL*
>
> 3. Compile the kernel.
>
>        # make depend
>        # make
>
> 4. Install the new kernel.
>
>        # make install
>
> ------------------------------------
>
> But When I do
>
> # /usr/sbin/config *MYKERNEL
>
> The system reminds me to do "make clean depend" before "make depend"
> but in the third step of the handbook "make clean depend" doesnt
> appear. I know it works in both ways but I would like to know if it is
> not better to include the command just in case.

In general, choosing when to do a "make clean" and when not to do it,
requires a fair level of experience with the dependencies between
various kernel options.

If you are not severely limited by time, and can spare a few CPU cycles,
it's always much much safer to build a new kernel with the procedure
recommended in /usr/src/UPDATING:

    # cd /usr/src
    # make KERNCONF=FOO buildworld buildkernel

If you keep your /usr/obj tree around, even between multiple kernel-only
rebuilds, you can ommit the `buildworld' step, and run:

    # cd /usr/src
    # make KERNCONF=BAR buildkernel




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