|Druid628 :: Tech Tips :: BSD Kernel|
When it comes time to compile the FreeBSD
kernel which is always such a fun thing to do, but MAKE SURE you
make a boot disk. You need to have the sys
sources installed, you should be able to type:
To begin your Kernel adventure change your working directory to
First things first, copy the GENERIC file into a file named after your favorite cartoon character like so:
DO NOT DELETE "GENERIC" OR "LINT" if you do Beastie will come stick you with his pitch fork, and I mean that!
Edit your new kernel file (in this case CARTMAN) using your favorite Text Editor. (vi is your friend) Make the changes necessary by commenting out or removing the stuff you don't need, such as SCSI, RAID, etc etc.. ( Know your system before you start jerking out lines you think you don't need)
I bet by now you are wondering why you need that LINT file, right?
Next run config <filename>
If you encounter any errors then you goofed up in the file go fix
Next you will need to change your working directory to /usr/src/sys/compile/<filename>
To compile you need only three more steps and Ta-Da your done!
This is a rather long process so make sure you have lots of caffeine.
To explain what you've just done with these three commands make
depend runs a series of Perl scripts that gather source code. Make
actually compiles the kernel with all the new stuff you've done to it.
Make install actually installs it into your root directory "/"
it also renames your current kernel.GENERIC to kernel.old and puts the new
kernel in it's place.
# cd /usr/src/sys/i386/conf