Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on CM3588 board (RockChip RK3588 based ARM board) with Debian Bookworm for a TP-Link T2U Nano (rtl8811au) #159

Open
agusventuri opened this issue Jan 12, 2025 · 3 comments

Comments

@agusventuri
Copy link

Hi!

I'm trying to build drivers for a TP-Link t2u nano adapter that has the rtl8811au chipset but can't get it to work. I'm guessing the Debian version I'm using has modifications that make it incompatible.
Here are some logs and info about the setup I have and the output I'm getting.

Hardware

Software

OS info

root@CM3588-Plus:~# cat /etc/*-release
# PLEASE DO NOT EDIT THIS FILE
BOARD="CM3588-Plus"
BOARD_NAME="CM3588-Plus"
LINUXFAMILY=nanopi6
BRANCH=dev
BOARD_VENDOR=FriendlyELEC
ARCH=arm
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Kernel info

root@CM3588-Plus:~# uname -r
6.1.57

USB device info

root@CM3588-Plus:~# lsusb
Bus 003 Device 002: ID 2357:011e TP-Link AC600 wireless Realtek RTL8811AU [Archer T2U Nano]

Compiler info

root@CM3588-Plus:~# cat /proc/version
Linux version 6.1.57 (fa@jensen) (aarch64-linux-gcc (ctng-1.25.0-119g-FA) 11.3.0, GNU ld (GNU Binutils) 2.38) #13 SMP Tue May 21 16:26:32 CST 2024

gcc --version
gcc (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Issue

When executing the install-driver.sh it fails. Here's the result:

root@CM3588-Plus:~# ./install-driver.sh
Error! Bad return status for module build on kernel: 6.1.57 (aarch64)
Consult /var/lib/dkms/rtl8821au/5.12.5.2/build/make.log for more information.
Command exited with non-zero status 10
Compile time: 140.26 seconds

Exploring the logs this is what I'm getting:

root@CM3588-Plus:~# cat /var/lib/dkms/rtl8821au/5.12.5.2/build/make.log
DKMS make.log for rtl8821au-5.12.5.2 for kernel 6.1.57 (aarch64)
Sun Jan 12 02:25:33 UTC 2025
make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/6.1.57/build M=/var/lib/dkms/rtl8821au/5.12.5.2/build  modules
make[1]: Entering directory '/usr/src/linux-headers-6.1.57'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: aarch64-linux-gcc (ctng-1.25.0-119g-FA) 11.3.0
  You are using:           gcc (Debian 12.2.0-14) 12.2.0
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_cmd.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_security.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_debug.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_io.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_ioctl_query.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_ioctl_set.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_ieee80211.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_mlme.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_mlme_ext.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_mi.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_wlan_util.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_vht.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_pwrctrl.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_rf.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_chplan.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/monitor/rtw_radiotap.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_recv.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_sta_mgt.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_ap.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/wds/rtw_wds.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/mesh/rtw_mesh.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/mesh/rtw_mesh_pathtbl.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/mesh/rtw_mesh_hwmp.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_xmit.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_p2p.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_rson.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_tdls.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_br_ext.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_iol.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_sreset.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_btcoex_wifionly.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_btcoex.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_beamforming.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_odm.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_rm.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_rm_fsm.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_ft.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_wnm.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_mbo.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_rm_util.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/efuse/rtw_efuse.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_roch.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/crypto/aes-internal.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/crypto/aes-internal-enc.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/crypto/aes-gcm.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/crypto/aes-ccm.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/crypto/aes-omac1.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/crypto/ccmp.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/crypto/gcmp.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/crypto/aes-siv.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/crypto/aes-ctr.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/crypto/sha256-internal.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/crypto/sha256.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/crypto/sha256-prf.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/crypto/rtw_crypto_wrap.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_swcrypto.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/osdep_service.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/os_intfs.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/usb_intf.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/usb_ops_linux.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/ioctl_linux.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/xmit_linux.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/mlme_linux.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/recv_linux.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/ioctl_cfg80211.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/rtw_cfgvendor.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/wifi_regd.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/rtw_android.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/rtw_proc.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/nlrtw.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/rtw_rhashtable.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/hal/hal_intf.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/hal/hal_com.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/hal/hal_com_phycfg.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/hal/hal_phy.o
  CC [M]  /var/lib/dkms/rtl8821au/5.12.5.2/build/hal/hal_dm.o
/var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_cfg80211_ch_switch_notify’:
/var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/ioctl_cfg80211.c:471:17: error: too few arguments to function ‘cfg80211_ch_switch_started_notify’
  471 |                 cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/rtl8821au/5.12.5.2/build/include/osdep_service_linux.h:98,
                 from /var/lib/dkms/rtl8821au/5.12.5.2/build/include/osdep_service.h:57,
                 from /var/lib/dkms/rtl8821au/5.12.5.2/build/include/drv_types.h:27,
                 from /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/ioctl_cfg80211.c:17:
./include/net/cfg80211.h:8501:6: note: declared here
 8501 | void cfg80211_ch_switch_started_notify(struct net_device *dev,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/ioctl_cfg80211.c:490:9: error: too few arguments to function ‘cfg80211_ch_switch_notify’
  490 |         cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
./include/net/cfg80211.h:8484:6: note: declared here
 8484 | void cfg80211_ch_switch_notify(struct net_device *dev,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~
At top level:
cc1: note: unrecognized command-line option ‘-Wno-enum-int-mismatch’ may have been intended to silence earlier diagnostics
make[2]: *** [scripts/Makefile.build:250: /var/lib/dkms/rtl8821au/5.12.5.2/build/os_dep/linux/ioctl_cfg80211.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:2057: /var/lib/dkms/rtl8821au/5.12.5.2/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.1.57'
make: *** [Makefile:2498: modules] Error 2

I tried several things, including modifying the c files myself, but I'm out of my depth there. If there's anything else you need from logs or output please let me know.

@morrownr
Copy link
Owner

Hi @agusventuri

It probably would not take me too long to track that problem down but I'd prefer that you try a different driver:

https://github.com/lwfinger/rtw88

That is a driver that we are using for testing and the patching go upstream into the Linux kernel. In fact, the rtl8821/11au driver went into kernel 6.13. More patches to improve a few things will go into kernel 6.14. However, that repo has all work. We need it tested to see if any additional work needs to be done.

With my driver that you were trying to install:

$ make clean
$ sudo sh remove-driver.sh

That will clean things up and you can go to the rtw88 repo and give it a shot.

@agusventuri
Copy link
Author

Hi @morrownr . Thanks for the quick reply.

I removed your driver and tried with the rtw88 but couldn't get it to work. The driver builds correctly but can't make it work beyond that.
I'm guessing then this FAQ applies: https://github.com/lwfinger/rtw88?tab=readme-ov-file#q1-my-driver-builds-and-loads-correctly-but-fails-to-work-properly-can-you-help-me and I should not post a new issue in the rtw88 repo.

@morrownr
Copy link
Owner

@agusventuri

I'm guessing then this FAQ applies:

No, it no longer applies. I'll try to fix that today. The original owner of the repo wrote that but it really does not apply anymore so please post an issue giving as much detail as you think will help figure out the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants