ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

centos 7.6 kernel 内核升级和RTL8811CU驱动安装

2020-03-12 22:10:09  阅读:1512  来源: 互联网

标签:kernel x86 centos sudo elrepo 64 install 7.6


为了安装RTL8811CU无限网卡驱动:

参考:https://github.com/brektrou/rtl8821CU

Realtek RTL8811CU/RTL8821CU USB wifi adapter driver version 5.4.1 for Linux 4.4.x up to 5.6.x

内核准备:

要求是4.4到5.6的,这里我选择更新到5.5.9,内核更新主要安装:

You may retrieve signed binary configuration files from one the above two links (varying by the major release number of the installation target machine). They may be automatically installed by root thus:

不装headers和devel无法继续安驱动

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

第三方网址:https://centos.pkgs.org/7/elrepo-kernel-x86_64/kernel-ml-devel-5.5.9-1.el7.elrepo.x86_64.rpm.html

kernel-ml-headers-5.5.9-1.el7.elrepo.x86_64

sudo yum install https://mirror.rackspace.com/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-headers-5.5.9-1.el7.elrepo.x86_64.rpm

kernel-ml-devel-5.5.9-1.el7.elrepo.x86_64

sudo yum install https://mirror.rackspace.com/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-devel-5.5.9-1.el7.elrepo.x86_64.rpm

kernel-ml-5.5.9-1.el7.elrepo.x86_64

sudo yum install https://mirror.rackspace.com/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-5.5.9-1.el7.elrepo.x86_64.rpm

最后,rpm -qa|grep kernel,获取安装过的列表。

dkms准备:

DKMS is a system which will automatically recompile and install a kernel module when a new kernel gets installed or updated. To make use of DKMS, install the dkms package.

###centos

rpm -ivh epel-release-7-0.2.noarch.rpm

yum -y install dkms

### Debian/Ubuntu:
```
sudo apt-get install dkms
```
### Arch Linux/Manjaro:
```
sudo pacman -S dkms
```

驱动:
第一种方法:
```
mkdir -p ~/build
cd ~/build
git clone https://github.com/brektrou/rtl8821CU.git
```
To make use of the **DKMS** feature with this project, just run:
```
./dkms-install.sh
```
If you later on want to remove it, run:
```
./dkms-remove.sh
```

第二种方法,直接

## Build and install without DKMS
Use following commands:
```
cd ~/build/rtl8821CU
make
sudo make install
```
If you later on want to remove it, do the following:
```
cd ~/build/rtl8821CU
sudo make uninstall
```

驱动如果检测出问题了:

### Plug your USB-wifi-adapter into your PC
If wifi can be detected, congratulations.
If not, maybe you need to switch your device usb mode by the following steps in terminal:
1. find your usb-wifi-adapter device ID, like "0bda:1a2b", by type:
```
lsusb
```
2. switch the mode by type: (the device ID must be yours.) 改变模式

Need install `usb_modeswitch` (Archlinux: `sudo pacman -S usb_modeswitch`)
```
sudo usb_modeswitch -KW -v 0bda -p 1a2b
systemctl start bluetooth.service - starting Bluetooth service if it's in inactive state
```
驱动检查:
If you successfully install the driver, the driver is installed on `/lib/modules/<linux version>/kernel/drivers/net/wireless/realtek/rtl8821cu`. Check the driver with the `ls` command:
```
ls /lib/modules/$(uname -r)/kernel/drivers/net/wireless/realtek/rtl8821cu
```
Make sure `8821cu.ko` file present on that directory

### Check with **DKMS** (if installing via **DKMS**):

``
sudo dkms status
``
### ARM architecture tweak for this driver (this solves compilation problem of this driver):
```
sudo cp /lib/modules/$(uname -r)/build/arch/arm/Makefile /lib/modules/$(uname -r)/build/arch/arm/Makefile.$(date +%Y%m%d%H%M)
sudo sed -i 's/-msoft-float//' /lib/modules/$(uname -r)/build/arch/arm/Makefile
sudo ln -s /lib/modules/$(uname -r)/build/arch/arm /lib/modules/$(uname -r)/build/arch/armv7l
```
### Monitor mode
Use the tool 'iw', please don't use other tools like 'airmon-ng'
```
iw dev wlan0 set monitor none
```

 

 

标签:kernel,x86,centos,sudo,elrepo,64,install,7.6
来源: https://blog.csdn.net/u012236241/article/details/104828938

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有