03-03-2018, 09:04 AM
Hi everyone,
This is my first posting here:
I just wanted to share what I did to make RTL8812AU working in dual-band mode on Rock64 running Xenial Mate Community Build Image.
The following information is based on the personal blog I found on the net:
https://ameblo.jp/gabriel1225/entry-12337005303.html
The page is in Japanese only, so I summarise the relevant parts here.
1) Obtain the source code:
>$ git clone https://github.com/gnab/rtl8812au.git
[This will create a directory called rtl8812au in your home directory.]
2) Move to this newly created rtl8812au directory:
>$ cd rtl8812au
3) 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)
4) Compile:
>$ make
5) Register the newly created driver:
>$ sudo insmod 8812au.ko
In order to automate this driver compiling process after each version update, use DKSM function.
1) Unload the driver:
>$ sudo rmmod 8812au
2) Install dkms:
>$ sudo apt-get install dkms -y
8) Since dkms is managed in /usr/src directory, copy dkms into there.
>$ sudo cp dkms /usr/src
9) Type:
>$ make clean
>$ sudo cp -R . /usr/src/8812au-4.2.2
10) Register module:
[First, move to the working directory]
>$ cd ../../usr/src
[Type]
>$ sudo dkms add -m 8812au -v 4.2.2
11) Build:
>$ sudo dkms build -m 8812au -v 4.2.2
12) Install:
>$ sudo dkms install -m 8812au -v 4.2.2
Now your driver will be self-build in the next kernel update, so you do not have to repeat this cumbersome operation again.
This is my first posting here:
I just wanted to share what I did to make RTL8812AU working in dual-band mode on Rock64 running Xenial Mate Community Build Image.
The following information is based on the personal blog I found on the net:
https://ameblo.jp/gabriel1225/entry-12337005303.html
The page is in Japanese only, so I summarise the relevant parts here.
1) Obtain the source code:
>$ git clone https://github.com/gnab/rtl8812au.git
[This will create a directory called rtl8812au in your home directory.]
2) Move to this newly created rtl8812au directory:
>$ cd rtl8812au
3) 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)
4) Compile:
>$ make
5) Register the newly created driver:
>$ sudo insmod 8812au.ko
In order to automate this driver compiling process after each version update, use DKSM function.
1) Unload the driver:
>$ sudo rmmod 8812au
2) Install dkms:
>$ sudo apt-get install dkms -y
8) Since dkms is managed in /usr/src directory, copy dkms into there.
>$ sudo cp dkms /usr/src
9) Type:
>$ make clean
>$ sudo cp -R . /usr/src/8812au-4.2.2
10) Register module:
[First, move to the working directory]
>$ cd ../../usr/src
[Type]
>$ sudo dkms add -m 8812au -v 4.2.2
11) Build:
>$ sudo dkms build -m 8812au -v 4.2.2
12) Install:
>$ sudo dkms install -m 8812au -v 4.2.2
Now your driver will be self-build in the next kernel update, so you do not have to repeat this cumbersome operation again.