Can not install driver for intel i340-t4
-
Hi there, i am using latest Pfsense and i am trying to install the latest driver for my intel nic i340-t4 and i am following instruction from the intel website but when i do MAKE on the driver folder i get this error: make: "/usr/share/mk/bsd.kmod.mk" line 12: Unable to locate the kernel source tree. Set SYSDIR to override. Any suggestion how can i install. Thanks .
README INSTRUCTION:
- Move the base driver tar file to the directory of your choice. For example, use /home/username/igb or /usr/local/src/igb.
- Untar/unzip the archive:
tar xzf igb-x.x.x.tar.gz
This will create the igb-x.x.x directory. - To install man page:
cd igb-x.x.x
gzip -c igb.4 > /usr/share/man/man4/igb.4.gz - To load the driver onto a running system:
cd igb-x.x.x/src
make
kldload ./if_igb.ko
-
You cannot compile software on pfSense, nor should you ever want to. It lacks all of the necessary developer tools, and adding them will break stuff.
To compile drivers for pfSense you will need to build a separate FreeBSD machine with the developer tools installed, compile and link the code there, and then copy the resultant driver binary module over to pfSense.
For pfSense-2.4.5 you will need FreeBSD-11.3/STABLE. For pfSense-2.5 you will need FreeBSD-12.2/STABLE. The most expedient way to do this is with a virtual machine on the hypervisor of your choice.
-
the igb driver is compiled inside the kernel and not as a module, I don't think you can update it without recompiling the entire kernel
-
i did install freebsd in virtual machine and installed the drivers, now which file should i copy to my pfsense because in the kernel folder i see this file if_igb.ko , is this the one that i need to move to my pfsense kernel folder?
-
@edmond said in Can not install driver for intel i340-t4:
i did install freebsd in virtual machine and installed the drivers, now which file should i copy to my pfsense because in the kernel folder i see this file if_igb.ko , is this the one that i need to move to my pfsense kernel folder?
You can try that (be sure to create a backup of any existing matching file on your pfSense box first), but if the driver is compiled into the kernel your approach will likely not work. The kernel is going to choose the built-in (compiled in) driver first.
One of the downsides of FreeBSD is that support for the latest hardware tends to lag behind that of Linux and of course Windows. When building a FreeBSD box, the latest/greatest/fastest hardware is not always going to work.
-
If you compiled the module against a compatible FreeBSD version you can load it at boot in preference to the in-kernel driver. It can only be done at boot via loader.conf(.local) if you try to load it using kldload it will fail.
However you probably don't need to. I would expect the in kernel igb driver to work fine with that card.
Why are you trying this?Steve
-
i just want to install latest driver, which is 2.5.16. i checked my current driver using DMEG command and i think i have 2.5.3-k . It is not that i have any issue with my current driver but i just wanted to install the latest.
-
@edmond said in Can not install driver for intel i340-t4:
i just want to install latest driver, which is 2.5.16. i checked my current driver using DMEG command and i think i have 2.5.3-k . It is not that i have any issue with my current driver but i just wanted to install the latest.
If it ain't broke .....
/Bingo
-
Yeah, there is no reason to do that. The driver that ships with 2.4.5p1 was the current FreeBSD driver for that kernel. You are far more likely to see problems and introduce instability by loading a completely untested kernel module.
Steve
-
Right, i also wanted to learn how to update drivers in case i will have problems in the future but for now i will leave it like it is and see how it works, thanks for your help