From owner-freebsd-doc@FreeBSD.ORG Wed Oct 18 20:56:24 2006 Return-Path: X-Original-To: freebsd-doc@freebsd.org Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85FE816A494 for ; Wed, 18 Oct 2006 20:56:24 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57F4F43D91 for ; Wed, 18 Oct 2006 20:56:17 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from gothmog.pc (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-2) with ESMTP id k9IKtx11008950 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 18 Oct 2006 23:56:00 +0300 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.8/8.13.8) with ESMTP id k9IKuaZj091726; Wed, 18 Oct 2006 23:56:36 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from giorgos@localhost) by gothmog.pc (8.13.8/8.13.8/Submit) id k9IKuaVe091725; Wed, 18 Oct 2006 23:56:36 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Wed, 18 Oct 2006 23:56:35 +0300 From: Giorgos Keramidas To: Nadow Message-ID: <20061018205635.GB5665@gothmog.pc> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.666, required 5, AWL -0.27, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20, UNPARSEABLE_RELAY 0.00) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: freebsd-doc@freebsd.org Subject: Re: About compiling a new kernel steps X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Oct 2006 20:56:24 -0000 On 2006-10-12 18:46, Nadow wrote: > Hi, in the handbook Chapter 8 Configuring the FreeBSD Kernel, part 8.3 it > says > > 1. Run config(8) to generate the kernel source code. > > # /usr/sbin/config *MYKERNEL* > > 2. Change into the build directory. config(8) will print the name of > this directory after being run as above. > > # cd ../compile/*MYKERNEL* > > For FreeBSD versions prior to 5.0, use the following form instead: > > # cd ../../compile/*MYKERNEL* > > 3. Compile the kernel. > > # make depend > # make > > 4. Install the new kernel. > > # make install > > ------------------------------------ > > But When I do > > # /usr/sbin/config *MYKERNEL > > The system reminds me to do "make clean depend" before "make depend" > but in the third step of the handbook "make clean depend" doesnt > appear. I know it works in both ways but I would like to know if it is > not better to include the command just in case. In general, choosing when to do a "make clean" and when not to do it, requires a fair level of experience with the dependencies between various kernel options. If you are not severely limited by time, and can spare a few CPU cycles, it's always much much safer to build a new kernel with the procedure recommended in /usr/src/UPDATING: # cd /usr/src # make KERNCONF=FOO buildworld buildkernel If you keep your /usr/obj tree around, even between multiple kernel-only rebuilds, you can ommit the `buildworld' step, and run: # cd /usr/src # make KERNCONF=BAR buildkernel