Subject: Re: building -current (was Re: reproducible kernel panic w/
To: Pavel Cahyna <pavel.cahyna@st.mff.cuni.cz>
From: Tim Kelly <hockey@dialectronics.com>
List: netbsd-docs
Date: 11/08/2004 12:55:02
Hi Pavel,

> That's probably OK. But, if the only thing you want to do is to wire
> down one SCSI device, then why do you compile -current? I'm just
> curious.

It's probably my lack of experience, but I was unable to see a way to
get config (kernel file) to do the wiring. Since my previous experience
with *BSD has been in OpenBSD, I was comfortable with compiling a
kernel with a rewired configuration file, or at least, I thought I was.

With two identical NetBSD installs on two separate hard drives on the
same Mac, there appears to be a problem with properly identifying the
boot device and the assumption is sd0; however, if the boot device is
actually a higher target ID in the SCSI chain, it gets attached as sd1
while the kernel appears to go looking for /sbin/init on sd0. Changing
fstab to reflect sd1 does not appear to alter this condition. This has
led me to need to wire the higher target ID to sd0. 

> The building process should be completely independent of the way you
> obtained the source. At the web page, the instructions for building
> are duplicated, once at "Updating an existing system" and for the
> second time under "Tracking NetBSD-current with anoncvs", every time
> they are a bit different. This seems confusing and generally wrong.

And to add to this, within "Tracking NetBSD-current with anoncvs," the
steps are repeated from obtaining to updating and the order of the flags
is altered.

As far as I can tell, though, the only differences are that "Updating an
existing system" uses relative paths and the "tools" instruction
explicitly, while the "Tracking NetBSD-current with anoncvs" uses
absolute paths and calls build (which implicitly calls tools, as Pavel
notes below).

However, perhaps it would be clearer if the instructions for building
the source came after the discussion of the two methods for obtain the
source.

> I do not thing that the interface between kernel and userland between
> RC2 and RC4 changed.

I was not sure, but since the original post from me was due to a
reproducible kernel panic in RC4 GENERIC.MP and I still had RC2
userland, I had to see if I could repeat the panic with a consolidated
kernel and userland (I can). I got the RC4 kernel because
releng.netbsd.org has not been reachable to me and the RC2 installer did
not install GENERIC.MP, so I had to get the kernel from
ftp.fr.netbsd.org, which does not have RC2.

> 
> The documentation for build.sh at /usr/src/BUILDING says:
> 
>      The following operations are supported by build.sh:
> 
>           build         Build the system as per ``make build''.  This
> 	  		option implies the obj and tools operations.
> 
> > 
> > this won't build a new toolchain from the sources?
> 
> So, it will.

Ok, just wanted to make sure because I was not completely sure that the
do-tools command in src/Makefile would be the same as what was called by
build.sh. It seemed to me that it would, but I thought perhaps I could
have confused the two.

> But, if you just type "config", it won't be used, because it woiil
> find the config that you have in your $PATH, not the nbconfig from
> tools.

Is this true even after a complete build and install of -current
userland?

> > I took the document to describe two separate approaches, in which
> > the steps were independent of each other. Is this incorrect?
> 
> which document?

http://www.netbsd.org/Documentation/current/#using-anoncvs

Thanks!
tim