Installing a driver for NIC.
-
I would like to configure this (not detected by pfSense) ethernet card:
Silicom PXG6BPi Six Port Copper Gigabit Ethernet PCI-X Bypass Server Adapter http://www.silicom-usa.com/Networking_Bypass_Adapters/PXG6BPi-Six_Port_Copper_Gigabit_Ethernet_PCI-X_Bypass_Server_Adapter_Intel_based_58
But the procedure requires compilation. Extracted from its "Readme.txt":
1. Move the base driver tar file to the directory of your choice. For
example, use /home/username/silbpi or /usr/local/src/silbpi.2. Untar/unzip the archive:
tar xvfz silbpi-x.x.x.silc.x.x.tar.gz
This will create an silbpi-x.x.x.silc.x.x directory.
3. To create a loadable module, perform the following steps.
a. To compile the module
cd silbpi-x.x.x.silc.x.x/src
makeb. To install the compiled module in system directory:
make install
c. To load the driver as a dynamic module:kldload ./if_silbpi.ko
d. If you want the driver to load automatically when the system is booted:
1. Follow steps a, and b above to compile and install the module
2. Edit /boot/loader.conf, and add the following line:if_silbpi_load="YES"
So, it seems there is no other way than using make.
I have read that the proper procedure for compilations on pfSense is:1.- Install another FreeBSD compatible system (10.2-stable in my case) on another computer or VM.
2.- Perform the compilation on that system.
3.- Transport the compiled stuff to the pfSense system.But I am not sure if that will be that "easy" when talking about drivers: they copy files on different locations and/or maybe modify some configuration files inside the operating system.
Suggestions about my options to install this driver are welcome.
-
The driver builds a loadable module which is a single file that, conventionally, is placed in /boot/modules (or /boot/kernel if the module in question was shipped as part of the kernel).
You should put the line to load your module at boot time in /boot/loader.conf.local as pfSense will leave this file alone. Changes to /boot/loader.conf will likely be overwritten.
10.2-STABLE is the correct version of FreeBSD for pfSense 2.3 at this time - the kernel source used for pfSense 2.3 can be found in the devel branch of https://github.com/pfsense/FreeBSD-src .
You could consider packaging the module as a FreeBSD package, with a pkg-install script that installs the relevant line in /boot/loader.conf.local if it is missing, and a pkg-deinstall script that removes the relevant line from /boot/loader.conf.local if it is there. The easiest way to automate building of a package is to produce a port - the man pages for pkg and the FreeBSD Porter's Handbook will help. When making your package, remember that /bin/sh is not Bash on FreeBSD - there is no guarantee that Bash is available on a FreeBSD system.
-
- Install the card
- Do a fresh and full install of pfSense 2.2.6
- If the card is not recognized, try loading the "ex(4)" driver module for it.
Alternatively you could try out;
- Install the card
- Install FreeBSD 10.1R and see if this card get recognized
- If not compile the driver from source code and then find out which .ko module is loaded for this card as driver
- copy this .ko module over to your pfSense when the card is installed and then load it
Please make sure that the same FreeBSD and pfSense versions will be used to realize this.
FreeBSD 10.1 > pfSense based FreeBSD 10.1
32Bit > 32Bit and 64Bit > 64Bit