■2.Hyper-Vに UbuntuのVMを作成、インストールします。 「Hyper-V で無線 LAN のみの PC でもネットワーク接続できるようにする方法」 補足:上の手順の設定のままやるとメモリが不足する可能性が高い。起動メモリは自分のマシンのメモリサイズに合わせて決めてください。ホストOSにもメモリが必要なので半分程度を基準に、使い方に合わせて調整して割り当ててください。例えば全メモリサイズが8GBなら4GBを割り当てるといった具合に調整してください。
■おまけ: ここで、VMから無線WiFiデバイスが使えるか確認してみました。 「Hyper-V で無線 LAN のみの PC でもネットワーク接続できるようにする方法」などの情報があります。そりゃそうだ、というか、デバイスはホストOSが管理しているのでゲストOSには直接見えませんよね。つまり、無線WiFiで通信することはできるが、それはブリッジを介して接続するのでUbuntuからはブリッジ接続が有線接続のように見えるということです。よって、やりたいホットスポットとして使用することはできない。 Windows10で起動したホットスポットに対してブリッジ接続することでそれらしい動きはできそうです。しかし、これも Ubuntuからは有線接続として見えるのでUbuntuからはWiFiデバイス操作はできず目的を果たせません。
$ git clone –single-branch –branch v5.2.2.4 https://github.com/capitalfuse/rtl8188eus.git $ cd rtl8188eus $ make
次のようにビルドに失敗
hbox@hbox-Virtual-Machine:~$ git clone –single-branch –branch v5.2.2.4 https://github.com/capitalfuse/rtl8188eus.git Cloning into ‘rtl8188eus’… remote: Enumerating objects: 1173, done. remote: Total 1173 (delta 0), reused 0 (delta 0), pack-reused 1173 Receiving objects: 100% (1173/1173), 3.71 MiB | 1.44 MiB/s, done. Resolving deltas: 100% (693/693), done. hbox@hbox-Virtual-Machine:~$ cd rtl8188eus hbox@hbox-Virtual-Machine:~/rtl8188eus$ make make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.0.0-25-generic/build M=/home/hbox/rtl8188eus modules make[1]: ディレクトリ ‘/usr/src/linux-headers-5.0.0-25-generic’ に入ります CC [M] /home/hbox/rtl8188eus/core/rtw_cmd.o CC [M] /home/hbox/rtl8188eus/core/rtw_security.o CC [M] /home/hbox/rtl8188eus/core/rtw_debug.o CC [M] /home/hbox/rtl8188eus/core/rtw_io.o CC [M] /home/hbox/rtl8188eus/core/rtw_ioctl_query.o CC [M] /home/hbox/rtl8188eus/core/rtw_ioctl_set.o CC [M] /home/hbox/rtl8188eus/core/rtw_ieee80211.o CC [M] /home/hbox/rtl8188eus/core/rtw_mlme.o CC [M] /home/hbox/rtl8188eus/core/rtw_mlme_ext.o CC [M] /home/hbox/rtl8188eus/core/rtw_mi.o CC [M] /home/hbox/rtl8188eus/core/rtw_wlan_util.o CC [M] /home/hbox/rtl8188eus/core/rtw_vht.o CC [M] /home/hbox/rtl8188eus/core/rtw_pwrctrl.o CC [M] /home/hbox/rtl8188eus/core/rtw_rf.o CC [M] /home/hbox/rtl8188eus/core/rtw_recv.o CC [M] /home/hbox/rtl8188eus/core/rtw_sta_mgt.o CC [M] /home/hbox/rtl8188eus/core/rtw_ap.o CC [M] /home/hbox/rtl8188eus/core/rtw_xmit.o CC [M] /home/hbox/rtl8188eus/core/rtw_p2p.o CC [M] /home/hbox/rtl8188eus/core/rtw_tdls.o CC [M] /home/hbox/rtl8188eus/core/rtw_br_ext.o CC [M] /home/hbox/rtl8188eus/core/rtw_iol.o CC [M] /home/hbox/rtl8188eus/core/rtw_sreset.o CC [M] /home/hbox/rtl8188eus/core/rtw_btcoex_wifionly.o CC [M] /home/hbox/rtl8188eus/core/rtw_btcoex.o CC [M] /home/hbox/rtl8188eus/core/rtw_beamforming.o CC [M] /home/hbox/rtl8188eus/core/rtw_odm.o CC [M] /home/hbox/rtl8188eus/core/efuse/rtw_efuse.o CC [M] /home/hbox/rtl8188eus/os_dep/osdep_service.o CC [M] /home/hbox/rtl8188eus/os_dep/linux/os_intfs.o CC [M] /home/hbox/rtl8188eus/os_dep/linux/usb_intf.o CC [M] /home/hbox/rtl8188eus/os_dep/linux/usb_ops_linux.o CC [M] /home/hbox/rtl8188eus/os_dep/linux/ioctl_linux.o CC [M] /home/hbox/rtl8188eus/os_dep/linux/xmit_linux.o CC [M] /home/hbox/rtl8188eus/os_dep/linux/mlme_linux.o CC [M] /home/hbox/rtl8188eus/os_dep/linux/recv_linux.o CC [M] /home/hbox/rtl8188eus/os_dep/linux/ioctl_cfg80211.o /home/hbox/rtl8188eus/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_get_systime_us’: /home/hbox/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:354:2: error: implicit declaration of function ‘get_monotonic_boottime’; did you mean ‘getboottime’? [-Werror=implicit-function-declaration] get_monotonic_boottime(&ts); ^~~~~~ getboottime cc1: some warnings being treated as errors scripts/Makefile.build:284: recipe for target ‘/home/hbox/rtl8188eus/os_dep/linux/ioctl_cfg80211.o’ failed make[2]: *** [/home/hbox/rtl8188eus/os_dep/linux/ioctl_cfg80211.o] Error 1 Makefile:1606: recipe for target ‘module/home/hbox/rtl8188eus’ failed make[1]: *** [module/home/hbox/rtl8188eus] Error 2 make[1]: ディレクトリ ‘/usr/src/linux-headers-5.0.0-25-generic’ から出ます Makefile:1911: recipe for target ‘modules’ failed make: *** [modules] Error 2 hbox@hbox-Virtual-Machine:~/rtl8188eus$
同様に別のページを参考に他のドライバをビルドしてみたが別のエラーで失敗した。
$ make make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.0.0-25-generic/build M=/home/hbox/rtl8188fu modules make[1]: ディレクトリ ‘/usr/src/linux-headers-5.0.0-25-generic’ に入ります CC [M] /home/hbox/rtl8188fu/core/rtw_cmd.o In file included from /home/hbox/rtl8188fu/include/osdep_service.h:41:0, from /home/hbox/rtl8188fu/include/drv_types.h:32, from /home/hbox/rtl8188fu/core/rtw_cmd.c:22: /home/hbox/rtl8188fu/include/osdep_service_linux.h: In function ‘_init_timer’: /home/hbox/rtl8188fu/include/osdep_service_linux.h:273:8: error: ‘_timer {aka struct timer_list}’ has no member named ‘data’ ptimer->data = (unsigned long)cntx; ^~ /home/hbox/rtl8188fu/include/osdep_service_linux.h:274:2: error: implicit declaration of function ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration] init_timer(ptimer); ^~~~~~ _init_timer In file included from /home/hbox/rtl8188fu/include/drv_types.h:35:0, from /home/hbox/rtl8188fu/core/rtw_cmd.c:22: /home/hbox/rtl8188fu/include/wifi.h: At top level: /home/hbox/rtl8188fu/include/wifi.h:1009:0: warning: “IEEE80211_MAX_AMPDU_BUF” redefined #define IEEE80211_MAX_AMPDU_BUF 0x40
In file included from /home/hbox/rtl8188fu/include/osdep_service_linux.h:84:0, from /home/hbox/rtl8188fu/include/osdep_service.h:41, from /home/hbox/rtl8188fu/include/drv_types.h:32, from /home/hbox/rtl8188fu/core/rtw_cmd.c:22: ./include/linux/ieee80211.h:1444:0: note: this is the location of the previous definition #define IEEE80211_MAX_AMPDU_BUF 0x100
cc1: some warnings being treated as errors scripts/Makefile.build:284: recipe for target ‘/home/hbox/rtl8188fu/core/rtw_cmd.o’ failed make[2]: *** [/home/hbox/rtl8188fu/core/rtw_cmd.o] Error 1 Makefile:1606: recipe for target ‘module/home/hbox/rtl8188fu’ failed make[1]: *** [module/home/hbox/rtl8188fu] Error 2 make[1]: ディレクトリ ‘/usr/src/linux-headers-5.0.0-25-generic’ から出ます Makefile:1679: recipe for target ‘modules’ failed make: *** [modules] Error 2