Introduction

忘備録。
使いたいのは WI-U2-433DMS
子機をマシンに繋げても

BuildError

そもそもアダプターがないと言われる。

How to do?

まずは環境確認

1
2
3
4
5
6
7
8
9
10
11
12
13
$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

次にドライバーをビルド。
有志の方が Realtek 802.11ac (rtl8812au) v4.2.2 のドライバーをフォークして公開しているものです。
ライセンスの記載もない (一応、issue で提起はされている。フォーク元は GPL-2 の模様) ですし、何の保証もない点に注意。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
$ git clone https://github.com/gnab/rtl8812au.git
$ cd rtl8812au/
$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.0-54-generic/build M=/home/xxxxxx/Work/rtl8812au modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-54-generic'
Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_cmd.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_security.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_debug.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_io.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_ioctl_query.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_ioctl_set.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_ieee80211.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_mlme.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_mlme_ext.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_wlan_util.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_vht.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_pwrctrl.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_rf.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_recv.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_sta_mgt.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_ap.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_xmit.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_p2p.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_tdls.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_br_ext.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_iol.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_sreset.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/efuse/rtw_efuse.o
CC [M] /home/xxxxxx/Work/rtl8812au/os_dep/osdep_service.o
CC [M] /home/xxxxxx/Work/rtl8812au/os_dep/linux/os_intfs.o
CC [M] /home/xxxxxx/Work/rtl8812au/os_dep/linux/usb_intf.o
CC [M] /home/xxxxxx/Work/rtl8812au/os_dep/linux/usb_ops_linux.o
CC [M] /home/xxxxxx/Work/rtl8812au/os_dep/linux/ioctl_linux.o
CC [M] /home/xxxxxx/Work/rtl8812au/os_dep/linux/xmit_linux.o
CC [M] /home/xxxxxx/Work/rtl8812au/os_dep/linux/mlme_linux.o
CC [M] /home/xxxxxx/Work/rtl8812au/os_dep/linux/recv_linux.o
CC [M] /home/xxxxxx/Work/rtl8812au/os_dep/linux/ioctl_cfg80211.o
CC [M] /home/xxxxxx/Work/rtl8812au/os_dep/linux/rtw_android.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/hal_intf.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/hal_com.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/hal_com_phycfg.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/hal_phy.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/led/hal_usb_led.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/HalPwrSeqCmd.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/rtl8812a/Hal8812PwrSeq.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/rtl8812a/Hal8821APwrSeq.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/rtl8812a/rtl8812a_xmit.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/rtl8812a/rtl8812a_sreset.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/rtl8812a/rtl8812a_hal_init.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/rtl8812a/rtl8812a_phycfg.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/rtl8812a/rtl8812a_rf6052.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/rtl8812a/rtl8812a_dm.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/rtl8812a/rtl8812a_rxdesc.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/rtl8812a/rtl8812a_cmd.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/rtl8812a/usb/usb_halinit.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/rtl8812a/usb/rtl8812au_led.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/rtl8812a/usb/rtl8812au_xmit.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/rtl8812a/usb/rtl8812au_recv.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/rtl8812a/usb/usb_ops_linux.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/rtl8812a/rtl8812a_mp.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/odm_debug.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/odm_interface.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/odm_HWConfig.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/odm.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/HalPhyRf.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8812a/HalHWImg8812A_FW.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8812a/HalHWImg8812A_MAC.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8812a/HalHWImg8812A_BB.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8812a/HalHWImg8812A_RF.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8812a/HalHWImg8812A_TestChip_FW.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8812a/HalHWImg8812A_TestChip_MAC.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8812a/HalHWImg8812A_TestChip_BB.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8812a/HalHWImg8812A_TestChip_RF.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8812a/HalPhyRf_8812A.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8812a/odm_RegConfig8812A.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8821a/HalHWImg8821A_FW.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8821a/HalHWImg8821A_MAC.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8821a/HalHWImg8821A_BB.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8821a/HalHWImg8821A_RF.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8821a/HalHWImg8821A_TestChip_MAC.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8821a/HalHWImg8821A_TestChip_BB.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8821a/HalHWImg8821A_TestChip_RF.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8821a/HalPhyRf_8821A.o
CC [M] /home/xxxxxx/Work/rtl8812au/hal/OUTSRC/rtl8821a/odm_RegConfig8821A.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_mp.o
CC [M] /home/xxxxxx/Work/rtl8812au/core/rtw_mp_ioctl.o
LD [M] /home/xxxxxx/Work/rtl8812au/8812au.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/xxxxxx/Work/rtl8812au/8812au.mod.o
LD [M] /home/xxxxxx/Work/rtl8812au/8812au.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-54-generic'

最後にドライバーをインストール。

1
2
3
4
5
$ sudo make install
[sudo] password for xxxxxx:
install -p -m 644 8812au.ko /lib/modules/4.15.0-54-generic/kernel/drivers/net/wireless/
/sbin/depmod -a 4.15.0-54-generic
$ sudo modprobe 8812au

すると、Wi-Fi の設定画面にエンドポイントが列挙されるようになった。

BuildError