From owner-freebsd-questions@FreeBSD.ORG Mon Jan 5 15:50:07 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3E47106566C for ; Mon, 5 Jan 2009 15:50:07 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 64A298FC13 for ; Mon, 5 Jan 2009 15:50:07 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id C07A06D43F; Mon, 5 Jan 2009 15:33:22 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 9C2B4844FE; Mon, 5 Jan 2009 16:33:22 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Eugene Grosbein References: <387210.21917.qm@web45407.mail.sp1.yahoo.com> <20090102082117.GA78125@svzserv.kemerovo.su> Date: Mon, 05 Jan 2009 16:33:22 +0100 In-Reply-To: <20090102082117.GA78125@svzserv.kemerovo.su> (Eugene Grosbein's message of "Fri, 2 Jan 2009 15:21:17 +0700") Message-ID: <86fxjxkbst.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Kamlesh Patel , freebsd-questions@freebsd.org Subject: Re: FreeBSD kernel Debugging tools for Virtual Memory Module X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 15:50:07 -0000 Eugene Grosbein 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