freebsd-update(8) and custom kernels

Aram Hăvărneanu aram.h at mgk.ro
Tue Nov 6 23:12:51 UTC 2018


> Building the kernel doesn't need the new binaries, otherwise a
> source upgrade would be impossible.

I was under the impression that building across releases was not
recommended and/or fragile. From /usr/src/UPDATING:

    NOTE: FreeBSD has switched from gcc to clang. If you have trouble
    bootstrapping from older versions of FreeBSD, try WITHOUT_CLANG
    and WITH_GCC to bootstrap to the tip of head, and then rebuild
    without this option. The bootstrap process from older version
    of current across the gcc/clang cutover is a bit fragile.

> The first install must install sources as well as the GENERIC kernel.

Does it do that? According to the documentation, it only installs
the new kernel. Other components (which I read as also the src
component) are installed only by the second invocation, after you
have booted the new kernel. Is this another case of the documentation
being outdated?

> No, I never boot into GENERIC, the procedure is exactly as Julien
> described apart from the extra make install after the reboot.

What extra make install?

To recapitulate:

This is how it works with GENERIC kernel:

    freebsd-update -r XX.Y-RELEASE upgrade
    freebsd-update install
    reboot
    freebsd-update install

This is how Julian said it works for him with the custom kernel,
except I replaced fetch with upgrade:

    1) freebsd-update -r XX.Y-RELEASE upgrade
    2) freebsd-update install
    3) make kernel KERNCONF=MYKERNEL
    4) reboot
    5) freebsd-update install

In my understanding in step #3 you don't have the new sources yet,
so how do you compile the new kernel? Or do you have them?

Thanks,

-- 
Aram Hăvărneanu


More information about the freebsd-questions mailing list