# Rock64 Wifi Module

**URL:** <https://dietpi.com/forum/t/rock64-wifi-module/2101>\
**Category:** Community Tutorials\
**Created:** [23 March 2018 06:45 UTC](https://dietpi.com/forum/t/rock64-wifi-module/2101 "2018-03-23T06:45:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joseph\_Lin](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/ce7236/32.png) [@Joseph\_Lin](https://dietpi.com/forum/u/Joseph_Lin)\
**Post date:** [23 March 2018 06:45 UTC](https://dietpi.com/forum/t/rock64-wifi-module/2101/1 "2018-03-23T06:45:00Z")

</div>

I successfully installed Dietpi on my new Rock64 2G board. However, I cannot make my RTL8812AU wifi module to work on Dietpi.  
I tried to compile the driver by myself but the linux headers for Rock64 cannot be found, tried to get the headers but apt-get told me the system has the newest headers.  
I am wondering, is there a way to compile the driver for Dietpi? Will Dietpi support RTL8812AU wifi module in the future? I found  
[https://github.com/ayufan-rock64/linux-kernel/tree/release-4.4/drivers/net/wireless/rockchip\_wlan](https://github.com/ayufan-rock64/linux-kernel/tree/release-4.4/drivers/net/wireless/rockchip_wlan)  
has a lot of drivers ready for compilation if it is possible on Dietpi.

---

<div class="post-metadata">

**Author:** ![Joseph\_Lin](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/ce7236/32.png) [@Joseph\_Lin](https://dietpi.com/forum/u/Joseph_Lin)\
**Post date:** [25 March 2018 21:58 UTC](https://dietpi.com/forum/t/rock64-wifi-module/2101/2 "2018-03-25T21:58:16Z")

</div>

> [@Joseph\_Lin](#):
>
> I successfully installed Dietpi on my new Rock64 2G board. However, I cannot make my RTL8812AU wifi module to work on Dietpi.  
> I tried to compile the driver by myself but the linux headers for Rock64 cannot be found, tried to get the headers but apt-get told me the system has the newest headers.  
> I am wondering, is there a way to compile the driver for Dietpi? Will Dietpi support RTL8812AU wifi module in the future? I found  
> [https://github.com/ayufan-rock64/linux-kernel/tree/release-4.4/drivers/net/wireless/rockchip\_wlan](https://github.com/ayufan-rock64/linux-kernel/tree/release-4.4/drivers/net/wireless/rockchip_wlan)  
> has a lot of drivers ready for compilation if it is possible on Dietpi.

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:

> **[『ROCK64でPLANEX GW-450Sを使う。』](https://ameblo.jp/gabriel1225/entry-12337005303.html)**
>
> 塩顔の関根勤 がぶちゃんです。 とりあえず、ROCK64でプラネックス GW-450Sを使う手順を書いときます。 ドライバはgnabさん版 https://g…

git clone [GitHub - gnab/rtl8812au: Realtek 802.11n WLAN Adapter Linux driver](https://github.com/gnab/rtl8812au.git)  
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 = ｙ  
↓  
CONFIG\_POWER\_SAVING = n  
  
  
[Change platform setting around line 53]

CONFIG\_PLATFORM\_I386\_PC = ｙ  
↓  
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)

1. Compile:

> $ make

1. 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.

---

<div class="post-metadata">

**Author:** ![Joseph\_Lin](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/ce7236/32.png) [@Joseph\_Lin](https://dietpi.com/forum/u/Joseph_Lin)\
**Post date:** [25 March 2018 22:03 UTC](https://dietpi.com/forum/t/rock64-wifi-module/2101/3 "2018-03-25T22:03:32Z")

</div>

By the way, since I have 8812au module compiled and confirmed working. Will dietpi include this driver in the future release, please? I do not want to recompile it again in the future.

---

<div class="post-metadata">

**Author:** ![Joseph\_Lin](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/ce7236/32.png) [@Joseph\_Lin](https://dietpi.com/forum/u/Joseph_Lin)\
**Post date:** [26 March 2018 17:56 UTC](https://dietpi.com/forum/t/rock64-wifi-module/2101/4 "2018-03-26T17:56:24Z")

</div>

I made some corrections, if you like, you can download my Makefile and skip those confusing modifications

sudo apt-get install git

sudo apt-get install build-essential

apt-get download linux-headers-4.4.77-rockchip-ayufan-136

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:

> **[『ROCK64でPLANEX GW-450Sを使う。』](https://ameblo.jp/gabriel1225/entry-12337005303.html)**
>
> 塩顔の関根勤 がぶちゃんです。 とりあえず、ROCK64でプラネックス GW-450Sを使う手順を書いときます。 ドライバはgnabさん版 https://g…

The page is in Japanese only, so I summarise the relevant parts here.

1. Obtain the source code:

> $ git clone [GitHub - gnab/rtl8812au: Realtek 802.11n WLAN Adapter Linux driver](https://github.com/gnab/rtl8812au.git)

[This will create a directory called rtl8812au in your home directory.]

1. Move to this newly created rtl8812au directory:

> $ cd rtl8812au

1. 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 = ｙ  
↓  
CONFIG\_POWER\_SAVING = n  
  
  
[Change platform setting around line 53]

CONFIG\_PLATFORM\_I386\_PC = ｙ  
↓  
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)

1. Compile:

> $ make

1. 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/kernel/drivers/net/wireless since I moved 8812au.ko to this location.

I hope this helps someone.  
[Makefile.zip](https://dietpi.com/forum/uploads/short-url/cFThbFwGZzBzkdP55hCxZ01O5j8.zip) (5.06 KB)

---

<div class="post-metadata">

**Author:** ![Joseph\_Lin](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/ce7236/32.png) [@Joseph\_Lin](https://dietpi.com/forum/u/Joseph_Lin)\
**Post date:** [26 March 2018 18:03 UTC](https://dietpi.com/forum/t/rock64-wifi-module/2101/5 "2018-03-26T18:03:10Z")

</div>

Some screen shots after connected to my 5G router. It is fast!

 ![Capture2.JPG](https://dietpi.com/forum/uploads/default/original/1X/5e0f52072b41ec214d9e6162632c5d65400c0959.jpeg)  
 ![Capture.JPG](https://dietpi.com/forum/uploads/default/original/1X/e122effc248ca4c9d5642ed7709be891b6f7a535.jpeg)

---

<div class="post-metadata">

**Author:** ![Joseph\_Lin](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/ce7236/32.png) [@Joseph\_Lin](https://dietpi.com/forum/u/Joseph_Lin)\
**Post date:** [2 April 2018 01:59 UTC](https://dietpi.com/forum/t/rock64-wifi-module/2101/6 "2018-04-02T01:59:23Z")

</div>

There is a newer version of 8812au driver – 5.2.20, I think it is the newest. If you know there is a newer one, please let me know.

To compile and install it:

1. If you have old rtl8812au installed, please remove it first. Leave no trace of it 🙂  
sudo rmmod 8812au  
go to the path where 8812au.ko is installed  
sudo rm 8812au.ko
2. Install build-essential from Dietpi-software(Looks like Dietpi-software is not able to install a complete build-essential, you need to install it with :sudo apt-get install build-essential)
3. Install git from dietpi-software
4. git clone [https://github.com/gordboy/rtl8812au](https://github.com/gordboy/rtl8812au)
5. apt-get download linux-headers-4.4.77-rockchip-ayufan-136
6. mkdir header
7. dpkg -x linux-headers-4.4.77-rockchip-ayufan-136\_0.5.15\_arm64.deb header
8. cd header/usr/src
9. sudo mv linux-headers-4.4.77-rockchip-ayufan-136/ /usr/src/.
10. cd
11. cd rtl8812au
12. ARCH=arm64 make
13. sudo ARCH=arm64 make install
14. Reboot and it should work now.
