FomalhautWeisszwerg / rtl8822bu

RTL8822BU Wireless Driver for Linux >= 4.12
GNU General Public License v2.0
34 stars 12 forks source link

Does not load on 4.16.11-300.fc28.x86_64 #16

Closed divinitus closed 6 years ago

divinitus commented 6 years ago

build completes successfully make install puts the module into proper location.

trying to load with modprobe ends up in [root@divistacja ~]# modprobe 8822bu ; modprobe: ERROR: could not insert '8822bu': Unknown symbol in module, or unknown parameter (see dmesg)

[ 400.158339] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 400.158817] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 400.158970] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 400.158971] cfg80211: failed to load regulatory.db [ 400.160499] 8822bu: Unknown symbol vfs_read (err 0)

the firmware is located in: [root@divistacja rtl8822bu]# md5sum /lib/firmware/RTL8822Bfw_NIC.bin 1d81b1cffbd3ba03a6f0c712344f33d9 /lib/firmware/RTL8822Bfw_NIC.bin

FomalhautWeisszwerg commented 6 years ago

The fail is caused by "Unknown symbol vfs_read". Not firmware.

But vfs_read has been obsoleted since Linux-4.14 and also already obsoleted in this driver by this commit 275bd06841bf315627d140b9c763ba63b8d3327b . Note, if vfs_read remains, make fails on Linux-4.16.

helektron commented 6 years ago

I've the same issue for kernel 4.17 "8822bu: Unknown symbol vfs_read (err 0)" how can we fix it? thanks!

FomalhautWeisszwerg commented 6 years ago

No error found on Debian sid and Ubuntu 18.04.

On Debian sid (2018-06-10 latest)

$ uname -v
#1 SMP Debian 4.16.12-1 (2018-05-27)
$ git log -n 1
commit e66490cb63c88c0c2466829331a92cba098789aa (HEAD -> master, origin/master, origin/HEAD)
Author: Fomalhaut Weisszwerg <weisszwerg@gmail.com>
Date:   Mon May 28 19:52:51 2018 +0900

    Update: readme.
$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.16.0-2-amd64/build M=/home/working/rtl8822bu modules
make[1]: Entering directory '/usr/src/linux-headers-4.16.0-2-amd64'
  CC [M]  /home/working/rtl8822bu/core/rtw_cmd.o
  CC [M]  /home/working/rtl8822bu/core/rtw_security.o
  CC [M]  /home/working/rtl8822bu/core/rtw_debug.o
  CC [M]  /home/working/rtl8822bu/core/rtw_io.o
  CC [M]  /home/working/rtl8822bu/core/rtw_ioctl_query.o
  CC [M]  /home/working/rtl8822bu/core/rtw_ioctl_set.o
  CC [M]  /home/working/rtl8822bu/core/rtw_ieee80211.o
  CC [M]  /home/working/rtl8822bu/core/rtw_mlme.o
  CC [M]  /home/working/rtl8822bu/core/rtw_mlme_ext.o
  CC [M]  /home/working/rtl8822bu/core/rtw_mi.o
  CC [M]  /home/working/rtl8822bu/core/rtw_wlan_util.o
  CC [M]  /home/working/rtl8822bu/core/rtw_vht.o
  CC [M]  /home/working/rtl8822bu/core/rtw_pwrctrl.o
  CC [M]  /home/working/rtl8822bu/core/rtw_rf.o
  CC [M]  /home/working/rtl8822bu/core/rtw_recv.o
  CC [M]  /home/working/rtl8822bu/core/rtw_sta_mgt.o
  CC [M]  /home/working/rtl8822bu/core/rtw_ap.o
  CC [M]  /home/working/rtl8822bu/core/rtw_xmit.o
  CC [M]  /home/working/rtl8822bu/core/rtw_p2p.o
  CC [M]  /home/working/rtl8822bu/core/rtw_tdls.o
  CC [M]  /home/working/rtl8822bu/core/rtw_br_ext.o
  CC [M]  /home/working/rtl8822bu/core/rtw_iol.o
  CC [M]  /home/working/rtl8822bu/core/rtw_sreset.o
  CC [M]  /home/working/rtl8822bu/core/rtw_btcoex.o
  CC [M]  /home/working/rtl8822bu/core/rtw_beamforming.o
  CC [M]  /home/working/rtl8822bu/core/rtw_odm.o
  CC [M]  /home/working/rtl8822bu/core/efuse/rtw_efuse.o
  CC [M]  /home/working/rtl8822bu/os_dep/osdep_service.o
  CC [M]  /home/working/rtl8822bu/os_dep/linux/os_intfs.o
  CC [M]  /home/working/rtl8822bu/os_dep/linux/usb_intf.o
  CC [M]  /home/working/rtl8822bu/os_dep/linux/usb_ops_linux.o
  CC [M]  /home/working/rtl8822bu/os_dep/linux/ioctl_linux.o
  CC [M]  /home/working/rtl8822bu/os_dep/linux/xmit_linux.o
  CC [M]  /home/working/rtl8822bu/os_dep/linux/mlme_linux.o
  CC [M]  /home/working/rtl8822bu/os_dep/linux/recv_linux.o
  CC [M]  /home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.o
/home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_cfg80211_indicate_connect’:
/home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:755:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
   struct cfg80211_roam_info roam_info;
   ^~~~~~
  CC [M]  /home/working/rtl8822bu/os_dep/linux/rtw_cfgvendor.o
  CC [M]  /home/working/rtl8822bu/os_dep/linux/wifi_regd.o
  CC [M]  /home/working/rtl8822bu/os_dep/linux/rtw_android.o
/home/working/rtl8822bu/os_dep/linux/rtw_android.c: In function ‘rtw_android_priv_cmd’:
/home/working/rtl8822bu/os_dep/linux/rtw_android.c:580:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  compat_android_wifi_priv_cmd compat_priv_cmd;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /home/working/rtl8822bu/os_dep/linux/rtw_proc.o
  CC [M]  /home/working/rtl8822bu/os_dep/linux/ioctl_mp.o
  CC [M]  /home/working/rtl8822bu/hal/hal_intf.o
  CC [M]  /home/working/rtl8822bu/hal/hal_com.o
  CC [M]  /home/working/rtl8822bu/hal/hal_com_phycfg.o
  CC [M]  /home/working/rtl8822bu/hal/hal_phy.o
  CC [M]  /home/working/rtl8822bu/hal/hal_dm.o
  CC [M]  /home/working/rtl8822bu/hal/hal_btcoex.o
  CC [M]  /home/working/rtl8822bu/hal/hal_mp.o
  CC [M]  /home/working/rtl8822bu/hal/hal_mcc.o
  CC [M]  /home/working/rtl8822bu/hal/hal_hci/hal_usb.o
  CC [M]  /home/working/rtl8822bu/hal/led/hal_usb_led.o
  CC [M]  /home/working/rtl8822bu/hal/hal_halmac.o
  CC [M]  /home/working/rtl8822bu/hal/rtl8822b/rtl8822b_halinit.o
  CC [M]  /home/working/rtl8822bu/hal/rtl8822b/rtl8822b_mac.o
  CC [M]  /home/working/rtl8822bu/hal/rtl8822b/rtl8822b_cmd.o
  CC [M]  /home/working/rtl8822bu/hal/rtl8822b/rtl8822b_phy.o
  CC [M]  /home/working/rtl8822bu/hal/rtl8822b/rtl8822b_ops.o
  CC [M]  /home/working/rtl8822bu/hal/rtl8822b/usb/rtl8822bu_halinit.o
  CC [M]  /home/working/rtl8822bu/hal/rtl8822b/usb/rtl8822bu_halmac.o
  CC [M]  /home/working/rtl8822bu/hal/rtl8822b/usb/rtl8822bu_io.o
  CC [M]  /home/working/rtl8822bu/hal/rtl8822b/usb/rtl8822bu_xmit.o
  CC [M]  /home/working/rtl8822bu/hal/rtl8822b/usb/rtl8822bu_recv.o
  CC [M]  /home/working/rtl8822bu/hal/rtl8822b/usb/rtl8822bu_led.o
  CC [M]  /home/working/rtl8822bu/hal/rtl8822b/usb/rtl8822bu_ops.o
  CC [M]  /home/working/rtl8822bu/hal/efuse/rtl8822b/HalEfuseMask8822B_USB.o
  CC [M]  /home/working/rtl8822bu/hal/halmac/halmac_api.o
  CC [M]  /home/working/rtl8822bu/hal/halmac/halmac_88xx/halmac_api_88xx.o
  CC [M]  /home/working/rtl8822bu/hal/halmac/halmac_88xx/halmac_func_88xx.o
  CC [M]  /home/working/rtl8822bu/hal/halmac/halmac_88xx/halmac_api_88xx_usb.o
  CC [M]  /home/working/rtl8822bu/hal/halmac/halmac_88xx/halmac_api_88xx_sdio.o
  CC [M]  /home/working/rtl8822bu/hal/halmac/halmac_88xx/halmac_api_88xx_pcie.o
  CC [M]  /home/working/rtl8822bu/hal/halmac/halmac_88xx/halmac_8822b/halmac_8822b_pwr_seq.o
  CC [M]  /home/working/rtl8822bu/hal/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b.o
  CC [M]  /home/working/rtl8822bu/hal/halmac/halmac_88xx/halmac_8822b/halmac_func_8822b.o
  CC [M]  /home/working/rtl8822bu/hal/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_usb.o
  CC [M]  /home/working/rtl8822bu/hal/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_sdio.o
  CC [M]  /home/working/rtl8822bu/hal/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_pcie.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_debug.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_antdiv.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_antdect.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_interface.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_hwconfig.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/halphyrf_ce.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_edcaturbocheck.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_dig.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_pathdiv.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_rainfo.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_dynamicbbpowersaving.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_powertracking_ce.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_dynamictxpower.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_adaptivity.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_cfotracking.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_noisemonitor.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_acs.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_beamforming.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_dfs.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/txbf/halcomtxbf.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/txbf/haltxbfinterface.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_kfree.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/phydm_ccx.o
  CC [M]  /home/working/rtl8822bu/hal/btc/HalBtc8192e1Ant.o
  CC [M]  /home/working/rtl8822bu/hal/btc/HalBtc8192e2Ant.o
  CC [M]  /home/working/rtl8822bu/hal/btc/HalBtc8723b1Ant.o
  CC [M]  /home/working/rtl8822bu/hal/btc/HalBtc8723b2Ant.o
  CC [M]  /home/working/rtl8822bu/hal/btc/HalBtc8812a1Ant.o
  CC [M]  /home/working/rtl8822bu/hal/btc/HalBtc8812a2Ant.o
  CC [M]  /home/working/rtl8822bu/hal/btc/HalBtc8821a1Ant.o
  CC [M]  /home/working/rtl8822bu/hal/btc/HalBtc8821a2Ant.o
  CC [M]  /home/working/rtl8822bu/hal/btc/HalBtc8821aCsr2Ant.o
  CC [M]  /home/working/rtl8822bu/hal/btc/HalBtc8703b1Ant.o
  CC [M]  /home/working/rtl8822bu/hal/btc/halbtc8723d1ant.o
  CC [M]  /home/working/rtl8822bu/hal/btc/halbtc8723d2ant.o
  CC [M]  /home/working/rtl8822bu/hal/btc/HalBtc8822b1Ant.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/rtl8822b/halhwimg8822b_bb.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/rtl8822b/halhwimg8822b_fw.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/rtl8822b/halhwimg8822b_mac.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/rtl8822b/halhwimg8822b_rf.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/rtl8822b/halphyrf_8822b.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/rtl8822b/phydm_hal_api8822b.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/rtl8822b/phydm_iqk_8822b.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/rtl8822b/phydm_regconfig8822b.o
  CC [M]  /home/working/rtl8822bu/hal/phydm/rtl8822b/phydm_rtl8822b.o
  CC [M]  /home/working/rtl8822bu/platform/platform_ops.o
  CC [M]  /home/working/rtl8822bu/core/rtw_mp.o
  LD [M]  /home/working/rtl8822bu/8822bu.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/working/rtl8822bu/8822bu.mod.o
  LD [M]  /home/working/rtl8822bu/8822bu.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.16.0-2-amd64'

On Ubuntu 18.04

$ git log -n1
commit e66490cb63c88c0c2466829331a92cba098789aa (HEAD -> master, origin/master, origin/HEAD)
Author: Fomalhaut Weisszwerg <weisszwerg@gmail.com>
Date:   Mon May 28 19:52:51 2018 +0900

    Update: readme.
$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.0-22-generic/build M=/home/fomalhaut/develop/rtl8822bu modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-22-generic'
Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_cmd.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_security.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_debug.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_io.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_ioctl_query.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_ioctl_set.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_ieee80211.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_mlme.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_mlme_ext.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_mi.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_wlan_util.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_vht.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_pwrctrl.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_rf.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_recv.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_sta_mgt.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_ap.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_xmit.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_p2p.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_tdls.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_br_ext.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_iol.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_sreset.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_btcoex.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_beamforming.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_odm.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/efuse/rtw_efuse.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/os_dep/osdep_service.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/os_dep/linux/os_intfs.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/os_dep/linux/usb_intf.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/os_dep/linux/usb_ops_linux.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/os_dep/linux/ioctl_linux.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/os_dep/linux/xmit_linux.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/os_dep/linux/mlme_linux.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/os_dep/linux/recv_linux.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/os_dep/linux/ioctl_cfg80211.o
/home/fomalhaut/develop/rtl8822bu/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_cfg80211_indicate_connect’:
/home/fomalhaut/develop/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:755:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
   struct cfg80211_roam_info roam_info;
   ^~~~~~
  CC [M]  /home/fomalhaut/develop/rtl8822bu/os_dep/linux/rtw_cfgvendor.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/os_dep/linux/wifi_regd.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/os_dep/linux/rtw_android.o
/home/fomalhaut/develop/rtl8822bu/os_dep/linux/rtw_android.c: In function ‘rtw_android_priv_cmd’:
/home/fomalhaut/develop/rtl8822bu/os_dep/linux/rtw_android.c:580:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  compat_android_wifi_priv_cmd compat_priv_cmd;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /home/fomalhaut/develop/rtl8822bu/os_dep/linux/rtw_proc.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/os_dep/linux/ioctl_mp.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/hal_intf.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/hal_com.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/hal_com_phycfg.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/hal_phy.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/hal_dm.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/hal_btcoex.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/hal_mp.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/hal_mcc.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/hal_hci/hal_usb.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/led/hal_usb_led.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/hal_halmac.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/rtl8822b/rtl8822b_halinit.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/rtl8822b/rtl8822b_mac.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/rtl8822b/rtl8822b_cmd.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/rtl8822b/rtl8822b_phy.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/rtl8822b/rtl8822b_ops.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/rtl8822b/usb/rtl8822bu_halinit.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/rtl8822b/usb/rtl8822bu_halmac.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/rtl8822b/usb/rtl8822bu_io.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/rtl8822b/usb/rtl8822bu_xmit.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/rtl8822b/usb/rtl8822bu_recv.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/rtl8822b/usb/rtl8822bu_led.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/rtl8822b/usb/rtl8822bu_ops.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/efuse/rtl8822b/HalEfuseMask8822B_USB.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/halmac/halmac_api.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/halmac/halmac_88xx/halmac_api_88xx.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/halmac/halmac_88xx/halmac_func_88xx.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/halmac/halmac_88xx/halmac_api_88xx_usb.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/halmac/halmac_88xx/halmac_api_88xx_sdio.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/halmac/halmac_88xx/halmac_api_88xx_pcie.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/halmac/halmac_88xx/halmac_8822b/halmac_8822b_pwr_seq.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/halmac/halmac_88xx/halmac_8822b/halmac_func_8822b.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_usb.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_sdio.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_pcie.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_debug.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_antdiv.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_antdect.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_interface.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_hwconfig.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/halphyrf_ce.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_edcaturbocheck.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_dig.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_pathdiv.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_rainfo.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_dynamicbbpowersaving.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_powertracking_ce.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_dynamictxpower.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_adaptivity.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_cfotracking.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_noisemonitor.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_acs.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_beamforming.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_dfs.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/txbf/halcomtxbf.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/txbf/haltxbfinterface.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_kfree.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/phydm_ccx.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/btc/HalBtc8192e1Ant.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/btc/HalBtc8192e2Ant.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/btc/HalBtc8723b1Ant.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/btc/HalBtc8723b2Ant.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/btc/HalBtc8812a1Ant.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/btc/HalBtc8812a2Ant.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/btc/HalBtc8821a1Ant.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/btc/HalBtc8821a2Ant.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/btc/HalBtc8821aCsr2Ant.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/btc/HalBtc8703b1Ant.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/btc/halbtc8723d1ant.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/btc/halbtc8723d2ant.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/btc/HalBtc8822b1Ant.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/rtl8822b/halhwimg8822b_bb.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/rtl8822b/halhwimg8822b_fw.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/rtl8822b/halhwimg8822b_mac.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/rtl8822b/halhwimg8822b_rf.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/rtl8822b/halphyrf_8822b.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/rtl8822b/phydm_hal_api8822b.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/rtl8822b/phydm_iqk_8822b.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/rtl8822b/phydm_regconfig8822b.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/hal/phydm/rtl8822b/phydm_rtl8822b.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/platform/platform_ops.o
  CC [M]  /home/fomalhaut/develop/rtl8822bu/core/rtw_mp.o
  LD [M]  /home/fomalhaut/develop/rtl8822bu/8822bu.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/fomalhaut/develop/rtl8822bu/8822bu.mod.o
  LD [M]  /home/fomalhaut/develop/rtl8822bu/8822bu.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-22-generic'
$ sudo make install
install -p -m 644 8822bu.ko  /lib/modules/4.15.0-22-generic/kernel/drivers/net/wireless/
/sbin/depmod -a 4.15.0-22-generic
$ sudo modprobe 8822bu
$ echo $?
0
FomalhautWeisszwerg commented 6 years ago

@helektron As I described above, there are no error on my environments.

Which distribution do you use?

helektron commented 6 years ago

Ubuntu 18.04 Kernel 4.17

FomalhautWeisszwerg commented 6 years ago

I've reproduced this "undefined reference" error on ArchLinux.

And I also revealed why this error does not occurred on Debian and Ubuntu. On Debian and Ubuntu, maintainers apply their patchs and one of patches include following section:

diff --git a/fs/read_write.c b/fs/read_write.c
index 0a5c47b..d423a5f 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -454,6 +454,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)

        return ret;
 }
+EXPORT_SYMBOL_GPL(vfs_read);

 static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos)
 {
@@ -494,6 +495,7 @@ vfs_readf_t vfs_readf(struct file *file)
                return new_sync_read;
        return ERR_PTR(-ENOSYS);
 }
+EXPORT_SYMBOL_GPL(vfs_readf);

 vfs_writef_t vfs_writef(struct file *file)
 {
@@ -505,6 +507,7 @@ vfs_writef_t vfs_writef(struct file *file)
                return new_sync_write;
        return ERR_PTR(-ENOSYS);
 }
+EXPORT_SYMBOL_GPL(vfs_writef);

 ssize_t __kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos)
 {
@@ -574,6 +577,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_

        return ret;
 }
+EXPORT_SYMBOL_GPL(vfs_write);

 static inline loff_t file_pos_read(struct file *file)
 {

In short, vfs_read and some symbols are re-enabled this patch due to compatibility.

FomalhautWeisszwerg commented 6 years ago

@helektron A quick hack to fix this issue is applying patch provided by Debian or Ubuntu maintainers. http://cdn-fastly.deb.debian.org/debian/pool/main/l/linux/linux_4.17~rc7-1~exp1.debian.tar.xz

FomalhautWeisszwerg commented 6 years ago

Please try the commit 5e6140c4c7acb26d7c70d922f167e9131fb4b5f1

helektron commented 6 years ago

It's working. Thanks!!