Updating Driver / Already loaded in Kernel

Started by maxreg, January 14, 2021, 10:44:44 AM

Previous topic - Next topic
Hey people, happy new year!

I have been searching and trying to update the driver for Intel I219-V. I've setup a FreeBSD 12.1 to 'compile' (?) the driver I've downloaded from intel.


I have read alot of forum posts to get where I am, but I am stuck and I'm not sure if my UNIX understanding is enough.

My first step was to get the kernel sources, then I went to the intel driver folder, executed 'make', wich created the 'if_em.ko'.

Wich I then copied over to the opnSense-system. First I tried to put it into /boot/modules, and tried to kldload it, with the error: "already loaded from kernel". I then tried to replace the file in the /boot/kernel folder, wich I read isn't a good idea, but it did not work either.

After searching the error, I came to the conclusion, that the kernel itself has driver injected, and it is not possible to just replace them with recompiling opnsense from sources. Is that true?


My goal was using a AsRock DeskMini H470 (Pentium G6600, 4GB RAM, 128GB M.2 SSD) wich has the Intel I219-V built in. I've checked before buying if the driver was available, but when opnsense is installed, the network interface is neither available nor activated. I can't assign an interface an ip address.


Does anybody have an idea to get it to work?


The ports install the driver at /boot/modules/if_em_updated.ko and will tell you:

QuoteUsage:
To load the updated version of the driver add this:

if_em_updated_load="YES"

to your /boot/loader.conf and reboot the machine.
There's no need to recompile the GENERIC kernel without if_em driver

After the reboot you may see this kind of messaged in the dmesg:

module_register: module pci/em already exists!
Module pci/em failed to register: 17

This is the side effect of the newer version of the driver overriding the
older one and can be safely disregarded

However, use /boot/loader.conf.local to do this or System: Settings: Tunables.

The driver will be correct after reboot.


Cheers,
Franco

PS: Happy new year :)

Thank you alot, that worked! You saved me so much time!


Have a good day.



Tunable => if_em_updated_load
Value => YES

Done :)