Broadcom 14e4:43ae wifi 控制器的 Backport 安装脚本失败
Backport installation script for Broadcom 14e4:43ae wifi controller fails
最近买了一台联想500-15ACZ笔记本,装了Ubuntu16.04。安装后发现无法连接wifi。当我用谷歌搜索这个问题时,这似乎是 Broadcom wifi 卡的常见问题。我在 askubuntu 上找到 this question 并按照 Luis Alvarado 的回答步骤进行操作。
命令lspci -nn -d 14e4:
显示我设备的pci.id是14e4:43ae rev 02
,Linux.
还不支持
但是,git 上有一个脚本 (link to project) 试图通过向后移植解决此问题:
#!/bin/bash
cd /tmp
git clone https://github.com/kvalo/ath10k-firmware.git
cd ath10k-firmware/QCA9377/hw1.0
sudo mkdir -p /lib/firmware/ath10k/QCA9377/hw1.0
sudo cp board.bin /lib/firmware/ath10k/QCA9377/hw1.0
sudo cp firmware-5.bin_WLAN.TF.1.0-00267-1 /lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin
sudo modprobe -r ath10k_pci
cd /tmp
wget https://www.kernel.org/pub/linux/kernel/projects/backports/2015/11/20/backports-20151120.tar.gz
tar -xf backports-20151120.tar.gz
cd backports-20151120
make defconfig-ath10k
make
sudo make install
但是当我尝试 运行 这个时,make
抛出了以下错误:
Building backport-include/backport/autoconf.h ... done.
CC [M] /tmp/backports-20151120/compat/main.o
In file included from /tmp/backports-20151120/backport-include/backport/backport.h:7:0,
from :0:
./include/asm-generic/qrwlock.h: In function ‘__qrwlock_write_byte’:
/tmp/backports-20151120/backport-include/linux/kconfig.h:25:28: error: implicit declaration of function ‘config_enabled’ [-Werror=implicit-function-declaration]
#define IS_BUILTIN(option) config_enabled(option)
^
./include/asm-generic/qrwlock.h:156:26: note: in expansion of macro ‘IS_BUILTIN’
return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN);
^
./include/asm-generic/qrwlock.h:156:37: error: ‘CONFIG_CPU_BIG_ENDIAN’ undeclared (first use in this function)
return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN);
^
/tmp/backports-20151120/backport-include/linux/kconfig.h:25:43: note: in definition of macro ‘IS_BUILTIN’
#define IS_BUILTIN(option) config_enabled(option)
^
./include/asm-generic/qrwlock.h:156:37: note: each undeclared identifier is reported only once for each function it appears in
return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN);
^
/tmp/backports-20151120/backport-include/linux/kconfig.h:25:43: note: in definition of macro ‘IS_BUILTIN’
#define IS_BUILTIN(option) config_enabled(option)
^
cc1: some warnings being treated as errors
scripts/Makefile.build:294: recipe for target '/tmp/backports-20151120/compat/main.o' failed
make[6]: *** [/tmp/backports-20151120/compat/main.o] Error 1
scripts/Makefile.build:567: recipe for target '/tmp/backports-20151120/compat' failed
make[5]: *** [/tmp/backports-20151120/compat] Error 2
Makefile:1524: recipe for target '_module_/tmp/backports-20151120' failed
make[4]: *** [_module_/tmp/backports-20151120] Error 2
Makefile.build:6: recipe for target 'modules' failed
make[3]: *** [modules] Error 2
Makefile.real:88: recipe for target 'modules' failed
make[2]: *** [modules] Error 2
Makefile:40: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
Makefile:30: recipe for target 'default' failed
make: *** [default] Error 2
CC [M] /tmp/backports-20151120/compat/main.o
In file included from /tmp/backports-20151120/backport-include/backport/backport.h:7:0,
from :0:
./include/asm-generic/qrwlock.h: In function ‘__qrwlock_write_byte’:
/tmp/backports-20151120/backport-include/linux/kconfig.h:25:28: error: implicit declaration of function ‘config_enabled’ [-Werror=implicit-function-declaration]
#define IS_BUILTIN(option) config_enabled(option)
^
./include/asm-generic/qrwlock.h:156:26: note: in expansion of macro ‘IS_BUILTIN’
return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN);
^
./include/asm-generic/qrwlock.h:156:37: error: ‘CONFIG_CPU_BIG_ENDIAN’ undeclared (first use in this function)
return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN);
^
/tmp/backports-20151120/backport-include/linux/kconfig.h:25:43: note: in definition of macro ‘IS_BUILTIN’
#define IS_BUILTIN(option) config_enabled(option)
^
./include/asm-generic/qrwlock.h:156:37: note: each undeclared identifier is reported only once for each function it appears in
return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN);
^
/tmp/backports-20151120/backport-include/linux/kconfig.h:25:43: note: in definition of macro ‘IS_BUILTIN’
#define IS_BUILTIN(option) config_enabled(option)
^
cc1: some warnings being treated as errors
scripts/Makefile.build:294: recipe for target '/tmp/backports-20151120/compat/main.o' failed
make[5]: *** [/tmp/backports-20151120/compat/main.o] Error 1
scripts/Makefile.build:567: recipe for target '/tmp/backports-20151120/compat' failed
make[4]: *** [/tmp/backports-20151120/compat] Error 2
Makefile:1524: recipe for target '_module_/tmp/backports-20151120' failed
make[3]: *** [_module_/tmp/backports-20151120] Error 2
Makefile.build:6: recipe for target 'modules' failed
make[2]: *** [modules] Error 2
Makefile.real:88: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
Makefile:40: recipe for target 'install' failed
make: *** [install] Error 2
**Does anyone know how to fix this?**
Please let me know if you need any other info.
Thanks in advance!
更新:
我按照你的建议安装了 broadcom-sta-dkms 包。不幸的是,你是对的;这没有用。
当我尝试 wl 驱动程序时,dmesg | grep -i wl
返回
[
12.459884] wl: loading out-of-tree module taints kernel.
[ 12.459890] wl: module license 'MIXED/Proprietary' taints kernel.
[ 12.468203] wl: module verification failed: signature and/or required key missing - tainting kernel
[ 12.487603] wl driver 6.30.223.271 (r587334) failed with code 1001
[ 12.487606] ERROR @wl_cfg80211_detach :
[ 12.487607] NULL ndev->ieee80211ptr, unable to deref wl
但是,恐怕我不确定这意味着什么。对于其他驱动程序,dmesg 没有返回任何内容。
嗯,我建议保持一致。您有一个 Wi-Fi 设备并且知道它的 PCI 供应商 ID(位于冒号之前)和设备 ID - 14e4:43ae。在您的问题中,您没有提供 lspci
的完整摘录,因此不清楚您的设备是否确实被识别为 Broadcom。但是,如果我们假设它是真的,我们可以搜索它。
WikiDevi page 是这样说的:
802.11a/b/g/n/ac WLAN + Bluetooth 4.0 NGFF 2230 Mini Card
WI1 chip1: Broadcom BCM43162
Probable Linux driver unknown
PCI ID not yet observed in any mainline kernel / this list
因此,正如您可能看到的那样,此页面阐明了诸如芯片命名和当前对此类 PCI ID 的内核代码感知的观察等重要事项。后者意味着,根据他们的研究,主内核树中没有一个 driver 在相应的 PCI ID table 中具有这样的 ID,内核通过它决定探测特定的 driver 对于给定的设备。对 PCI ID 一无所知。
但现在我们可以确定这确实是一台 Broadcom 设备。
查看您的脚本摘录(您正在尝试使用)让我很困惑,因为它适用于 Qualcomm Atheros,not 博通。它试图从(可能)不受信任的存储库中获取 QCA 固件并编译 ath10k
向后移植 driver。所以,在这一点上,我们知道仅仅关于编译错误的问题从一开始就没有帮助。但是,当然,有人可能会假设 Linux 内核 headers 软件包未安装,或者向后移植 ath10k
的版本与您当前的内核不兼容。就是这样。
因此,很明显,我们应该寻找 Broadcom drivers(并且可能寻找 Broadcom 固件)。从这个角度来看,我可以告诉您三种类型的 drivers 可用于 Broadcom 设备:b43
(主要是旧版),vendor-licensed broadcom-sta
(wl
)和 in-tree brcm80211
。后一个是 brcmsmac
和 brcmfmac
的通用名称。
以下是包含 up-to-date 信息的权威页面:
b43 - http://linuxwireless.org/en/users/Drivers/b43/
brcm80211 - https://wireless.wiki.kernel.org/en/users/drivers/brcm80211
此外,vendor-licensed wl
的或多或少的描述性页面:
我在两个页面上都找不到您的 PCI ID。这确实证实了还没有添加相应的支持。但是,我们可以通过尝试手上的 driver 来进一步确认这一点。很明显 in-kernel b43
和 brcm80211
不适合你,但看看 dmesg
可能会有用 - 也许 brcm80211
是已加载但找不到固件。
如果没有找到有用的东西,那么试试wl
就好了。这个 driver 是通过 broadcom-sta
软件包(Debian,Ubuntu)分发的,我可以在 Ubuntu 网站上提到相应的 description。
所以,要尝试 wl
你需要确保你有合适的 Linux headers 然后安装 broadcom-sta-dkms
包。
apt-get update
apt-get install linux-headers-$(uname -r)
apt-get install broadcom-sta-dkms
希望它能编译安装。然后你应该重新启动并看看你的 Wi-Fi 发生了什么。这很可能无济于事(因为我想您的设备确实还不受支持),但如果它有效,您将能够使用它。即使您确定您的设备无法与 wl
一起使用,同样,就像 brcm80211
的情况一样,也值得查看 dmesg
输出。然而,例如,寻找有效的固件图像(如果 dmesg
抱怨它)是一个单独的问题,应该相应地讨论。
另外,我可以扩展这个话题,并提到在网络上的某些邮件列表中,一些人已经询问了增加对该设备的支持的计划。这里是one of the links. So, if neither brcm80211
nor wl
(broadcom-sta-dkms
) help you, you may consider sending an email to one of brcm80211
supporters. Their names and email addresses are listed on the page。其中就有博通的员工。如果你向他们寻求好的建议,你也会帮助其他人。
更新
所以,你说b43
(也b43_legacy
)和brcm80211
在dmesg
保持沉默。这可能意味着这些 driver 不支持您的 PCI ID。
wl
输出是什么,我可以分享我的输出进行比较:
wl: loading out-of-tree module taints kernel.
wl: module license 'MIXED/Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
wlan0: Broadcom BCM43a0 802.11 Hybrid Wireless Controller 6.30.223.271 (r587334)
这显然意味着你的输出减去这个输出再次给出某种沉默。但是,很难确定您的设备是否不受支持或存在固件问题。
因此,这里似乎没有其他选择。
但是,您仍然可以考虑 ndiswrapper
解决方案。简而言之,它是一个特殊的 tool/driver,它使您能够从 Windows 安装适当的 inf 和 sys 文件driver(即您应该从某个地方为您的卡获取它,例如从 CD 中提取或从 Broadcom 网站下载),这样 driver 将在 Linux 中正常运行在 Windows 环境中。这种类型的解决方案有其缺点和局限性。首先,只支持 Windows XP 版本的无线 drivers,所以如果你有,比如说,来自供应商网站的 ZIP 包,你需要提取 inf 和sys文件来自以WindowsXP命名的目录(不是Vista/7/10),需要注意CPU体系结构选择(32 位/64 位)。这是来自 Debian 的 article,其中 c也适合 Ubuntu。但是这种解决方案总体上可能会面临一些额外的缺点和突然的糟糕操作(这是一个单独的话题),而且通常它被认为是缺少 driver 的糟糕解决方案。因此,在这种情况下,许多人更愿意将他们不受支持的卡换成其他卡,或者只是等到缺少的支持被添加到本地 driver 之一。由你决定。
最近买了一台联想500-15ACZ笔记本,装了Ubuntu16.04。安装后发现无法连接wifi。当我用谷歌搜索这个问题时,这似乎是 Broadcom wifi 卡的常见问题。我在 askubuntu 上找到 this question 并按照 Luis Alvarado 的回答步骤进行操作。
命令lspci -nn -d 14e4:
显示我设备的pci.id是14e4:43ae rev 02
,Linux.
还不支持
但是,git 上有一个脚本 (link to project) 试图通过向后移植解决此问题:
#!/bin/bash cd /tmp git clone https://github.com/kvalo/ath10k-firmware.git cd ath10k-firmware/QCA9377/hw1.0 sudo mkdir -p /lib/firmware/ath10k/QCA9377/hw1.0 sudo cp board.bin /lib/firmware/ath10k/QCA9377/hw1.0 sudo cp firmware-5.bin_WLAN.TF.1.0-00267-1 /lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin sudo modprobe -r ath10k_pci cd /tmp wget https://www.kernel.org/pub/linux/kernel/projects/backports/2015/11/20/backports-20151120.tar.gz tar -xf backports-20151120.tar.gz cd backports-20151120 make defconfig-ath10k make sudo make install
但是当我尝试 运行 这个时,make
抛出了以下错误:
Building backport-include/backport/autoconf.h ... done. CC [M] /tmp/backports-20151120/compat/main.o In file included from /tmp/backports-20151120/backport-include/backport/backport.h:7:0, from :0: ./include/asm-generic/qrwlock.h: In function ‘__qrwlock_write_byte’: /tmp/backports-20151120/backport-include/linux/kconfig.h:25:28: error: implicit declaration of function ‘config_enabled’ [-Werror=implicit-function-declaration] #define IS_BUILTIN(option) config_enabled(option) ^ ./include/asm-generic/qrwlock.h:156:26: note: in expansion of macro ‘IS_BUILTIN’ return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); ^ ./include/asm-generic/qrwlock.h:156:37: error: ‘CONFIG_CPU_BIG_ENDIAN’ undeclared (first use in this function) return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); ^ /tmp/backports-20151120/backport-include/linux/kconfig.h:25:43: note: in definition of macro ‘IS_BUILTIN’ #define IS_BUILTIN(option) config_enabled(option) ^ ./include/asm-generic/qrwlock.h:156:37: note: each undeclared identifier is reported only once for each function it appears in return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); ^ /tmp/backports-20151120/backport-include/linux/kconfig.h:25:43: note: in definition of macro ‘IS_BUILTIN’ #define IS_BUILTIN(option) config_enabled(option) ^ cc1: some warnings being treated as errors scripts/Makefile.build:294: recipe for target '/tmp/backports-20151120/compat/main.o' failed make[6]: *** [/tmp/backports-20151120/compat/main.o] Error 1 scripts/Makefile.build:567: recipe for target '/tmp/backports-20151120/compat' failed make[5]: *** [/tmp/backports-20151120/compat] Error 2 Makefile:1524: recipe for target '_module_/tmp/backports-20151120' failed make[4]: *** [_module_/tmp/backports-20151120] Error 2 Makefile.build:6: recipe for target 'modules' failed make[3]: *** [modules] Error 2 Makefile.real:88: recipe for target 'modules' failed make[2]: *** [modules] Error 2 Makefile:40: recipe for target 'modules' failed make[1]: *** [modules] Error 2 Makefile:30: recipe for target 'default' failed make: *** [default] Error 2 CC [M] /tmp/backports-20151120/compat/main.o In file included from /tmp/backports-20151120/backport-include/backport/backport.h:7:0, from :0: ./include/asm-generic/qrwlock.h: In function ‘__qrwlock_write_byte’: /tmp/backports-20151120/backport-include/linux/kconfig.h:25:28: error: implicit declaration of function ‘config_enabled’ [-Werror=implicit-function-declaration] #define IS_BUILTIN(option) config_enabled(option) ^ ./include/asm-generic/qrwlock.h:156:26: note: in expansion of macro ‘IS_BUILTIN’ return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); ^ ./include/asm-generic/qrwlock.h:156:37: error: ‘CONFIG_CPU_BIG_ENDIAN’ undeclared (first use in this function) return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); ^ /tmp/backports-20151120/backport-include/linux/kconfig.h:25:43: note: in definition of macro ‘IS_BUILTIN’ #define IS_BUILTIN(option) config_enabled(option) ^ ./include/asm-generic/qrwlock.h:156:37: note: each undeclared identifier is reported only once for each function it appears in return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); ^ /tmp/backports-20151120/backport-include/linux/kconfig.h:25:43: note: in definition of macro ‘IS_BUILTIN’ #define IS_BUILTIN(option) config_enabled(option) ^ cc1: some warnings being treated as errors scripts/Makefile.build:294: recipe for target '/tmp/backports-20151120/compat/main.o' failed make[5]: *** [/tmp/backports-20151120/compat/main.o] Error 1 scripts/Makefile.build:567: recipe for target '/tmp/backports-20151120/compat' failed make[4]: *** [/tmp/backports-20151120/compat] Error 2 Makefile:1524: recipe for target '_module_/tmp/backports-20151120' failed make[3]: *** [_module_/tmp/backports-20151120] Error 2 Makefile.build:6: recipe for target 'modules' failed make[2]: *** [modules] Error 2 Makefile.real:88: recipe for target 'modules' failed make[1]: *** [modules] Error 2 Makefile:40: recipe for target 'install' failed make: *** [install] Error 2
**Does anyone know how to fix this?**
Please let me know if you need any other info.
Thanks in advance!
更新:
我按照你的建议安装了 broadcom-sta-dkms 包。不幸的是,你是对的;这没有用。
当我尝试 wl 驱动程序时,dmesg | grep -i wl
返回
[但是,恐怕我不确定这意味着什么。对于其他驱动程序,dmesg 没有返回任何内容。12.459884] wl: loading out-of-tree module taints kernel. [ 12.459890] wl: module license 'MIXED/Proprietary' taints kernel. [ 12.468203] wl: module verification failed: signature and/or required key missing - tainting kernel [ 12.487603] wl driver 6.30.223.271 (r587334) failed with code 1001 [ 12.487606] ERROR @wl_cfg80211_detach : [ 12.487607] NULL ndev->ieee80211ptr, unable to deref wl
嗯,我建议保持一致。您有一个 Wi-Fi 设备并且知道它的 PCI 供应商 ID(位于冒号之前)和设备 ID - 14e4:43ae。在您的问题中,您没有提供 lspci
的完整摘录,因此不清楚您的设备是否确实被识别为 Broadcom。但是,如果我们假设它是真的,我们可以搜索它。
WikiDevi page 是这样说的:
802.11a/b/g/n/ac WLAN + Bluetooth 4.0 NGFF 2230 Mini Card
WI1 chip1: Broadcom BCM43162
Probable Linux driver unknown
PCI ID not yet observed in any mainline kernel / this list
因此,正如您可能看到的那样,此页面阐明了诸如芯片命名和当前对此类 PCI ID 的内核代码感知的观察等重要事项。后者意味着,根据他们的研究,主内核树中没有一个 driver 在相应的 PCI ID table 中具有这样的 ID,内核通过它决定探测特定的 driver 对于给定的设备。对 PCI ID 一无所知。
但现在我们可以确定这确实是一台 Broadcom 设备。
查看您的脚本摘录(您正在尝试使用)让我很困惑,因为它适用于 Qualcomm Atheros,not 博通。它试图从(可能)不受信任的存储库中获取 QCA 固件并编译 ath10k
向后移植 driver。所以,在这一点上,我们知道仅仅关于编译错误的问题从一开始就没有帮助。但是,当然,有人可能会假设 Linux 内核 headers 软件包未安装,或者向后移植 ath10k
的版本与您当前的内核不兼容。就是这样。
因此,很明显,我们应该寻找 Broadcom drivers(并且可能寻找 Broadcom 固件)。从这个角度来看,我可以告诉您三种类型的 drivers 可用于 Broadcom 设备:b43
(主要是旧版),vendor-licensed broadcom-sta
(wl
)和 in-tree brcm80211
。后一个是 brcmsmac
和 brcmfmac
的通用名称。
以下是包含 up-to-date 信息的权威页面:
b43 - http://linuxwireless.org/en/users/Drivers/b43/
brcm80211 - https://wireless.wiki.kernel.org/en/users/drivers/brcm80211
此外,vendor-licensed wl
的或多或少的描述性页面:
我在两个页面上都找不到您的 PCI ID。这确实证实了还没有添加相应的支持。但是,我们可以通过尝试手上的 driver 来进一步确认这一点。很明显 in-kernel b43
和 brcm80211
不适合你,但看看 dmesg
可能会有用 - 也许 brcm80211
是已加载但找不到固件。
如果没有找到有用的东西,那么试试wl
就好了。这个 driver 是通过 broadcom-sta
软件包(Debian,Ubuntu)分发的,我可以在 Ubuntu 网站上提到相应的 description。
所以,要尝试 wl
你需要确保你有合适的 Linux headers 然后安装 broadcom-sta-dkms
包。
apt-get update
apt-get install linux-headers-$(uname -r)
apt-get install broadcom-sta-dkms
希望它能编译安装。然后你应该重新启动并看看你的 Wi-Fi 发生了什么。这很可能无济于事(因为我想您的设备确实还不受支持),但如果它有效,您将能够使用它。即使您确定您的设备无法与 wl
一起使用,同样,就像 brcm80211
的情况一样,也值得查看 dmesg
输出。然而,例如,寻找有效的固件图像(如果 dmesg
抱怨它)是一个单独的问题,应该相应地讨论。
另外,我可以扩展这个话题,并提到在网络上的某些邮件列表中,一些人已经询问了增加对该设备的支持的计划。这里是one of the links. So, if neither brcm80211
nor wl
(broadcom-sta-dkms
) help you, you may consider sending an email to one of brcm80211
supporters. Their names and email addresses are listed on the page。其中就有博通的员工。如果你向他们寻求好的建议,你也会帮助其他人。
更新
所以,你说b43
(也b43_legacy
)和brcm80211
在dmesg
保持沉默。这可能意味着这些 driver 不支持您的 PCI ID。
wl
输出是什么,我可以分享我的输出进行比较:
wl: loading out-of-tree module taints kernel.
wl: module license 'MIXED/Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
wlan0: Broadcom BCM43a0 802.11 Hybrid Wireless Controller 6.30.223.271 (r587334)
这显然意味着你的输出减去这个输出再次给出某种沉默。但是,很难确定您的设备是否不受支持或存在固件问题。
因此,这里似乎没有其他选择。
但是,您仍然可以考虑 ndiswrapper
解决方案。简而言之,它是一个特殊的 tool/driver,它使您能够从 Windows 安装适当的 inf 和 sys 文件driver(即您应该从某个地方为您的卡获取它,例如从 CD 中提取或从 Broadcom 网站下载),这样 driver 将在 Linux 中正常运行在 Windows 环境中。这种类型的解决方案有其缺点和局限性。首先,只支持 Windows XP 版本的无线 drivers,所以如果你有,比如说,来自供应商网站的 ZIP 包,你需要提取 inf 和sys文件来自以WindowsXP命名的目录(不是Vista/7/10),需要注意CPU体系结构选择(32 位/64 位)。这是来自 Debian 的 article,其中 c也适合 Ubuntu。但是这种解决方案总体上可能会面临一些额外的缺点和突然的糟糕操作(这是一个单独的话题),而且通常它被认为是缺少 driver 的糟糕解决方案。因此,在这种情况下,许多人更愿意将他们不受支持的卡换成其他卡,或者只是等到缺少的支持被添加到本地 driver 之一。由你决定。