lwfinger / rtw8852cu

GNU General Public License v2.0
22 stars 13 forks source link

This project can fail to compile on AARCH64 devices, such as Raspberry Pi 3B+ with RaspberryOS 64 #4

Closed zyuelin closed 2 months ago

zyuelin commented 9 months ago

I have a Raspberry Pi 3B+, git cloned this project, and want to compile it. But it encountered a failure, prompting an unsupported architecture. So, how do I deal with this error? Thanks。

DavidIlie commented 9 months ago

Same here, anyone has found anything? I have a RTL8832CU which supposedly would work with this according here

lwfinger commented 9 months ago

It is an easy fix that was not anticipated by the people at Realtek. The Makefile uses 'uname -m' to get the base directory for the architecture-specific code. Unfortunately, the device yields something different that the simple "arm" used by the kernel code.

Do a 'git pull' and it should be OK.

DavidIlie commented 9 months ago

Got it working thank you!

zyuelin commented 9 months ago

@lwfinger Thanks. I will try it.

zyuelin commented 9 months ago

@lwfinger
It still not working. image $ uname -m image

I think the reason for the failure is that the result of uname -m execution is aarch64, but there is no aarch64/ directory in /usr/src/linux-headers-6.1.21-v8+/arch/, only the arm64/ directory. I renamed the arm64/ directory to aarch64, and the compilation worked normally.

lwfinger commented 9 months ago

In the future, do not send a message that you will try a fix. I get too many E-mails already. Just try it and tell me if it fails.

The Makefile still had an error.Do a 'git pull', rename that directory back to the original, and try again.

zyuelin commented 9 months ago

I am so sorry to bother you . After I did the git pull operation, I still got the same error message. It seems that the SUBARCH variable and ARCH variable in the Makefile are not assigned correctly. It is still aarch64, but arm64 is not obtained as expected. After I manually modified the ARCH variable to arm64, the compilation was normal.