For Raspberry Pi, requires user driver/module compile:
https://github.com/Fourdee/DietPi/issues/759#issuecomment-279476920
Hi, for the current kernel the above linked driver and tutorial no longer works.
I used this one to make it work using the latest version of DietPi on an RPI 3 (as root):
https://github.com/aircrack-ng/rtl8812au
However, the instructions there are not quite in sequence. IIRC this is what I did:
- Install Git, DKMS:
apt-get install dkms git -y
- Install kernel headers:
apt-get install build-essential libelf-dev raspberrypi-kernel-headers
-
Reboot (was in my case necessary for the compiler to find the headers)
-
Download driver:
git clone -b v5.6.4.2 https://github.com/aircrack-ng/rtl8812au.git
cd rtl*
- Edit Makefile to compile for your platform, for me this was:
sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
sed -i 's/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g' Makefile
- Compilation and installation using DKMS:
make dkms_install
I hope this saves you a few searches (as Google pointed me here)!
OFC I fail at this step
- Edit Makefile to compile for your platform, for me this was:
sed -i ‘s/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g’ Makefile
sed -i ‘s/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g’ Makefile
>
\
<br>
```text
"sed: can't read Makefile: No such file or directory"
I am using RPi2 board.
root@DietPi:~/rtl8812au# uname -a
Linux DietPi 5.10.63-v7+ #1459 SMP Wed Oct 6 16:41:10 BST 2021 armv7l GNU/Linux
Did you have done step 4, download the git branch and changed directory to get inside?
The Makefile is there: https://github.com/aircrack-ng/rtl8812au/blob/v5.6.4.2/Makefile
Is this still required with latest RPi kernel?
I have my DietPi distro updated to latest. It doesn’t recognize the adapter.
Started fresh. This time I didn’t make it past cloning.
dietpi@DietPi:~$ sudo git clone -b v5.6.4.2 https://github.com/aircrack-ng/rtl88 12au.git
Cloning into 'rtl8812au'...
fatal: unable to access 'https://github.com/aircrack-ng/rtl8812au.git/': Could n ot resolve host: github.com
dietpi@DietPi:~$
dietpi@DietPi:~$ sudo git clone -b v5.6.4.2 https://github.com/aircrack-ng/rtl8812au.git
Cloning into 'rtl8812au'...
^Z
[1]+ Stopped sudo git clone -b v5.6.4.2 https://github.com/aircrack-ng/rtl8812au.git
dietpi@DietPi:~$ sudo git clone -b v5.6.4.2 https://github.com/aircrack-ng/rtl8812au.git
fatal: destination path 'rtl8812au' already exists and is not an empty directory.
dietpi@DietPi:~$
you would need to remove the directory created during first try. As well you had a DNS resolution issue as your system was not able to resolve global GitHub url.
I didn’t have to delete that directory. Reboot seems to have solved that. And a reboot of my modem solved DNS trouble. Thank you.
For next newbie like me. This works. I followed advice to the letter. Logged as user: dietpi. I just had to put sudo in front of everything, but CD command, in order to have right privileges.
probably easier to use user root for such compiling task
Having some new trouble.
root@DietPi:~/rtl8812au# make dkms_install
mkdir: created directory '/usr/src/8812au-5.6.4.2_35491.20191025'
cp -r * /usr/src/8812au-5.6.4.2_35491.20191025
dkms add -m 8812au -v 5.6.4.2_35491.20191025
Creating symlink /var/lib/dkms/8812au/5.6.4.2_35491.20191025/source ->
/usr/src/8812au-5.6.4.2_35491.20191025
DKMS: add completed.
dkms build -m 8812au -v 5.6.4.2_35491.20191025
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
'make' -j4 KVER=5.15.32-v8+ KSRC=/lib/modules/5.15.32-v8+/build....(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.15.32-v8+ (aarch64)
Consult /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/make.log for more information.
make: *** [Makefile:2311: dkms_install] Error 10
root@DietPi:~/rtl8812au#
You might need to have a look into the log file
cat /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/make.log
Works with ARMv7, but not with ARMv8 DietPi.
it might be an issue 32bit vs 64bit. But if you don’t share any log, we are not able to assist.
Thank you very much for your quick assist @Joulinar!
I reformated that card and wnet with ARMv7 as it doesn’t matter much. It is a Roon endpoint OTP build.
Will experiment more with ARMv8 and post log then. <3
Probably the same issue we faced here on Odroid C4 with Linux 5.10. Probably still an issue with 5.15 after a fix has been applied to the driver for Linux 5.17: WIFI Realtek RTL8811AU seen by OS, not configurable in dietpi-config · Issue #4387 · MichaIng/DietPi · GitHub
Using some commits earlier works.
Hey guys,
With latest DietPi build I get this error when compiling on ArmV8.
'make' -j4 KVER=5.15.84-v8+ KSRC=/lib/modules/5.15.84-v8+/build....(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.15.84-v8+ (aarch64)
Consult /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/make.log for more information.
make: *** [Makefile:1790: dkms_install] Error 10
Anyone has a suggestion maybe?
Did you have done this, as stated on your error message?
I did not.
Can you, maybe, tell exact way how to do that?
nano /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/make.log
or
cat /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/make.log
DKMS make.log for 8812au-5.6.4.2_35491.20191025 for kernel 5.15.84-v8+ (aarch64)
Sun Jan 8 19:18:52 GMT 2023
make[1]: Entering directory '/var/lib/dkms/8812au/5.6.4.2_35491.20191025/build'
make ARCH=arm CROSS_COMPILE= -C /lib/modules/5.15.84-v8+/build M=/var/lib/dkms/8812au/5.6.4.2_35491.20191025/build modules
make[2]: Entering directory '/usr/src/linux-headers-5.15.84-v8+'
CC [M] /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/core/rtw_cmd.o
gcc: error: unrecognized argument in option ‘-mabi=apcs-gnu’
gcc: note: valid arguments to ‘-mabi=’ are: ilp32 lp64
CC [M] /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/core/rtw_security.o
gcc: error: unrecognized command-line option ‘-mapcs’
gcc: error: unrecognized argument in option ‘-mabi=apcs-gnu’
gcc: note: valid arguments to ‘-mabi=’ are: ilp32 lp64
CC [M] /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/core/rtw_debug.o
gcc: error: unrecognized command-line option ‘-mapcs’
gcc: error: unrecognized argument in option ‘-mabi=apcs-gnu’
gcc: note: valid arguments to ‘-mabi=’ are: ilp32 lp64
gcc: error: unrecognized command-line option ‘-mno-sched-prolog’
gcc: error: unrecognized command-line option ‘-mapcs’
CC [M] /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/core/rtw_io.o
gcc: error: unrecognized command-line option ‘-msoft-float’
make[3]: *** [scripts/Makefile.build:289: /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/core/rtw_cmd.o] Error 1
make[3]: *** Waiting for unfinished jobs....
gcc: error: unrecognized command-line option ‘-mno-sched-prolog’
gcc: error: unrecognized argument in option ‘-mabi=apcs-gnu’
gcc: note: valid arguments to ‘-mabi=’ are: ilp32 lp64
gcc: error: unrecognized command-line option ‘-msoft-float’
make[3]: *** [scripts/Makefile.build:289: /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/core/rtw_security.o] Error 1
gcc: error: unrecognized command-line option ‘-mno-sched-prolog’
gcc: error: unrecognized command-line option ‘-mapcs’
gcc: error: unrecognized command-line option ‘-msoft-float’
make[3]: *** [scripts/Makefile.build:289: /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/core/rtw_debug.o] Error 1
gcc: error: unrecognized command-line option ‘-mno-sched-prolog’
gcc: error: unrecognized command-line option ‘-msoft-float’
make[3]: *** [scripts/Makefile.build:289: /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/core/rtw_io.o] Error 1
make[2]: *** [Makefile:1902: /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-5.15.84-v8+'
make[1]: *** [Makefile:1730: modules] Error 2
make[1]: Leaving directory '/var/lib/dkms/8812au/5.6.4.2_35491.20191025/build'