fastoe / RTL8812BU_for_Raspbian

RTL8812BU Driver for Raspbian
69 stars 19 forks source link

Not working on my Raspberry Pi 4 after RPI-UPDATE #7

Closed MrAppAndCrap closed 3 years ago

MrAppAndCrap commented 3 years ago

Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster

Linux raspberrypi 5.10.17-v7l+ #1421 SMP Thu May 27 14:00:13 BST 2021 armv7l GNU/Linux

Following all the instructions ends in error 1 & 2.

`make[1]: Entering directory '/usr/src/linux-headers-5.10.17-v7l+' CC [M] /root/RTL8812BU_for_Raspbian/core/rtw_cmd.o In file included from /root/RTL8812BU_for_Raspbian/include/drv_conf.h:17, from /root/RTL8812BU_for_Raspbian/include/drv_types.h:25, from /root/RTL8812BU_for_Raspbian/core/rtw_cmd.c:17: /root/RTL8812BU_for_Raspbian/include/autoconf.h:183: warning: "CONFIG_RTW_SW_LED" redefined

define CONFIG_RTW_SW_LED

: note: this is the location of the previous definition In file included from /root/RTL8812BU_for_Raspbian/include/drv_types.h:79, from /root/RTL8812BU_for_Raspbian/core/rtw_cmd.c:17: /root/RTL8812BU_for_Raspbian/include/rtw_security.h:257:8: error: redefinition of ‘struct sha256_state’ struct sha256_state { ^~~~~~~~~~~~ In file included from ./include/linux/filter.h:24, from ./include/net/sock.h:59, from ./include/linux/tcp.h:19, from ./include/linux/ipv6.h:88, from ./include/net/addrconf.h:50, from /root/RTL8812BU_for_Raspbian/include/osdep_service_linux.h:48, from /root/RTL8812BU_for_Raspbian/include/osdep_service.h:50, from /root/RTL8812BU_for_Raspbian/include/drv_types.h:27, from /root/RTL8812BU_for_Raspbian/core/rtw_cmd.c:17: ./include/crypto/sha.h:84:8: note: originally defined here struct sha256_state { ^~~~~~~~~~~~ make[2]: *** [scripts/Makefile.build:279: /root/RTL8812BU_for_Raspbian/core/rtw_cmd.o] Error 1 make[1]: *** [Makefile:1804: /root/RTL8812BU_for_Raspbian] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.10.17-v7l+' make: *** [Makefile:2290: modules] Error 2 root@raspberrypi:~/RTL8812BU_for_Raspbian# root@raspberrypi:~/RTL8812BU_for_Raspbian# sudo make install install -p -m 644 88x2bu.ko /lib/modules/5.10.17-v7l+/kernel/drivers/net/wireless/ install: cannot stat '88x2bu.ko': No such file or directory `
MrAppAndCrap commented 3 years ago

Update: Got it working using:

sudo apt update sudo apt install -y bc git dkms build-essential raspberrypi-kernel-headers git clone -b v5.6.1 https://github.com/fastoe/RTL8812BU_for_Raspbian cd RTL8812BU_for_Raspbian make sudo make install sudo reboot

MrAppAndCrap commented 3 years ago

Yeah it's not working again after I updated. Not sure how I got it working last time.

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Kernel: 5.10.17-v7l+ #1421 SMP Thu May 27 14:00:13 BST 2021 armv7l GNU/Linux

make[2]: [scripts/Makefile.build:279: /home/pi/RTL8812BU_for_Raspbian/core/rtw_cmd.o] Error 1 make[1]: [Makefile:1804: /home/pi/RTL8812BU_for_Raspbian] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.10.17-v7l+' make: [Makefile:2290: modules] Error 2 root@raspberrypi:/home/pi/RTL8812BU_for_Raspbian# sudo make install install -p -m 644 88x2bu.ko /lib/modules/5.10.17-v7l+/kernel/drivers/net/wireless/ install: cannot stat '88x2bu.ko': No such file or directory make: [Makefile:2296: install] Error 1 root@raspberrypi:/home/pi/RTL8812BU_for_Raspbian# sudo reboot

That's the error I get now after I did rpi-update.

Tried this code again but it did not work:

sudo apt update sudo apt install -y bc git dkms build-essential raspberrypi-kernel-headers git clone -b v5.6.1 https://github.com/fastoe/RTL8812BU_for_Raspbian cd RTL8812BU_for_Raspbian make sudo make install sudo reboot

MrAppAndCrap commented 3 years ago

Bump @fastoe

fastoe commented 3 years ago

I tested a 5.10.17-v7l+ firmware and cloned the v5.6.1 branch, make and everything is OK.

I adjusted the compilation instructions, please check the instructions and try again, I guess there may be some problem with your system environment.

My build log:

pi@raspberrypi:~/RTL8812BU_for_Raspbian $ make
make ARCH=arm CROSS_COMPILE= -C /lib/modules/5.10.17-v7l+/build M=/home/pi/RTL8812BU_for_Raspbian  modules
make[1]: Entering directory '/home/pi/linux-3a33f11c48572b9dd0fecac164b3990fc9234da8'
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_cmd.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_security.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_debug.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_io.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_ioctl_query.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_ioctl_set.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_ieee80211.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_mlme.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_mlme_ext.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_mi.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_wlan_util.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_vht.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_pwrctrl.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_rf.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_chplan.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_recv.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_sta_mgt.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_ap.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/mesh/rtw_mesh.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/mesh/rtw_mesh_pathtbl.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/mesh/rtw_mesh_hwmp.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_xmit.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_p2p.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_rson.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_tdls.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_br_ext.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_iol.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_sreset.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_btcoex_wifionly.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_btcoex.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_beamforming.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_odm.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_rm.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_rm_fsm.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/efuse/rtw_efuse.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/os_dep/osdep_service.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/os_dep/linux/os_intfs.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/os_dep/linux/usb_intf.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/os_dep/linux/usb_ops_linux.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/os_dep/linux/ioctl_linux.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/os_dep/linux/xmit_linux.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/os_dep/linux/mlme_linux.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/os_dep/linux/recv_linux.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/os_dep/linux/ioctl_cfg80211.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/os_dep/linux/rtw_cfgvendor.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/os_dep/linux/wifi_regd.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/os_dep/linux/rtw_android.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/os_dep/linux/rtw_proc.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/os_dep/linux/rtw_rhashtable.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/os_dep/linux/ioctl_mp.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/hal_intf.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/hal_com.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/hal_com_phycfg.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/hal_phy.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/hal_dm.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/hal_dm_acs.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/hal_btcoex_wifionly.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/hal_btcoex.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/hal_mp.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/hal_mcc.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/hal_hci/hal_usb.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/led/hal_led.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/led/hal_usb_led.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/rtl8822b/rtl8822b_halinit.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/rtl8822b/rtl8822b_mac.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/rtl8822b/rtl8822b_cmd.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/rtl8822b/rtl8822b_phy.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/rtl8822b/rtl8822b_ops.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/rtl8822b/hal8822b_fw.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/rtl8822b/usb/rtl8822bu_halinit.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/rtl8822b/usb/rtl8822bu_halmac.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/rtl8822b/usb/rtl8822bu_io.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/rtl8822b/usb/rtl8822bu_xmit.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/rtl8822b/usb/rtl8822bu_recv.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/rtl8822b/usb/rtl8822bu_led.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/rtl8822b/usb/rtl8822bu_ops.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/efuse/rtl8822b/HalEfuseMask8822B_USB.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/hal_halmac.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_api.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_bb_rf_88xx.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_cfg_wmac_88xx.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_common_88xx.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_efuse_88xx.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_flash_88xx.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_fw_88xx.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_gpio_88xx.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_init_88xx.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_mimo_88xx.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_usb_88xx.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_8822b/halmac_cfg_wmac_8822b.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_8822b/halmac_common_8822b.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_8822b/halmac_gpio_8822b.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_8822b/halmac_init_8822b.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_8822b/halmac_phy_8822b.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_8822b/halmac_pwr_seq_8822b.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/halmac/halmac_88xx/halmac_8822b/halmac_usb_8822b.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_debug.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_antdiv.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_soml.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_smt_ant.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_antdect.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_interface.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_phystatus.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_hwconfig.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_dig.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_pathdiv.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_rainfo.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_dynamictxpower.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_adaptivity.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_cfotracking.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_noisemonitor.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_beamforming.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_dfs.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/txbf/halcomtxbf.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/txbf/haltxbfinterface.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/txbf/phydm_hal_txbf_api.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_adc_sampling.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_ccx.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_psd.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_primary_cca.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_cck_pd.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_rssi_monitor.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_auto_dbg.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_math_lib.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_api.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_pow_train.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_lna_sat.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_pmac_tx_setting.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/phydm_mp.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/halrf/halrf.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/halrf/halrf_debug.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/halrf/halphyrf_ce.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/halrf/halrf_powertracking_ce.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/halrf/halrf_powertracking.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/halrf/halrf_kfree.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/rtl8822b/halhwimg8822b_bb.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/rtl8822b/halhwimg8822b_mac.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/rtl8822b/halhwimg8822b_rf.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/halrf/rtl8822b/halrf_8822b.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/rtl8822b/phydm_hal_api8822b.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/halrf/rtl8822b/halrf_iqk_8822b.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/halrf/rtl8822b/halrf_rfk_init_8822b.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/rtl8822b/phydm_regconfig8822b.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/rtl8822b/phydm_rtl8822b.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/phydm/txbf/haltxbf8822b.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/btc/halbtc8822bwifionly.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/btc/halbtc8822b1ant.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/hal/btc/halbtc8822b2ant.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/platform/platform_ops.o
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/core/rtw_mp.o
  LD [M]  /home/pi/RTL8812BU_for_Raspbian/88x2bu.o
  MODPOST /home/pi/RTL8812BU_for_Raspbian/Module.symvers
  CC [M]  /home/pi/RTL8812BU_for_Raspbian/88x2bu.mod.o
  LD [M]  /home/pi/RTL8812BU_for_Raspbian/88x2bu.ko
make[1]: Leaving directory /home/pi/linux-3a33f11c48572b9dd0fecac164b3990fc9234da8

pi@raspberrypi:~/RTL8812BU_for_Raspbian $ sudo make install
install -p -m 644 88x2bu.ko  /lib/modules/5.10.17-v7l+/kernel/drivers/net/wireless/
/sbin/depmod -a 5.10.17-v7l+
MrAppAndCrap commented 3 years ago

Thank you fastoe!