On 26 August, 2001, I changed the script slightly. It now requires changes to /etc/make.conf
(you should create that file if it doesn't already exist). Ensure the following entries exist in that file:
SUPFLAGS= -g -z -L 2
NOTE: I have not been able to get the above to work. I have had to resort
to upgrading my source by issuing the cvsup command directly.
Here are the steps I go through to build my world.
Before you use the script,
remember to change the variable in the script to suit your requirements. You must
MYKERNEL to the appropriate value (see the following NOTE). And you may wish to
change the default location for the logs. By default, they go to
If you don't change that value, make sure
NOTE: If you have not previously downloaded the kernel source and created a kernel
configuration file, then you must create this file after step 2 and before step 5.
Please refer to the Configuring
the FreeBSD Kernel section in the FreeBSD
handbook. Pay special attention to the section on Building and Installing
a Custom Kernel.
If you have previously done a build world, you should remember to do a make clean
first. It clears out /usr/obj as well as deleting your old log files.
This section outlines the steps which are detailed below. This intended to be a
quick reference for those who are familiar with the steps and just need a quick reminder
of what to do. Again, this assumes you have installed the makefile in
when you were su'd to root.
Remember to create your kernel configuration file first and set the name of this file
within the Makefile (see
These instructions are for the Makefile provided at the top of this page.
su to root
make update - updates your source, if it already exists!
make build - does a build world.
make install - installs the results of the above builds
make merge - merges the configuration file changes
/usr/src/UPDATING recommends a reboot here just to make sure the
kernel you just built is operational. If it is not you can still reboot to
kernel.old and still have your world and kernel in sync. For what it's worth, I
don't usually do this reboot. And once, when I was upgrading to 4.4, I actually broke my
box big time. If you do this reboot, note that ipf will possibly break because
you are (for example) using a 4.4 kernel with a 4.3 world. If you also use
IPFILTER_DEFAULT_BLOCK, then you'll be locked out of the box. Your only way back in
will be via the console. BE WARNED!
If you encounter the following error:
then you don't have any source to be updated. I suggest you issue the following command instead:
# make update
cd /usr/src; make update 2>&1 | tee /usr/tmp/update.`date "+%Y.%m.%d.%H.%M.%S"`.log;
make: don't know how to make update. Stop
cvsup -h xeon /usr/share/examples/cvsup/stable-supfile
xeon is the name of your favorite cvsup server. I know I have to issue
the above command when I first cvsup a box (e.g. I just installed 4.4-RELEASE and I want to upgrade the
system to 4.4-STABLE.
It could also be that upgrading from an older version of FreeBSD which does not support
make update. For example, I know 4.2-Release does not have this feature.
In which case, you should run cvsup manually to upgrade your sources. There is a small example
of how do this within Installing cvsup.