If you want to discuss more about the BSD kernel implementation, sorry, but this is meant to be a quick guide for those who want to make simple adjustments and build a custom kernel. Feel free to go further.
Just follow the steps bellow:
- cd /usr/src
- wget http://mirror/openbsd/4.9/sys.tar.gz
- tar zxvf sys.tar.gz -C /usr/src
- cd /usr/src/sys/arch/i386/conf
- cp GENERIC MYKERNEL (and edit MYKERNEL as you need ;-P)
- config MYKERNEL
- cd ../compile/MYKERNEL
- make depend && make && mv /bsd /bsd.original
- cp bsd /
- reboot
Hum! That was fast and easy, wasn't it? :)
Keep practicing with different configurations!
Patches Application
If you want to apply security/fixes patches, just go to http://www.openbsd.org/ and take a look at the erratas page for your chosen version of OpenBSD.
At the time of writing this post, 5.6 was the current version, so I'd point to http://www.openbsd.org/errata56.html
There you can grab more info about patches and the proper ways of applying them.
For a quick and easy tip, you basically can get all patches from a single tarball and extract them.
Then you'll find a structure of directories whose files are named as follows:
010_<what_to_fix>.patch.sig
For each file inside that dir, just use ``signify'', but keep in mind that some patches are for kernel and some are for system-wide programs. The example below uses signify to patch ``pipex''. Then you just recompile the patched kernel/program.
signify -Vep /etc/signify/openbsd-XY-base.pub -x 010_pipex.patch.sig \
-m - | (cd /usr/src && patch -p0
See ya!
No comments:
Post a Comment