Installation procedure - FreeBSD 5.x
KAME project
$Id: INSTALL,v 1.3 2003/02/09 15:56:44 suz Exp $


You'll need to follow the steps below.  They can be separated into two major
sections - kernel build and userland build.

Be sure to perform "tree preparation" procedure, described in
../INSTALL, prior to taking the steps below.


A. Backup
=========
The following procedure replaces, or overwrites, the following
files/directories:
	/boot/kernel/*
	/usr/include
so you may want to back them up before going through the steps.

A-1. Backup your kernel file, if you need to.
	# cp -r /boot/kernel /boot/kernel.previous

A-2. Backup /usr/include directory, if you want an untouched tree to be
   preserved somewhere.
	# cd /usr
	# mkdir include.clean
	# cd include.clean
	# (cd ../include; tar Bpcf - . ) | tar Bpxf -


B. Kernel build
===============
Consult FreeBSD documentations for more detail.

B-0. It is assumed that you are in platform-specific directory (kame/freebsd4).
     If you are not, chdir to there.

B-1. Go down to sys/i386/conf.
	% cd sys/i386/conf

B-2. Make a kernel configuration file, and invoke "/usr/sbin/config CONFIGFILE".
     GENERIC.KAME includes KAME extensions as well as common FreeBSD
     definitions, so you may want to copy the file to begin with.
	% cp GENERIC.KAME CONFIGFILE
	% vi CONFIGFILE
	% /usr/sbin/config CONFIGFILE

B-3. Build the kernel.  The process will make kernel file named "kernel".
	% cd ../compile/CONFIGFILE
	% make depend
	% make

B-4. Install the kernel file to root directory, as root.
	# make install


C. Userland build
=================
We supply updated userland binaries for KAME-origin userland tools,
and in some cases, for FreeBSD-origin userland tools.

C-0. It is assumed that you are in platform-specific directory (kame/freebsd4).
     If you are not, chdir to there.

C-1. Invoke "make includes" as normal user, then "make install-includes"
     as root.  This will populate KAME-ready include files into /usr/include.
	% make includes
	# make install-includes

C-2. As normal user (or root, if you prefer) perform "make".
	% make

C-3. As root, perform "make install".  This will install necessary userland
     tools into /usr/local/v6/{bin,sbin,whatever}.  This should not replace
     existing IPv4-only userland tools, so it is safe.
	# make install


D. Reboot
=========
D-1. Reboot with the command you like.
	# fastboot


E. Configurations, in short
===========================
E-1. Check the ${.CURDIR}/etc directory if there are any KAME modified
     startup scripts.  If they exist and you want the new startup
     procedures, copy them to the /etc directory.  You may also have
     to check E-5.

E-2. You should configure IPv6 programs in this snapshot instead of the 
     ones in original FreeBSD 4.x, because some of them do not work 
     on this snapshot.
     See E-5 for more details.

E-3. Most of configuration files are shipped with normal OS distribution,
     and are in located in /etc.  If you need special configuration file for
     KAME-origin daemons, configuration files need to be placed in
     /usr/local/v6/etc.  You may want to copy /usr/local/v6/etc/foo.sample into
     /usr/local/v6/etc/foo, and edit as necessary.

E-4. You don't need to invoke /dev/MAKEDEV.altq for freebsd5.
     The altq device files are automatically created by DEVFS in freebsd5.

E-5. Commands modified by KAME project are placed in /usr/local/v6/{bin,sbin}.
     For daily use, you will need to add both of (or either of) them
     into your command search path (consult manpage for your favorite
     shell) and /etc/rc's PATH definition.
     Make sure to make them used before /usr/bin or /usr/sbin,
     otherwise you end up using OS-supplied commands, which might not
     work as mentioned in E-2.

     You should probably add the following line to your /etc/rc.conf:

     PATH=/usr/local/v6/sbin:/usr/local/v6/bin:${PATH}

E-6. There are batch of documents installed into /usr/local/v6/man
     and /usr/local/v6/share/doc.  They are more recent than those
     found in /usr/share/doc/IPv6.  Please read them as necessary.
     If you wish to develop your own programs, we suggest you to read through
     supplied documents, RFCs, and other documents to learn how.
