1
Tutorials and FAQs / [Tutorial] Compile network driver
« on: February 14, 2021, 08:39:42 pm »
This tutorial is how to compile and install the latest Intel if_em.ko driver, this may work for other drivers that you want to compile?
The right way is to use a OPNsense version that is the same version that you are using in production.
Thanks to almodovaris for pointing this out.
I found an old topic from franco that explained how to do this in OPNsense.
Prior to finding franco's post I ran in to this error while trying to compile the driver.
This my process for OPNsense version 21.1. I was using Arch Linux and running OPNsense as a VM using KVM with libvirt. The driver was copied to /tmp on the OPNsense VM.
There are two files that you want to copy to your production OPNsense system, /tmp/em-7.7.8/src/em.4 and /tmp/em-7.7.8/src/if_em.ko
I copied them to /root.
Copy the man page to the proper directory
When I copied the if_em.ko driver to /root I changed the name to if_em.ko-OPNsense-21.1v7.7.8 we need to put this in the right place now.
Edit/Update 1
The user DimitriDC posted a link below witch lead to user Franco posting the correct location to put the driver, it should be placed in /boot/modules/
Edit /boot/load.conf.local to contain the line:
Reboot and test.
The right way is to use a OPNsense version that is the same version that you are using in production.
Thanks to almodovaris for pointing this out.
Quote
https://forum.opnsense.org/index.php?action=post;quote=101093;topic=21484.0;last_msg=101093
I found an old topic from franco that explained how to do this in OPNsense.
Quote
https://forum.opnsense.org/index.php?topic=3689.msg12644#msg12644
Prior to finding franco's post I ran in to this error while trying to compile the driver.
Code: [Select]
root@OPNsense:/tmp/em-7.7.8/src # make
make: "/usr/share/mk/bsd.kmod.mk" line 16: Unable to locate the kernel source tree. Set SYSDIR to override.This my process for OPNsense version 21.1. I was using Arch Linux and running OPNsense as a VM using KVM with libvirt. The driver was copied to /tmp on the OPNsense VM.
Code: [Select]
root@OPNsense:~ # pkg install git
Updating OPNsense repository catalogue...
Fetching meta.conf: 100% 163 B 0.2kB/s 00:01
Fetching packagesite.txz: 100% 199 KiB 203.4kB/s 00:01
Processing entries: 100%
OPNsense repository update completed. 728 packages processed.
All repositories are up to date.
Updating database digests format: 100%
The following 3 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
cvsps: 2.1_2
git: 2.30.0
p5-Error: 0.17029
Number of packages to be installed: 3
The process will require 22 MiB more space.
4 MiB to be downloaded.
Proceed with this action? [y/N]: y
[1/3] Fetching git-2.30.0.txz: 100% 4 MiB 1.1MB/s 00:04
[2/3] Fetching p5-Error-0.17029.txz: 100% 27 KiB 27.4kB/s 00:01
[3/3] Fetching cvsps-2.1_2.txz: 100% 41 KiB 41.9kB/s 00:01
Checking integrity... done (0 conflicting)
[1/3] Installing p5-Error-0.17029...
[1/3] Extracting p5-Error-0.17029: 100%
[2/3] Installing cvsps-2.1_2...
[2/3] Extracting cvsps-2.1_2: 100%
[3/3] Installing git-2.30.0...
===> Creating groups.
Creating group 'git_daemon' with gid '964'.
===> Creating users
Creating user 'git_daemon' with uid '964'.
[3/3] Extracting git-2.30.0: 100%
=====
Message from git-2.30.0:
--
If you installed the GITWEB option please follow these instructions:
In the directory /usr/local/share/examples/git/gitweb you can find all files to
make gitweb work as a public repository on the web.
All you have to do to make gitweb work is:
1) Please be sure you're able to execute CGI scripts in
/usr/local/share/examples/git/gitweb.
2) Set the GITWEB_CONFIG variable in your webserver's config to
/usr/local/etc/git/gitweb.conf. This variable is passed to gitweb.cgi.
3) Restart server.
If you installed the CONTRIB option please note that the scripts are
installed in /usr/local/share/git-core/contrib. Some of them require
other ports to be installed (perl, python, etc), which you may need to
install manually.
root@OPNsense:~ # cd /usr
root@OPNsense:/usr # git clone https://github.com/opnsense/plugins
Cloning into 'plugins'...
remote: Enumerating objects: 96, done.
remote: Counting objects: 100% (96/96), done.
remote: Compressing objects: 100% (72/72), done.
remote: Total 45587 (delta 27), reused 67 (delta 16), pack-reused 45491
Receiving objects: 100% (45587/45587), 8.93 MiB | 8.63 MiB/s, done.
Resolving deltas: 100% (17821/17821), done.
root@OPNsense:/usr # git clone https://github.com/opnsense/ports
Cloning into 'ports'...
remote: Enumerating objects: 11654, done.
remote: Counting objects: 100% (11654/11654), done.
remote: Compressing objects: 100% (10196/10196), done.
remote: Total 1216799 (delta 2252), reused 7971 (delta 1393), pack-reused 1205145
Receiving objects: 100% (1216799/1216799), 406.62 MiB | 16.51 MiB/s, done.
Resolving deltas: 100% (559702/559702), done.
Updating files: 100% (137844/137844), done.
root@OPNsense:/usr # git clone https://github.com/opnsense/src
Cloning into 'src'...
remote: Enumerating objects: 296, done.
remote: Counting objects: 100% (296/296), done.
remote: Compressing objects: 100% (175/175), done.
remote: Total 218175 (delta 178), reused 164 (delta 115), pack-reused 217879
Receiving objects: 100% (218175/218175), 493.89 MiB | 17.60 MiB/s, done.
Resolving deltas: 100% (134226/134226), done.
Updating files: 100% (80527/80527), done.
root@OPNsense:/usr # cd src/
root@OPNsense:/usr/src # git checkout
COPYRIGHT ObsoleteFiles.inc contrib/ libexec/ sys/
LOCKS README crypto/ release/ targets/
MAINTAINERS README.md etc/ rescue/ tests/
Makefile UPDATING gnu/ sbin/ tools/
Makefile.inc1 UPDATING-HardenedBSD include/ secure/ usr.bin/
Makefile.libcompat bin/ kerberos5/ share/ usr.sbin/
Makefile.sys.inc cddl/ lib/ stand/
root@OPNsense:/usr/src # git checkout stable/21.1
Branch 'stable/21.1' set up to track remote branch 'stable/21.1' from 'origin'.
Switched to a new branch 'stable/21.1'
root@OPNsense:/tmp # cd /tmp
root@OPNsense:/tmp # tar xzf em-7.7.8.tar.gz
root@OPNsense:/tmp # cd em-7.7.8/src
root@OPNsense:/tmp/em-7.7.8/src # make
machine -> /usr/src/sys/amd64/include
x86 -> /usr/src/sys/x86/include
awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/device_if.m -h
awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/bus_if.m -h
awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/dev/pci/pci_if.m -h
Warning: Object directory not changed from original /tmp/em-7.7.8/src
cc -O2 -pipe -DHARDENEDBSD -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD -MF.depend.if_em.o -MTif_em.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c if_em.c -o if_em.o
cc -O2 -pipe -DHARDENEDBSD -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD -MF.depend.if_lem.o -MTif_lem.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c if_lem.c -o if_lem.o
cc -O2 -pipe -DHARDENEDBSD -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD -MF.depend.e1000_osdep.o -MTe1000_osdep.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c e1000_osdep.c -o e1000_osdep.o
cc -O2 -pipe -DHARDENEDBSD -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD -MF.depend.em_compat.o -MTem_compat.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c em_compat.c -o em_compat.o
cc -O2 -pipe -DHARDENEDBSD -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD -MF.depend.e1000_api.o -MTe1000_api.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c e1000_api.c -o e1000_api.o
cc -O2 -pipe -DHARDENEDBSD -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD -MF.depend.e1000_phy.o -MTe1000_phy.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c e1000_phy.c -o e1000_phy.o
cc -O2 -pipe -DHARDENEDBSD -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD -MF.depend.e1000_nvm.o -MTe1000_nvm.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c e1000_nvm.c -o e1000_nvm.o
cc -O2 -pipe -DHARDENEDBSD -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD -MF.depend.e1000_mac.o -MTe1000_mac.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c e1000_mac.c -o e1000_mac.o
cc -O2 -pipe -DHARDENEDBSD -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD -MF.depend.e1000_manage.o -MTe1000_manage.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c e1000_manage.c -o e1000_manage.o
cc -O2 -pipe -DHARDENEDBSD -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD -MF.depend.e1000_82540.o -MTe1000_82540.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c e1000_82540.c -o e1000_82540.o
cc -O2 -pipe -DHARDENEDBSD -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD -MF.depend.e1000_82542.o -MTe1000_82542.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c e1000_82542.c -o e1000_82542.o
cc -O2 -pipe -DHARDENEDBSD -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD -MF.depend.e1000_82541.o -MTe1000_82541.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c e1000_82541.c -o e1000_82541.o
cc -O2 -pipe -DHARDENEDBSD -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD -MF.depend.e1000_82543.o -MTe1000_82543.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c e1000_82543.c -o e1000_82543.o
cc -O2 -pipe -DHARDENEDBSD -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD -MF.depend.e1000_80003es2lan.o -MTe1000_80003es2lan.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c e1000_80003es2lan.c -o e1000_80003es2lan.o
cc -O2 -pipe -DHARDENEDBSD -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD -MF.depend.e1000_ich8lan.o -MTe1000_ich8lan.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c e1000_ich8lan.c -o e1000_ich8lan.o
cc -O2 -pipe -DHARDENEDBSD -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD -MF.depend.e1000_82571.o -MTe1000_82571.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c e1000_82571.c -o e1000_82571.o
ld -m elf_x86_64_fbsd -d -warn-common --build-id=sha1 -r -d -o if_em.ko if_em.o if_lem.o e1000_osdep.o em_compat.o e1000_api.o e1000_phy.o e1000_nvm.o e1000_mac.o e1000_manage.o e1000_82540.o e1000_82542.o e1000_82541.o e1000_82543.o e1000_80003es2lan.o e1000_ich8lan.o e1000_82571.o
:> export_syms
awk -f /usr/src/sys/conf/kmod_syms.awk if_em.ko export_syms | xargs -J% objcopy % if_em.ko
objcopy --strip-debug if_em.ko
There are two files that you want to copy to your production OPNsense system, /tmp/em-7.7.8/src/em.4 and /tmp/em-7.7.8/src/if_em.ko
I copied them to /root.
Copy the man page to the proper directory
Code: [Select]
# gzip -c em.4 > /usr/share/man/man4/em.4.gzWhen I copied the if_em.ko driver to /root I changed the name to if_em.ko-OPNsense-21.1v7.7.8 we need to put this in the right place now.
Edit/Update 1
The user DimitriDC posted a link below witch lead to user Franco posting the correct location to put the driver, it should be placed in /boot/modules/
Code: [Select]
cp if_em.ko-OPNsense-21.1v7.7.8 /boot/modules/if_em_updated.koEdit /boot/load.conf.local to contain the line:
Code: [Select]
if_em_updated_load="YESReboot and test.
Code: [Select]
# kldstat | grep update
12 1 0xffffffff82956000 67bd8 if_em_updated.ko




I cancelled the SG-3100 order
This is more then enough compute power to run the firewall with all the cool apps and can expand the hardware if needed?