Subject: Re: Rebuild NetBSD
To: None <yancm@sdf.lonestar.org>
From: Geert Hendrickx <ghen@telenet.be>
List: netbsd-users
Date: 03/31/2006 15:02:22
On Fri, Mar 31, 2006 at 07:40:44AM -0500, yancm@sdf.lonestar.org wrote:
> Here are the steps I use to rebuild the kernal and "userland".
> My source is on /usr/src and my object target is in /usr/obj.
> 
> First, sync/update the src tree to a particular release branch.
>    http://mail-index.netbsd.org/netbsd-announce/2005/01/13/0000.html
> 
> In my case I track the 2.xxx stable branch and so update with:
> cd /usr
> cvs -q up -rnetbsd-2 -PAd src
> [if they do not exist, create /usr/obj and /usr/tools]
> cd src   [now in /usr/src]
> 
> #For clean sheet rebuild:
> ./build.sh -O ../obj -T ../tools kernel=MYKERNEL
> [note: MYKERNEL is a customized kernel definition file...this will
> not work for you unless you customize a kernel definition and
> use MYKERNEL for it's name!]
> # Boot into new kernel
> ./build.sh -O ../obj -T ../tools -u distribution
> ./build.sh -O ../obj -T ../tools -U install=/

I have sources in /cvs/src, and all the rest (tools, objects, destdir,
release, ...) under /cvs/obj by setting this in the environment: 

export MAKEOBJDIR='${.CURDIR:C,^/cvs/src,/cvs/obj,}'

This way I can call build.sh without all the extra arguments: 

./build.sh tools
./build.sh kernel=GENERIC
./build.sh distribution sets

etc

	Geert