FreeBSD Kernel
Tuesday, August 19, 2008

I've just finished compiling and installing a new FreeBSD kernel (7.0-RELEASE) on a Pentium 166Mhz. It took about 12 hours to complete. Actually, it took about 1 hour, but all the modules took 11 hours.
By default, the kernel build will compile _all_ modules. Even if, for instance, you disable FireWire in the kernel, it will still build the FireWire modules! Now, I didn't realise this was going to happen, and I found out that you can specify what modules you want compiled to over ride this behavior. So the question became, what modules out of the available modules do I need? And the corollary of this is: What is the list of available modules for my kernel version?
I couldn't find an answer to this anywhere on the web. All the resources I found were related to writing a kernel module, not choosing from existing modules. Anyway, I dived into the directory of the kernel source, and it's actually all there.
/usr/src/sys/arch/i386/modules
And each directory is a module. There's a lot of sub files that show up in the compilation of the kernel, but that's basically all the modules. So save yourself about 90% compilation time, and use the /etc/make.conf to over ride the modules that get built!
The actual procedure for compiling the kernel is in the FreeBSD Handbook.




