# Building an OpenBSD Kernel I'm running OpenBSD-current for a while in order to support my port. It's only one port at the moment, but that's a start, right? Anyway... every once in a while I stumble over a patch on the OpenBSD mailing list I want to try and this requires me to apply the patch and build the Kernel with it. But how? Well, the documentation is where [where you would expect it](https://www.openbsd.org/faq/faq5.html#Custom). *Download the kernel source*
# cd /usr # cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs checkout -P src*Update the kernel source (if you downloaded it a while ago)*
# cd /usr/src # cvs -q up -Pd*Configure Kernel*
# cd /usr/src/sys/arch/amd64/conf # cp GENERIC.MP MYKERNEL # config MYKERNEL*Build and install kernel (amd64)*
# cd /sys/arch/amd64/compile/MYKERNEL # make clean # make # make install # the old kernel is /obsd nowThat's it. Reboot. This is ONLY the Kernel. If you need to build the whole system, please consult the OpenBSD documentation. The manpage release(8) is a good start.