Date: Thu, 27 Oct 2005 05:14:51 -0700 From: ray@redshift.com To: kamal kc <kamal_ckk@yahoo.com>, freebsd <freebsd-net@freebsd.org> Cc: freebsd <freebsd-hackers@freebsd.org> Subject: Re: compiling the kernel faster Message-ID: <3.0.1.32.20051027051451.00a842c0@pop.redshift.com> In-Reply-To: <20051027115411.77471.qmail@web35702.mail.mud.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
At 04:54 AM 10/27/2005 -0700, kamal kc wrote: | hello everybody, | | i am new to kernel programming. | i am developing a compression/decompression | functionality in the ip layer. | | i want to compile the kernel faster. | | it would | be ok if the kernel doesn't have support for sound | devices, or other devices like scsi,usb etc. because | i would be using the compiled kernel for | network data compression only. | | how could i do that. which source files and where in | the makefiles do i make modifications ???? | | thanks for any suggestions | | kamal Kamal, The files you modify to drop stuff out of the kernel are in /sys/i386/conf/ (assuming you are on an Intel platform). Copy the GENERIC file in there to something else (e.g DEVKERNEL), then edit that file. Comment out any drivers you don't need using # (check your dmesg output when you boot to see what drivers the OS is loading for your hardware). Don't comment out anything unless it's obviously something you don't need - doublt check the dmesg for stuff like network drivers, hard drive stuff, etc.) Once you comment out the drivers, you will need to re-compile the kernel. Go into /sys/i386/conf/ directory type this: config DEVKERNEL (using the example above) then change into the directory it shows you (should be something like ../compile/DEVKERNEL or something like that) and type this: make depend && make all install clean that will compile the new kernel and leave it in /boot/kernel (it will also backup your old kernel into kernel.old) go into /boot/kernel/ and type this: strip -s * then reboot using shutdown -r now If all goes well, you should boot to the new kernel. You can use the uname -a command to make sure you are on the new kernel okay. If the machine won't boot, you can boot into single user mode and copy the old kernel back in place. An excellent book on the subject is: Absolute BSD: The Ultimate Guide to FreeBSD (Paperback) good luck. Ray
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.1.32.20051027051451.00a842c0>