当前位置:网站首页>i.MX8MP开发板移植USBWIFI RTL8192EU驱动
i.MX8MP开发板移植USBWIFI RTL8192EU驱动
2022-07-19 05:13:00 【卡卡罗特GT】
在飞凌OKMX8MP-C开发板上移植了自行搭建的Debian系统之后,发现板卡原有的WiFi模块无法使用,在内核里面添加了支持项也没用,后面跟飞凌的技术支持工程师王工沟通,了解到需要将/lib/modules整个驱动文件夹复制并替换才可以,所以我就暂时搁置了。
WiFi方案可以用市面上已经非常成熟的RTL8192EU方案,一个USB WiFi模块,几十块钱就能买到,网上也可以下载各种Linux内核版本适配的源码。
下载RTL8192EU源码,打开Makefile文件:
修改I386_PC选项的架构和内核源码位置:
ifeq ($(CONFIG_PLATFORM_I386_PC), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 - DRTW_USE_CFG80211_STA_EVENT
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
ARCH ?= ARM64
CROSS_COMPILE ?=
KVER := $(shell uname -r)
KSRC := /home/OK8MP-linux-kernel/
MODDESTDIR := /home/OK8MP-linux- kernel/drivers/net/wireless/
INSTALL_PREFIX :=
STAGINGMODDIR := /home/OK8MP-linux- kernel/drivers/staging
endif
编译生成8192eu.ko文件,直接insmod即可。但是只有这个ko文件是不够的,因为这个ko驱动还会调用/lib/firmware/rtlwifi下的固件文件,名为rtl8192eu_nic.bin,必须要有这个文件,不然的话驱动是无法正常加载的:
加载成功之后,使用ifconfig命令可以查看正确加载的网卡设备:
然后使用networkmanager软件可以管理连接WiFi热点:
nmcli dev wifi connect "xxx" password "xxx"
在xxx处填入热点名称和密码即可。然后是开机自启动加载WiFi驱动,这个也很简单,在/etc/下新建一个名为autorun.sh的shell脚本:
#!/bin/sh
insmod /home/rtl8192eu-linux-driver-realtek-4.4.x/8192eu.ko
然后在/usr/lib/systemd/system/目录下新建autorun.service文件:
[Unit]
Description=autorun
After=basic.service X.service thermal-zone-init.service
[Service]
ExecStart=/etc/autorun.sh
[Install]
WantedBy=multi-user.target
输入命令:
systemctl -f enable /lib/systemd/system/autorun.service
chmod 777 /etc/autorun.sh
这样就能在开机的时候自动运行insmod命令。
边栏推荐
猜你喜欢
Samba的搭建
opencv引发的vector异常
(数电)各种触发器汇总——FPGA八股文(1)
Mysql45 talking about reading notes line lock (7)
2D&3D Pose数据集
Interpretation of the paper: Transformers make strong encoders for medical image segmentation
Mysql45 talking about reading notes in simple terms index (4)
Handwriting verification framework
Redis detailed explanation (2) basic introduction (1) installation and pressure measurement
病理组织切片热图显示(浮于组织切片表面)
随机推荐
yolov5-face
Detailed explanation of ngnix (3) configuration file
Absolute position information of the target in the image (1) -- how much position information do revolutionary neural networks encode
opencv(1)之图像读取,显示,保存,色彩转换
Vector exception thrown by opencv
Redis詳解(1)前言
Interpretation of CO correcting: noise tolerant medical image classification via mutual label correction
病理组织切片热图显示(浮于组织切片表面)
[a800-9000] [mindspire ascend 910 version] after installation, the official mindspot test program reported an error
Deep Snake for Real-Time Instance Segmentation
[cvpr2021] article, code and data link
上采样和上卷积的区别
Smplify-x notes
【LoRa&NB-IoT】现状分析
论文解读《PScL-HDeep:基于图像的蛋白质利用集成在人体组织中的亚细胞预测定位》
Interpretation of semi supervised contractual learning for label effective medical image segmentation
Interpretation of semi supervised semantic segmentation with error localization network
Opencv learning (2) image pixel operation pixel operation scroll keyboard
Detailed explanation of redis (1) Preface
Redis detailed explanation (2) basic introduction (1) installation and pressure measurement