lwfinger/rtl8852au

can not compilite

leonpano2006 opened this issue · 8 comments

leonpano@leonpano-desktop:~/rtl8852au$ make
#rm -f .symvers.8852au
make ARCH=aarch64 CROSS_COMPILE= -C /lib/modules/5.10.65-tegra/build M=/home/leonpano/rtl8852au modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.65-tegra-ubuntu20.04_aarch64/kernel-5.10'
Makefile:712: arch/aarch64/Makefile: No such file or directory
make[1]: *** No rule to make target 'arch/aarch64/Makefile'. Stop.
make[1]: Leaving directory '/usr/src/linux-headers-5.10.65-tegra-ubuntu20.04_aarch64/kernel-5.10'
make: *** [Makefile:629: modules] Error 2

I think your kernel headers are messed up. What are the results of
ls /lib/modules/5.10.65-tegra/build
ls /usr/src/linux-headers-5.10.65-tegra-ubuntu20.04_aarch64/kernel-5.10

I think they should be the same. The equivalent directories on my system are identical as the ..../build is a link to the source.

i also tried
CONFIG_PLATFORM_I386_PC = y
CONFIG_PLATFORM_RTL8198D = n
CONFIG_PLATFORM_ANDROID_X86 = n
CONFIG_PLATFORM_ANDROID_INTEL_X86 = n
CONFIG_PLATFORM_NV_TK1 = n
CONFIG_PLATFORM_NV_TK1_UBUNTU = n
CONFIG_PLATFORM_ARM_SUNxI = n
CONFIG_PLATFORM_RTK1319 = n
CONFIG_PLATFORM_AML_S905 = n
set to
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_RTL8198D = n
CONFIG_PLATFORM_ANDROID_X86 = n
CONFIG_PLATFORM_ANDROID_INTEL_X86 = n
CONFIG_PLATFORM_NV_TK1 = n
CONFIG_PLATFORM_NV_TK1_UBUNTU = y
CONFIG_PLATFORM_ARM_SUNxI = n
CONFIG_PLATFORM_RTK1319 = n
CONFIG_PLATFORM_AML_S905 = n
then is other error
and i am on jetson xavier nx not tk1 dev kit
i just pick one are tegra ubuntu

I had a similar error. I had to run make as "make arch=arm64". I'm not sure if that will also work for you.

These drivers detect arm64 as aarch64 (One way of naming them) instead of arm64 (Which kernel headers refer to them). I manually altered the makefile to compensate, although I guess @groeneveld's version is better :)

The problem is that 'uname -m' returns aarch64, but the architecture name is arm64. I updated the Makefile, and it should work now. Remove your changes, do a 'git pull', and try again. Let me know what happens.

For me it worked with

ARCH=arm64 make

also on Jetson NX, Jetpack 5.0.2, Ubuntu 20.04

Please run the following command and report the output:
uname -m | sed -e "s/i.86/i386/; s/ppc.*/powerpc/; s/armv.l/arm/; s/aarch64/arm64/;"

Change default gcc version to gcc 7 that you can fix the problem.