Nice short guide for writing a kernel module for FreeBSD operating system. From the article:
FreeBSD 7.0 has already been released. If you are a real hacker, the best way to jump in and learn it is hacking together an introductory kernel module. In this article Iâ€™ll implement a very basic module that prints a message when it is loaded, and another when it is unloaded. Iâ€™ll also cover the mechanics of compiling our module using standard tools and rebuilding the stock FreeBSD kernel.