Subject: Re: Confused compiling -current
To: Daniel Bolgheroni <dab__@uol.com.br>
From: Bill Studenmund <wrstuden@netbsd.org>
List: current-users
Date: 01/10/2003 14:53:30
On Thu, 9 Jan 2003, Daniel Bolgheroni wrote:

> On Thu, 9 Jan 2003, Martin Husemann wrote:
>
> > On Wed, Jan 08, 2003 at 02:11:01AM -0200, Daniel Bolgheroni wrote:
> >
> > > build.sh is only to compile *dependencies* to build a new system. I was
> > > thinking build.sh builds all the system.
> >
> > The latter, or both. It takes options to controll it, run "build.sh -h" to
> > see them. The minimal approach is "-t" to build the needed tools, and "-k"
> > to build the kernel.
>
> To understand:
>
> I have all the -current source at /usr/src. I used the "./build.sh -t -k
> GENERIC" and, after all done, build.sh gives me a kernel at
> /usr/src/arch/i386/compile/GENERIC. After that, all my -release tools
> remains the same, but I've got a -current kernel. Is it right?

If that's all you did, then yes.

> In "Tracking NetBSD-current", I saw:
>
> "./build.sh -O /usr/obj -T /usr/tools
> When you build your system for the first time using build.sh, a set of
> tools for future use of compilations will be built, too, and thus you
> encounter a quite increased runtime of the initial compilation."
>
> With this option (./build.sh -O /usr/obj -T /usr/tools), and with the
> DESTDIR=/, all my tools will be updated and the -release tools lost. So,
> to compile a new -current kernel, it can be directly with config, make
> depend, make. So, why don't compile new -current kernels only with
> build.sh? Because if the compilation of the new -current kernel fail, you
> still have all the old -release tools.

Don't use DESTDIR=/, it can make a mess of things.

Try "./build.sh -D /your/destdir -T /usr/tools -O /usr/obj" and that
should build the whole world. I'm not familiar with the -k option, so you
can use it, or you can use /usr/tools/bin/nbconfig on the kernel file, and
/usr/tools/bin/nbmake-MACHINE (i386, macppc, etc.) to actually build the
kernel.

Luke also recently added an option, which I haven't had a chance to use
yet, to install the files from DESTDIR to /. Thus you can do the
equivalent of FreeBSD's buildworld and installworld.

Take care,

Bill