MacMini2014安装飞牛后wifi无驱动不识别(Broadcom 4360)的解决办法 Linux MacOS fnOS

mowen 2025-09-13 7

MacMini2014安装飞牛后没有wifi,查看:

dmesg -T
[ 8104.200984] b43-phy3: Broadcom 4360 WLAN found (core revision 42)
[ 8104.201424] b43-phy3 ERROR: FOUND UNSUPPORTED PHY (Analog 12, Type 11 (AC), Revision 1)
[ 8104.201522] b43 bcma0:1: probe with driver b43 failed with error -95
[ 8104.201586] Broadcom 43xx driver loaded [ Features: PNLS ]
[ 8430.506985] Intel(R) Wireless WiFi driver for Linux


很显然Broadcom bcm4360无线网卡无法识别,先查下pci:

lspci -vnn|grep -i broadcom
02:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)
03:00.0 Ethernet controller [0200]: Broadcom Inc. and subsidiaries NetXtreme BCM57766 Gigabit Ethernet PCIe [14e4:1686] (rev 01)
        Subsystem: Broadcom Inc. and subsidiaries NetXtreme BCM57766 Gigabit Ethernet PCIe [14e4:1686]
03:00.1 SD Host controller [0805]: Broadcom Inc. and subsidiaries BCM57765/57785 SDXC/MMC Card Reader [14e4:16bc] (rev 01) (prog-if 01)
        Subsystem: Broadcom Inc. and subsidiaries BCM57765/57785 SDXC/MMC Card Reader [14e4:0000]


第一条BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)就是我们的无线网卡,我们按照设备标识符查看:

lspci -vnn -d 14e4:43a0
02:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)
        Subsystem: Apple Inc. BCM4360 802.11ac Dual Band Wireless Network Adapter [106b:013b]
        Flags: fast devsel, IRQ 18
        Memory at a0600000 (64-bit, non-prefetchable) [size=32K]
        Memory at a0400000 (64-bit, non-prefetchable) [size=2M]
        Capabilities: [48] Power Management version 3
        Capabilities: [58] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [68] Vendor Specific Information: Len=44 <?>
        Capabilities: [ac] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [13c] Device Serial Number 60-f8-00-ff-ff-00-00-01
        Capabilities: [150] Power Budgeting <?>
        Capabilities: [160] Virtual Channel
        Capabilities: [1b0] Latency Tolerance Reporting
        Capabilities: [220] Physical Resizable BAR
        Kernel modules: bcma


现在安装博通通用无线station驱动包:

apt install broadcom-sta-common
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
broadcom-sta-common is already the newest version (6.30.223.271-23).
0 upgraded, 0 newly installed, 0 to remove and 165 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up broadcom-sta-dkms (6.30.223.271-23) ...
Removing old broadcom-sta-6.30.223.271 DKMS files...
Deleting module broadcom-sta-6.30.223.271 completely from the DKMS tree.
Loading new broadcom-sta-6.30.223.271 DKMS files...
Building for 6.12.18-trim
Building initial module for 6.12.18-trim
Error! Bad return status for module build on kernel: 6.12.18-trim (x86_64)
Consult /var/lib/dkms/broadcom-sta/6.30.223.271/build/make.log for more information.
dpkg: error processing package broadcom-sta-dkms (--configure):
 installed broadcom-sta-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 broadcom-sta-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)


可惜安装失败了。。。看下出错日志:

cat /var/lib/dkms/broadcom-sta/6.30.223.271/build/make.log
DKMS make.log for broadcom-sta-6.30.223.271 for kernel 6.12.18-trim (x86_64)
Sun Sep 14 12:06:02 AM CST 2025
CFG80211 API is prefered for this kernel version
Makefile:89: Neither CFG80211 nor Wireless Extension is enabled in kernel
KBUILD_NOPEDANTIC=1 make -C /lib/modules/6.12.18-trim/build M=`pwd`
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/usr/src/linux-headers-6.12.18-trim'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Debian 12.2.0-14) 12.2.0
  You are using:           gcc (Debian 12.2.0-14+deb12u1) 12.2.0
CFG80211 API is prefered for this kernel version
Using CFG80211 API
Kernel architecture is X86_64
  CC [M]  /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.o
  CC [M]  /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/wl/sys/wl_linux.o
/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/wl/sys/wl_linux.c:59:10: fatal error: asm/unaligned.h: No such file or directory
   59 | #include <asm/unaligned.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:229: /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/wl/sys/wl_linux.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.12.18-trim/Makefile:1932: /var/lib/dkms/broadcom-sta/6.30.223.271/build] Error 2
make[1]: *** [Makefile:224: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.12.18-trim'
make: *** [Makefile:181: all] Error 2


原来是编译wl_linux.o时缺少头文件asm/unaligned.h,看下飞牛0.9.26是基于Debian什么版本开发的:

uname -r
6.12.18-trim


看下系统里有没有这个asm/unaligned.h文件:

find / -name "unaligned.h"
find: ‘/proc/267430’: No such file or directory
find: ‘/proc/267431’: No such file or directory
find: ‘/proc/267432’: No such file or directory
find: ‘/proc/267444’: No such file or directory
find: ‘/proc/267446’: No such file or directory
find: ‘/proc/267447’: No such file or directory
/usr/src/linux-headers-6.12.18-trim/include/vdso/unaligned.h
/usr/src/linux-headers-6.12.18-trim/include/linux/unaligned.h
/usr/src/linux-headers-6.1.0-39-common/arch/parisc/include/asm/unaligned.h
/usr/src/linux-headers-6.1.0-39-common/include/asm-generic/unaligned.h
/usr/src/linux-headers-6.1.0-39-amd64/arch/x86/include/generated/asm/unaligned.h


将wl_linux.c源码中的#include <asm/unaligned.h>改为#include <linux/unaligned.h>,再次编译:

dkms build -m broadcom-sta -v 6.30.223.271
Sign command: /lib/modules/6.12.18-trim/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Building module:
Cleaning build area...
make -j4 KERNELRELEASE=6.12.18-trim KVER=6.12.18-trim....
cp: cannot stat '/lib/modules/6.12.18-trim/build/.config': No such file or directory
Signing module /var/lib/dkms/broadcom-sta/6.30.223.271/build/wl.ko
Cleaning build area...
dkms status
broadcom-sta/6.30.223.271, 6.12.18-trim, x86_64: built


编译成功!安装编译好的无线驱动(wl.ko):

dkms install -m broadcom-sta -v 6.30.223.271
wl.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.12.18-trim/updates/dkms/
depmod...
dkms status
broadcom-sta/6.30.223.271, 6.12.18-trim, x86_64: installed


加载驱动:

modprobe wl && lsmod|grep -i wl
wl                   6483968  0
cfg80211             1359872  1 wl
dmesg -T
[ 2683.227574] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 2683.240350] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 2683.240626] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
[ 2683.243745] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid
[ 2683.265577] wl: loading out-of-tree module taints kernel.
[ 2683.265583] wl: module license 'MIXED/Proprietary' taints kernel.
[ 2683.265584] Disabling lock debugging due to kernel taint
[ 2683.265586] wl: module license taints kernel.
[ 2683.311248] wlan0: Broadcom BCM43a0 802.11 Hybrid Wireless Controller 6.30.223.271 (r587334)
[ 2683.313960] wl 0000:02:00.0 wlp2s0: renamed from wlan0


查看设备:

nmcli
wlp2s0: disconnected
        "Broadcom and subsidiaries BCM4360"
        wifi (wl), 60:F8:1D:AB:CA:16, hw, mtu 1500


一个字:完美~

最新回复 (0)
返回
发新帖
X