Building a Kernel

If config ran successfully, you will have a kernel compilation directory including a makefile and a whole slew of header files. The traditional place for the compile directory is under the platform directory, which is /usr/src/sys/arch/amd64 for amd64 hardware.

The compile directory contains a subdirectory for each kernel configuration processed by config. My amd64 kernel called TREBLE is in the /usr/src/sys/arch/amd64/compile/TREBLE directory, which contains a makefile, as well as all the header files for all included devices and options.

# cd ../compile/TREBLE
# make

Now it’s time to wait. A successful compilation will create a kernel file bsd without generating any error messages.

Kernel Build Errors

If your kernel ...

Get Absolute OpenBSD, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.