我有一个 USB wifi 适配器,它带有 RTL8188eu 芯片组。它以前无需执行任何操作即可工作(即我只需将其插入,它就可以运行)。
在尝试安装各种其他 USB wifi 加密狗时,我以某种方式设法删除了该加密狗的驱动程序(在我的系统上,在 中/lib/modules/4.13.0-31-generic/kernel/drivers/staging/rtl8188eu
)。
我尝试通过模仿我用来重建 btusb.ko(也丢失了)的步骤来重建它(r8188eu.ko):
- 从以下位置下载我的内核源代码https://www.kernel.org/pub/linux/kernel/v4.x/
- 解压它:
tar -zxvf linux-4.13.tar.gz
- 切换到目录:
cd ./linux-4.13/drivers/staging/rtl8188eu
- 构建它:
make -C /lib/modules/$(uname -r)/build M=$PWD modules
但我收到这个错误:
[van@van-t470p:rtl8188eu]$ make -C /lib/modules/$(uname -r)/build M=$PWD modules
make: Entering directory '/usr/src/linux-headers-4.13.0-31-generic'
CC [M] /home/van/Temp/kernels/linux-4.13/drivers/staging/rtl8188eu/core/rtw_ap.o
/home/van/Temp/kernels/linux-4.13/drivers/staging/rtl8188eu/core/rtw_ap.c:19:10: fatal error: osdep_service.h: No such file or directory
#include <osdep_service.h>
^~~~~~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.build:308: recipe for target '/home/van/Temp/kernels/linux-4.13/drivers/staging/rtl8188eu/core/rtw_ap.o' failed
make[1]: *** [/home/van/Temp/kernels/linux-4.13/drivers/staging/rtl8188eu/core/rtw_ap.o] Error 1
Makefile:1550: recipe for target '_module_/home/van/Temp/kernels/linux-4.13/drivers/staging/rtl8188eu' failed
make: *** [_module_/home/van/Temp/kernels/linux-4.13/drivers/staging/rtl8188eu] Error 2
make: Leaving directory '/usr/src/linux-headers-4.13.0-31-generic'
我还尝试运行使一个目录升级:
cd ..
make -C /lib/modules/$(uname -r)/build M=$PWD modules
但这也失败了:
[van@van-t470p:staging]$ make -C /lib/modules/$(uname -r)/build M=$PWD modules
make: Entering directory '/usr/src/linux-headers-4.13.0-31-generic'
CC [M] /home/van/Temp/kernels/linux-4.13/drivers/staging/media/cxd2099/cxd2099.o
In file included from /home/van/Temp/kernels/linux-4.13/drivers/staging/media/cxd2099/cxd2099.c:34:0:
/home/van/Temp/kernels/linux-4.13/drivers/staging/media/cxd2099/cxd2099.h:28:10: fatal error: dvb_ca_en50221.h: No such file or directory
#include <dvb_ca_en50221.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.build:315: recipe for target '/home/van/Temp/kernels/linux-4.13/drivers/staging/media/cxd2099/cxd2099.o' failed
make[3]: *** [/home/van/Temp/kernels/linux-4.13/drivers/staging/media/cxd2099/cxd2099.o] Error 1
scripts/Makefile.build:581: recipe for target '/home/van/Temp/kernels/linux-4.13/drivers/staging/media/cxd2099' failed
make[2]: *** [/home/van/Temp/kernels/linux-4.13/drivers/staging/media/cxd2099] Error 2
scripts/Makefile.build:581: recipe for target '/home/van/Temp/kernels/linux-4.13/drivers/staging/media' failed
make[1]: *** [/home/van/Temp/kernels/linux-4.13/drivers/staging/media] Error 2
Makefile:1550: recipe for target '_module_/home/van/Temp/kernels/linux-4.13/drivers/staging' failed
make: *** [_module_/home/van/Temp/kernels/linux-4.13/drivers/staging] Error 2
make: Leaving directory '/usr/src/linux-headers-4.13.0-31-generic'
也许 wifi 模块的 Makefile 参数不同?有什么办法可以重建我丢失的r8188eu.ko
,或者需要重新安装操作系统?
编辑:
我的 lsusb 输出:
Bus 002 Device 002: ID 05e3:0612 Genesys Logic, Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
Bus 001 Device 006: ID 04f2:b5c0 Chicony Electronics Co., Ltd
Bus 001 Device 005: ID 138a:0097 Validity Sensors, Inc.
Bus 001 Device 004: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 003: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
Bus 001 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub