Subject: Re: Compiling 1.6 Kernel
To: JTNelson <jnelson@wiai.com>
From: Perry E. Metzger <perry@piermont.com>
List: port-i386
Date: 02/03/2003 11:54:14
> > nelsonjt@earthlink.net writes:
> > > I can not compile a kernel for version 1.6.
> >
> > Are you using build.sh properly for this task? Could you explain
> > exactly what you're typing etc. to do your build?
>
> Just following the directions.
> 
> cd to the configuration directory
> 
> run config with GENERIC, for example
> 
> cd to the build directory, the 'make depend' and then 'make'
> 
> This is done under the bash shell, logging in under 'toor'.  Which may be my
> problem!!!  Thanks for the help.  I will check.

You are indeed following the ordinary instructions for building a new
kernel on a stable system.

However, those instructions don't apply when you're trying to build a
kernel from a new set of sources on an old machine. The toolchain and
kernel you're building with must be the same to guarantee success.

In this case, you're trying to build a 1.6 kernel under 1.5 -- you're
using a 1.5 config, for example, to config a 1.6 kernel. Unfortunately,
1.6 kernels can't be built correctly with 1.5's tools. That's the key
to your problem.

The right way to do this is to unpack the 1.6 (or better yet, the
1.6.1_RC2 sources which I think are available in the usual place on
ftp.netbsd.org), and then use build.sh to build a new
toolchain. Failing that, the UPDATING file will tell you how to
laboriously build a new make and config etc, but I think that's pretty
painful myself -- I'd just use build.sh. See "BUILDING" for
instructions on how to use build.sh.

In summary, use the tools (build.sh) to bootstrap a new toolchain,
build and install your new kernel using the new toolchain (which is
essentially a cross toolchain from 1.5 to 1.6) and then use build.sh
to build yourself a new userland.

Perry