1.6. Building the kernel

1.6.1. Compiling and compressing the kernel

Download the kernel configuration file for the platform that you want to build for from http://m0n0.ch/wall/downloads/freebsd-4.11 and copy it to /sys/i386/conf, then execute the following commands to compile the kernel and modules:

cd /sys/i386/conf
config M0N0WALL_[PLATFORM]
cd /sys/compile/M0N0WALL_[PLATFORM]
make depend && make

Compress the kernel using gzip:

gzip -9 kernel

The kernel will be installed later, as it doesn't go directly into the root file system.

1.6.2. Installing the modules

The dummynet, if_tap, if_vlan and ipfw modules are needed for m0n0wall:

cd modules/usr/src/sys/modules
cp dummynet/dummynet.ko if_tap/if_tap.ko if_vlan/if_vlan.ko ipfw/ipfw.ko $MWROOT/modules