5.7 - Building a custom kernel
It is assumed you have read the
above
, and really enjoy pain. It is also assumed that you have a goal that
can not be achieved by either a
Boot time configuration (UKC>)
or by
config(8)ing a GENERIC kernel
.
If all of this is not true, you should stick to using GENERIC. Really.
OpenBSD kernel generation is controlled by configuration files, which are located in the
/usr/src/
sys/arch//conf/
directory by default. All architectures have a file,
GENERIC
, which is
used to generate the standard OpenBSD kernel for that platform. There may also be other configuration
files which are used to create kernels with different focuses, for example, for minimal RAM, diskless
workstations, etc.
The configuration file is processed by
config(8)
, which creates and populates a compilation directory
in
../compile
, on a typical installation, that would be in
/usr/src/sys/arch//
compile/
. config(8) also creates a
Makefile
, and other files required to successfully build the kernel.
Kernel Configuration Options are options that you add to your kernel configuration that place certain
features into your kernel. This allows you to have exactly the support you want, without having support
for unneeded devices. There are a multitude of options that allow you to customize your kernel. Here we
will go over only some of them, those that are most commonly used. Check the
options(4)
man page for
a complete list of options, and as these change from time to time, you should make sure you use a man
page for the same version of OpenBSD you are building. You can also check the example configuration
files that are available for your architecture.
Do not add, remove, or change options in your kernel unless you actually have a reason to do so!
Do'stlaringiz bilan baham: |