Update, build and install world and kernel

Updating the sources using svn

by ross at 08:06:42 on October 2, 2012

Install subversion

# cd /usr/ports/devel/subversion
# make install clean
# rehash

Browse what is available

Open: http://svnweb.freebsd.org/base/

You will see a number of directories there. You need /base/releng/ if you are going to track a particular FreeBSD release with security patches. Or /base/stable/ if you are interested in FreeBSD-STABLE.

Initial checkout

Remove /usr/src and fetch FreeBSD 9.0-RELEASE-pN, for instance:

# rm -rf /usr/src
# svn co svn://svn.freebsd.org/base/releng/9.0 /usr/src

Updating fetched sources

After initial checkout you can update the sources simply by running:

# svn up /usr/src

Note on kernel config file

If you delete /usr/src in order to fetch a different version you might loose you kernel configuration file.

The simpliest way to avoid this is to keep kernel configs in /root/kernels directory, for instance. This way you can do (after fetching new sources):

# cd /usr/src/sys/amd64/conf
Or "/usr/src/sys/i386/conf" if you are on 32-bit
# ln -s /root/kernels/COFFIN

And your config file COFFIN will be restored.