Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacBook Pro 15+: Wifi Support #112

Open
9 of 10 tasks
aunali1 opened this issue Aug 6, 2019 · 127 comments
Open
9 of 10 tasks

MacBook Pro 15+: Wifi Support #112

aunali1 opened this issue Aug 6, 2019 · 127 comments

Comments

@aunali1
Copy link
Contributor

aunali1 commented Aug 6, 2019

Discussion and updates regarding Broadcom Wifi related support. Parent thread is #71.

Current Status:

NOTE: Firmware from macOS Catalina is currently known to fail to initialize with brcmfmac. Use firmware from a macOS Mojave or lower installation, otherwise you can find the necessary files in my up-to-date archive here: https://packages.aunali1.com/apple/wifi-fw/18G2022

  • Firmware Loading
    • BCM4355 (MacbookAir8,y)
    • BCM4364 (MacbookPro15,x)
    • BCM4377 (MacbookPro15,4+ [2019])
  • Frequency Bands
    • 2.4 GHz
    • 5 GHz
  • Security Protocols
    • WPA
    • WPA2

Unfortunately, due to the nature of how tightly linked .clmb files are to each model variant, generic distribution of firmware is currently impractical.

@jhohisel
Copy link

Hi everyone! I've been following this thread as I work on getting a USB SSD with linux that works on both of my Macs: MacBookAir8,2 (2019 MacBook Air) and iMac19,1 (2019 iMac). Fortunately the 2019 iMac does not contain a T2 chip, so things work fairly well out of the box.

I'm attempting to get WiFi working on both models. The iMac seems to have the same chipset as the MacBookPro15,x (BCM4364, codename Midway) but the MacBook Air has a BCM4355 chipset (codename Hawaii). I created and applied this patch (based on the work from @MCMrARM): https://github.com/jhohisel/macbookair8-2-linux/blob/master/brcmfmac.patch and copied the firmware from macOS.

However, the firmware fails to load (iMac):

[   20.314189] usbcore: registered new interface driver brcmfmac
[   20.330616] brcmfmac 0000:03:00.0: enabling device (0000 -> 0002)
[   20.439205] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4364-pcie for chip BCM4364/3
[   23.374627] brcmfmac 0000:03:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize

MacBook Air fails with a slightly different error:

[   27.958248] brcmfmac 0000:02:00.0: enabling device (0000 -> 0002)
[   28.121706] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4355-pcie for chip BCM4355/12
[   28.126287] brcmfmac 0000:02:00.0: Direct firmware load for brcm/brcmfmac4355-pcie.Apple Inc.-MacBookAir8,2.txt failed with error -2
[   31.030139] brcmfmac 0000:02:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize

I observe a different error when the NVRAM file (.txt) is missing, so I know that it is correctly detecting the presence of these files and attempting to load them.

Top tip: you can discover the firmware filenames that Apple uses by running:
ioreg -l | grep RequestedFiles
The output will look something like:

"RequestedFiles" = ({"Firmware"="C-4364__s-B2/midway.trx","TxCap"="C-4364__s-B2/midway-X0.txcb","Regulatory"="C-4364__s-B2/midway-X0.clmb","NVRAM"="C-4364__s-B2/P-midway-X0_M-HRPN_V-u__m-7.5.txt"})

@ppaulweber
Copy link
Contributor

Top tip: you can discover the firmware filenames that Apple uses by running:
ioreg -l | grep RequestedFiles

@jhohisel well done and nice tip!

I'm experimenting with the WLAN (WiFi) support on my MacBookAir8,1 since a week or so, I've pushed my version of this patch now as well (see reference above). Can you check if your MacBookAir8,2 platform goes along fine with the provided bcm5974, hid, nvme, and brcmfmac patches in https://github.com/ppaulweber/linux-mba? Thx!

@jhohisel
Copy link

I am currently running your bcm5974 and hid patches. Applying them added two-finger scrolling, right-click and function key support.

I'll try the nvme patch now.

@jhohisel
Copy link

bluehax@bluehax:~$ lsblk
NAME           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda              8:0    0 465.8G  0 disk  
├─sda1           8:1    0   448M  0 part  /boot/efi
├─sda2           8:2    0   4.7G  0 part  /media/bluehax/Debian Linux
├─sda3           8:3    0   4.7G  0 part  /boot
└─sda4           8:4    0   456G  0 part  
  └─sdb4_crypt 254:0    0   456G  0 crypt /
nvme0n1        259:0    0   113G  0 disk  
├─nvme0n1p1    259:1    0   300M  0 part  
└─nvme0n1p2    259:2    0 112.7G  0 part 

NVMe Works! I'll have to try installing it to a partition on the laptop now.

One issue I've been unable to fix is getting the keyboard working when I unlock my root partition during boot. It works during the GRUB menu, then stops working when the kernel prompts to unlock the drive for dm-crypt, then functions immediately after when it loads the bce module.

I built-in mbp2018-bridge-drv to the kernel by adding a Kconfig entry and declaring the source to the Makefile in drivers/. Applied the patches for bcm5974 and hid, then set the module load order in /etc/modules-load.d/bce.conf.

@ppaulweber
Copy link
Contributor

One issue I've been unable to fix is getting the keyboard working when I unlock my root partition during boot. It works during the GRUB menu, then stops working when the kernel prompts to unlock the drive for dm-crypt, then functions immediately after when it loads the bce module.

If you really need the keyboard in this case you have to take a look into your current /etc/mkinitcpio.conf setup. You shall include there the bce in the MODULE=... variable in order that the bce module even gets loaded and integrated into the initramfs creation.

@Dunedan
Copy link
Owner

Dunedan commented Aug 18, 2019

Please focus on wifi in this issue and discuss other topics (like keyboard or NVMe) in separate issues.

@mikeeq
Copy link

mikeeq commented Aug 19, 2019

Is WiFi (brcmfmac4364) working for anybody (besides @MCMrARM)?

Whenever i'm trying to load brcmfmac module, i'm getting error mentioned below:

[  990.003990] usbcore: registered new interface driver brcmfmac
[  990.110113] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4364-pcie for chip BCM4364/3
[  992.693631] brcmfmac 0000:01:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize

@aunali1
Copy link
Contributor Author

aunali1 commented Aug 20, 2019

@mikeeq What kernel patch are you using for WiFi support?

@aunali1
Copy link
Contributor Author

aunali1 commented Aug 21, 2019

@jhohisel @mikeeq Works perfectly fine for me:

[    8.196831] usbcore: registered new interface driver brcmfmac
[    8.212808] brcmfmac 0000:03:00.0: enabling device (0000 -> 0002)
[    8.319800] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4364-pcie for chip BCM4364/3
[    9.521164] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4364-pcie for chip BCM4364/3
[    9.840308] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4364/3 wl0: Mar 28 2019 19:17:52 version 9.137.9.0.32.6.34 FWID 01-36f56c94
[    9.933835] brcmfmac 0000:03:00.0 wlp3s0: renamed from wlan0

EDIT: I'm using this wifi patch (in my kernel tree) btw.

@mikeeq
Copy link

mikeeq commented Aug 21, 2019

@aunali1 yep, you're right - I've missed one line when I was generating a patch.
mikeeq/mbp-fedora-kernel@d8f5578

@ppaulweber could you confirm if that fix is not needed for MacBookAir8,2?

ppaulweber added a commit to ppaulweber/linux-mba that referenced this issue Aug 21, 2019
@ppaulweber
Copy link
Contributor

@aunali1 thanks for the hint and I've experimented for my MacBookAir8,1 that this brcm driver uses the same RAM base as the brcm driver of the MacBookPro15,x. It now allocates and loads correctly the firmware, and I get the wlan interface.

@jhohisel can you check if this latest patch works for your MacBookAir8,2 as well, thx!

@mikeeq it does need the same fix, which I've already updated in my repo (see commit reference above)

[  702.402953] usbcore: registered new interface driver brcmfmac
[  702.512262] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4355-pcie for chip BCM4355/12
[  702.960842] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4355-pcie for chip BCM4355/12
[  702.981704] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4355/12 wl0: Mar 28 2019 19:57:32 version 9.137.9.0.32.6.33 FWID 01-c5e1774f
[  703.109625] brcmfmac 0000:02:00.0 wlp2s0: renamed from wlan0

@jhohisel
Copy link

jhohisel commented Aug 22, 2019

@ppaulweber The good news is that now the card is correctly recognized and shows as a WIFI device. The bad news is that I can't seem to connect to my network using it. It repeatedly times out and prompts for the password. I tried switching from wpa_supplicant to iwd as suggested in issue 71, but no difference. I also tried using wicd instead of NetworkManager, it fails to connect saying bad password. I have not yet tried an open network, and yes I am entering the correct password.

Has anyone else experienced this?

I am able to connect to my network using a USB WIFI card.

@mikeeq
Copy link

mikeeq commented Aug 22, 2019

@jhohisel try to reload brcmfmac kernel module. I'm experiencing the same issue and after module reload I'm able to connect to WPA2 network ;)

https://github.com/mikeeq/mbp-fedora#known-issues

@ppaulweber
Copy link
Contributor

@jhohisel I can confirm that for me is wpa_supplicantno longer working as well. With iwdthe WLAN (WiFi) is working as expected. Thx @mikeeq for collecting the known issues in your repo!

@jhohisel
Copy link

I was missing:

[device]
wifi.backend=iwd

From /etc/NetworkManager/NetworkManager.conf

Now I can connect!

@macphotoed
Copy link

Sorry for the silly question all - when I locate the files from mojave, where do I copy them on the linux side?

@aunali1
Copy link
Contributor Author

aunali1 commented Aug 24, 2019

@macphotoed Just copy the *.trx file to /lib/firmware/brcm/brcmfmac4364-pcie.trx, the *.clmb file to /lib/firmware/brcm/brcmfmac4364-pcie.clm_blob and the *.txt file to /lib/firmware/brcm/brcmfmac4364-pcie.Apple Inc.-MacBookPro15,1.txt

@macphotoed
Copy link

macphotoed commented Aug 24, 2019

Amazing - thank you again @aunali1 - got the files, tjust grappling with the iwd/wpa_supplicant issue! And bluetooth for some reason?

@MCMrARM
Copy link

MCMrARM commented Aug 28, 2019

By the way 5Ghz generally works for me, through a full multiband 5ac does not achieve full speeds.

@wzygzlm
Copy link

wzygzlm commented Aug 30, 2019 via email

@aunali1
Copy link
Contributor Author

aunali1 commented Aug 31, 2019

It seems that with 5.2.11, 5 Ghz works without any problems, and in some cases faster than macOS!

@MCMrARM
Copy link

MCMrARM commented Sep 1, 2019

@wzygzlm I mean, this no longer requires IDA, the firmware is in /usr/share/firmware on OS X.

@TRPB
Copy link

TRPB commented Sep 16, 2019

can anyone tell me where the trx and clmb files are? On Arch if it makes any difference.

@MCMrARM
Copy link

MCMrARM commented Sep 17, 2019

TL;Dr with the wifi is to first find your firmware files using ioreg -l | grep C-4364, then copy them from /usr/share/firmware/wifi from OS X. On Linux, the .trx file for your model goes to /lib/firmware/brcm/brcmfmac4364-pcie.bin, the .clmb goes to /lib/firmware/brcm/brcmfmac4364-pcie.clm_blob and the .txt to something like /lib/firmware/brcm/brcmfmac4364-pcie.Apple Inc.-MacBookPro15,2.txt
All of this requires a kernel patch: https://mrarm.io/u/Paste%202019-07-26%2012-30-16.txt

@0xEmma
Copy link

0xEmma commented Sep 21, 2019

Anyone else not have this working on MBA 8,1(air 2018) it shows up as a ethernet device, thanks :)

@MCMrARM
Copy link

MCMrARM commented Sep 21, 2019

@EmmaDSamms sorry, what? Show the output of lspci?

@abjugard
Copy link

abjugard commented Sep 1, 2020

@stefanpartheym well I haven't attempted booting any Linux distribution yet personally, but this repo here suggests the 16,1 uses BCM4364 according to the dumps others have contributed, and your script (after I figured out which json command you expected me to have hehe, EDIT: which I now realise is written right there in your repo... 🤦‍♂️) ran fine as is, but did not run when I attempted to run it using any of the other part numbers mentioned in this thread.

The output was:

# Checking system:
  => SUCCESS

# Determining requested files via ioreg:
  => SUCCESS

# Parsing ioreg output:
{
  "Firmware": "C-4364__s-B3/bali.trx",
  "TxCap": "C-4364__s-B3/bali-X3.txcb",
  "Regulatory": "C-4364__s-B3/bali-X3.clmb",
  "NVRAM": "C-4364__s-B3/P-bali-X3_M-HRPN_V-m__m-7.9.txt"
}
  => SUCCESS

# Creating destination directory for raw files:
  => SUCCESS

# Collecting file 'bali.trx':

# Collecting file 'bali-X3.txcb':

# Collecting file 'bali-X3.clmb':

# Collecting file 'P-bali-X3_M-HRPN_V-m__m-7.9.txt':

@stefanpartheym
Copy link

@abjugard I don't claim the scripts or the documentation is perfect haha. But as you see, it works for BCM4364 on your machine, so I suspect this is the correct model for the mbp16,1. Otherwise you would see an error that the ioreg output is not parsable.

@abjugard
Copy link

abjugard commented Sep 1, 2020

@stefanpartheym Yes it seems to be correct, though apparently brcmfmac fails to load this firmware, which unfortunately would make Linux on this machine unusable for me. Let's hope someone figures out what's wrong with initialisation when using this firmware.

@stefanpartheym
Copy link

@abjugard Other people already had similair issues (see stefanpartheym/mbp15-wifi-driver#3 for instance).
Please make sure you follow this guide correctly: https://gist.github.com/TRPB/437f663b545d23cc8a2073253c774be3#wifi

Hope this helps!

@zappacor
Copy link

zappacor commented Oct 9, 2020

Hi all, copy/pasting here what I posted on another repo and thread, it's in connection with the BCM4364/4 "trinidad" chip on a MacBookPro 16,2 (year 2020):

Two pieces of info and two questions I have to dig into further but I'd like to share:
Info 1) this chip (BCM4364/4) has two cores
Info 2) when I loaded the module with a specific RAM address parameter (modprobe brcmfmac rambase_addr=0x180000 debug=0xffffff), I could see two raminfo messages, each one for a different base address (when I didn't specify any rambase_addr, they were the same: 0x160000):

[  103.863252] brcmfmac: brcmf_chip_ai_resetcore found two d11 cores, reset both
[  103.969228] brcmfmac: brcmf_chip_ai_resetcore found two d11 cores, reset both
[  103.969561] brcmfmac: brcmf_chip_get_raminfo RAM: base=0x160000 size=1310720 (0x140000) sr=0 (0x0)
[  103.983450] brcmfmac: brcmf_chip_get_raminfo RAM: base=0x180000 size=1310720 (0x140000) sr=0 (0x0)

Question 1) are there two brcmf_chip_get_raminfo messages because it's one message per core?
Question 2) if yes, shouldn't both base=0xXXXXXX dumped values be the same?

Only (somehow) related info I could find is on https://patchwork.kernel.org/patch/11286575:

There are two D11 cores in RSDB chips like 4359. We have to reset two D11 cores simutaneously before
firmware download, or the firmware may not be initialized correctly and cause "fw initialized failed" error.

EDIT:
Realized some of the files are actually just text, not binaries, which could be "interpreted" as some kind of pointer to the actual binaries:

"Firmware"="C-4364__s-B3/trinidad.trx"
	XSym
	0010
	fee982dfdb0e40d971e83ef3c9fdbdc5
	borneo.trx
		=> uses "borneo.trx" instead?
"TxCap"="C-4364__s-B3/trinidad-X0.txcb"
	XSym
	0013
	f42aa4bca0998b787ee1605728ad9726
	trinidad.txcb
		=> uses "trinidad.txcb" instead?
			=> Transmission Power Cap not used?
"Regulatory"="C-4364__s-B3/trinidad-X0.clmb"
	XSym
	0013
	e84b29139d7e7e3d814a6f87260bbefc
	trinidad.clmb
		=> uses "trinidad.clmb" instead?
"NVRAM"="C-4364__s-B3/P-trinidad-X0_M-HRPN_V-u__m-7.7.txt"
	XSym
	0032
	ecf31bb4bbfea112085d3c85c032c336
	P-trinidad_M-HRPN_V-u__m-7.7.txt
		=> uses "P-trinidad_M-HRPN_V-u__m-7.7.txt" instead?

However, doing this didn't work either:

rm /lib/firmware/brcm/brcmfmac4364-pcie.*
#
ln -s drv/borneo.trx                                  /lib/firmware/brcm/brcmfmac4364-pcie.bin
   ln -s /lib/firmware/brcm/brcmfmac4364-pcie.bin        /lib/firmware/brcm/brcmfmac4364-pcie.trx
# Seems like the "*.txcb" files are not used:
#   ln -s /drv/trinidad.txcb                              ??????
ln -s drv/trinidad.clmb                               /lib/firmware/brcm/brcmfmac4364-pcie.clm_blob
ln -s drv/P-trinidad_M-HRPN_V-u__m-7.7.txt            /lib/firmware/brcm/brcmfmac4364-pcie.txt
   ln -s /lib/firmware/brcm/brcmfmac4364-pcie.txt        /lib/firmware/brcm/brcmfmac4364-pcie.Apple\ Inc.-MacBookPro16,2.txt

Any thoughts?

@emceku
Copy link

emceku commented Nov 9, 2020

Hi all, copy/pasting here what I posted on another repo and thread, it's in connection with the BCM4364/4 "trinidad" chip on a MacBookPro 16,2 (year 2020):

Two pieces of info and two questions I have to dig into further but I'd like to share:
Info 1) this chip (BCM4364/4) has two cores
Info 2) when I loaded the module with a specific RAM address parameter (modprobe brcmfmac rambase_addr=0x180000 debug=0xffffff), I could see two raminfo messages, each one for a different base address (when I didn't specify any rambase_addr, they were the same: 0x160000):

[  103.863252] brcmfmac: brcmf_chip_ai_resetcore found two d11 cores, reset both
[  103.969228] brcmfmac: brcmf_chip_ai_resetcore found two d11 cores, reset both
[  103.969561] brcmfmac: brcmf_chip_get_raminfo RAM: base=0x160000 size=1310720 (0x140000) sr=0 (0x0)
[  103.983450] brcmfmac: brcmf_chip_get_raminfo RAM: base=0x180000 size=1310720 (0x140000) sr=0 (0x0)

Question 1) are there two brcmf_chip_get_raminfo messages because it's one message per core?
Question 2) if yes, shouldn't both base=0xXXXXXX dumped values be the same?

Only (somehow) related info I could find is on https://patchwork.kernel.org/patch/11286575:

There are two D11 cores in RSDB chips like 4359. We have to reset two D11 cores simutaneously before
firmware download, or the firmware may not be initialized correctly and cause "fw initialized failed" error.

EDIT:
Realized some of the files are actually just text, not binaries, which could be "interpreted" as some kind of pointer to the actual binaries:

"Firmware"="C-4364__s-B3/trinidad.trx"
	XSym
	0010
	fee982dfdb0e40d971e83ef3c9fdbdc5
	borneo.trx
		=> uses "borneo.trx" instead?
"TxCap"="C-4364__s-B3/trinidad-X0.txcb"
	XSym
	0013
	f42aa4bca0998b787ee1605728ad9726
	trinidad.txcb
		=> uses "trinidad.txcb" instead?
			=> Transmission Power Cap not used?
"Regulatory"="C-4364__s-B3/trinidad-X0.clmb"
	XSym
	0013
	e84b29139d7e7e3d814a6f87260bbefc
	trinidad.clmb
		=> uses "trinidad.clmb" instead?
"NVRAM"="C-4364__s-B3/P-trinidad-X0_M-HRPN_V-u__m-7.7.txt"
	XSym
	0032
	ecf31bb4bbfea112085d3c85c032c336
	P-trinidad_M-HRPN_V-u__m-7.7.txt
		=> uses "P-trinidad_M-HRPN_V-u__m-7.7.txt" instead?

However, doing this didn't work either:

rm /lib/firmware/brcm/brcmfmac4364-pcie.*
#
ln -s drv/borneo.trx                                  /lib/firmware/brcm/brcmfmac4364-pcie.bin
   ln -s /lib/firmware/brcm/brcmfmac4364-pcie.bin        /lib/firmware/brcm/brcmfmac4364-pcie.trx
# Seems like the "*.txcb" files are not used:
#   ln -s /drv/trinidad.txcb                              ??????
ln -s drv/trinidad.clmb                               /lib/firmware/brcm/brcmfmac4364-pcie.clm_blob
ln -s drv/P-trinidad_M-HRPN_V-u__m-7.7.txt            /lib/firmware/brcm/brcmfmac4364-pcie.txt
   ln -s /lib/firmware/brcm/brcmfmac4364-pcie.txt        /lib/firmware/brcm/brcmfmac4364-pcie.Apple\ Inc.-MacBookPro16,2.txt

Any thoughts?

Hey !

Something new, any suggestions for MacBook Pro 16.2?
I've been trying to deal with it for a week...

I copied my Trinidad files from MacOS to Ubuntu using https://github.com/stefanpartheym/mbp15-wifi-driver.
Configured according to https://github.com/marcosfad/mbp-ubuntu and still not running.

I tried several ways from different sources...

Please, help me !

@snorez
Copy link

snorez commented Nov 28, 2020

@emceku Did you work this out? How about keyboard and touchpad?

@ybayart
Copy link

ybayart commented Jan 11, 2021

@yurnam @MoonPadUSer @mushoku-ningen did you find a solution for BCM4377 on mbp 15,4 ?
I've try big sur, catalina & mojave files but nothing works
If you found a solution, I really hope you share it with us

@bjmd
Copy link

bjmd commented Feb 7, 2021

I'm interested in the 4677 driver for mbp 15,4 as well

@abjugard
Copy link

We all are, I think the ball is in Broadcoms court unfortunately, the open source driver doesn't work with the available macOS firmware. Unless someone puts in the considerable effort to fix those issues, we need some official firmware released by Broadcom, but I'm not sure how likely that is to happen here. Is there anyone besides Apple using that chip in their products?

@paralin
Copy link

paralin commented Mar 3, 2021

Just keep buying refurbished i7 Macbook Pro 2015 Retina computers and maybe they'll re-list them on the store /s

@reynaldliu
Copy link

After I compiled the code from this repository and extracted the firmware from macos, I can successfully open macbookpro 16, 1 bcm4364 wifi

https://github.com/jamlam/mbp-16.1-linux-wifi

@jpmenil
Copy link

jpmenil commented May 4, 2021

After I compiled the code from this repository and extracted the firmware from macos, I can successfully open macbookpro 16, 1 bcm4364 wifi

https://github.com/jamlam/mbp-16.1-linux-wifi

Confirmed, that the corelium patch, do the trick !!

Redecorating added a commit to t2linux/wiki that referenced this issue Oct 2, 2021
iMac19,1 has BCM4364 but no T2

Link: Dunedan/mbp-2016-linux#112 (comment)

Link: https://support.apple.com/en-us/HT208862

Link: https://support.apple.com/en-us/HT201634

With most islands known, I've made guesses based off which macos version models released with and their bluetooth chip names. If my guesses are correct (or just have a couple of models switched), the only ones left are Sid and Kahana. These two islands are the only ones in both the 4364B2 and 4364B3 folders, and the only ones in the Mojave version of the 4364B3 folder. Could be the two models missing here https://www.theiphonewiki.com/wiki/T8012#Enabled_Mac_Products
Redecorating added a commit to t2linux/wiki that referenced this issue Dec 5, 2021
Redecorating added a commit to t2linux/wiki that referenced this issue Dec 25, 2021
I'm not sure why I entered this wrong
Dunedan/mbp-2016-linux#112 (comment)

also convert 4355 revision 0c to decimal 12
@xeacott
Copy link

xeacott commented Mar 19, 2022

Dropping in for some help myself... Have a macbook 13 inch with the same 4364 driver. I've done what I could from reading this thread...

  1. Booted into my mac and ran ioreg -l | grep RequestedFiles
  2. emailed myself a copy of the files and moved them into ubuntu
  3. cp them to their correct destination
  4. restart and nothing
    I did try to apply the patch, but it hung and did nothing. Any tips would be greatly appreciated!

@ppaulweber
Copy link
Contributor

@xeacott which parts of the kernel did you patch exactly? e.g. ppaulweber/linux-mba@6916d9c

@xeacott
Copy link

xeacott commented Mar 19, 2022

@xeacott which parts of the kernel did you patch exactly? e.g. ppaulweber/linux-mba@6916d9c

@ppaulweber

This one https://mrarm.io/u/Paste%202019-07-26%2012-30-16.txt
I copied the file contents into a file.patch and tried to run sudo patch file.patch but im probably doing something wrong here. Ran that command inside linux after copying the files btw

joe@ubuntu:~$ sudo ls /lib/firmware/brcm/brcmfmac4364-pcie.
brcmfmac4364-pcie.Apple Inc.-MacBookPro13,3.txt
brcmfmac4364-pcie.bin
brcmfmac4364-pcie.clm_blob

@ppaulweber
Copy link
Contributor

@xeacott it looks to me that you forgot to patch the chip rambase address in the brcmfmac driver as well, see: https://github.com/ppaulweber/linux-mba/blob/master/patch-linux-brcmfmac.diff#L1-L13

@ppaulweber
Copy link
Contributor

@xeacott are you sure that you have a brcmfmac4364 chip? Accordingly to the following page that WiFi chip of the MacBookPro13,3 is a brcmfmac43602, see: https://gist.github.com/cristianmiranda/6f269797b62076c3414c3baa848dda67#wifi

@xeacott
Copy link

xeacott commented Mar 19, 2022

@ppaulweber
Yeah here's my device and it's info

e5:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM4364 802.11ac Wireless Network Adapter [14e4:4464] (rev 04)
	Subsystem: Apple Inc. BCM4364 802.11ac Wireless Network Adapter [106b:07bf]
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 255
	Region 0: Memory at 81400000 (64-bit, non-prefetchable) [disabled] [size=32K]
	Region 2: Memory at 81000000 (64-bit, non-prefetchable) [disabled] [size=4M]
	Capabilities: <access denied>
	Kernel modules: brcmfmac, wl


@xeacott
Copy link

xeacott commented Mar 19, 2022

@ppaulweber maybe this is related?

joe@ubuntu:/lib/firmware/brcm$ sudo rmmod brcmfmac && sudo modprobe brcmfmac
rmmod: ERROR: Module brcmfmac is not currently loaded

@ppaulweber
Copy link
Contributor

@xeacott of course, please check your kernel messages via dmesg and please check if the rambase address patch is part of your patched kernel, see #112 (comment)

@xeacott
Copy link

xeacott commented Mar 19, 2022

@ppaulweber
cool. I grepped dmesg and found no results with brcm so then super noob question, how do i apply the patch with the right commands? I have https://mrarm.io/u/Paste%202019-07-26%2012-30-16.txt

@ppaulweber
Copy link
Contributor

@xeacott the patch you have there is still missing the rambase address as mentioned above.

how do i apply the patch with the right commands?

Depends: If you have cloned the Linux kernel via git you can directly use git apply <patch-file> [1] or you can use the standalone patch [2] command if you downloaded a non-versioned source archive.

[1] https://git-scm.com/docs/git-apply
[2] https://man7.org/linux/man-pages/man1/patch.1.html

@xeacott
Copy link

xeacott commented Mar 19, 2022

@ppaulweber tried to make and got a bunch of errors indicating something with Arch from your repo

make[4]: *** [scripts/Makefile.build:276: arch/x86/entry/vdso/vclock_gettime.o] Error 1
make[3]: *** [scripts/Makefile.build:486: arch/x86/entry/vdso] Error 2
make[2]: *** [scripts/Makefile.build:486: arch/x86/entry] Error 2
make[1]: *** [Makefile:1051: arch/x86] Error 2
make[1]: Leaving directory '/home/joe/linux-mba/linux-5.1.5-mba+'
make: *** [Makefile:54: build] Error 2

@ppaulweber
Copy link
Contributor

@xeacott if you are trying to use the linux-mba project, please open a full issue report there, because the extracted error log has nothing to do with an ArchLinux setup. The lines just show that there is a problem in the Kernel source code folder of the Intel x86 architecture which is located in the Linux kernel under arch/x86/*.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests