Ideapad Gaming 3 16IAH7 WLAN 在 Linux Ubuntu 上无法使用,rtl8852be“make”错误

Ideapad Gaming 3 16IAH7 WLAN 在 Linux Ubuntu 上无法使用,rtl8852be“make”错误

我买了 ideapad gaming 3,有双启动和内核 5.19.0-45-generic,问题是我没有 wifi,做了以下研究:但在“make”部分有 2 个错误

sudo apt update
sudo apt install git bc
git clone https://github.com/HRex39/rtl8852be.git
cd rtl8852be
make
sudo make install
sudo modprobe 8852be

我犯了什么错误才能使用 wifi

弹出如下窗口:

#rm -f .symvers.8852be
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.19.0-45-generic/build M=/home/stiph/rtl8852be  modules
make[1]: se entra en el directorio '/usr/src/linux-headers-5.19.0-45-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
  CC [M]  /home/stiph/rtl8852be/platform/platform_linux_pc_pci.o
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_cache_wback’:
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c:21:17: error: implicit declaration of function ‘pci_dma_sync_single_for_device’; did you mean ‘dma_sync_single_for_device’? [-Werror=implicit-function-declaration]
   21 |                 pci_dma_sync_single_for_device(hwdev, *bus_addr, size,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 dma_sync_single_for_device
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_cache_inv’:
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c:30:17: error: implicit declaration of function ‘pci_dma_sync_single_for_cpu’; did you mean ‘dma_sync_single_for_cpu’? [-Werror=implicit-function-declaration]
   30 |                 pci_dma_sync_single_for_cpu(hwdev, *bus_addr, size, direction);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 dma_sync_single_for_cpu
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_get_bus_addr’:
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c:39:29: error: implicit declaration of function ‘pci_map_single’; did you mean ‘dma_map_single’? [-Werror=implicit-function-declaration]
   39 |                 *bus_addr = pci_map_single(hwdev, vir_addr, size, direction);
      |                             ^~~~~~~~~~~~~~
      |                             dma_map_single
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_unmap_bus_addr’:
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c:50:17: error: implicit declaration of function ‘pci_unmap_single’; did you mean ‘dma_unmap_single’? [-Werror=implicit-function-declaration]
   50 |                 pci_unmap_single(hwdev, *bus_addr, size, direction);
      |                 ^~~~~~~~~~~~~~~~
      |                 dma_unmap_single
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_free_noncache_mem’:
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c:97:17: error: implicit declaration of function ‘pci_free_consistent’ [-Werror=implicit-function-declaration]
   97 |                 pci_free_consistent(pdev, size, vir_addr, *bus_addr);
      |                 ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:257: /home/stiph/rtl8852be/platform/platform_linux_pc_pci.o] Error 1
make[1]: *** [Makefile:1857: /home/stiph/rtl8852be] Error 2
make[1]: se sale del directorio '/usr/src/linux-headers-5.19.0-45-generic'
make: *** [Makefile:637: modules] Error 2
stiph@StiphPC:~/rtl8852be$ sudo make install
[sudo] contraseña para stiph: 
install -p -m 644 8852be.ko  /lib/modules/5.19.0-45-generic/kernel/drivers/net/wireless/
install: no se puede efectuar `stat' sobre '8852be.ko': No existe el archivo o el directorio
make: *** [Makefile:646: install] Error 1
stiph@StiphPC:~/rtl8852be$ sudo modprobe 8852be
modprobe: FATAL: Module 8852be not found in directory /lib/modules/5.19.0-45-generic
stiph@StiphPC:~/rtl8852be$ make -j8
#rm -f .symvers.8852be
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.19.0-45-generic/build M=/home/stiph/rtl8852be  modules
make[1]: se entra en el directorio '/usr/src/linux-headers-5.19.0-45-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
  CC [M]  /home/stiph/rtl8852be/platform/platform_linux_pc_pci.o
  CC [M]  /home/stiph/rtl8852be/os_dep/osdep_service.o
  CC [M]  /home/stiph/rtl8852be/os_dep/osdep_service_linux.o
  CC [M]  /home/stiph/rtl8852be/os_dep/linux/rtw_cfg.o
  CC [M]  /home/stiph/rtl8852be/os_dep/linux/os_intfs.o
  CC [M]  /home/stiph/rtl8852be/os_dep/linux/ioctl_linux.o
  CC [M]  /home/stiph/rtl8852be/os_dep/linux/xmit_linux.o
  CC [M]  /home/stiph/rtl8852be/os_dep/linux/mlme_linux.o
/home/stiph/rtl8852be/os_dep/linux/os_intfs.c: In function ‘rtw_net_set_mac_address’:
/home/stiph/rtl8852be/os_dep/linux/os_intfs.c:79:28: warning: passing argument 1 of ‘_rtw_memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   79 |         _rtw_memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */
      |                     ~~~~~~~^~~~~~~~~~
In file included from /home/stiph/rtl8852be/include/drv_types.h:25,
                 from /home/stiph/rtl8852be/os_dep/linux/os_intfs.c:17:
/home/stiph/rtl8852be/include/osdep_service.h:281:24: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
  281 | void _rtw_memcpy(void *dec, const void *sour, u32 sz);
      |                  ~~~~~~^~~
/home/stiph/rtl8852be/os_dep/linux/os_intfs.c: In function ‘rtw_os_ndev_register’:
/home/stiph/rtl8852be/os_dep/linux/os_intfs.c:623:25: warning: passing argument 1 of ‘_rtw_memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  623 |         _rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN);
      |                     ~~~~^~~~~~~~~~
In file included from /home/stiph/rtl8852be/include/drv_types.h:25,
                 from /home/stiph/rtl8852be/os_dep/linux/os_intfs.c:17:
/home/stiph/rtl8852be/include/osdep_service.h:281:24: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
  281 | void _rtw_memcpy(void *dec, const void *sour, u32 sz);
      |                  ~~~~~~^~~
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_cache_wback’:
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c:21:17: error: implicit declaration of function ‘pci_dma_sync_single_for_device’; did you mean ‘dma_sync_single_for_device’? [-Werror=implicit-function-declaration]
   21 |                 pci_dma_sync_single_for_device(hwdev, *bus_addr, size,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 dma_sync_single_for_device
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_cache_inv’:
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c:30:17: error: implicit declaration of function ‘pci_dma_sync_single_for_cpu’; did you mean ‘dma_sync_single_for_cpu’? [-Werror=implicit-function-declaration]
   30 |                 pci_dma_sync_single_for_cpu(hwdev, *bus_addr, size, direction);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 dma_sync_single_for_cpu
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_get_bus_addr’:
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c:39:29: error: implicit declaration of function ‘pci_map_single’; did you mean ‘dma_map_single’? [-Werror=implicit-function-declaration]
   39 |                 *bus_addr = pci_map_single(hwdev, vir_addr, size, direction);
      |                             ^~~~~~~~~~~~~~
      |                             dma_map_single
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_unmap_bus_addr’:
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c:50:17: error: implicit declaration of function ‘pci_unmap_single’; did you mean ‘dma_unmap_single’? [-Werror=implicit-function-declaration]
   50 |                 pci_unmap_single(hwdev, *bus_addr, size, direction);
      |                 ^~~~~~~~~~~~~~~~
      |                 dma_unmap_single
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_free_noncache_mem’:
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c:97:17: error: implicit declaration of function ‘pci_free_consistent’ [-Werror=implicit-function-declaration]
   97 |                 pci_free_consistent(pdev, size, vir_addr, *bus_addr);
      |                 ^~~~~~~~~~~~~~~~~~~
  CC [M]  /home/stiph/rtl8852be/os_dep/linux/recv_linux.o
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:257: /home/stiph/rtl8852be/platform/platform_linux_pc_pci.o] Error 1
make[2]: *** Se espera a que terminen otras tareas....
/home/stiph/rtl8852be/os_dep/osdep_service_linux.c: In function ‘rtw_change_ifname’:
/home/stiph/rtl8852be/os_dep/osdep_service_linux.c:810:28: warning: passing argument 1 of ‘_rtw_memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  810 |         _rtw_memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN);
      |                     ~~~~~~~^~~~~~~~~~
/home/stiph/rtl8852be/os_dep/osdep_service_linux.c:48:24: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
   48 | void _rtw_memcpy(void *dst, const void *src, u32 sz)
      |                  ~~~~~~^~~
make[1]: *** [Makefile:1857: /home/stiph/rtl8852be] Error 2
make[1]: se sale del directorio '/usr/src/linux-headers-5.19.0-45-generic'
make: *** [Makefile:637: modules] Error 2
stiph@StiphPC:~/rtl8852be$ cd ..
stiph@StiphPC:~$ sudo apt update
Ign:1 cdrom://Ubuntu 22.04.2 LTS _Jammy Jellyfish_ - Release amd64 (20230223) jammy InRelease
Err:2 cdrom://Ubuntu 22.04.2 LTS _Jammy Jellyfish_ - Release amd64 (20230223) jammy Release
  Utilice «apt-cdrom» para hacer que APT reconozca este CD. No puede utilizar «apt-get update» para añadir nuevos CDs
Obj:3 http://security.ubuntu.com/ubuntu jammy-security InRelease
Obj:4 https://brave-browser-apt-release.s3.brave.com stable InRelease          
Obj:5 http://pe.archive.ubuntu.com/ubuntu jammy InRelease                      
Des:6 http://pe.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Des:7 http://pe.archive.ubuntu.com/ubuntu jammy-backports InRelease [108 kB]
Des:8 http://pe.archive.ubuntu.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [99,9 kB]
Des:9 http://pe.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [274 kB]
Des:10 http://pe.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 DEP-11 Metadata [940 B]
Des:11 http://pe.archive.ubuntu.com/ubuntu jammy-backports/main amd64 DEP-11 Metadata [7.988 B]
Des:12 http://pe.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 DEP-11 Metadata [16,9 kB]
Leyendo lista de paquetes... Hecho                                            
E: El repositorio «cdrom://Ubuntu 22.04.2 LTS _Jammy Jellyfish_ - Release amd64 (20230223) jammy Release» no tiene un fichero de Publicación.
N: No se puede actualizar de un repositorio como este de forma segura y por tanto está deshabilitado por omisión.
N: Vea la página de manual apt-secure(8) para los detalles sobre la creación de repositorios y la configuración de usuarios.
N: Omitiendo el uso del fichero configurado «main/binary-i386/Packages» ya que el repositorio «https://brave-browser-apt-release.s3.brave.com stable InRelease» no admite la arquitectura «i386»
stiph@StiphPC:~$ sudo apt install git bc
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias... Hecho
Leyendo la información de estado... Hecho
bc ya está en su versión más reciente (1.07.1-3build1).
git ya está en su versión más reciente (1:2.34.1-1ubuntu1.9).
0 actualizados, 0 nuevos se instalarán, 0 para eliminar y 4 no actualizados.
stiph@StiphPC:~$ git clone https://github.com/HRex39/rtl8852be.git
fatal: la ruta de destino 'rtl8852be' ya existe y no es un directorio vacío.
stiph@StiphPC:~$ git clone https://github.com/HRex39/rtl8852be.git
fatal: la ruta de destino 'rtl8852be' ya existe y no es un directorio vacío.
stiph@StiphPC:~$ cd rtl8852be
stiph@StiphPC:~/rtl8852be$ make
#rm -f .symvers.8852be
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.19.0-45-generic/build M=/home/stiph/rtl8852be  modules
make[1]: se entra en el directorio '/usr/src/linux-headers-5.19.0-45-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
  CC [M]  /home/stiph/rtl8852be/platform/platform_linux_pc_pci.o
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_cache_wback’:
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c:21:17: error: implicit declaration of function ‘pci_dma_sync_single_for_device’; did you mean ‘dma_sync_single_for_device’? [-Werror=implicit-function-declaration]
   21 |                 pci_dma_sync_single_for_device(hwdev, *bus_addr, size,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 dma_sync_single_for_device
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_cache_inv’:
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c:30:17: error: implicit declaration of function ‘pci_dma_sync_single_for_cpu’; did you mean ‘dma_sync_single_for_cpu’? [-Werror=implicit-function-declaration]
   30 |                 pci_dma_sync_single_for_cpu(hwdev, *bus_addr, size, direction);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 dma_sync_single_for_cpu
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_get_bus_addr’:
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c:39:29: error: implicit declaration of function ‘pci_map_single’; did you mean ‘dma_map_single’? [-Werror=implicit-function-declaration]
   39 |                 *bus_addr = pci_map_single(hwdev, vir_addr, size, direction);
      |                             ^~~~~~~~~~~~~~
      |                             dma_map_single
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_unmap_bus_addr’:
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c:50:17: error: implicit declaration of function ‘pci_unmap_single’; did you mean ‘dma_unmap_single’? [-Werror=implicit-function-declaration]
   50 |                 pci_unmap_single(hwdev, *bus_addr, size, direction);
      |                 ^~~~~~~~~~~~~~~~
      |                 dma_unmap_single
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_free_noncache_mem’:
/home/stiph/rtl8852be/platform/platform_linux_pc_pci.c:97:17: error: implicit declaration of function ‘pci_free_consistent’ [-Werror=implicit-function-declaration]
   97 |                 pci_free_consistent(pdev, size, vir_addr, *bus_addr);
      |                 ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:257: /home/stiph/rtl8852be/platform/platform_linux_pc_pci.o] Error 1
make[1]: *** [Makefile:1857: /home/stiph/rtl8852be] Error 2
make[1]: se sale del directorio '/usr/src/linux-headers-5.19.0-45-generic'
make: *** [Makefile:637: modules] Error 2

帮助

相关内容