From nobody@FreeBSD.ORG  Wed Jul 26 03:42:06 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 529F137B5F6; Wed, 26 Jul 2000 03:42:06 -0700 (PDT)
Message-Id: <20000726104206.529F137B5F6@hub.freebsd.org>
Date: Wed, 26 Jul 2000 03:42:06 -0700 (PDT)
From: dan@freebsddiary.org
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: you don't ALWAYS have to make world before building a kernel
X-Send-Pr-Version: www-1.0

>Number:         20191
>Category:       docs
>Synopsis:       you don't ALWAYS have to make world before building a kernel
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 26 03:50:00 PDT 2000
>Closed-Date:    Wed Jul 26 10:38:22 PDT 2000
>Last-Modified:  Wed Jul 26 10:38:49 PDT 2000
>Originator:     Dan Langille
>Release:        
>Organization:
The FreeBSD Diary
>Environment:
>Description:
The handbook implies that when building a custom kernel, you need to 
do a build world first. That's not correct.

From http://www.freebsd.org/handbook/kernelconfig-building.html (near 
bottom of page):

For FreeBSD 4.x or later (or upgrading from FreeBSD 3.x to FreeBSD 
4.x or higher), use the following commands (be sure you have built 
world before!):

While correct, if you know what you are doing, we've had people
asking about how to build world, when all they need is a new
kernel.

Someone please verify my claims in the patch for correctness.  Cheers.
>How-To-Repeat:

>Fix:
--- chapter.sgml.original       Sat Jul 22 17:50:25 2000
+++ chapter.sgml        Sat Jul 22 18:09:47 2000
@@ -155,7 +155,8 @@
 &prompt.root; <userinput>make install</userinput></screen>
 
     <para>For FreeBSD 4.x or later (or upgrading from FreeBSD 3.x to
-      FreeBSD 4.x or higher), use the following commands (be sure you
+      FreeBSD 4.x or higher), use the following commands (and if you are
+      upgrading FreeBSD, e.g. 3 to 4 or -release to -stable, be sure you
       have built world before you build the kernel!):</para>
 
     <screen>&prompt.root; <userinput>cd /usr/src</userinput>

>Release-Note:
>Audit-Trail:

From: Eric Ogren <eogren@earthlink.net>
To: dan@freebsddiary.org
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: docs/20191: you don't ALWAYS have to make world before building a kernel
Date: Wed, 26 Jul 2000 10:01:37 -0400

 Make [build|install]kernel requires a populated /usr/obj. The only way to
 get that is to make world, so the entry is correct.
 
 However, it is pretty unreasonable for everyone who downloads 4.1 and has
 no intentions of tracking -STABLE to have to a) download the entire src
 tree and b) build it just to get a custom kernel, and for these people,
 the config, make sequence should work fine, since there aren't going to be
 any toolchain issues.
 
 So, having said that, how's the below patch look? My warnings might be a
 little too dire, but I figured it would reduce the 10.2 million questions
 on -stable about kernel builds dying if I made the point several times.
 
 Eric
 
 Index: chapter.sgml
 ===================================================================
 RCS file: /usr/local/doctree/doc/en_US.ISO_8859-1/books/handbook/kernelconfig/chapter.sgml,v
 retrieving revision 1.30
 diff -u -r1.30 chapter.sgml
 --- chapter.sgml	2000/07/25 09:34:10	1.30
 +++ chapter.sgml	2000/07/26 13:59:57
 @@ -160,14 +160,34 @@
  &prompt.root; <userinput>make</userinput>
  &prompt.root; <userinput>make install</userinput></screen>
  
 -    <para>For FreeBSD 4.x or later (or upgrading from FreeBSD 3.x to
 -      FreeBSD 4.x or higher), use the following commands (be sure you
 -      have <link linkend="cutting-edge">built world</link> before!):</para>
 +    <para>If you have just upgraded to a newer version of 4.X or
 +      higher (ie from 3.X to 4.0-STABLE, or even from 4.0-STABLE to a
 +      later version of 4.0-STABLE), make sure you have <link
 +      linkend="cutting-edge">built world</link>, and then run the
 +      following commands:</para>
  
      <screen>&prompt.root; <userinput>cd /usr/src</userinput>
  &prompt.root; <userinput>make buildkernel KERNEL=MYKERNEL</userinput>
  &prompt.root; <userinput>make installkernel KERNEL=MYKERNEL</userinput></screen>
  
 +    <para>If you have <emphasis>not</emphasis> upgraded your source
 +      tree in any way (you have not run <application>CVSUp</application>, 
 +      <application>CTM</application>, or used 
 +      <application>anoncvs</application>, then you should use the 
 +      <command>config</command>, <command>make depend</command>, 
 +      <command>make</command>, <command>make install</command> sequence.</para>
 +
 +    <warning>
 +      <para>If you have upgraded your sources since your last kernel
 +        build, you <emphasis>must</emphasis> use the <command>make
 +        buildkernel</command> method to build your kernel.  Otherwise,
 +	old utilities will be used to build the kernel, which will
 +	probably fail.  <emphasis>Do not use the
 +	<command>config</command>/<command>make</command> sequence to
 +	build your kernel if you have updated the
 +	sources!</emphasis></para>
 +    </warning>
 +    
      <para>The new kernel will be copied to the root directory as
        <filename>/kernel</filename> and the old kernel will be moved to
        <filename>/kernel.old</filename>.  Now, shutdown the system and
  
 
 On Wed, Jul 26, 2000 at 03:42:06AM -0700, dan@freebsddiary.org wrote:
 > >Description:
 > The handbook implies that when building a custom kernel, you need to 
 > do a build world first. That's not correct.
 
State-Changed-From-To: open->closed 
State-Changed-By: jim 
State-Changed-When: Wed Jul 26 10:38:22 PDT 2000 
State-Changed-Why:  
Committed with Eric's changes.  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20191 
>Unformatted:
