[折腾] Linux在Mac air上的WIFI驱动折腾备忘

Mac air Linux 折腾备忘

最近想给我的Mac air安装个Linux,我选择的是最新Mint Linux(18.3),这个系统是Ubuntu系的,而且系统也没Ubuntu那么花哨,支援的软件也特别多,所以暂且就选择它作为日常用OS之一

查询网卡型号

默认安装后发现系统找不到WIFI,待我速度查询了下我Mac air的网卡型号,使用以下指令:

$ sudo lshw -C Network

结果:

*-network UNCLAIMED     
       description: Network controller
       product: BCM4360 802.11ac Wireless Network Adapter
       vendor: Broadcom Corporation
       physical id: 0
       bus info: [email protected]:03:00.0
       version: 03
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: latency=0
       resources: memory:c1200000-c1207fff memory:c1000000-c11fffff

发现我网卡型号是BCM4360之后我迅速谷歌了下该网卡的驱动,发现要安装下apt install bcmwl-kernel-source,问题是目前我mac air没法联网,手头上唯一的USB无线网卡(TL-WN821N)也识别不到,但是我记得该网卡把kernel升级到4.16之后,就能找到驱动了,所以,第一件事就是把kernel给升级下,Mint linux默认是4.10。

升级kernel

因为之前在折腾台式机上的linux的时候,已经经历过类似的问题,所以当初还好吧4.16的kernel升级用的文件备份了下,然后只要 sudo dpkg -i *.deb 安装下全部的包就好了。

等kernel升级完毕之后,手头上的USB外置无线网卡就已经能使用了,这样,就可以使用apt来进行联网安装源包了

安装BCM4360驱动

查了下谷歌后,发现需要安装下bcmwl-kernel-source,既然现在有网了,那么就可以迅速下apt-get update 然后在apt-get install bcmwl-kernel-source了,但是带我安装 bcmwl-kernel-source的过程中,发现又却了几个文件

(Reading database ... 281934 files and directories currently installed.)
Preparing to unpack bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu4_amd64.deb ...
Removing all DKMS Modules
Done.
Unpacking bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu4) over (6.30.223.271+bdcom-0ubuntu1~1.2) ...
Setting up bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu4) ...
Loading new bcmwl-6.30.223.271+bdcom DKMS files...
Building for 4.16.0-041600-generic and 4.17.0-041700-generic
Building for architecture x86_64
Building initial module for 4.16.0-041600-generic
Done.

wl:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.16.0-041600-generic/updates/

depmod....

DKMS: install completed.
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
update-initramfs: deferring update (trigger activated)
Processing triggers for shim-signed (1.32~16.04.1+0.9+1474479173.6c180c6-1ubuntu1+linuxmint1) ...
Secure Boot not enabled on this system.
Processing triggers for initramfs-tools (0.122ubuntu8.9) ...
update-initramfs: Generating /boot/initrd.img-4.16.0-041600-generic
W: Possible missing firmware /lib/firmware/i915/skl_dmc_ver1_27.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1_04.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_ver9_39.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver9_29.bin for module i915
W: Possible missing firmware /lib/firmware/i915/skl_guc_ver9_33.bin for module i915
Warning: No support for locale: en_AU.utf8

缺少的文件分别为:skl_dmc_ver1_27.bin,kbl_dmc_ver1_04.bin,kbl_guc_ver9_39.bin,bxt_guc_ver9_29.bin,skl_guc_ver9_33.bin

我的天啊,真麻烦,(对,这就是Linux,折腾的乐趣~),没办法,只能继续谷歌。

然后我在 https://askubuntu.com/questions/832524/updated-kernel-to-4-8-now-missing-firmware-warnings 找到了解决方法,里面给出了一个网站,可以下载到缺少的文件

下载地址  只要把缺少的文件给下载下来就可以了,然后按照他的说法把他们都放到/lib/firmware/i915/ 目录下即可。

之后再apt install -f 后,再次apt-get install bcmwl-kernel-source。

如下:

(Reading database ... 281936 files and directories currently installed.)
Preparing to unpack bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu4_amd64.deb ...
Removing all DKMS Modules
Done.
Unpacking bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu4) over (6.30.223.271+bdcom-0ubuntu4) ...
Setting up bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu4) ...
Loading new bcmwl-6.30.223.271+bdcom DKMS files...
Building for 4.16.0-041600-generic and 4.17.0-041700-generic
Building for architecture x86_64
Building initial module for 4.16.0-041600-generic
Done.

wl:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.16.0-041600-generic/updates/

depmod....

DKMS: install completed.
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
update-initramfs: deferring update (trigger activated)
Processing triggers for shim-signed (1.32~16.04.1+0.9+1474479173.6c180c6-1ubuntu1+linuxmint1) ...
Secure Boot not enabled on this system.
Processing triggers for initramfs-tools (0.122ubuntu8.9) ...
update-initramfs: Generating /boot/initrd.img-4.16.0-041600-generic
Warning: No support for locale: en_AU.utf8

然后,mac air 上的网卡驱动就复活了,无需重启电脑!

耶~

附录

Linux 4.16升级deb包 kernel16

丢失的firmware打包 bcm_4630_missingfirmeware

bcmwl驱动包(如果没有网络的情况下) bcmwl-driver

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください