Wednesday, November 25, 2009

Compiling an OpenBSD kernel

Configuring Kernel

Download srcsys.tar.gz from and unpack it into the /usr/src/ directory.

cd /usr/src
gzip -dc srcsys.tar.gz | tar xvf -

To update the kernel source tree to the latest version using CVS, perform the following steps:

export CVS_RSH="/usr/bin/ssh"
export CVSROOT=""
cd /usr/src/sys
cvs update -d

Read the options(4) man page which has a complete list of options. You can also check /usr/src/sys/conf/GENERIC and /usr/src/sys/arch/i386/conf/GENERIC files.

All the options should be placed in your kernel configuration file in the form of:

option OPTION

When there is unreconized isapnp devices, you should add their name to /sys/dev/isa/pnpdevs and /sys/dev/isa/pnpdevs.h files and recompile your kernel to have them detected.

Building your own kernel

To build a new kernel, do like this:

cd /tmp/kernel
config -s /usr/src/sys -b /tmp/kernel kernel.config
make clean
make depend

Once a new kernel is compiled, move it to /bsd.

mv /bsd /bsd.old
mv /usr/local/tmp/bsd /bsd

About This Blog

KBlog logo This blog seeks to provide useful information to people, based on the author's knowledge and experience. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Follow by Email

Total Pageviews