-
Download FreeBSD 11.1 VMDK and create a VM with it as HDD.
-
Get FreeBSD source tree for your exact FreeBSD version and uncompress it to /usr/src:
fetch -o /tmp ftp://ftp.freebsd.org/pub/`uname -s`/releases/`uname -m`/`uname -r | cut -d'-' -f1,2`/src.txz tar -C / -xvf /tmp/src.txz
-
Download latest Realtek network driver (you need to input an email address).
-
Uncompress driver:
tar xvzf 0007-rtl_bsd_drv_v194.01.tgz
-
Make driver:
cd rtl_bsd_drv_v194.01 make
-
If the last command fails, change the following line in file if_re.c
From:
#include <dev/re/if_rereg.h>
To:
#include "if_rereg.h"
-
-
Copy the file if_re.ko to the /boot/kernel folder in pfSense device.
scp if_re.ko root@<pfSense device IP>:/boot/kernel
-
Change file permissions in if_re.ko file accessing through SSH to pfSense.
chmod 555 /boot/kernel/if_re.ko
-
Modify /boot/loader.conf.local file and add the following line at the end of the file:
if_re_load="YES"
- Through console:
vi /boot/loader.conf.local
- Through web: Diagnostics > Edit File and click Load. When finished editing click Save.
- Through console:
-
Reboot pfSense.
-
After restart, verify if module is installed through ssh with kldstat. Example execution:
[2.4.2-RELEASE][root@pfSense.local]/root: kldstat Id Refs Address Size Name 1 7 0xffffffff80200000 2c3ea98 kernel 2 1 0xffffffff82e3f000 80900 if_re.ko 3 1 0xffffffff83021000 46c6 cryptodev.ko
Based on:
Hi guys,
Thanks for this guide.
In my opinion the guide is a bit unclear of how to run the freeBSD on a virtual machine and how to mount the drivers on the virtual machine in order to compile them.
I spent hours trying to compile those drivers and I want to share my experience and hopefully save someone else's time:
If you use VMWare workstation please do the following:
Download the realtek drivers on you desktop. Install UltraISO software for example and create ISO image file containing "0007-rtl_bsd_drv_v194.01.tgz".
Follow this guide to create virtual machine for freebsd: Here
In the virtual machine settings Hardware/ CD/DVD and add the path of the image file you created with the realtek drivers.
Run the virtual machine. Login as root. Execute the following command in order to mount the drivers to the cdrom:
mount -t cd9660 /dev/cd0 /cdrom
Follow the guide above. Step 4 becomes:
tar xvzf /cdrom/0007-rtl_bsd_drv_v194.01.tgz
If you face an error with make command edit the file using "VI" editor:
vi if_re.c
In my case
#include <dev/re/if_rereg.h>
became#include <if_rereg.h>
To make any changes to the file use "i" for input and once you're done, press i again, then ":" and "w" to write the file and "q" to quit vi. Here is a guide how to use vi: How to use VI.
Transfer the file using the virtual machine. The command is
scp if_re.ko root@yourip:/boot/kernel
Good luck.
Regards,
Nick