网卡型号为:
Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 2b)
飞牛默认不识别这个网卡,我通过控制台手动安装驱动,可正常使用。
驱动包
附件:8.052.01.tar.gz
通过执行以下命令,每次升级了内核都可以正常识别到网卡了
2 解压驱动文件 8.052.01.tar.gz
3 设置权限chmod +x autorun.sh
4 执行安装sudo ./autorun.sh
5 重启系统 reboot
重启后系统就可以识别到网卡,本次升级了内核后就无法安装这个驱动
具体报错情况:
Check old driver and unload it.
Build the module and install
/home/r8168-8.052.01/src/r8168_n.c:1624:6: warning: no previous prototype for ‘_proc_dump_tx_desc’ [-Wmissing-prototypes]
1624 | void _proc_dump_tx_desc(struct seq_file *m, struct TxDesc *desc_base,
| ^~~~~~~~~~~~~~~~~~
/home/r8168-8.052.01/src/r8168_n.c:2949:5: warning: no previous prototype for ‘mdio_real_read’ [-Wmissing-prototypes]
2949 | u32 mdio_real_read(struct rtl8168_private *tp,
| ^~~~~~~~~~~~~~
/home/r8168-8.052.01/src/r8168_n.c:5726:1: warning: no previous prototype for ‘rtl8168_set_rx_vlan_filter’ [-Wmissing-prototypes]
5726 | rtl8168_set_rx_vlan_filter(struct rtl8168_private tp)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/r8168-8.052.01/src/r8168_n.c: In function ‘rtl8168_get_drvinfo’:
/home/r8168-8.052.01/src/r8168_n.c:6296:17: error: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Werror=implicit-function-declaration]
6296 | strlcpy(info->fw_version, rtl_fw->version,
| ^~~~~~~
| strncpy
/home/r8168-8.052.01/src/r8168_n.c: At top level:
/home/r8168-8.052.01/src/r8168_n.c:7978:20: error: initialization of ‘int ()(struct net_device *, struct ethtool_keee )’ from incompatible pointer type ‘int ()(struct net_device *, struct ethtool_eee )’ [-Werror=incompatible-pointer-types]
7978 | .get_eee = rtl_ethtool_get_eee,
| ^~~~~~~~~~~~~~~~~~~
/home/r8168-8.052.01/src/r8168_n.c:7978:20: note: (near initialization for ‘rtl8168_ethtool_ops.get_eee’)
/home/r8168-8.052.01/src/r8168_n.c:7979:20: error: initialization of ‘int ()(struct net_device *, struct ethtool_keee )’ from incompatible pointer type ‘int ()(struct net_device *, struct ethtool_eee *)’ [-Werror=incompatible-pointer-types]
7979 | .set_eee = rtl_ethtool_set_eee,
| ^~~~~~~~~~~~~~~~~~~
/home/r8168-8.052.01/src/r8168_n.c:7979:20: note: (near initialization for ‘rtl8168_ethtool_ops.set_eee’)
/home/r8168-8.052.01/src/r8168_n.c:28087:5: warning: no previous prototype for ‘rtl8168_enable_msix’ [-Wmissing-prototypes]
28087 | int rtl8168_enable_msix(struct rtl8168_private *tp)
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [scripts/Makefile.build:229: /home/r8168-8.052.01/src/r8168_n.o] Error 1
make[3]: *** [/usr/src/linux-headers-6.12.18-trim/Makefile:1932: /home/r8168-8.052.01/src] Error 2
make[2]: *** [Makefile:224: __sub-make] Error 2
make[1]: *** [Makefile:174: modules] Error 2
make: *** [Makefile:41: modules] Error 2