Subject: Re: building a kernel with a read-only /usr/src
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: current-users
Date: 05/13/1998 10:29:25
> Is it possible to build a kernel when /usr/src is mounted read-only?
> Is there a mechanism to make a kernel in /usr/obj?

Certainly.  If nothing else, in my experience the /usr/src/sys tree is
self-contained: if you clone it somewhere else, you can then pretend
you're in /usr/src/sys and everything Just Works.

eg,

% mkdir /tmp/kernel
% cd /tmp/kernel
% rsh srcbox tar cf - -C /usr/src/sys . | tar xvfp -
% cd arch/sparc/conf		# the SPARC is the commonest for me :)
% config WHATEVER
% cd ../compile/WHATEVER
% make depend && make

Of course, you need enough space for a complete copy of the subtree.
If the source is already present on the same machine, one of the other
options people have suggested may be better.

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B