Wednesday, November 25, 2009

Compiling an OpenBSD kernel

Configuring Kernel


Download srcsys.tar.gz from ftp://ftp.openbsd.org/pub/OpenBSD/2.8
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="anoncvs@anoncvs1.usa.openbsd.org:/cvs"
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
make


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



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

No comments:

Post a Comment

About This Blog

KBlog logo This blog is about current events and issues concerning general population. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

icon
Powered By Blogger