[870] in netbsd-help mailing list archive

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

sup'ing your own kernel tree

daemon@ATHENA.MIT.EDU (Yoav Yerushalmi)
Wed Mar 27 15:07:01 1996

To: netbsd-help@MIT.EDU
Cc: eford@MIT.EDU
Date: Wed, 27 Mar 1996 15:02:46 EST
From: Yoav Yerushalmi <yoav@MIT.EDU>


How to get your own NetBSD-current (right now it is 1.1B) source tree.
Either Kernel only, or kernel and binraries.

a few things to note:
  1) This is a constantly changing source tree. In general, some things
will not build. Sometimes, the kernel will not build. Wait a day
or two and sup again, and it will probably be fixed by then.
  2) This will require around 200 megs of disk space. While in general,
you will only use about 100, it will grow when compiling, and shrink
again. (well, 150 may be enough, but I won't commit to that).
  3) It will help if you read current-users (a mailing list). This
generates about 80 messages a day, so it might be more than you'd
care to. However, to find out how to subscribe, send mail to
      majordomo@netbsd.org
with the following text in the body:
      help

How to actually get a tree:
always do this as root:

first time around will be VERY SLOW. after that, it should get better. Try
to do this late at night when less people might be running sup.
	1) rm /usr/src
	2) mkdir /usr/src /usr/local/sbin /usr/local/etc
	3) attach netbsd
	4) cp /mit/netbsd/arch/i386_nbsd1/sbin/sup /usr/local/sbin/
	5) cp /mit/netbsd/arch/i386_nbsd1/etc/supfile /usr/local/etc
	6) cp /mit/netbsd/arch/i386_nbsd1/usr/sbin/building /usr/local/sbin/	
	7) rehash

now, this step you will repeat every time you want to update your source
tree.

	1) cd /usr/local/etc
	2) sup -v supfile

This will update your files. first time will take forever. After that, it
should take about 15 minutes.

You should now have a source tree.

to compile a kernel:
	cd /usr/src/sys/arch/i386/config
	config {KERNEL}
	cd ../compile/{KERNEL}
	make clean; make depend; make clean; make
(the cleans are 'just in case')
	mv /netbsd /netbsd.old
	cp ./netbsd /netbsd
	sync
	sync
	reboot
(if it messes up, you can always boot to /netbsd.old in single-user to
fix  by typing  
     /netbsd.old -s
at the original boot prompt.)




to build the OS:
	building
(wait forever)



Sometimes, there are components you need to build first before you can build
others. (for example, right now, you have to build config before building
a new kernel, since stuff has changed).

Also, right now, the kernel config files have changed a bit. pci0 lives off
mainbus0 and mainbus0 lives off root. Look at something like GENERIC and
compare to your kernel config file, and fix it.

Well, good luck, and have fun.

-- 
-----------------------------------------------------------------
| Yoav Yerushalmi         |  My opinions are mine..             |
| M.I.T student at large  |    (I hope..  don't sue)            |
| http://www.mit.edu:8001/afs/sipb/user/yoav/html/homepage.html |
-----------------------------------------------------------------


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