Building and Installation
you must have kernel sources installed in order to compile the driver module.
in the instructions below, x.x.x is the driver version as indicated in the name of the driver tar.
1 move the base driver tar file to the directory of your choice. for example, use /home/username/em or /usr/local/src/em.
2 untar/unzip the archive: tar xfz em-x.x.x.tar.gz
3 to load the driver onto a running system: cd em-x.x.x/modules kldload ./if_em.ko
4 to assign an ip address to the interface, enter the following: ifconfig em[interface_num] [ip_address]
5 verify that the interface works. enter the following, where [ip_address] is the ip address for another machine on the same subnet as the interface that is being tested: ping [ip_address]
6 if you want the driver to load automatically when the system is booted: cd em-x.x.x/modules
cp if_em.ko /modules
edit /boot/loader.conf, and add the following line:
if_em_load="yes"
or
compile the driver into the kernel (see item 7).
edit /etc/rc.conf, and create the appropriate ifconfig_em[interface_num] entry:
ifconfig_em[interface_num]="[ifconfig_settings]"
example usage:
ifconfig_em0="inet 192.168.10.1 netmask 255.255.255.0"
for assistance, see the ifconfig man page.
7 if you want to compile the driver into the kernel, enter:
cd em-x.x.x/src
cp if_em* /usr/src/sys/dev/em
cp makefile /usr/src/sys/modules/em
edit the /usr/src/sys/conf/files.i386 file, and add the following line:
dev/em/if_em_hw.c optional em
remove the following lines from the /usr/src/sys/conf/files.i386 file, if they exist:
/dev/em/if_em_fx_hw.c optional em
/dev/em/if_em_phy.c optional em
compile and install the kernel.