Subject: Re: System Build
To: Andrew S. Clapp <clapp@peak.org>
From: Andreas Brusinsky <brusinsk@ibdr.inf.tu-dresden.de>
List: netbsd-help
Date: 09/09/1997 06:29:35
On Mon, 8 Sep 1997, Andrew S. Clapp wrote:
> #cd /usr

I would assume /usr/src is the place you would like to start from.
Then a 'make build' includes the 'make depend' command and if
all runs smoothly through it includes also a 'make install'(I believe).

If you get stuck then there are several things to be done ahead of 'make 
build' it depends from what version of the system you are comming:

	- build a new Kernel from your new sources and run it
	 (this is done by going into 
	   /sys/arch/<the architecture you are running>/conf;
	   config GENERIC; cd ../compile/GENERIC; make depend && make ;
	   cp /netbsd /onetbsd;!!! it is very importand to keep the old 
 		kernel. You could start it, if the other fails from the
		boot prompt by hacking in 'onetbsd' or attempting
		to do the same thing with onetbsd as the bootloader does with
		netbsd(i.e. special device ..)
	   cp /sys/arc/<arch>/compile/GENERIC/netbsd /netbsd;
	   then 'reboot' and hoping that all goes through.

	- before new making can take place new makefiles should
	  be available for the system so go into /usr/src/share/mk and
	  'make install' (probably this is also done by 'make build' but
 	  who knows) then a 'make install' in /usr/src/includes can help
	  also

	- to run all through and dont stop with every small error you
	  could do: 'make -k build |tee /var/tmp/build.log' and the
	  tee thing helps you tracking down all the errors that come up.

> Will this build the complete source properly?
Not in every case. Usually you will have some bugs on the way
from new source to freshly build binaries. Also some people
say and it probably makes some sense, that after a full build and
and installation of that, you should run 'make build' on the same
sources once more to ensure that all things are build as they
expected. Especially if some of the build tools(i.e gcc, lint ..)
are new in source and possibly functionallity then this makes
your new build binaries 'more safe'.
 
> Is there any documentation I should have read by now?
There are quite a few books about OS'ses, UNIX'es and
especially BSD's but what help they are in a quickly changing
source tree you have to know for yourself. Pages within the tree
are 'man make' ,'man install', 'man config' or browse
some web-pages with FAQ's to the topics you would like to
know more about.