Skip to content

Build your own kernel of FreeBSD

homepage-banner

Install source code

choose a release version of source code based on your arch, and download source code here (https://download.freebsd.org/ftp/releases/) or github (https://github.com/freebsd/freebsd-src).

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

  • https://docs.freebsd.org/en/books/handbook/kernelconfig
Leave a message