Now compile the code. This may fail if you don’t have kernel headers and other standard features of a build environment:
make clean
make modules
make install

Make sure modprobe knows not to use r8169, and that depmod doesn’t find the r8169 module:
echo -e “\nblacklist r8169\n” >> /etc/modprobe.d/blacklist
mv /lib/modules/$(uname -r)/kernel/drivers/net/r8169.ko{,.bak}

Let the OS know about the new module:
depmod
insmod ./src/r8168.ko

Put your work in the initrd, too:
mv /boot/initrd.img-$(uname -r){,.bak}
mkinitramfs -o /boot/initrd.img-$(uname -r) $(uname -r)

Reboot!
shutdown -r now

Module: r8168
Version: 8.041.00

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.