[655] in netbsd-help mailing list archive

home help back first fref pref prev next nref lref last post

Re: 3c590

daemon@ATHENA.MIT.EDU (Greg Hudson)
Fri Jan 26 19:57:54 1996

To: "Douglas S. J. De Couto" <decouto@bermuda.MIT.EDU>
Cc: eford@MIT.EDU, jhawk@MIT.EDU, jcyang@ceci.MIT.EDU, netbsd-help@MIT.EDU
In-Reply-To: Your message of "Sat, 27 Jan 1996 00:22:37 GMT."
             <199601270022.AAA02625@bermuda.MIT.EDU> 
Date: Fri, 26 Jan 1996 19:53:23 EST
From: Greg Hudson <ghudson@MIT.EDU>

> How can you compile kernels and stuff from the afs source tree?
> doesn't the comilation try to write to the afs?  I thought I would
> have to copy the source treeonto my own disk....

There are several different approaches:

	* If you're currently running NetBSD 1.1 or 1.1A, you can use
	  union mounts.  Union mounts let you transparently access a
	  directory with modifications going somewher else.  They
	  exist in 1.0A, but will crash your machine.  (In fact, they
	  may still crash your machine in 1.1 if you play around with
	  them too much, but they work fine for source tree and kernel
	  builds.)  To use them, do something like:

		mkdir /u1/build
		mount_union -b /mit/netbsd/release/netbsd-1.1/source/src \
			/u1/build
		cd /u1/build/sys/arch/i386/conf
		cp /my/kernel/config MYKERNELNAME
		config MYKERNELNAME
		cd ../compile/MYKERNELNAME
		make depend
		make

	  If you reboot your machine, you'll have to redo the union
	  mount each time.  You can only do a union mount to local
	  disk; you can't do a union mount into your Athena home
	  directory, for instance.

	* Symlink farms don't work very well with the NetBSD source
	  tree, but they work well enough for kernel builds.  They're
	  not as convenient as union mounts because they don't stay
	  consistent with the source tree.  To make a symlink farm,
	  do something like:

		mkdir -p /u1/build/sys
		cd /u1/build/sys
		/usr/X11/bin/lndir /mit/netbsd/release/netbsd-1.1/source/src/sys
		cd arch/i386/conf
		[etc.]

	* You can, of course, make a copy of the kernel source tree
	  (about 25MB, which you can pare down to about 8MB if you
	  delete all the arch subdirectories except for i386).

	* We have some hacks for /mit/netbsd/dev/current-source that
	  let users build a kernel out of the AFS tree, but they're
	  deprecated now (and you shouldn't be building a kernel out
	  of /mit/netbsd/dev/current-source unless you know what
	  you're doing).

I'm planning on trying to get some changes checked in for NetBSD 1.2
to let users build both user-level programs and the kernel from a
read-only source tree.


home help back first fref pref prev next nref lref last post