Subject: Re: 2.0RC4 kernel/update questions
To: Brian <4thgensi@comcast.net>
From: Jeff Rizzo <riz@redcrowgroup.com>
List: netbsd-help
Date: 10/16/2004 18:52:20
Brian wrote:

>Hi,
>
>I just installed RC4 today. I grabbed the sources with
>
>cvs checkout -rnetbsd-2-0 -PA src
>
>I want to recompile the kernel but wondering if I should recompile the userland since they may be out of sync. Just confused on which procedure I should use since there is several in the handbook. As of right now guessing something like this.
>  
>

The 2.0 branch hasn't changed at all that I'm aware of since RC4 was 
tagged, so you shouldn't need to recompile userland just to run a new 
kernel.

Be aware, however, that the commandline you pasted above might actually 
get you -current instead of 2.0;  the "-A" flag has the effect of 
getting rid of any sticky tags (like netbsd-2-0), so I'm not sure what 
its behaviour in conjunction with -r is.  You might want to do a 'cvs 
status' on one of the files in the tree to make sure you've really got 
the 2.0 branch.

>./build.sh tools
>./build.sh distribution
>./build.sh kernel
>
>install kernel
>./build.sh install=/
>etc-update
>
>Compared to the stable page, simple as
>
>build the kernel
>./builld.sh -d
>
>Somewhat confused on which way to do it. Thanks
>
>Brian
>  
>

Well, as you've probably guessed, there's several ways to do it.  One 
thing to keep in mind is that the usage of build.sh changed dramatically 
between 1.6.X and 2.0, so you need to be aware of which version the 
instructions are for.

For building just a kernel, there's two ways to do it.  The way with 
build.sh (for 2.0 or later!) works even if you're building a kernel for 
another version of the OS (like -current), while the way without 
build.sh it's best to stick with building kernels for the same version.  
Quick summary:

with build.sh, from your source dir (usually /usr/src):

./build.sh tools    # you can skip this if you've built tools before
./build.sh kernel=GENERIC      # or whatever kernel config you're building

I always copy my kernel to / by hand, so I'm not sure the "official" way 
to install it.


_without_ build.sh, cd into the conf directory where your kernel config 
is, and do:

config GENERIC        # again, substitute your config here
cd ../compile/GENERIC    # see above
make depend
make

...the second way has the benefit of using your system tools, so you 
don't have to rebuild them.

I hope I haven't confused you too much more.  Feel free to ask followups!

+j


-- 
Jeff Rizzo                                         riz@redcrowgroup.com
Red Crow Group LLC                                 http://www.redcrowgroup.com/
+1 415 550 0310