Инструменты пользователя

Инструменты сайта


soft:rtl8821ce

Сборка драйвера rtl8821ce для Armbian 22.05.3 Bullseye и Rock 3A (5.18.0-rk35xx)

Очень кратко :-P

Начало

Работаю с Armbian_22.05.3_Rock-3a_bullseye_edge_5.18.0.img.

root@rock-3a:~# lspci
0000:00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3566 (rev 01)
0002:20:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3566 (rev 01)
root@rock-3a:~# uname -r
5.18.0-rk35xx

Сборка

root@rock-3a:~# apt update
root@rock-3a:~# apt install git
root@rock-3a:~# git clone https://github.com/tomaspinho/rtl8821ce.git
root@rock-3a:~# cd rtl8821ce
root@rock-3a:~/rtl8821ce# apt install bc module-assistant build-essential dkms
# Если понадобится пакет:
# wget https://armbian.tnahosting.net/apt/pool/main/l/linux-5.18.0-rk35xx/linux-headers-edge-rk35xx_22.05.1_arm64.deb
# dpkg -i linux-headers-edge-rk35xx_22.05.1_arm64.deb
root@rock-3a:~/rtl8821ce# apt install linux-headers-edge-rk35xx
root@rock-3a:~/rtl8821ce# m-a prepare
root@rock-3a:~/rtl8821ce# ./dkms-install.sh

После перезагрузки.

root@rock-3a:~# lspci -k
0000:00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3566 (rev 01)
0000:01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter
        Subsystem: AzureWave RTL8821CE 802.11ac PCIe Wireless Network Adapter
        Kernel driver in use: rtl8821ce
        Kernel modules: 8821ce
0002:20:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3566 (rev 01)
        Kernel driver in use: pcieport

Возможные ошибки

Ошибка во время сборки.

'make' -j4 KVER=5.18.0-rk35xx...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.18.0-rk35xx (aarch64)
Consult /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/make.log for more information.

Решением является уточнение корректной архитектуры.

root@rock-3a:~/rtl8821ce# export ARCH=arm64

Ошибка в журнале.

...
Mar  4 07:53:13 rock-3a kernel: [    9.282373] cfg80211: Loading compiled-in X.509 certificates for regulatory database
Mar  4 07:53:13 rock-3a kernel: [    9.283341] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
Mar  4 07:53:13 rock-3a kernel: [    9.294884] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid
...
Mar  4 07:53:13 rock-3a kernel: [    9.547996] 8821ce: loading out-of-tree module taints kernel.
Mar  4 07:53:13 rock-3a kernel: [    9.551534] 8821ce: module verification failed: signature and/or required key missing - tainting kernel
...
Mar  4 07:53:13 rock-3a kernel: [    9.561832] rtl8821ce 0000:01:00.0: enabling device (0000 -> 0003)
...
Mar  4 07:53:13 rock-3a kernel: [   10.018154] rtl8821ce 0000:01:00.0 wlp1s0: renamed from wlan0
...
Mar  4 07:53:14 rock-3a kernel: [   16.597139] rtl8821ce 0000:01:00.0 wlp1s0: Current addr:  00 e9 3a cb d4 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Mar  4 07:53:14 rock-3a kernel: [   16.597162] rtl8821ce 0000:01:00.0 wlp1s0: Expected addr: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Mar  4 07:53:14 rock-3a kernel: [   16.597168] ------------[ cut here ]------------
Mar  4 07:53:14 rock-3a kernel: [   16.597171] netdevice: wlp1s0: Incorrect netdev->dev_addr
Mar  4 07:53:14 rock-3a kernel: [   16.597207] WARNING: CPU: 3 PID: 1148 at net/core/dev_addr_lists.c:517 dev_addr_check+0x90/0x138
Mar  4 07:53:14 rock-3a kernel: [   16.597230] Modules linked in: zram snd_soc_hdmi_codec nls_iso8859_1 snd_soc_simple_card snd_soc_simple_card_utils display_connector hantro_vpu(C) v4l2_vp9 rockchip_rga v4l2_h264 videobuf2_dma_sg videobuf2_dma_contig snd_soc_rockchip_i2s_tdm 8821ce(OE) snd_soc_rk817 v4l2_mem2mem snd_soc_core videobuf2_memops videobuf2_v4l2 videobuf2_common snd_compress videodev btusb snd_pcm_dmaengine btrtl btbcm btintel btmtk snd_pcm bluetooth panfrost snd_timer dw_hdmi_i2s_audio dw_hdmi_cec snd mc gpu_sched cfg80211 soundcore drm_shmem_helper rfkill cpufreq_dt nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables x_tables autofs4 realtek dwmac_rk spi_rockchip_sfc stmmac_platform stmmac pcs_xpcs
Mar  4 07:53:14 rock-3a kernel: [   16.597363] CPU: 3 PID: 1148 Comm: NetworkManager Tainted: G         C OE     5.18.0-rk35xx #22.05.1
Mar  4 07:53:14 rock-3a kernel: [   16.597370] Hardware name: Radxa ROCK3 Model A (DT)
Mar  4 07:53:14 rock-3a kernel: [   16.597373] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
Mar  4 07:53:14 rock-3a kernel: [   16.597379] pc : dev_addr_check+0x90/0x138
Mar  4 07:53:14 rock-3a kernel: [   16.597385] lr : dev_addr_check+0x90/0x138
Mar  4 07:53:14 rock-3a kernel: [   16.597390] sp : ffff80000fbc3290
Mar  4 07:53:14 rock-3a kernel: [   16.597392] x29: ffff80000fbc3290 x28: 0000000000000000 x27: ffff0000043ea810
Mar  4 07:53:14 rock-3a kernel: [   16.597401] x26: ffff0000043ea810 x25: 0000000000000001 x24: 0000000000000000
Mar  4 07:53:14 rock-3a kernel: [   16.597409] x23: ffff80000fbc3a38 x22: ffff80000174b118 x21: ffff80000fbc3a38
Mar  4 07:53:14 rock-3a kernel: [   16.597417] x20: ffff000006be9000 x19: ffff000006be9000 x18: ffff800009adee08
Mar  4 07:53:14 rock-3a kernel: [   16.597425] x17: 0000000000000000 x16: 0000000000000000 x15: 00000000000002ab
Mar  4 07:53:14 rock-3a kernel: [   16.597432] x14: ffff80000fbc2f90 x13: 00000000ffffffea x12: ffff800009b4ee00
Mar  4 07:53:14 rock-3a kernel: [   16.597440] x11: 0000000000000003 x10: 0000000000000001 x9 : ffff800009b36e18
Mar  4 07:53:14 rock-3a kernel: [   16.597448] x8 : 0000000000017fe8 x7 : c0000000ffffefff x6 : ffff800009b36dc0
Mar  4 07:53:14 rock-3a kernel: [   16.597455] x5 : ffff800076407000 x4 : 0000000000000001 x3 : 0000000000000001
Mar  4 07:53:14 rock-3a kernel: [   16.597463] x2 : 0000000000000000 x1 : 279ccca87ab45200 x0 : 0000000000000000
Mar  4 07:53:14 rock-3a kernel: [   16.597470] Call trace:
Mar  4 07:53:14 rock-3a kernel: [   16.597473]  dev_addr_check+0x90/0x138
Mar  4 07:53:14 rock-3a kernel: [   16.597480]  __dev_open+0x44/0x1c0
Mar  4 07:53:14 rock-3a kernel: [   16.597486]  __dev_change_flags+0x16c/0x1d0
Mar  4 07:53:14 rock-3a kernel: [   16.597491]  dev_change_flags+0x24/0x68
Mar  4 07:53:14 rock-3a kernel: [   16.597496]  do_setlink+0x29c/0xde0
Mar  4 07:53:14 rock-3a kernel: [   16.597501]  __rtnl_newlink+0x404/0x7b8
Mar  4 07:53:14 rock-3a kernel: [   16.597507]  rtnl_newlink+0x50/0x80
Mar  4 07:53:14 rock-3a kernel: [   16.597510]  rtnetlink_rcv_msg+0x120/0x338
Mar  4 07:53:14 rock-3a kernel: [   16.597515]  netlink_rcv_skb+0x5c/0x120
Mar  4 07:53:14 rock-3a kernel: [   16.597520]  rtnetlink_rcv+0x18/0x28
Mar  4 07:53:14 rock-3a kernel: [   16.597526]  netlink_unicast+0x1b8/0x278
Mar  4 07:53:14 rock-3a kernel: [   16.597531]  netlink_sendmsg+0x1d8/0x420
Mar  4 07:53:14 rock-3a kernel: [   16.597535]  sock_sendmsg+0x4c/0x58
Mar  4 07:53:14 rock-3a kernel: [   16.597541]  ____sys_sendmsg+0x288/0x2b0
Mar  4 07:53:14 rock-3a kernel: [   16.597545]  ___sys_sendmsg+0x84/0xc8
Mar  4 07:53:14 rock-3a kernel: [   16.597550]  __sys_sendmsg+0x6c/0xc0
Mar  4 07:53:14 rock-3a kernel: [   16.597554]  __arm64_sys_sendmsg+0x24/0x30
Mar  4 07:53:14 rock-3a kernel: [   16.597559]  invoke_syscall+0x44/0x108
Mar  4 07:53:14 rock-3a kernel: [   16.597567]  el0_svc_common.constprop.3+0x94/0xf8
Mar  4 07:53:14 rock-3a kernel: [   16.597573]  do_el0_svc+0x24/0x88
Mar  4 07:53:14 rock-3a kernel: [   16.597577]  el0_svc+0x20/0x50
Mar  4 07:53:14 rock-3a kernel: [   16.597584]  el0t_64_sync_handler+0x90/0xb8
Mar  4 07:53:14 rock-3a kernel: [   16.597588]  el0t_64_sync+0x170/0x174
Mar  4 07:53:14 rock-3a kernel: [   16.597594] ---[ end trace 0000000000000000 ]---

Часто встречается при поиске в интернете с относительно новыми ядрами. Решения пока не найдено.

Полезные ссылки

soft/rtl8821ce.txt · Последнее изменение: 2023/03/04 13:08 — yury

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki