Date: Sun, 3 Jun 2001 10:18:49 +0300 From: Valentin Nechayev <netch@iv.nn.kiev.ua> To: Jiangyi Liu <gzjyliu@public.guangzhou.gd.cn> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: How to recompile kernel after minor changes? Message-ID: <20010603101848.A990@iv.nn.kiev.ua> In-Reply-To: <878zjb20fd.fsf@fatcow.home>; from gzjyliu@public.guangzhou.gd.cn on Sat, Jun 02, 2001 at 08:24:54AM %2B0800 References: <878zjb20fd.fsf@fatcow.home>
next in thread | previous in thread | raw e-mail | index | archive | help
Sat, Jun 02, 2001 at 08:24:54, gzjyliu (Jiangyi Liu) wrote about "How to recompile kernel after minor changes?": > After just changing a little in sys/kern/kern_sig.c, how can I rebuild > the kernel fast? I think it should not take such a long time as 'make > buildkernel' does. Anyway, just kern_sig.c need to be recompiled and > the kernel can be linked. So how do you guys do in such case? With changing only sys/kern/kern_sig.c, `make -DNOCLEAN -DNO_KERNELDEPEND -DNO_KERNELCONFIG -DNO_MODULES' can be used. But, cd /usr/obj/usr/src/sys/${KERNCONF} make -DNO_MODULES will be better and faster for human due to shorter commands. Really, `make buildkernel' is nesessary only for cross-platform build (`make buildworld' on earlier system is strictly considered as cross-platform build), and is too expensive for already installed system. But this receipt should be used with caution. Changes in conf/files*, e.g., require reconfiguring. Changes in headers require `make depend'. Some changes in file bodies also require `make depend', such as for aic7xxx stuff. If you don't know exactly which remakings are required by your change, do full reconfiguring and remaking. For modules, you should note that they aren't built with specified kernel config. If you strictly understand when kernel code is changed, MODULES_WITH_WORLD should be placed constantly in /etc/make.conf. ;-| For -current, `make install' in kernel compile directory will move all directory with old kernel and modules. I consider this feature too annoying, it should be off when either MODULES_WITH_WORLD or NO_MODULES is set (yes, I consider current feature as brain bug;))) /netch To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010603101848.A990>