OPNsense Forum

Archive => 20.7 Legacy Series => Topic started by: maxreg on January 14, 2021, 10:44:44 am

Title: Updating Driver / Already loaded in Kernel
Post by: maxreg on January 14, 2021, 10:44:44 am
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?

Title: Re: Updating Driver / Already loaded in Kernel
Post by: franco on January 14, 2021, 11:19:08 am
The ports install the driver at /boot/modules/if_em_updated.ko and will tell you:

Quote
Usage:
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 :)
Title: Re: Updating Driver / Already loaded in Kernel
Post by: maxreg on January 14, 2021, 11:36:37 am
Thank you alot, that worked! You saved me so much time!


Have a good day.
Title: Re: Updating Driver / Already loaded in Kernel
Post by: franco on January 14, 2021, 01:38:12 pm
Ok, great, no problem :)


Cheers,
Franco
Title: Re: Updating Driver / Already loaded in Kernel
Post by: tracerrx on April 20, 2022, 10:38:02 pm
How do you do this in system tuneables?
Title: Re: Updating Driver / Already loaded in Kernel
Post by: franco on April 21, 2022, 12:00:41 pm
Tunable => if_em_updated_load
Value => YES

Done :)