Subject: chap-kernel fixes
To: None <netbsd-docs@netbsd.org>
From: Daniel de Kok <danieldk@pobox.com>
List: netbsd-docs
Date: 08/13/2004 14:08:37
--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

I propose to make the changes in the attached patch to fix chap-kern
a bit. Any comments/objections/...?

-- 
Daniel de Kok <danieldk@pobox.com>

--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="chap-kernel.xml.diff"

Index: chap-kernel.xml
===================================================================
RCS file: /cvsroot/htdocs/guide/en/chap-kernel.xml,v
retrieving revision 1.9
diff -b -u -r1.9 chap-kernel.xml
--- chap-kernel.xml	20 May 2004 03:09:14 -0000	1.9
+++ chap-kernel.xml	13 Aug 2004 12:04:01 -0000
@@ -42,21 +42,29 @@
     <title>Installing the kernel sources</title>
 
     <sidebar>
-      <para>You can get the kernel sources from AnonCVS, see
-        <xref linkend="chap-cvs" />.</para>
+      <para>
+	You can get the kernel sources from AnonCVS (see
+        <xref linkend="chap-cvs" />), or from the 
+	<filename>syssrc.tgz</filename>
+	tarball that is located in the <filename>source/sets/</filename> 
+	directory of the release that you are using. If you use the second
+	method, you can extract the tarball as root: 
+      </para>
     </sidebar>
 
-    <para>Be patient: this operation lasts many minutes, because the repository
-      contains hundreds of files.
-      The sources live in <filename>/usr/src/sys</filename>; the
-      symbolic link <filename>sys</filename> points to this directory.
-      Therefore the following commands have the same effect:</para>
+    <screen>
+&rprompt; <userinput>cd /</userinput>
+&rprompt; <userinput>tar zxf /path/to/syssrc.tgz</userinput>
+    </screen>
 
-    <screen>&rprompt; <userinput>cd /usr/src/sys</userinput>
-&rprompt; <userinput>cd /sys</userinput></screen>
+    <para>
+      If you chose to use AnonCVS, be patient, the operation can last
+      many minutes, because the repository contains hundreds of files.
+    </para>
 
-    <para>Once the sources are checked out, you can create a custom kernel: this
-      is not as difficult as you think.
+    <para>
+      Once you have the sources available, you can create a custom kernel: 
+      this is not as difficult as you might think.
       In fact, a new kernel can be created in a few steps
       which will be described in the following sections.</para>
   </sect1>
@@ -187,10 +195,6 @@
       <title>Basic steps for kernel compilation</title>
 
       <step>
-        <para>Build the toolchain</para>
-      </step>
-
-      <step>
         <para>Create/modify the kernel configuration file</para>
       </step>
 
@@ -214,23 +218,6 @@
 
   <!-- ============================================================= -->
 
-  <sect1 id="chap-kernel-build-toolchain">
-    <title>Build the toolchain</title>
-
-    <para>The &os; toolchain provides a simple mechanism for compiling
-      the &os; system both natively or when the need arises, cross
-      compiling for other targets. In this example, a native toolchain
-      is built (as <username>root</username>) by simply typing:</para>
-
-    <screen>&rprompt; <userinput>cd /usr/src</userinput>
-&rprompt;  <userinput>./build.sh tools</userinput></screen>
-
-    <para>Once the tools are built, the kernel can be reconfigured
-      and compiled.</para>
-  </sect1>
-
-  <!-- ============================================================= -->
-
   <sect1 id="chap-kernel-creating-kernel-configfile">
     <title>Creating the kernel configuration file</title>
 
@@ -244,14 +231,14 @@
       characteristics of the devices supported by the kernel as well as
       several kernel configuration options.
       Kernel configuration files are located in the
-      <filename>/sys/arch/i386/conf</filename> directory.
+      <filename>/usr/sys/arch/i386/conf</filename> directory.
       The easiest way to create a new file is to copy an existing one
       and modify it: usually the best choice on most platforms is the
       GENERIC configuration.
       In the configuration file there are comments describing the options; a
       more detailed description is found in the &man.options.4; man page.</para>
 
-    <screen>&rprompt; <userinput>cd /sys/arch/i386/conf/</userinput>
+    <screen>&rprompt; <userinput>cd /usr/src/sys/arch/i386/conf/</userinput>
 &rprompt; <userinput>cp GENERIC <replaceable>MYKERNEL</replaceable></userinput>
 &rprompt; <userinput>vi <replaceable>MYKERNEL</replaceable></userinput></screen>
 
@@ -313,31 +300,32 @@
 ...
 options PCKBD_LAYOUT="KB_IT"</programlisting>
 
-    <para>The <filename>adjustkernel</filename> Perl script, which can be
-      found at <ulink url="http://www.feyrer.de/Misc/adjustkernel"></ulink>,
-      analizes the output of &man.dmesg.8; and
+    <para>
+      The <filename>adjustkernel</filename> Perl script, which is
+      available through pkgsrc analyzes the output of &man.dmesg.8; and
       automatically generates a minimal configuration file.
-      To run it you need to have Perl installed on your system.
-      The installation of new software is described in detail
-      in the <xref linkend="chap-pack" />.
-      If you want to install Perl now, download the pre-compiled package
-      <filename>perl-5.00404.tgz</filename> and write the following command:</para>
-
-    <screen>&rprompt; <userinput>pkg_add perl-5.00404.tgz</userinput></screen>
+      The installation of packages is described extensively in 
+      in the <xref linkend="chap-pack" />, but installing
+      <command>adjustkernel</command> basically boils down to:
+    </para>
 
-    <para>Now Perl is installed, configured and ready to work: easier than this
-      it's impossible...</para>
+    <screen>
+&rprompt; <userinput>cd /usr/pkgsrc/sysutils/adjustkernel</userinput>
+&rprompt; <userinput>make install</userinput
+    </screen>
 
     <para>You can now run the script with:</para>
 
     <screen>&rprompt; <userinput>cd /sys/arch/i386/conf</userinput>
-&rprompt; <userinput>perl adjustkernel GENERIC > <replaceable>MYKERNEL</replaceable></userinput></screen>
+&rprompt; <userinput>adjustkernel GENERIC > <replaceable>MYKERNEL</replaceable></userinput>
+    </screen>
 
-    <para>I tried this script and it worked very well, saving me a lot of manual
+    <para>
+      This script usually works very well, saving a lot of manual
       editing.
-      Beware that the script only configures the available devices: you
-      must still configure manually the other options (e.g. Linux emulation,
-      ...)</para>
+      But be aware that the script only configures the available devices: you
+      must still configure the other options manually.
+    </para>
   </sect1>
 
   <!-- ============================================================= -->

--h31gzZEtNLTqOjlF--