Skip to content

Build your own kernel of FreeBSD

Install source code

choose a release version of source code based on your arch, and download source code here or github.

wget https://download.freebsd.org/ftp/releases/amd64/amd64/13.0-RELEASE/src.txz
tar -C / -xvzf src.txz

Build kernel

may take a long while

cd /usr/src/sys/`uname -m`/conf
cp GENERIC MY_FIRST_BUILD
cd /usr/src
make buildkernel KERNCONF="MY_FIRST_BUILD"

Install new kernel

make installkernel KERNCONF="MY_FIRST_BUILD"
reboot

Verify new kernel

uname -a
uname -i

Reference