Cannot load a compiled .ko Intel NIC driver to pfSense 2.4.5
-
I have compiled an if_ix.ko NIC driver for Intel X553 chipset in order to replace the older version of pfSense one.
I used a VM with FreeBsd 11.3-STABLE:

I replaced the old .ko in /boot/kernel and I have edited the loader.conf.local with the follwing line:
if_ix_load="YES"
Also I tried to put the module in /boot/modules/ and edit the loader.conf.local with the following line:
if_ix_updated_load="YES"
In both cases the .ko is not loaded, although the NICs are still working
kldstat output:

Also when I try to load it manually i get the following from kldload:

dmesg relevant output:

ASFAIK this means the version of my FreeBSD is not the same as pfSense one.
What version of FreeBSD should I use in order to be able to be on the same version, in order to compile ?
pfSense is using a version from 24th of March:

Any help is appreciated, thanks
-
Does it load in the box you compiled it on?
At first glance that looks like the correct kernel though.
Steve
-
@stephenw10 said in Cannot load a compiled .ko Intel NIC driver to pfSense 2.4.5:
Does it load in the box you compiled it on?
At first glance that looks like the correct kernel though.
Steve
I tried it, and it loads:

The driver was downloaded from here:
https://downloadcenter.intel.com/download/14688/Intel-Network-Adapters-Driver-for-PCIe-10-Gigabit-Network-Connections-Under-FreeBSD-?product=88207and then compiled
-
Hmm, this is the first release that was not based on a FreeBSD release version directly. I have built kernel modules for other versions but clearly there is something different here.
However I note the alternative re driver module seems to be working: https://forum.netgate.com/post/900628
They don't say precisely but it looks like that was built against 11.3 release. You might ask there.Steve
-
I can confirm that I built the Realtek driver using the official FreeBSD 11.3-RELEASE VM image, and it loads and works.
-
@TheNarc said in Cannot load a compiled .ko Intel NIC driver to pfSense 2.4.5:
I can confirm that I built the Realtek driver using the official FreeBSD 11.3-RELEASE VM image, and it loads and works.
Hi @TheNarc
Which one exactly 11.3-Release or 11.3-Stable. Because from what I see pfSense was built with stable:
2.4.5-RELEASE (amd64)
built on Tue Mar 24 15:25:50 EDT 2020
FreeBSD 11.3-STABLE
Hence my VM machine on which I've compiled is the 11.3-Stable version. And I think maybe the build date also matters?Thanks
-
@NRgia I apologize, you're correct; I should never trust my memory. I went back and checked and it was the stable image that I used:
http://ftp.freebsd.org/pub/FreeBSD/snapshots/VM-IMAGES/11.3-STABLE/amd64/Latest/FreeBSD-11.3-STABLE-amd64.vhd.xz -
@TheNarc said in Cannot load a compiled .ko Intel NIC driver to pfSense 2.4.5:
http://ftp.freebsd.org/pub/FreeBSD/snapshots/VM-IMAGES/11.3-STABLE/amd64/Latest/FreeBSD-11.3-STABLE-amd64.vhd.xz
I'll try with the one you provided and post a feedback afterwards.
Thanks -
@TheNarc I've remembered why I didn't used an already created VM, it lacked the kernel source.
I got this when I try to compile:

Do you know which src.txz you used for usr/src/ or which one to fetch?
Thanks
-
@NRgia Just checked, and I did use the 11.3-RELEASE source, which adds to the confusion I guess. But it did work for me. Plus I don't see the 11.3-STABLE source, at least on this FTP server:
ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/11.3-RELEASE/src.txz -
@TheNarc said in Cannot load a compiled .ko Intel NIC driver to pfSense 2.4.5:
@NRgia Just checked, and I did use the 11.3-RELEASE source, which adds to the confusion I guess. But it did work for me. Plus I don't see the 11.3-STABLE source, at least on this FTP server:
ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/11.3-RELEASE/src.txzThe source for STABLE is always changing. You'd have to check out a specific commit from svn or git.
As you can see on https://docs.netgate.com/pfsense/en/latest/releases/versions-of-pfsense-and-freebsd.html#id1 we have listed the specific point on 11-STABLE used for 2.4.5.
-
@TheNarc said in Cannot load a compiled .ko Intel NIC driver to pfSense 2.4.5:
@NRgia Just checked, and I did use the 11.3-RELEASE source, which adds to the confusion I guess. But it did work for me. Plus I don't see the 11.3-STABLE source, at least on this FTP server:
ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/11.3-RELEASE/src.txzThere is for stable also:
https://download.freebsd.org/ftp/snapshots/amd64/11.3-STABLE/src.txz -
@jimp said in Cannot load a compiled .ko Intel NIC driver to pfSense 2.4.5:
@TheNarc said in Cannot load a compiled .ko Intel NIC driver to pfSense 2.4.5:
@NRgia Just checked, and I did use the 11.3-RELEASE source, which adds to the confusion I guess. But it did work for me. Plus I don't see the 11.3-STABLE source, at least on this FTP server:
ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/11.3-RELEASE/src.txzThe source for STABLE is always changing. You'd have to check out a specific commit from svn or git.
As you can see on https://docs.netgate.com/pfsense/en/latest/releases/versions-of-pfsense-and-freebsd.html#id1 we have listed the specific point on 11-STABLE used for 2.4.5.
And how can I take the exact one?
-
The stable/11 branch is here:
https://github.com/freebsd/freebsd/commits/stable/11
But I've been unsuccessful in linking r357046 to a commit hash, which is not entirely surprising as I'm not too well versed in git. I thought github's search would be able to find it, but I haven't had luck yet. I'll let you know if I locate it though. -
@TheNarc said in Cannot load a compiled .ko Intel NIC driver to pfSense 2.4.5:
The stable/11 branch is here:
https://github.com/freebsd/freebsd/commits/stable/11
But I've been unsuccessful in linking r357046 to a commit hash, which is not entirely surprising as I'm not too well versed in git. I thought github's search would be able to find it, but I haven't had luck yet. I'll let you know if I locate it though.It will be good to know, but I managed to compile it as follows:
- The VM image didn't had enough space, so I've created a VM from 11.3-STABLE ISO
- Installed subversion (svn)
- Used the following:
svn checkout https://svn.FreeBSD.org/base/release/11.3.0 /usr/src/to download the source - So you were right using Release SRC on STABLE. I still don't understand why it works, but I'm glad it did.
What I saw in the FreeBSD svn manual, is that we can use svn -r (and the number of revision), in order to update the source to exact revision. But it didn't worked for me, or it's a more complex syntax, or I don't have access to the repository. If you find out please let me know. We will need it when pfSense based on FreeBSD 12 will be released :)
In the end I would like to thank you, for all your tips @TheNarc , @stephenw10 and @jimp . It worked

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy