Subject: RE: Rules for building "current"
To: None <,>
From: Marc Wandschneider <>
List: current-users
Date: 01/10/1994 10:49:52
| From: "Dennis D. Sherod"  <netmail!>
| I apologize for having to ask this question, but I just got on the list and
| missed the discussion that is most pressing to me.  "How to build current."
| I've read the FAQ and picked up the sequence there and was wondering if that
| was the "up-to-date" sequence... at least for a current-kernel?

	this was posted to comp.os.386bsd.questions a few weeks
	back.  there might be some subtle differences between then
	and now, but it gives the general outline of how to proceed.

	if anybody has any obvious corrections to this, please let me

						marc 'em.

Newsgroups: comp.os.386bsd.misc,comp.os.386bsd.questions
Subject: Re: Updating to current

In article <>,
Jason R. Thorpe <thorpej@xanth.CS.ORST.EDU> wrote:
>Does anyone have a canned procedure for updating to current?
>I'd appreciate it...

	I work with NetBSD, so I will describe this for NetBSD-current.

	The following is exactly what I did to upgrade to the
	tar files from saturday morning.  I make no guarnatees
	as to it's working with anything more recent (the tar
	files are only updated every saturday morning):

	1.  There was NO /usr/src tree---Mine was completely removed/
	trashed.  This ends up being big as certain files have moved, and
	if you just copy over an old tree, things will get screwed up with
	miltiple copies of things. [okay,. I lied, keep the TOP level Makefile,
	since the current tar files don't come with it.]

	2.  I extracted the newest tar_files.

	3.  Ran the following guantlet: (I use csh)

	% setenv MACHINE_ARCH i386
	% cd /usr/src/include; make && make install
	% cd /usr/usr/share/mk; make install
	% cd /usr/src/include; make && make install # don't ask--i just did it
	% setenv LDSTATIC -static
	% setenv NOPIC
	% cd /usr/src/lib/libc; make && make install
	% cd /usr/src/gnu/lib/libmalloc; make && make install
	% cd /usr/src/gnu/usr.bin/gas; make && make install
	% cd /usr/src/gnu/usr.bin/ld; make && make install
	# Things WILL barf while building rtld (  Just ignore
	# it and type make install (where things will barf again, because they
	# can't find :-)), and you will be okay.
	% cd /usr/src/gnu/usr.bin/gcc2; make && make install
	% unsetenv LDSTATIC NOPIC
	% cd /usr/src/lib; make && make install
	% cd /usr/src/gnu/lib; make && make install
	% cd /usr/src/gnu/usr.bin/ld; make && make install

	4.  Now, here is where things get messy.  Most suggestions
	I saw recommend now just going to /usr/src, and then
	typeing make && make install.  However, there will be a few
	barfs along the way, and you will want to rebuild the kernel.

	The top level Makefile builds things in this order:

      lib include bin libexec sbin usr.bin usr.sbin share games gnu sys

	Thus, what I did was to go to each directory, one at a time
	and build with make && make install.

	Ie (from /usr/src)

	% cd lib; make && make install
	% cd ../include; make && make install
	% ...

	AFTER building sbin, I then went and rebuilt a new kernel,
	because the 0.9 kernel has a bug which will cause extremely
	frequent kernel panics during long builds.

	TO do this, use the exact same procedure you used in 0.9 to build


	% cd /usr/src/usr.sbin/config; make && make install
	% cd /sys/arch/i386/conf
	% cd ../compile/MYCONFIGFILE
	% make depend && make
	% cp /netbsd /wumpus
	% cp netbsd /netbsd
	% reboot


	You can then continue building where you left off (ie
	/usr/src/usr.bin).  Please note the following (READ ALL FIRST):

	a. in usr.bin, tn3270 will not build.  I have never been
	able to get this to build, and couldn't be bothered figuring
	out how to fix it, thus, I just removed it temporarily from
	the usr.bin Makefile so that the rest would work fine. The old
	statically linked one will still be there, and (allah willing)
	should work fine.

	b. When in gnu/usr.bin/lex, things will vomit left and right. To
	get it to work, read the Makefile
	[basically, cd lib, make && make install; cd .. ; cp initscan.c
	 scan.c; make && make install]

	c. Things in share will vomit left and right, and again, I couldn't
	have been bothered to fix them up, as much of the stuff was already
	there.   After the first death in share, I just aborted, and went
	back to install the games tree.  This might not be a great idea :-)

	d. in games, if you do NOT use the obj/ stuff, (as I do not), then
	fortune will vomit during the build.  I fixed this by removing
	any obj/ from the Makefile.  Everything worked fine after

	Finally, please note the following:

	1.  Please do not attempt this if you are not patient, and willing
	to tolerate a sudden loss of a lot of data.

	2. You might want to have a copy of old binaries lying around.  I
	 trashed  up a few here and there with really stdupid moves, and
	had to get a new (old) ld and make.

	3. Kneeling towards the east before starting might help
	a little.  this stuff is quite amusing.

	4. I don't speak for the NetBSD core team, and might very well get
	flamed for being an ignorant little twip for this post.  Use at your
	own risk.

	Right now, I'm having a gas with this thing.  I just got a 1,8GB disk,
	and now, with the -current up and running, have even MORE space
	free :-)

						Marc 'em.