https://forum.opnsense.org/index.php?action=post;quote=101093;topic=21484.0;last_msg=101093
https://forum.opnsense.org/index.php?topic=3689.msg12644#msg12644
root@OPNsense:/tmp/em-7.7.8/src # makemake: "/usr/share/mk/bsd.kmod.mk" line 16: Unable to locate the kernel source tree. Set SYSDIR to override.
root@OPNsense:~ # pkg install gitUpdating 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.17029Number of packages to be installed: 3The 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 usersCreating 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 tomake 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 areinstalled in /usr/local/share/git-core/contrib. Some of them requireother ports to be installed (perl, python, etc), which you may need toinstall manually.root@OPNsense:~ # cd /usrroot@OPNsense:/usr # git clone https://github.com/opnsense/pluginsCloning 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 45491Receiving 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/portsCloning 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 1205145Receiving 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/srcCloning 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 217879Receiving 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.1Branch '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 /tmproot@OPNsense:/tmp # tar xzf em-7.7.8.tar.gzroot@OPNsense:/tmp # cd em-7.7.8/srcroot@OPNsense:/tmp/em-7.7.8/src # makemachine -> /usr/src/sys/amd64/includex86 -> /usr/src/sys/x86/includeawk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/device_if.m -hawk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/bus_if.m -hawk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/dev/pci/pci_if.m -hWarning: Object directory not changed from original /tmp/em-7.7.8/srccc -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.occ -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.occ -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.occ -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.occ -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.occ -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.occ -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.occ -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.occ -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.occ -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.occ -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.occ -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.occ -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.occ -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.occ -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.occ -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.old -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_symsawk -f /usr/src/sys/conf/kmod_syms.awk if_em.ko export_syms | xargs -J% objcopy % if_em.koobjcopy --strip-debug if_em.ko
# gzip -c em.4 > /usr/share/man/man4/em.4.gz
cp if_em.ko-OPNsense-21.1v7.7.8 /boot/modules/if_em_updated.ko
if_em_updated_load="YES
# kldstat | grep update12 1 0xffffffff82956000 67bd8 if_em_updated.ko
[root@OPNsense /tmp/em-7.7.8/src]# makemachine -> /usr/src/sys/amd64/includex86 -> /usr/src/sys/x86/includeawk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/device_if.m -hawk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/bus_if.m -hawk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/dev/pci/pci_if.m -htouch opt_global.hWarning: Object directory not changed from original /tmp/em-7.7.8/srccc -O2 -pipe -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -include /tmp/em-7.7.8/src/opt_global.h -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 -Wno-error=unused-but-set-variable -Wno-format-zero-length -mno-aes -mno-avx -std=iso9899:1999 -c if_em.c -o if_em.oif_em.c:557:36: error: incompatible pointer types assigning to 'struct device *' from 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] adapter->dev = adapter->osdep.dev = dev; ^ ~~~if_em.c:1295:18: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] device_printf(adapter->dev, "Media change is" ^~~~~~~~~~~~/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' hereint device_printf(device_t dev, const char *, ...) __printflike(2, 3); ^if_em.c:1390:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types] device_t dev = adapter->dev; ^ ~~~~~~~~~~~~if_em.c:1587:7: warning: variable 'ifp' set but not used [-Wunused-but-set-variable] if_t ifp; ^if_em.c:1917:17: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] device_printf(adapter->dev, "Unsupported media type\n"); ^~~~~~~~~~~~/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' hereint device_printf(device_t dev, const char *, ...) __printflike(2, 3); ^if_em.c:2278:10: error: implicit declaration of function 'if_multiaddr_count' is invalid in C99 [-Werror,-Wimplicit-function-declaration] mcnt = if_multiaddr_count(ifp, MAX_NUM_MULTICAST_ADDRESSES); ^if_em.c:2317:2: error: implicit declaration of function 'if_multiaddr_array' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if_multiaddr_array(ifp, mta, &mcnt, MAX_NUM_MULTICAST_ADDRESSES); ^if_em.c:2395:16: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] device_printf(adapter->dev, "Watchdog timeout Queue[%d]-- resetting\n", ^~~~~~~~~~~~/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' hereint device_printf(device_t dev, const char *, ...) __printflike(2, 3); ^if_em.c:2411:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types] device_t dev = adapter->dev; ^ ~~~~~~~~~~~~if_em.c:2532:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types] device_t dev = adapter->dev; ^ ~~~~~~~~~~~~if_em.c:2557:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types] device_t dev = adapter->dev; ^ ~~~~~~~~~~~~if_em.c:2586:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types] device_t dev = adapter->dev; ^ ~~~~~~~~~~~~if_em.c:2612:26: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] device_get_nameunit(adapter->dev)); ^~~~~~~~~~~~/usr/src/sys/sys/bus.h:594:42: note: passing argument to parameter 'dev' hereconst char *device_get_nameunit(device_t dev); ^if_em.c:2618:26: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] device_get_nameunit(adapter->dev)); ^~~~~~~~~~~~/usr/src/sys/sys/bus.h:594:42: note: passing argument to parameter 'dev' hereconst char *device_get_nameunit(device_t dev); ^if_em.c:2643:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types] device_t dev = adapter->dev; ^ ~~~~~~~~~~~~if_em.c:2685:27: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] device_get_nameunit(adapter->dev), cpu_id); ^~~~~~~~~~~~/usr/src/sys/sys/bus.h:594:42: note: passing argument to parameter 'dev' hereconst char *device_get_nameunit(device_t dev); ^if_em.c:2728:27: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] device_get_nameunit(adapter->dev), cpu_id); ^~~~~~~~~~~~/usr/src/sys/sys/bus.h:594:42: note: passing argument to parameter 'dev' hereconst char *device_get_nameunit(device_t dev); ^if_em.c:2772:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types] device_t dev = adapter->dev; ^ ~~~~~~~~~~~~if_em.c:2852:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types] device_t dev = adapter->dev; ^ ~~~~~~~~~~~~if_em.c:2874:32: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] device_printf(adapter->dev, ^~~~~~~~~~~~/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' hereint device_printf(device_t dev, const char *, ...) __printflike(2, 3); ^fatal error: too many errors emitted, stopping now [-ferror-limit=]1 warning and 20 errors generated.*** Error code 1Stop.make: stopped in /tmp/em-7.7.8/src
Hi all, thanks for the tutorial. I'm trying to compile the em intel driver using the currrent version (OPNsense 23.1.7_3, based on FreeBSD 13.1-RELEASE-p7), and I'm getting the following compilation error. Code: [Select][root@OPNsense /tmp/em-7.7.8/src]# makemachine -> /usr/src/sys/amd64/includex86 -> /usr/src/sys/x86/includeawk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/device_if.m -hawk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/bus_if.m -hawk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/dev/pci/pci_if.m -htouch opt_global.hWarning: Object directory not changed from original /tmp/em-7.7.8/srccc -O2 -pipe -DINET -DINET6 -DEM_STANDALONE_BUILD -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -include /tmp/em-7.7.8/src/opt_global.h -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 -Wno-error=unused-but-set-variable -Wno-format-zero-length -mno-aes -mno-avx -std=iso9899:1999 -c if_em.c -o if_em.oif_em.c:557:36: error: incompatible pointer types assigning to 'struct device *' from 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] adapter->dev = adapter->osdep.dev = dev; ^ ~~~if_em.c:1295:18: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] device_printf(adapter->dev, "Media change is" ^~~~~~~~~~~~/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' hereint device_printf(device_t dev, const char *, ...) __printflike(2, 3); ^if_em.c:1390:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types] device_t dev = adapter->dev; ^ ~~~~~~~~~~~~if_em.c:1587:7: warning: variable 'ifp' set but not used [-Wunused-but-set-variable] if_t ifp; ^if_em.c:1917:17: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] device_printf(adapter->dev, "Unsupported media type\n"); ^~~~~~~~~~~~/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' hereint device_printf(device_t dev, const char *, ...) __printflike(2, 3); ^if_em.c:2278:10: error: implicit declaration of function 'if_multiaddr_count' is invalid in C99 [-Werror,-Wimplicit-function-declaration] mcnt = if_multiaddr_count(ifp, MAX_NUM_MULTICAST_ADDRESSES); ^if_em.c:2317:2: error: implicit declaration of function 'if_multiaddr_array' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if_multiaddr_array(ifp, mta, &mcnt, MAX_NUM_MULTICAST_ADDRESSES); ^if_em.c:2395:16: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] device_printf(adapter->dev, "Watchdog timeout Queue[%d]-- resetting\n", ^~~~~~~~~~~~/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' hereint device_printf(device_t dev, const char *, ...) __printflike(2, 3); ^if_em.c:2411:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types] device_t dev = adapter->dev; ^ ~~~~~~~~~~~~if_em.c:2532:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types] device_t dev = adapter->dev; ^ ~~~~~~~~~~~~if_em.c:2557:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types] device_t dev = adapter->dev; ^ ~~~~~~~~~~~~if_em.c:2586:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types] device_t dev = adapter->dev; ^ ~~~~~~~~~~~~if_em.c:2612:26: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] device_get_nameunit(adapter->dev)); ^~~~~~~~~~~~/usr/src/sys/sys/bus.h:594:42: note: passing argument to parameter 'dev' hereconst char *device_get_nameunit(device_t dev); ^if_em.c:2618:26: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] device_get_nameunit(adapter->dev)); ^~~~~~~~~~~~/usr/src/sys/sys/bus.h:594:42: note: passing argument to parameter 'dev' hereconst char *device_get_nameunit(device_t dev); ^if_em.c:2643:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types] device_t dev = adapter->dev; ^ ~~~~~~~~~~~~if_em.c:2685:27: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] device_get_nameunit(adapter->dev), cpu_id); ^~~~~~~~~~~~/usr/src/sys/sys/bus.h:594:42: note: passing argument to parameter 'dev' hereconst char *device_get_nameunit(device_t dev); ^if_em.c:2728:27: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] device_get_nameunit(adapter->dev), cpu_id); ^~~~~~~~~~~~/usr/src/sys/sys/bus.h:594:42: note: passing argument to parameter 'dev' hereconst char *device_get_nameunit(device_t dev); ^if_em.c:2772:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types] device_t dev = adapter->dev; ^ ~~~~~~~~~~~~if_em.c:2852:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types] device_t dev = adapter->dev; ^ ~~~~~~~~~~~~if_em.c:2874:32: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types] device_printf(adapter->dev, ^~~~~~~~~~~~/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' hereint device_printf(device_t dev, const char *, ...) __printflike(2, 3); ^fatal error: too many errors emitted, stopping now [-ferror-limit=]1 warning and 20 errors generated.*** Error code 1Stop.make: stopped in /tmp/em-7.7.8/srchave anyone tried compiling the driver in this version?
Thanks to almodovaris for pointing this out.Quotehttps://forum.opnsense.org/index.php?action=post;quote=101093;topic=21484.0;last_msg=101093