Date: Tue, 23 Sep 2003 15:45:13 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: D J Hawkey Jr <hawkeyd@visi.com> Cc: questions at FreeBSD <freebsd-questions@freebsd.org> Subject: Re: Something I should know about 'make buildkernel ...', but I don't. Message-ID: <20030923144513.GA51933@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <20030923143226.GA89496@sheol.localdomain> References: <20030923143226.GA89496@sheol.localdomain>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Tue, Sep 23, 2003 at 09:32:26AM -0500, D J Hawkey Jr wrote:
> Hi All.
>
> Something's been bugging me about 'make buildkernel ...' (or pro'lly more
> precisely, the docs): How do I re-make the kernel without first cleaning
> /usr/obj/...?
>
> After applying patches, I bump $BRANCH in /sys/conf/newvers.sh, and would
> like the running kernel to reflect the current patchlevel, but not at the
> expense of a complete rebuild. Something this trivial shouldn't get me in
> any trouble, kernel-wise, should it?
>
> Browsing Makefile.inc1, I see these defines:
> -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
> -DNOCLEAN do not clean at all
>
> What does 'cleandir' do that 'clean' doesn't? Remove directory trees?
> Anyway, is it as simple as:
> make buildkernel -DNOCLEAN KERNCONF=...
So long as you aren't changing the kernel configuration, then you can
probably use the 'old' build mechanism:
# cd /usr/src/sys/i386/conf
# config YOURKERNELCONFIGHERE
# cd ../../compile/YOURKERNELCONFIGHERE
# make depend
# make
# make install
However, this is only worth doing if you're going to be recompiling
the kernel a number of times, as the first time through it will
compile everything. Note that this won't put the object files
etc. under /usr/obj, although you might be able to achieve that by
creative use of the '-d destdir' flag to config(8).
Mind you, with modern machines cleaning or not before rebuilding is
becoming much less of an issue. It took less time to build a kernel
on my machine than it did to write this e-mail...
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
iD8DBQE/cFx5dtESqEQa7a0RAlutAJ9ZtiGKXys0kkVeHZVV8jMixIrayQCbBTLW
vllN3qDJeqdBXmGoj8uK8KE=
=i2ZO
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030923144513.GA51933>
