Looks like not many people are using Rock64, very few views and no replies.
Anyways, I spent 4 hours trying to figure out how to compile 8812au for Rock64, and finally have it up and running in Dietpi!
Here’s my tutorial:
sudo apt-get install git
sudo apt-get install build-essential
sudo dpkg -i linux-headers-4.4.77-rockchip-ayufan-136_0.5.15_arm64.deb
mkdir header
dpkg -x linux-headers-4.4.77-rockchip-ayufan-136_0.5.15_arm64.deb header
cd header/usr/src
sudo mv linux-headers-4.4.77-rockchip-ayufan-136/ /usr/src/.
The following information is based on the personal blog I found on the net:
git clone GitHub - gnab/rtl8812au: Realtek 802.11n WLAN Adapter Linux driver
cd rtl8812au
Using your text editor, edit some entries in file called Makefile so that it can run without error on Rock64.
[Disable energy saving around line 40]
CONFIG_POWER_SAVING = y
↓
CONFIG_POWER_SAVING = n
[Change platform setting around line 53]
CONFIG_PLATFORM_I386_PC = y
↓
CONFIG_PLATFORM_I386_PC = n
[Add the following platform setting immediately under the above line]
CONFIG_PLATFORM_ARM_PC = y
[Add the following command around line 662]
ifeq ($(CONFIG_PLATFORM_ARM_PC), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
SUBARCH := arm64
ARCH ?= arm64
CROSS_COMPILE ?=
KVER ?= $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build/
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
endif
[Remove “modules” part from the following command around line 1065]
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules
↓
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd)
- Compile:
$ make
- Register the newly created driver:
$ sudo insmod 8812au.ko
Somehow, I am not able to make 8812au.ko loads in /etc/modules. My fix is to simply edit /etc/rc.local and add insmod /Path-to-driver/8812au.ki
My path to driver is in /lib/modules/4.4.77-rockchip-ayufan-136 since I moved 8812au.ko to this location.
I hope this helps someone.