Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Jan 2009 16:33:22 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Eugene Grosbein <eugen@kuzbass.ru>
Cc:        freebsd-hackers@freebsd.org, Kamlesh Patel <shilp.kamal@yahoo.com>, freebsd-questions@freebsd.org
Subject:   Re: FreeBSD kernel Debugging tools for Virtual Memory Module
Message-ID:  <86fxjxkbst.fsf@ds4.des.no>
In-Reply-To: <20090102082117.GA78125@svzserv.kemerovo.su> (Eugene Grosbein's message of "Fri, 2 Jan 2009 15:21:17 +0700")
References:  <387210.21917.qm@web45407.mail.sp1.yahoo.com> <20090102082117.GA78125@svzserv.kemerovo.su>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Eugene Grosbein <eugen@kuzbass.ru> writes:
> First, you need to recompile source you change for sure :-)
> But you have not rebuild all other files all the time.
> You need to add to your /etc/src.conf (or /etc/make.conf for 6.x and earl=
ier):
>
> MODULES_WITH_WORLD=3Dyes
>
> This will skip rebuilding of all modules during 'make buildkernel'
> but you MUST to copy all modules from /boot/kernel to /boot/modules
> (all files other than /boot/kernel/kernel*) if you do this.

What is the point, if you use NO_KERNELCLEAN as recommended below?  The
modules won't be rebuilt either unless something that affects them has
changed.  Running a new kernel with old modules is a great way to shoot
yourself in the foot.

If you absolutely want to skip modules, build your kernel with
-DNO_MODULES, but install it normally, or use reinstallkernel instead of
installkernel.  The latter will overwrite your running kernel - but you
should keep an unmodified kernel around anyway.

You can boot entirely without modules if you include everything you need
(including acpi) in your kernel config.

> Then, if you do not change kernel config file,
> recompile your changes with command (only second time and then):
>
> cd /usr/src; make NO_KERNELDEPEND=3Dyes NO_KERNELCLEAN=3Dyes buildkernel

You should not use -DNO_KERNELDEPEND unless you know for sure that no
#include directives have been added or removed and no kernel options
have changed.

It is safe to use -DNO_KERNELCLEAN, but not -DNO_KERNELDEPEND, even if
your config file changed.

> Second, you should use some kind of virtual machine (like qemu from
> ports) to speedup your development cycle even more: install the system
> into virtual machine and you'll need not another box to debug the
> kernel and need not rebuild your development box. Test your changes
> with the system installed into VM and reboot it only. Use ddb or kgdb
> already noted here.

The best solution by far is to use actual hardware and netboot from your
development machine.  It's easy to set up, and you don't lose context
every time you reboot the test system.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?86fxjxkbst.fsf>