Date: Thu, 2 May 2002 02:18:00 -0700 (PDT) From: Annelise Anderson <andrsn@andrsn.stanford.edu> To: Shantanu <shantanoo@ieee.org> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@FreeBSD.ORG> Subject: Re: Building Kernel -- which is fastest,reliable,easy? Message-ID: <Pine.BSF.4.10.10205020153270.34274-100000@andrsn.stanford.edu> In-Reply-To: <3AEF00E3.66D085DA@ieee.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2 May 2001, Shantanu wrote: > Hi! > 1) cd /usr/src/sys/i386/conf > config MYKERN > cd ../../compile/MYKERN > make dep > make > make install > > Reboot > > 2) cd /usr/src > make buildkernel KERNCONF=MYKERN > make installkernel KERNCONF=MYKERN > > Reboot > > 3) cd /usr/src > make kernel KERNCONF=MYKERN > > Reboot > > Which is the best method to compile? > It some situations, they're equivalent (they're all easy). 2 and 3 are identical, just two steps in 2 instead of one. Useful if you don't want to install the built kernel as the default; maybe you want a new kernel.GENERIC. Method 1 uses the already-installed system. Method two uses the system files you have built with "make buildworld". This is especially useful when you have not yet done a "make installworld", because if the kernel fails, you can easily revert to your old system (not yet overwritten) and kernel.old. If you have done an installworld so the installed system and the "built" system are not different, then method one is equivalent to 2 and to its 2-step variant, 3. However a kernel build with the 2-3 methods will always end up in the /usr/obj structure rather than the /usr/src structure, AFAIK, and will reveal this. For example, this kernel was build with the new (2 or 3) method: xanne@killer ~ % uname -a FreeBSD killer.stanford.edu 4.5-STABLE FreeBSD 4.5-STABLE #0: Sun Mar 10 04:04:01 PST 2002 xanne@killer.stanford.edu:/usr/obj/usr/src/sys/KILLER i386 whereas this kernel was build with the old (1) method (although I use make depend, not make dep, when I do mine)--or was probably installed with the system and not rebuilt. xanne@vaio ~ % uname -a FreeBSD vaio.stanford.edu 4.5-RC1 FreeBSD 4.5-RC1 #0: Tue Jan 8 23:37:23 PST 2002 murray@builder.freebsdmall.com:/usr/src/sys/compile/GENERIC i386 The reason for using the new method is that it will work when changes have been made and it can be tested before you install the newly built system over your old installed system (i.e., after buildworld and before installworld) so you have a chance to back out if the new kernel doesn't work. Annelise -- Annelise Anderson Author of: FreeBSD: An Open-Source Operating System for Your PC Available from: BSDmall.com and amazon.com Book Website: http://www.bittreepress.com/FreeBSD/introbook/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10205020153270.34274-100000>