移植USB RTL8723DU WIFI无线驱动给RK3588

wifi

通过dmesg发现可以识别到设备为无线网卡,并驱动蓝牙,但是在ifconfig中没有找到对应的wlan0。

image

推断有可能是内核里面没有针对8723du wifi的驱动。所以需要查询当前的5.10内核是否包含8723du的驱动。到https://linux-hardware.org/ 上查看。

并结合dmesg的usb信息

image

image970×90 10.5 KB可以得到信息6.3之前的内核是只包含了蓝牙驱动,6.3之后的内核才包含了内核驱动。

获取rtl8723du的驱动

git clone https://github.com/lwfinger/rtl8723du

拷贝到./kernel/drivers/net/wireless/rockchip_wlan/

Kconfig加入source "drivers/net/wireless/rockchip_wlan/rtl8723du/Kconfig"

Makefile加入obj-$(CONFIG_RTL8723DU) += rtl8723du/

config RTL8723DU
        tristate "Realtek 8723DU USB WiFi"
        help
          Help message of RTL8723DU

内核使能RTL8723DU,make编译报错误,再适当调整一下即可编译成功。

修改Makefile,不单独使用ko文件。

#obj-m := $(MODULE_NAME).o
obj-$(CONFIG_RTL8723DU) := $(MODULE_NAME).o

其中有个错误

ERROR: modpost: module 8723du uses symbol kernel_read from namespace VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver, but does not import it.

命名空间问题。在os_dep/osdep_service.c中加入:

:MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);

Bluetooth

[   78.365798] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000d lmp_ver=08 lmp_subver=8723
[   78.366600] Bluetooth: hci0: RTL: rom_version status=0 version=2
[   78.366622] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723d_fw.bin
[   78.367549] bluetooth hci0: Direct firmware load for rtl_bt/rtl8723d_fw.bin failed with error -2
[   78.367579] Bluetooth: hci0: RTL: firmware file rtl_bt/rtl8723d_fw.bin not found
[   91.208816] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000d lmp_ver=08 lmp_subver=8723
[   91.210849] Bluetooth: hci0: RTL: rom_version status=0 version=2
[   91.210873] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723d_fw.bin
[   91.211055] bluetooth hci0: Direct firmware load for rtl_bt/rtl8723d_fw.bin failed with error -2
[   91.211081] Bluetooth: hci0: RTL: firmware file rtl_bt/rtl8723d_fw.bin not found
root@xd68:~#   

缺少的文件,把文件拷贝到/lib/firmware/中。

[  115.246275] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000d lmp_ver=08 lmp_subver=8723
[  115.248019] Bluetooth: hci0: RTL: rom_version status=0 version=2
[  115.248044] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723d_fw.bin
[  115.248681] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723d_config.bin
[  115.251089] Bluetooth: hci0: RTL: cfg_sz 14, total sz 32558
[  115.521042] Bluetooth: hci0: RTL: fw version 0x829937de

hci0:   Type: Primary  Bus: USB
        BD Address: 24:8A:3B:19:1F:22  ACL MTU: 1021:8  SCO MTU: 255:12
        UP RUNNING 
        RX bytes:2150 acl:0 sco:0 events:177 errors:0
        TX bytes:33501 acl:0 sco:0 commands:173 errors:0
        Features: 0xff 0xff 0xff 0xfe 0xdb 0xfd 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
        Link policy: RSWITCH HOLD SNIFF PARK 
        Link mode: SLAVE ACCEPT 
        Name: 'RTK_BT_4.1'
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous, 
        HCI Version: 4.1 (0x7)  Revision: 0x8299
        LMP Version: 4.1 (0x7)  Subversion: 0x37de
        Manufacturer: Realtek Semiconductor Corporation (93)

相关推荐

  1. rk3568 移植rk628

    2024-05-01 17:02:03       33 阅读
  2. PCIe总线-RK3588 PCIe驱动设备树介绍(九)

    2024-05-01 17:02:03       18 阅读
  3. RK3568 speex speexdsp降噪算法移植

    2024-05-01 17:02:03       61 阅读
  4. RK3568 Ubuntu终端无法打开问题

    2024-05-01 17:02:03       42 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-01 17:02:03       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-01 17:02:03       106 阅读
  3. 在Django里面运行非项目文件

    2024-05-01 17:02:03       87 阅读
  4. Python语言-面向对象

    2024-05-01 17:02:03       96 阅读

热门阅读

  1. ts封装浏览器indexedDB

    2024-05-01 17:02:03       32 阅读
  2. 【DevOps】Docker安装和使用示例

    2024-05-01 17:02:03       23 阅读
  3. 使用rust学习基本算法(四)

    2024-05-01 17:02:03       28 阅读
  4. GPT每日面试题-Typescript中type和interface的区别

    2024-05-01 17:02:03       36 阅读
  5. 如何在Linux服务器上安装Stable Diffusion WebUI

    2024-05-01 17:02:03       33 阅读
  6. 行业早报0501

    2024-05-01 17:02:03       35 阅读
  7. FlinkSQL 中lateral table

    2024-05-01 17:02:03       30 阅读
  8. springboot配置WebMvcConfigurationSupport

    2024-05-01 17:02:03       33 阅读
  9. leetcode_41.缺失的第一个正数

    2024-05-01 17:02:03       32 阅读
  10. 【Chrony】Docker中的精准时间同步的高效解决方案

    2024-05-01 17:02:03       33 阅读
  11. 「笔试刷题」:数组中的最长连续子序列

    2024-05-01 17:02:03       32 阅读