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

WiFi issues #3

Open
mikeeq opened this issue Jan 8, 2020 · 81 comments
Open

WiFi issues #3

mikeeq opened this issue Jan 8, 2020 · 81 comments
Labels
bug Something isn't working

Comments

@mikeeq
Copy link
Owner

mikeeq commented Jan 8, 2020

Hello everyone,

As many of us have problems with running WiFi under Linux on new Macs, I want to make a list of already compatible models/wifi chips here and track all issues in one thread. Sorry for closing other ones.

Compatible models:

  • Macbook Pro 15,2 i5
    • BCM4364/3 (P-maui-X3_M-HRPN_V-u__m-7.5.txt)

How correct Broadcom fw load should look like in dmesg:

➜ dmesg | grep brcmfmac
[   13.351387] usbcore: registered new interface driver brcmfmac
[   13.351570] brcmfmac 0000:01:00.0: enabling device (0000 -> 0002)
[   13.454664] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4364-pcie for chip BCM4364/3
[   14.545924] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4364-pcie for chip BCM4364/3
[   14.578324] 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
[   14.658688] brcmfmac 0000:01:00.0 wlp1s0: renamed from wlan0
modprobe -r brcmfmac; modprobe brcmfmac rambase_addr=0x160000
#/etc/default/grub
GRUB_CMDLINE_LINUX="rhgb quiet efi=noruntime pcie_ports=compat modprobe.blacklist=thunderbolt systemd.unified_cgroup_hierarchy=0 brcmfmac.rambase_addr=0x160000"

Please post here all WiFi related issues.

Related issues in other projects:

Historic issues:

@mikeeq mikeeq added the bug Something isn't working label Jan 8, 2020
@mikeeq mikeeq pinned this issue Jan 8, 2020
@zhewang95
Copy link

zhewang95 commented Jan 8, 2020

Imcompatible models:

  • Macbook Pro 15,2 i5
    • BCM4364/3 (P-maui-X2_M-HRPN_V-u__m-7.5.txt)

Wrong Broadcom fw load message:

[    7.140063] usbcore: registered new interface driver brcmfmac  
[    7.140311] brcmfmac 0000:01:00.0: enabling device (0000 -> 0002)  
[    7.245941] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4364-pcie for chip BCM4364/3  
[    9.624439] brcmfmac 0000:01:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize  

@mikeeq
Copy link
Owner Author

mikeeq commented Jan 8, 2020

@zhewang95 Your revision of WiFi chip probably uses different rambase address (Dunedan/mbp-2016-linux#112 (comment)) than my one. Are you able to recompile the kernel by yourself and check if removing that line fixes the issue for you?

https://github.com/mikeeq/mbp-fedora-kernel/blob/v5.4-f31/patches/wifi.patch#L21

Also you can check if it will be printed in dmesg after adding brcmfmac.debug=2097150 to kernel arguments, like here:

[    4.170427] brcmfmac: brcmf_chip_get_raminfo RAM: base=0x160000 size=1310720 (0x140000) sr=0 (0x0)

@zhewang95
Copy link

@mikeeq OK I will have a try

@ktb92677
Copy link

ktb92677 commented Jan 8, 2020

Imcompatible models:

MacbookAir 8,2 i5
BCM4355/12 (P-hawaii-X0_M-YSBC_V-u__m-4.3.txt)
Wrong Broadcom fw load message:

[    7.140063] usbcore: registered new interface driver brcmfmac  
[    7.140311] brcmfmac 0000:02:00.0: enabling device (0000 -> 0002)  
[    7.245941] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4355-pcie for chip BCM4355/12  
[    7.778035] bluetooth hci0: Direct firmware load for brcm/BCM.hcd failed with error -2  
[    7.778037] Bluetooth: hci0: BCM: Patch brcm/BCM.hcd not found  
[    9.624439] brcmfmac 0000:02:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize

A couple of notes... Here is what I named each file (MacOSX -> Fedora)

C-4355__s-C1/hawaii.trx -> /lib/firmware/brcm/brcmfmac4355-pcie.bin
C-4355__s-C1/hawaii-X0.clmb -> /lib/firmware/brcm/brcmfmac4355-pcie.clm_blob
C-4355__s-C1/P-hawaii-X0_M-YSBC_V-u__m-4.3.txt -> "/lib/firmware/brcm/brcmfmac4355-pcie.Apple Inc.-MacBookAir8,2.txt"

I have used the latest ISO listed here: https://github.com/mikeeq/mbp-fedora

Per these comments: Dunedan/mbp-2016-linux#112 (comment) and Dunedan/mbp-2016-linux#112 (comment) People have been successful in loading wifi on the MacBookAir8,2 and the BCM4355 driver. The particular kernel patch they are referencing was this: ppaulweber/linux-mba@80f9698. Unfortunately I am not quite skilled enough to recompile the linux kernel myself and apply this patch to see if it works. But I looked through the patches posted on this repository and saw that the wifi kernel patches seem pretty similar.

The only conclusion I can reach is that I am doing something wrong but I cannot for the life of me figure out what I am doing wrong. Any help would be greatly appreciated!

@mikeeq
Copy link
Owner Author

mikeeq commented Jan 8, 2020

@ktb92677 Please check brcmf_chip_get_raminfo size in dmesg after adding brcmfmac.debug=2097150 to kernel args (in grub).

@ktb92677
Copy link

ktb92677 commented Jan 8, 2020

@mikeeq Hey, I am having trouble getting the CRTL+SHIFT+F10 trick to work on my mac... any other way to edit kernel args?

EDIT: okay I got to the screen with CTRL_SHIFT+F10. I edited the kernel parameters but now I can't hit CTRL+X to save it!

FURTHER EDIT: Doesn't hitting F10 boot with the modifications made in the grub interface? If so I hit F10 after making the modification and when it booted there was no reference to brcmf_chip_get_raminfo inside of dmesg.... I assume F10 means "disregard the changes and boot"

LAST EDIT (I promise... read from here): Okay so you hit CTRL+SHIFT+F10 to get grub to take the kernel parameter. Got it. I can confirm via dmesg that the kernel parameter "brcmfmac.debug=2097150" was taken. However there is still no reference to "brcmf_chip_get_raminfo" inside of dmesg... what do I do from here?

@geovie
Copy link

geovie commented Jan 8, 2020

@mikeeq Thanks a lot for this project 👍

Incompatible model:

  • Macbook Pro 15,2 i5
    • BCM4364/3 (P-maui-X3_M-HRPN_V-m__m-7.7.txt)

dmesg | grep brcmfmac:

[    5.500453] usbcore: registered new interface driver brcmfmac
[    5.500664] brcmfmac 0000:01:00.0: enabling device (0000 -> 0002)
[    5.607914] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4364-pcie for chip BCM4364/3
[    7.987068] brcmfmac 0000:01:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize

I also tried adding brcmfmac.debug=2097150 as kernel argument, but there was no change in the dmesg output...

BTW: modprobe -r brcmfmac; modprobe brcmfmac debug=2097150 should also work without the need to edit kernel arguments...

@ktb92677
Copy link

ktb92677 commented Jan 8, 2020

Thanks @geovie on the suggestion. I tried adding "debug=2097150" after modprobe like you suggested with no changes for me as well.

@Xinkai
Copy link

Xinkai commented Jan 9, 2020

Same FW failed to initialize problem here with a 4364 on a 15,3. I have tried every possible baseaddr in that file: 0x160000, 0x180000, 0x198000, 0x200000. None of them works.

@mikeeq
Copy link
Owner Author

mikeeq commented Jan 9, 2020

We need to find a solution to load brcmfmac module with debug parameter to find out baseaddr for most wifi chips revisions, so I can make several versions of kernel so everyone will be able to download kernel with his wifi.patch backed into the kernel.

@geovie
Copy link

geovie commented Jan 9, 2020

@mikeeq Is modprobe -r brcmfmac; modprobe brcmfmac debug=2097150working for you?

@mikeeq
Copy link
Owner Author

mikeeq commented Jan 9, 2020

I tried it on my current setup (when FW is loading correctly) and I don't have any additional logs in dmesg, i don't have time to test it further at the moment.

@ppaulweber
Copy link

Same FW failed to initialize problem here with a 4364 on a 15,3. I have tried every possible baseaddr in that file: 0x160000, 0x180000, 0x198000, 0x200000. None of them works.

@Xinkai @ktb92677 accordingly to one of the first issues the firmware loading address 0x160000 should be fine for BRCM 4355 and 4364 chips.

At the beginning I had a similar problem as reported above:

[    5.607914] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4364-pcie for chip BCM4364/3
[    7.987068] brcmfmac 0000:01:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize

I recommend to check the following locations in the patch of the brcmfmac driver if you have correctly patched those location as well: https://github.com/ppaulweber/linux-mba/blob/master/patch-linux-brcmfmac.diff Check especially the mapping at the end of the patch because the device id and hw id differs from the chip name!

Just to check, here is my firmware listing:

-rw-r--r-- 1 root root  655611 2019-08-17 19:53  /lib/firmware/brcm/brcmfmac4355-pcie.bin
-rw-r--r-- 1 root root 3039828 2019-08-17 21:22  /lib/firmware/brcm/brcmfmac4355-pcie.hexdump
-rw-r--r-- 1 root root     607 2019-08-17 19:53  /lib/firmware/brcm/brcmfmac4355-pcie.txcb
-rw-r--r-- 1 root root    5093 2019-08-21 16:18 '/lib/firmware/brcm/brcmfmac4355-pcie.Apple Inc.-MacBookAir8,1.txt'
-rw-r--r-- 1 root root   14241 2019-08-17 19:54  /lib/firmware/brcm/brcmfmac4355-pcie.clm_blob

And my dmesg output (I'm reloading the brcmfmac and iwd at every system start-up):

[   43.124844] usbcore: deregistering interface driver brcmfmac
[   43.346802] usbcore: registered new interface driver brcmfmac
[   43.457090] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4355-pcie for chip BCM4355/12
[   43.904065] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4355-pcie for chip BCM4355/12
[   43.928037] 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

@ktb92677
Copy link

ktb92677 commented Jan 9, 2020

@ppaulweber so here's the wifi patch that @mikeeq was using: https://github.com/mikeeq/mbp-fedora-kernel/blob/d8f5578d4fd9c9ee01c2a125dae30237aefcf391/patches/wifi.patch. I've taken a look at that and compared it to the wifi patch you posted (also carefully looking at those lines that you specified) and the patch seems pretty okay to me.

One difference I did immediately notice though was that on my system I only copied over the .txt, clm_blob, and bin. Are the hexdump and txcb files required as well for this to work?

@ppaulweber
Copy link

ppaulweber commented Jan 9, 2020

@ktb92677 but accordingly to this patch from @mikeeq the BRCM_CC_4355_CHIP_ID redirects (switch case fall-through) to tcm_rambase value 0x180000 and not 0x160000.

+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
@@ -683,6 +683,7 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci)
case BRCM_CC_4339_CHIP_ID:
case BRCM_CC_4350_CHIP_ID:
case BRCM_CC_4354_CHIP_ID:
+ case BRCM_CC_4355_CHIP_ID: /* MacBookAir8,x */
case BRCM_CC_4356_CHIP_ID:
case BRCM_CC_43567_CHIP_ID:
case BRCM_CC_43569_CHIP_ID:
@@ -694,6 +695,8 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci)
return 0x180000;
case BRCM_CC_43465_CHIP_ID:
case BRCM_CC_43525_CHIP_ID:
+ case BRCM_CC_4364_CHIP_ID: /* MacBookPro15,x */
+ return 0x160000;
case BRCM_CC_4365_CHIP_ID:
case BRCM_CC_4366_CHIP_ID:
case BRCM_CC_43664_CHIP_ID:

One difference I did immediately notice though was that on my system I only copied over the .txt, clm_blob, and bin. Are the hexdump and txcb files required as well for this to work?

no, I forgot to strip them, sry about that

@ktb92677
Copy link

ktb92677 commented Jan 9, 2020

@ppaulweber Okay, with my very limited knowledge of this I am trying to recompile the kernel with that patch included... If you have any suggestions on how I might test to see if this is what is causing my problems short of rebuilding the kernel that would be appreciated.

@mikeeq any chance you could include this fix into your repository sometime soon? Also instructions on how to build this from home. (e.g. do I just run the build.sh script on a Fedora machine?)

@mikeeq
Copy link
Owner Author

mikeeq commented Jan 9, 2020

Will do it in a minute ;)

@ktb92677
Copy link

ktb92677 commented Jan 9, 2020

okay great! @mikeeq I am currently running a "sh build.sh" over here. As soon as the new kernel-5.4.8-200.mbp.fc31.x86_64.rpm file pops out I'll go ahead and install it to my mba8,2 and I'll let you know what happens

@ktb92677
Copy link

ktb92677 commented Jan 9, 2020

@mikeeq okay well I just finally built it all and installed everything... for some reason my system doesn't get past the following screen:

BCMDHD_ExitBootService: ENTER
dhd_os_wifi_platofrm_set_power: Setting wl_reg_on to 0 succeeded
dhd_os_wifi_platform_set_power: Setting wl_reg_on to 1 succeeded

What have I done wrong..

EDIT: SO hitting return a bunch of times makes the thing boot at that screen. Anyways I got the same exact error after the kernel update (I verified that the new kernel is running via uname -a). The error is "FW failed to initialize". Not exactly sure what else to check here.. Did I also mention my mouse and keyboard don't work after the kernel upgrade?

@ktkd
Copy link

ktkd commented Jan 10, 2020

Hello, i have tested this update with mbp 15,2 i5 maui-x3. have same issue as in previous kernel

brcmf_pcie_download_fw_nvram: FW failed to initialize

trying to set debug options but without any good results.

@ppaulweber
Copy link

@ktkd the fix mentioned above addresses only the MBA8,2 issues from @ktb92677

@ktb92677 seems that UEFI has an incorrect firmware setting, just reboot to your system into Mac OS X, ignore the system error report dialog, and reboot back to your bootloader (grub etc.) and boot your Linux again.

@ktb92677
Copy link

@ppaulweber reboot to MacOSX? I over wrote MacOSX already though. Do I need to re-install it?

@ppaulweber
Copy link

@ktb92677 I hope you didn't erased the EFI partition of your internal storage, otherwise you have no proper Apple firmware installed and the Apple UEFI uses this to setup etc. the device.

@ktb92677
Copy link

ktb92677 commented Jan 10, 2020

@ppaulweber I do not believe that I erased the EFI partition. I used the following repo to install linux on my Mac: https://github.com/mikeeq/mbp-fedora.

So what are you suggesting? Should I go through the Apple recovery process and re-install MacOSX right now and then try to install Fedora again ontop of it?

EDIT: And just as I was trying to use the new mbp-fedora image posted on https://github.com/mikeeq/mbp-fedora with the new kernel patch and it doesn't get past the spinning wheel screen on Fedora... mikeeq/mbp-fedora#13

@mikeeq
Copy link
Owner Author

mikeeq commented Jan 10, 2020

@ktb92677 but README doesn't mention that you should remove all partitions :D

You can always split your main macOS partition and then use left free space for other partitions ;)

And yes I recommend to install macOS, i.e. for EFI/iBridge updates.

Cheers

@berrfred
Copy link

berrfred commented May 22, 2020

Does anybody have any issue with the Function key with the last kernel 5.6.13-300.mbp.fc32.x86_64 ? My touchbar does not show function keys any longer...

Everything has been working fine for the last three months and for every update_kernel_mbp up to 5.6.7-300.mbp.fc32.x86_64.

@atodorov
Copy link

@berrfred do not hijack issues. This is for WiFi only. Open a new one to discuss the Fn key problems you are seeing.

@atodorov
Copy link

I have MacBookPro15,4 with 5.6.13-300.mbp.fc32.x86_64

    | |   | |   "RequestedFiles" = ({"Firmware"="C-4377__s-B3/formosa.trx","TxCap"="C-4377__s-B3/formosa-X3.txcb","Regulatory"="C-4377__s-B3/formosa-X3.clmb","NVRAM"="C-4377__s-B3/P-formosa-X3_M-SPPR_V-u__m-3.1.txt"})

If I use modprobe brcmfmac rambase_addr=0x170000 with the Catalina firmware I get nowhere.

The same command with the Mojave firmware gives

[ 2553.430567] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4377-pcie for chip BCM4377/4
[ 2556.021512] ieee80211 phy0: brcmf_msgbuf_query_dcmd: Timeout on response for query command
[ 2556.021516] ieee80211 phy0: brcmf_c_preinit_dcmds: Retrieving cur_etheraddr failed, -5
[ 2556.021518] ieee80211 phy0: brcmf_bus_started: failed: -5
[ 2556.021526] ieee80211 phy0: brcmf_attach: dongle is not responding: err=-5

Any more ideas how to debug, or maybe somebody who's got newer firwmare which we can try?

@folke
Copy link

folke commented May 25, 2020

@atodorov I read in an Arch issue somewhere that Catalina firmware doesn't work yet with the latest kernel.

I got it to work by downloading the Mojave firmware instead.

#3 (comment)

@berrfred
Copy link

berrfred commented May 25, 2020

@berrfred do not hijack issues. This is for WiFi only. Open a new one to discuss the Fn key problems you are seeing.

Sorry, my mistake... I posted to the relevant project ( roadrunner2/macbook12-spi-driver#46 ) where there is already an open issue.

@haxworx
Copy link

haxworx commented May 26, 2020

Hi.

I've a MacMini8,1.. I'm running the Fedora rawhide 5.7.0-0.rc6.20200522git051143e1602d.1.fc33.x86_64 kernel (as of this message)..

I've one issue, for some WPA2 networks I have to "jump start" the module. Unload then reload the kernel module before it will associate . I've no issue with open networks. Firmware loads fine as per your instructions. I'm not sure if this is because of using the 5GHz band.

If I'm able to test anything please let me know. I'm making the assumption all the great work you're doing is getting merged.

@vinodhmoodley
Copy link

I have a 15,2 MacBook Pro:

RequestedFiles" = (\{"Firmware"="C-4364__s-B2/maui.trx","TxCap"="C-4364__s-B2/maui-X3.txcb","Regulatory"="C-4364__s-B2/maui-X3.clmb","NVRAM"="C-4364__s-B2/P-maui-X3_M-HRPN_V-m__m-7.7.txt"\})\ | | | | | "images" = \{"C-4364__s-B2/maui-X3.txcb"=\{"imagetype"="TxCap","required"=No,"imagename"="C-4364__s-B2/maui-X3.txcb"\},"C-4364__s-B2/maui-X3.clmb"=\{"imagetype"="Regulatory","required"=Yes,"imagename"="C-4364__s-B2/maui-X3.clmb"\},"C-4364__s-B2/maui.trx"=\{"imagetype"="Firmware","required"=Yes,"imagename"="C-4364__s-B2/maui.trx"\},"C-4364__s-B2/P-maui-X3_M-HRPN_V-m__m-7.7.txt"=\{"imagetype"="NVRAM","required"=Yes,"imagename"="C-4364__s-B2/P-maui-X3_M-HRPN_V-m__m-7.7.txt"\}\}\

and I get the following error if I use the downloaded Mojave firmware:

brcmf_pcie_download_fw_nvram: FW failed to initialize

If I try to run:

modprobe -r brcmfmac; modprobe brcmfmac rambase_addr=0x160000

I get the following error:
modprobe: ERROR: ../libkmod/libkmod-module.c:799 kmod_module_remove_module() could not remove 'brcmfmac': Operation not permitted

@mushoku-ningen
Copy link

@folke how did you download the majove firmware?

@vinodhmoodley
Copy link

You can use the following to automate it if you have a MacBook Pro 15,2:

https://github.com/stefanpartheym/mbp15-wifi-driver

If you want to do it manually, got to the following repository that contains Mojave wifi firmware:

https://packages.aunali1.com/apple/wifi-fw/18G2022/

To confirm exactly which wifi firmware you need, run the following in macOS Terminal:

ioreg -l | grep module-instance

@mushoku-ningen
Copy link

@vinodhmoodley oh thanks

@0cv
Copy link

0cv commented Aug 15, 2020

I've a 16,2 using C-4364__s-B3 / trinidad but likewise @FabriceColin or @rieske on bali, I'm getting the same error. I've tried to use kahana or sid as specified in https://packages.aunali1.com/apple/wifi-fw/18G2022 but that didn't help

edit: the address seems to be 0x160000 when running the debug but the error is still the same (brcmf_pcie_download_fw_nvram: FW failed to initialize)

@berrfred
Copy link

berrfred commented Oct 5, 2020

Happily running Fedora 32 on my Macbook Pro 15,2 i5 (BCM4364/3) since almost a year, latest kernel 5.7.8, still using wpa_supplicant as a backend because my experience is that NetworkManager and iwd do not collaborate nicely with hidden networks. So the only little annoying thing is reloading brcmfmac at startup.

I tried Fedora 33 beta on another laptop and it looks like NetworkManager 1.26.2 and iwd 1.9 now work properly also with hidden networks. Do you think upgrading mbp to Fedora 33 would be a bad idea or do you foresee any critical issue ?

Thanks.

@berrfred
Copy link

berrfred commented Oct 6, 2020

... well I did it, now running fc33 and so far so good !

  • during upgrade it also installed 5.7.6-201.mbp.fc32.x86_64 of course without the necessary additional drivers (this is the last release in the repo while 5.7.8 was installed through update_kernel_mbp)
  • just booted into the previously working 5.7.8 which keeps working fine
  • updated a few gnome extensions (Dash to dock above all)
  • enabled iwd as wifi backend in NetworkManager, disabled/stopped wpa, enabled/started iwd
  • rebooted

Now also wifi works fine, automatically connect to my hidden network... that was the point.

As a final step I also installed the missing drivers for kernel-5.7.6-201.mbp.fc32.x86_64 by simply executing the last part of update_kernel_mbp (just remove the initial kernel update part and pass a cmdline parameter with "kernel-5.7.6-201.mbp.fc32.x86_64" for KERNEL_PACKAGE_NAME).

@zappacor
Copy link

zappacor commented Oct 8, 2020

I've a 16,2 using C-4364__s-B3 / trinidad but likewise @FabriceColin or @rieske on bali, I'm getting the same error. I've tried to use kahana or sid as specified in https://packages.aunali1.com/apple/wifi-fw/18G2022 but that didn't help

edit: the address seems to be 0x160000 when running the debug but the error is still the same (brcmf_pcie_download_fw_nvram: FW failed to initialize)

No luck on my MBP 16,2 with "trinidad" either, getting always a brcmfmac 0000:e5:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize error.

Just in case it's important though, I don't have any *.txt file for it.

So, I copied them like this:
cp C-4364__s-B3/trinidad.trx /lib/firmware/brcm/brcmfmac4364-pcie.bin
cp C-4364__s-B3/trinidad.clmb /lib/firmware/brcm/brcmfmac4364-pcie.clm_blob
cp C-4364__s-B3/trinidad.txcb /lib/firmware/brcm/brcmfmac4364-pcie.Apple\ Inc.-MacBookPro16,2.txt

[EDIT-1/UPDATE]: from the ioreg output:
"Firmware"="C-4364__s-B3/trinidad.trx"
"TxCap"="C-4364__s-B3/trinidad-X0.txcb"
"Regulatory"="C-4364__s-B3/trinidad-X0.clmb"
"NVRAM"="C-4364__s-B3/P-trinidad-X0_M-HRPN_V-u__m-7.7.txt"
realized should have done something like this:
cp trinidad.trx /lib/firmware/brcm/brcmfmac4364-pcie.bin
cp trinidad-X0.clmb /lib/firmware/brcm/brcmfmac4364-pcie.clm_blob
cp P-trinidad-X0_M-HRPN_V-u__m-7.7.txt /lib/firmware/brcm/brcmfmac4364-pcie.Apple\ Inc.-MacBookPro16,2.txt
However, tried these cp's but no luck either

[EDIT-2]: kept trying and got a slightly better result. I now get a brcmfmac 0000:e5:00.0: brcmf_pcie_download_fw_nvram: Invalid shared RAM address 0xffffffff error (and the system hangs...)
Any idea on what else could I try/do?:

[  327.175010] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[  327.175168] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[  327.193183] brcmfmac: brcmfmac_module_init No platform data available.
[  327.193192] brcmfmac: brcmf_usb_register Enter
[  327.193219] usbcore: registered new interface driver brcmfmac
[  327.193220] brcmfmac: brcmf_pcie_register Enter
[  327.193239] brcmfmac: brcmf_pcie_probe Enter 14e4:4464
[  327.193432] brcmfmac: brcmf_pcie_get_resource Phys addr : reg space = 00000000a0e898f0 base addr 0x00000081400000
[  327.193433] brcmfmac: brcmf_pcie_get_resource Phys addr : mem space = 00000000afcd292c base addr 0x00000081000000 size 0x400000
[  327.193482] brcmfmac: brcmf_chip_recognition found AXI chip: BCM4364/4
[  327.193901] brcmfmac: brcmf_chip_cores_check  [1 ] core 0x800:59 base 0x18000000 wrap 0x18100000
[  327.193902] brcmfmac: brcmf_chip_cores_check  [2 ] core 0x812:58 base 0x18001000 wrap 0x18101000
[  327.193908] brcmfmac: brcmf_chip_cores_check  [3 ] core 0x83e:12 base 0x18002000 wrap 0x18102000
[  327.193909] brcmfmac: brcmf_chip_cores_check  [4 ] core 0x83c:16 base 0x18003000 wrap 0x18103000
[  327.193909] brcmfmac: brcmf_chip_cores_check  [5 ] core 0x812:58 base 0x18004000 wrap 0x18104000
[  327.193910] brcmfmac: brcmf_chip_cores_check  [6 ] core 0x829:22 base 0x18005000 wrap 0x18105000
[  327.193911] brcmfmac: brcmf_chip_cores_check  [7 ] core 0x840:7  base 0x1800a000 wrap 0x00000000
[  327.193911] brcmfmac: brcmf_chip_cores_check  [8 ] core 0x135:0  base 0x00000000 wrap 0x18108000
[  327.193912] brcmfmac: brcmf_chip_cores_check  [9 ] core 0x240:0  base 0x00000000 wrap 0x00000000
[  327.193912] brcmfmac: brcmf_chip_set_passive Enter
[  327.194171] brcmfmac: brcmf_chip_ai_resetcore found two d11 cores, reset both
[  327.299124] brcmfmac: brcmf_chip_set_passive Enter
[  327.299341] brcmfmac: brcmf_chip_ai_resetcore found two d11 cores, reset both
[  327.299672] brcmfmac: brcmf_chip_get_raminfo RAM: base=0x160000 size=1310720 (0x140000) sr=0 (0x0)
[  327.299684] brcmfmac: brcmf_chip_setup ccrev=59, pmurev=29, pmucaps=0x3c8c3f1d
[  327.299686] brcmfmac: brcmf_get_module_param Enter, bus=2, chip=17252, rev=4
[  327.299690] brcmfmac: brcmf_alloc Enter
[  327.299701] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4364-pcie for chip BCM4364/4
[  327.300021] brcmfmac: brcmf_fw_get_firmwares enter: dev=0000:e5:00.0
[  327.300125] brcmfmac: brcmf_fw_complete_request firmware brcm/brcmfmac4364-pcie.bin found
[  327.300148] brcmfmac: brcmf_fw_complete_request firmware brcm/brcmfmac4364-pcie.txt found
[  327.300149] brcmfmac: brcmf_fw_request_nvram_done enter: dev=0000:e5:00.0
[  327.300334] brcmfmac: brcmf_fw_request_nvram_done nvram 000000004b7985ae len 12884
[  327.300547] brcmfmac: brcmf_chip_get_raminfo RAM: base=0x160000 size=1310720 (0x140000) sr=0 (0x0)
[  327.300548] brcmfmac: brcmf_pcie_download_fw_nvram Halt ARM.
[  327.300549] brcmfmac: brcmf_pcie_download_fw_nvram Download FW brcm/brcmfmac4364-pcie.bin
[  327.300669] brcmfmac: brcmf_pcie_download_fw_nvram Download NVRAM brcm/brcmfmac4364-pcie.txt
[  327.304453] brcmfmac: brcmf_pcie_download_fw_nvram Bring ARM in running state
[  327.304455] brcmfmac: brcmf_chip_set_active Enter
[  327.304650] brcmfmac: brcmf_pcie_download_fw_nvram Wait for FW init
[  327.692617] brcmfmac 0000:e5:00.0: brcmf_pcie_download_fw_nvram: Invalid shared RAM address 0xffffffff
[  327.692994] brcmfmac: brcmf_pcie_remove Enter
[  327.692996] brcmfmac: brcmf_detach Enter

For the record, these are the files I'm using:

brcmfmac4364-pcie.txt -> drivers/P-trinidad_M-HRPN_V-u__m-7.7.txt
brcmfmac4364-pcie.Apple Inc.-MacBookPro16,2.txt -> brcmfmac4364-pcie.txt
brcmfmac4364-pcie.clm_blob -> drivers/trinidad-X0.clmb
brcmfmac4364-pcie.bin -> drivers/trinidad.trx
brcmfmac4364-pcie.trx -> brcmfmac4364-pcie.bin

[EDIT-3]: 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.

Any thoughts?

EDIT-4: Posting above edit on Dunedan/mbp-2016-linux#112 too as I think it might make more sense to discuss it there. Please lemme know otherwise

@emceku
Copy link

emceku commented Nov 10, 2020

I have the same issue like @zappacor. Is someone has any ideas?

@direlime
Copy link

direlime commented Nov 25, 2020

I'm having a strange issue with firmware crashing...I was able to install the wifi firmware and it loads fine, I can even see wifi networks through network manager. However, when I try to connect to a network the firmware crashes according to dmesg. Weirdly sometimes it crashes and resets, other times (like the 174 timepoints) it just crashes the whole system.

Nov 25 11:37:20 localhost.localdomain NetworkManager[2781]: [1606318640.5674] device (wlp5s0): supplicant interface state: scanning -> associating
Nov 25 11:37:20 localhost.localdomain NetworkManager[2781]: [1606318640.5675] device (p2p-dev-wlp5s0): supplicant management interface state: scanning -> associating
Nov 25 11:37:21 localhost.localdomain kernel: ieee80211 phy0: brcmf_fw_crashed: Firmware has halted or crashed
Nov 25 11:37:21 localhost.localdomain kernel: brcmfmac 0000:05:00.0: brcmf_pcie_bus_console_read: CONSOLE: c 001cd5c5
Nov 25 11:37:21 localhost.localdomain kernel: brcmfmac 0000:05:00.0: brcmf_pcie_bus_console_read: CONSOLE: 000007.193 sp+1ac 001cc809
Nov 25 11:37:21 localhost.localdomain kernel: brcmfmac 0000:05:00.0: brcmf_pcie_bus_console_read: CONSOLE: 000007.193 sp+1b4 00064131
Nov 25 11:37:21 localhost.localdomain kernel: brcmfmac 0000:05:00.0: brcmf_pcie_bus_console_read: CONSOLE: 000007.193 sp+204 0006139b
Nov 25 11:37:21 localhost.localdomain kernel: brcmfmac 0000:05:00.0: brcmf_pcie_bus_console_read: CONSOLE: 000007.193 sp+21c 001728d5
Nov 25 11:37:21 localhost.localdomain kernel: brcmfmac 0000:05:00.0: brcmf_pcie_bus_console_read: CONSOLE: 000007.193 sp+248 001a90a3
Nov 25 11:37:21 localhost.localdomain kernel: brcmfmac 0000:05:00.0: brcmf_pcie_bus_console_read: CONSOLE: 000007.193 sp+264 001a90a3
Nov 25 11:37:21 localhost.localdomain kernel: brcmfmac 0000:05:00.0: brcmf_pcie_bus_console_read: CONSOLE: 000007.194 sp+274 001732b9
Nov 25 11:37:21 localhost.localdomain kernel: ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
Nov 25 11:37:21 localhost.localdomain kernel: ieee80211 phy0: brcmf_cfg80211_get_tx_power: error (-5)
Nov 25 11:37:21 localhost.localdomain wpa_supplicant[2699]: wlp5s0: CTRL-EVENT-DISCONNECTED bssid=00:fc:ba:15:eb:40 reason=3 locally_generated=1
Nov 25 11:37:21 localhost.localdomain NetworkManager[2781]: [1606318641.9414] device (wlp5s0): state change: config -> unmanaged (reason 'removed', sys-iface-state: 'removed')
Nov 25 11:37:21 localhost.localdomain NetworkManager[2781]: [1606318641.9435] device (p2p-dev-wlp5s0): state change: disconnected -> unmanaged (reason 'removed', sys-iface-state: 'removed')
Nov 25 11:37:21 localhost.localdomain gnome-shell[3367]: Removing a network device that was not added
Nov 25 11:37:21 localhost.localdomain kernel: list_del corruption, ffff9c8fd88f5138->next is LIST_POISON1 (dead000000000100)
Nov 25 11:37:21 localhost.localdomain kernel: ------------[ cut here ]------------
Nov 25 11:37:21 localhost.localdomain kernel: kernel BUG at lib/list_debug.c:45!
Nov 25 11:37:21 localhost.localdomain kernel: invalid opcode: 0000 [#1] SMP NOPTI
Nov 25 11:37:21 localhost.localdomain kernel: CPU: 13 PID: 172 Comm: kworker/13:1 Tainted: G OE 5.7.8-200.mbp.fc32.x86_64 #1
Nov 25 11:37:21 localhost.localdomain kernel: Hardware name: Apple Inc. MacBookPro15,3/Mac-1E7E29AD0135F9BC, BIOS 1554.50.3.0.0 (iBridge: 18.16.12561.0.0,0) 10/29/2020
Nov 25 11:37:21 localhost.localdomain kernel: Workqueue: events brcmf_core_bus_reset [brcmfmac]
Nov 25 11:37:21 localhost.localdomain kernel: RIP: 0010:__list_del_entry_valid.cold+0xf/0x55
Nov 25 11:37:21 localhost.localdomain kernel: Code: c2 ff 0f 0b 48 89 d1 4c 89 c6 4c 89 ca 48 c7 c7 78 e6 3b 84 e8 25 74 c2 ff 0f 0b 48 89 fe 48 c7 c7 08 e7 3b 84 e8 14 74 c2 ff <0f> 0b 48 c7 c7 b8 e7 3b 84 e8 06 74 c2 ff 0f 0b 48 89 f2 48 89 fe
Nov 25 11:37:21 localhost.localdomain kernel: RSP: 0018:ffffbed8419a7d98 EFLAGS: 00010282
Nov 25 11:37:21 localhost.localdomain kernel: RAX: 000000000000004e RBX: ffff9c8fce52ec68 RCX: 0000000000000000
Nov 25 11:37:21 localhost.localdomain kernel: RDX: ffff9c8fded67cc0 RSI: ffff9c8fded59cc8 RDI: ffff9c8fded59cc8
Nov 25 11:37:21 localhost.localdomain kernel: RBP: ffff9c8fd88f5078 R08: 000000000000072b R09: 0000000000000003
Nov 25 11:37:21 localhost.localdomain kernel: R10: 0000000000000000 R11: 0000000000000001 R12: ffff9c8fbe138448
Nov 25 11:37:21 localhost.localdomain kernel: R13: ffff9c8fd88f50f8 R14: ffff9c8fda6d2a80 R15: ffff9c8fbe13b6d0
Nov 25 11:37:21 localhost.localdomain kernel: FS: 0000000000000000(0000) GS:ffff9c8fded40000(0000) knlGS:0000000000000000
Nov 25 11:37:21 localhost.localdomain kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 25 11:37:21 localhost.localdomain kernel: CR2: 00007f655100a634 CR3: 000000018280a001 CR4: 00000000003606e0
Nov 25 11:37:21 localhost.localdomain kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Nov 25 11:37:21 localhost.localdomain kernel: DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Nov 25 11:37:21 localhost.localdomain kernel: Call Trace:
Nov 25 11:37:21 localhost.localdomain kernel: device_del+0x1ac/0x3f0
Nov 25 11:37:21 localhost.localdomain kernel: rfkill_unregister+0x55/0xd0 [rfkill]
Nov 25 11:37:21 localhost.localdomain kernel: wiphy_unregister+0x50/0x310 [cfg80211]
Nov 25 11:37:21 localhost.localdomain kernel: ? kfree+0xa3/0x200
Nov 25 11:37:21 localhost.localdomain kernel: brcmf_cfg80211_detach+0x28/0xc0 [brcmfmac]
Nov 25 11:37:21 localhost.localdomain kernel: brcmf_detach+0xda/0x100 [brcmfmac]
Nov 25 11:37:21 localhost.localdomain kernel: brcmf_pcie_reset+0x41/0xa0 [brcmfmac]
Nov 25 11:37:21 localhost.localdomain kernel: process_one_work+0x1b4/0x380
Nov 25 11:37:21 localhost.localdomain kernel: worker_thread+0x53/0x3e0
Nov 25 11:37:21 localhost.localdomain kernel: ? process_one_work+0x380/0x380
Nov 25 11:37:21 localhost.localdomain kernel: kthread+0x115/0x140
Nov 25 11:37:21 localhost.localdomain kernel: ? __kthread_bind_mask+0x60/0x60
Nov 25 11:37:21 localhost.localdomain kernel: ret_from_fork+0x1f/0x40
Nov 25 11:37:21 localhost.localdomain kernel: Modules linked in: rfcomm xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_nat_tftp nf_conntrack_tftp tun nft_objref nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_re>
Nov 25 11:37:21 localhost.localdomain kernel: industrialio snd_hda_codec intel_rapl_perf btqca btrtl btbcm mc btintel pcspkr mei_me apple_mfi_fastcharge snd_hda_core mmc_core snd_hwdep bluetooth idma64 i2c_i801 intel_pch_thermal mei sbs ecdh_generic rfkill sbshc ecc apple_gmux acpi_tad apple_bl ip_tables cdc_mb>
Nov 25 11:37:21 localhost.localdomain kernel: ---[ end trace 235d509ba6ae9b81 ]---
Nov 25 11:37:21 localhost.localdomain kernel: RIP: 0010:__list_del_entry_valid.cold+0xf/0x55
Nov 25 11:37:21 localhost.localdomain kernel: Code: c2 ff 0f 0b 48 89 d1 4c 89 c6 4c 89 ca 48 c7 c7 78 e6 3b 84 e8 25 74 c2 ff 0f 0b 48 89 fe 48 c7 c7 08 e7 3b 84 e8 14 74 c2 ff <0f> 0b 48 c7 c7 b8 e7 3b 84 e8 06 74 c2 ff 0f 0b 48 89 f2 48 89 fe
Nov 25 11:37:21 localhost.localdomain kernel: RSP: 0018:ffffbed8419a7d98 EFLAGS: 00010282
Nov 25 11:37:21 localhost.localdomain kernel: RAX: 000000000000004e RBX: ffff9c8fce52ec68 RCX: 0000000000000000
Nov 25 11:37:21 localhost.localdomain kernel: RDX: ffff9c8fded67cc0 RSI: ffff9c8fded59cc8 RDI: ffff9c8fded59cc8
Nov 25 11:37:21 localhost.localdomain kernel: RBP: ffff9c8fd88f5078 R08: 000000000000072b R09: 0000000000000003
Nov 25 11:37:21 localhost.localdomain kernel: R10: 0000000000000000 R11: 0000000000000001 R12: ffff9c8fbe138448
Nov 25 11:37:21 localhost.localdomain kernel: R13: ffff9c8fd88f50f8 R14: ffff9c8fda6d2a80 R15: ffff9c8fbe13b6d0
Nov 25 11:37:21 localhost.localdomain kernel: FS: 0000000000000000(0000) GS:ffff9c8fded40000(0000) knlGS:0000000000000000
Nov 25 11:37:21 localhost.localdomain kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 25 11:37:21 localhost.localdomain kernel: CR2: 00007f655100a634 CR3: 000000018280a001 CR4: 00000000003606e0
Nov 25 11:37:21 localhost.localdomain kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Nov 25 11:37:21 localhost.localdomain kernel: DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Nov 25 11:37:21 localhost.localdomain gnome-shell[4028]: Removing a network device that was not added
Nov 25 11:37:21 localhost.localdomain wpa_supplicant[2699]: nl80211: deinit ifname=p2p-dev-wlp5s0 disabled_11b_rates=0
Nov 25 11:37:21 localhost.localdomain wpa_supplicant[2699]: Could not read interface p2p-dev-wlp5s0 flags: No such device
Nov 25 11:37:21 localhost.localdomain wpa_supplicant[2699]: nl80211: deinit ifname=wlp5s0 disabled_11b_rates=0
Nov 25 11:37:23 localhost.localdomain abrt-dump-journal-oops[2751]: abrt-dump-journal-oops: Found oopses: 1
Nov 25 11:37:23 localhost.localdomain abrt-dump-journal-oops[2751]: abrt-dump-journal-oops: Creating problem directories
Nov 25 11:37:23 localhost.localdomain abrt-server[7015]: Package 'kernel-core' isn't signed with proper key
Nov 25 11:37:23 localhost.localdomain abrt-server[7015]: 'post-create' on '/var/spool/abrt/oops-2020-11-25-11:37:23-2751-0' exited with 1
Nov 25 11:37:23 localhost.localdomain abrt-server[7015]: Deleting problem directory '/var/spool/abrt/oops-2020-11-25-11:37:23-2751-0'
Nov 25 11:37:24 localhost.localdomain abrt-dump-journal-oops[2751]: Reported 1 kernel oopses to Abrt

Any idea here? I am a bit stumped...for context I was able to get the wifi up and running on ubuntu-mbp using a similar patch, but ubuntu had crashing problems on my macbook, so I switched over to fedora. So far, fedora-mbp has worked without a hitch...except wifi.

@networkException
Copy link
Contributor

are you using iwd as the wifi backend? https://github.com/mikeeq/mbp-fedora#known-issues has a guide on installing it. I'm not an expert so I really don't know what dmesg is saying there but the whole issue description sounds like a typical problem when not using iwd

@direlime
Copy link

direlime commented Nov 25, 2020

I checked that just now, and it crashes in the exact same way under iwd as well. I was using wpa_supplicant before with NetworkManager. I also tried to connect with a different front end (used iwctl) and that also crashed the driver.

EDIT1:
Right after the driver crashes, network manager segfaults:
` NetworkManager[2835]: segfault at 128 ip 000055a4de2b1b64 sp 00007ffe8ba32f78 error 4 in NetworkManager[55a4de150000+21e000]

EDIT2
For any other total newbs in the room, the name of the firmware files is CASE SENSITIVE...That is to say I solved it, thanks for your help networkException!
`

@sxiii
Copy link

sxiii commented Jun 17, 2021

Greetings dear strugglers, developers and participants! I'm with Fedora 32 now and I do have MacbookPro 16,1 with bali firmware. And yes I have the same issue -- 0000:05:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize - tried all advices from this thread... Could somebody:

  1. Tell me how to upgrade to Fedora 33 without loosing my system at all? :D So I'm interested if this might solve the issue;
  2. Tell me if somebody was successful with using wifi on bali MBP 16,1? Are there any better/easier ways for that now?
    Thank you guys and I wish you all best of luck!

@rieske
Copy link

rieske commented Jun 18, 2021

@sxiii I succeeded with MBP 16,1 (bali) and have the wifi working. Have a look at https://wiki.t2linux.org/guides/wifi/ - you will have to compile the kernel yourself with the right patches applied as documented in the linked wiki.

@sxiii
Copy link

sxiii commented Jul 1, 2021

@rieske wifi wasn't working even after following the t2linux wiki on F32. However, today I've updated F32 on MBP to F34 and kernel to 5.12.11, and wifi automatically get up. Neat! Works OK.

@FabriceColin
Copy link

Amazing, this guide works for me too with F34/5.12.11 on my MBP16. Good job!

@RaeesBhatti
Copy link

I would like to mention this for other people struggling with this that copying firmware files from macOS and then trying to load them in Ubuntu resulted in (brcmf_pcie_download_fw_nvram: FW failed to initialize) error for me. My system is MacBookPro15,3 with BCM4364 module (Rev 3).
Downloading the firmware files from https://packages.aunali1.com/apple/wifi-fw/18G2022/ and loading them in Ubuntu worked right away. The firmware loaded correctly the first time but I couldn't see any WiFi networks. But a simple restart fixed that problem and now it's just working fine.

@sxiii
Copy link

sxiii commented Feb 7, 2022

Fedora 35, kernel version Linux fedora-mbp 5.15.16-200.mbp.fc33.x86_64 #1 SMP Mon Jan 24 13:22:50 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux -> Wifi stopped working again >,,<

@mikeeq
Copy link
Owner Author

mikeeq commented Feb 7, 2022

Have you checked the changelog in the new kernel release? There's a new wifi driver which requires a different naming schema for firmware files. More details here:

@berrfred
Copy link

berrfred commented Feb 8, 2022

Since I have removed the MacOS partition long time ago, I downloaded the content of https://packages.aunali1.com/apple/wifi-fw/18G2022/C-4364__s-B2/ into a local wifi directory and tried to run the python script ... I would expect it to generate the firmware.tar with converted names but it gives an error ... same result if I keep only maui files into the wifi directory.

Any idea of what I am missing ?

[frederic@linux-hpg-fred apple-wifi-fw] $ python wifi.sh /home/frederic/Downloads/apple-wifi-fw/wifi firmware.tar
Traceback (most recent call last):
  File "/home/frederic/Downloads/apple-wifi-fw/wifi.sh", line 283, in <module>
    pkg.add_files(sorted(col.files()))
  File "/home/frederic/Downloads/apple-wifi-fw/wifi.sh", line 249, in files
    (ext, chip, rev), rest = ident[:3], ident[3:]
ValueError: not enough values to unpack (expected 3, got 2)

Update 1: I think I got it ... need to keep everything in a C-4364__s-B2 subfolder.

frederic@linux-hpg-fred apple-wifi-fw] $ ls -la wifi-mojave/
total 4
drwxrwxr-x. 1 frederic frederic    24 Feb  8 16:00 .
drwxrwxr-x. 1 frederic frederic   126 Feb  8 16:01 ..
drwxrwxr-x. 1 frederic frederic 19482 Feb  8 13:52 C-4364__s-B2
[frederic@linux-hpg-fred apple-wifi-fw] $ python wifi.sh /home/frederic/Downloads/apple-wifi-fw/wifi-mojave firmware.tar
FILE brcm/brcmfmac4364b2-pcie.apple,ekans-HRPN-m-5.1.txt SHA256 88495c791dcd7e5e58e8507a817a072c479ae52ba849c951bbb876760caff5bc
FILE brcm/brcmfmac4364b2-pcie.apple,ekans-HRPN-m-6.1.txt SHA256 fe892ebf60317f3c200ac72bcf9a3df9dfb36ac6824fbc1bc61e71309e0b014c
FILE brcm/brcmfmac4364b2-pcie.apple,ekans-HRPN-m-6.3.txt SHA256 ffc1d43347b87c5617f5cdc55007ddad4be5bd5576397cd08ad5a76db708bc33
FILE brcm/brcmfmac4364b2-pcie.apple,ekans-HRPN-m-7.1.txt SHA256 8e871dcb179044567024cffb695efda572595dd080727e15efbd66fa2de21f0a
LINK brcm/brcmfmac4364b2-pcie.apple,ekans-HRPN-m-7.3.txt brcmfmac4364b2-pcie.apple,ekans-HRPN-m-6.3.txt
FILE brcm/brcmfmac4364b2-pcie.apple,ekans-HRPN-m-7.5.txt SHA256 40be0899be53be7c8e83bc8f287b136f938bcfb23a51358713509fbf6ea3ebca
FILE brcm/brcmfmac4364b2-pcie.apple,ekans-HRPN-m-7.7.txt SHA256 8bf8e1c5a8a5ffc167c47882cdfd0eedc38baec4584bff719a6475115620e58e
FILE brcm/brcmfmac4364b2-pcie.apple,ekans-HRPN-u-1.1.txt SHA256 c73a9f6d20dc70eb346034121c2ccda60a5258d445a20599fdc32752fe0e28a8
FILE brcm/brcmfmac4364b2-pcie.apple,ekans-HRPN-u-6.1.txt SHA256 9563f207c8411b4aa51b94ee901d20622032f6a681ac906d67b10b3344f00132
LINK brcm/brcmfmac4364b2-pcie.apple,ekans-HRPN-u-7.1.txt brcmfmac4364b2-pcie.apple,ekans-HRPN-u-6.1.txt
LINK brcm/brcmfmac4364b2-pcie.apple,ekans-HRPN-u-7.3.txt brcmfmac4364b2-pcie.apple,ekans-HRPN-u-6.1.txt
FILE brcm/brcmfmac4364b2-pcie.apple,ekans-HRPN-u-7.5.txt SHA256 1b88a709e040dab235983b807ee1b2734d77e71c3abc2b4d0e3a012256041823
FILE brcm/brcmfmac4364b2-pcie.apple,ekans.bin SHA256 a312c0bf2695138dcc056e8c455f6f3de578e52b202de7ff4636f75adef89258
FILE brcm/brcmfmac4364b2-pcie.apple,ekans.clm_blob SHA256 b5322b559585de0eb15a6bed911c3ce6b67823f8633af9ecd8ecf1c3663c1eee
FILE brcm/brcmfmac4364b2-pcie.apple,ekans.txcap_blob SHA256 fc3c814516c16e81aba7910fa7adf728507f41075c0003941822bb3feb00d4f5
FILE brcm/brcmfmac4364b2-pcie.apple,kahana-HRPN-m.txt SHA256 debff5ce48e272dd93ef84d2ac6342ee98efabff45e85b683f7d593ef1736911
FILE brcm/brcmfmac4364b2-pcie.apple,kahana-HRPN-u.txt SHA256 827b118a77bc3f5cd1cc90cd7dc31e4677c59fcc67fe4cafecf7252bae38dd1c
LINK brcm/brcmfmac4364b2-pcie.apple,kahana.bin brcmfmac4364b2-pcie.apple,ekans.bin
FILE brcm/brcmfmac4364b2-pcie.apple,kahana.clm_blob SHA256 001da9e8d080cbafeaad2e0d22a4f4f52deedc240ee9080cd7b5046a8361b865
FILE brcm/brcmfmac4364b2-pcie.apple,kahana.txcap_blob SHA256 3abf57cee04c1d5edbc6e04c43b266e23a54095a41057cd300fd644e1c701071
FILE brcm/brcmfmac4364b2-pcie.apple,kauai-HRPN-m-6.1.txt SHA256 7c38c251555cf5e8350267b7edeed483be96a173c29a0fc291dcf011d1cc82d4
FILE brcm/brcmfmac4364b2-pcie.apple,kauai-HRPN-m-6.3.txt SHA256 8a6177b9c2c0f2efed47e52f6407f3416afc06b9bd0029ca120692fd1d44d339
LINK brcm/brcmfmac4364b2-pcie.apple,kauai-HRPN-m-7.1.txt brcmfmac4364b2-pcie.apple,kauai-HRPN-m-6.3.txt
LINK brcm/brcmfmac4364b2-pcie.apple,kauai-HRPN-m-7.3.txt brcmfmac4364b2-pcie.apple,kauai-HRPN-m-6.3.txt
FILE brcm/brcmfmac4364b2-pcie.apple,kauai-HRPN-m-7.5.txt SHA256 2707ca002a9e184e4024a1fa38e7e869f355a520a43ec19cabe4396ec9eefbf2
FILE brcm/brcmfmac4364b2-pcie.apple,kauai-HRPN-m-7.7.txt SHA256 12d0c25f82af295886352c6b2f9910dcf2cff217e8b01f5ee873ff93dff770bb
FILE brcm/brcmfmac4364b2-pcie.apple,kauai-HRPN-u-6.1.txt SHA256 0b37896cbcfc0296f2988b724869e0f174ef177737ccda4e70938c319a1a5836
LINK brcm/brcmfmac4364b2-pcie.apple,kauai-HRPN-u-7.1.txt brcmfmac4364b2-pcie.apple,kauai-HRPN-u-6.1.txt
LINK brcm/brcmfmac4364b2-pcie.apple,kauai-HRPN-u-7.3.txt brcmfmac4364b2-pcie.apple,kauai-HRPN-u-6.1.txt
FILE brcm/brcmfmac4364b2-pcie.apple,kauai-HRPN-u-7.5.txt SHA256 35a9d0ba8ef6ac8c6a510fdea91d4dfb3f49c31f8ab61c3f38226a2174514caa
LINK brcm/brcmfmac4364b2-pcie.apple,kauai.bin brcmfmac4364b2-pcie.apple,ekans.bin
FILE brcm/brcmfmac4364b2-pcie.apple,kauai.clm_blob SHA256 10a2de33c0ade83135779f0a473f4f90f1a33ba9c8c71fc19ec18bb113f5467e
FILE brcm/brcmfmac4364b2-pcie.apple,kauai.txcap_blob SHA256 c1e9ec4f97fa76d26a90e450154c7575c3229509138f163d34e45ced0c6ac4da
FILE brcm/brcmfmac4364b2-pcie.apple,lanai-HRPN-m.txt SHA256 c0b26ec178b0cf3b795abd08cd4c491a27e6a50dd4b749ede2c4339c84f0d6b2
FILE brcm/brcmfmac4364b2-pcie.apple,lanai-HRPN-u.txt SHA256 69791dd3fd0a0e4d2d910f46bf7534f35283a790497bf9ed1b14f84933ee3f53
LINK brcm/brcmfmac4364b2-pcie.apple,lanai.bin brcmfmac4364b2-pcie.apple,ekans.bin
FILE brcm/brcmfmac4364b2-pcie.apple,lanai.clm_blob SHA256 e732044bdee67d7c2a5129627105e70c2eac94b33d696ffcb1a7d659a65939d6
FILE brcm/brcmfmac4364b2-pcie.apple,lanai.txcap_blob SHA256 b64ae3e514ff24cf80cc97ff533b586150bd84f09af9bd9cac5190ec3f1859ab
LINK brcm/brcmfmac4364b2-pcie.apple,maui-HRPN-m-6.1.txt brcmfmac4364b2-pcie.apple,kauai-HRPN-m-6.1.txt
LINK brcm/brcmfmac4364b2-pcie.apple,maui-HRPN-m-6.3.txt brcmfmac4364b2-pcie.apple,kauai-HRPN-m-6.3.txt
LINK brcm/brcmfmac4364b2-pcie.apple,maui-HRPN-m-7.1.txt brcmfmac4364b2-pcie.apple,kauai-HRPN-m-6.3.txt
LINK brcm/brcmfmac4364b2-pcie.apple,maui-HRPN-m-7.3.txt brcmfmac4364b2-pcie.apple,kauai-HRPN-m-6.3.txt
LINK brcm/brcmfmac4364b2-pcie.apple,maui-HRPN-m-7.5.txt brcmfmac4364b2-pcie.apple,kauai-HRPN-m-7.5.txt
FILE brcm/brcmfmac4364b2-pcie.apple,maui-HRPN-m-7.7.txt SHA256 80cbb805239db29683b88860094865f5402833b7dd32fc91ee93f2f1a767e9e7
LINK brcm/brcmfmac4364b2-pcie.apple,maui-HRPN-u-6.1.txt brcmfmac4364b2-pcie.apple,kauai-HRPN-u-6.1.txt
LINK brcm/brcmfmac4364b2-pcie.apple,maui-HRPN-u-7.1.txt brcmfmac4364b2-pcie.apple,kauai-HRPN-u-6.1.txt
LINK brcm/brcmfmac4364b2-pcie.apple,maui-HRPN-u-7.3.txt brcmfmac4364b2-pcie.apple,kauai-HRPN-u-6.1.txt
FILE brcm/brcmfmac4364b2-pcie.apple,maui-HRPN-u-7.5.txt SHA256 59da4944ec6eab1ae97117e0173244a8cf5f1db9ffed799814f94b6b4660c410
LINK brcm/brcmfmac4364b2-pcie.apple,maui.bin brcmfmac4364b2-pcie.apple,ekans.bin
FILE brcm/brcmfmac4364b2-pcie.apple,maui.clm_blob SHA256 ded2974c771e2a37e770d19aca5be7786b18a4c1a0c37d7b1bdd9b3af537c230
FILE brcm/brcmfmac4364b2-pcie.apple,maui.txcap_blob SHA256 0f1d86f3c3e2a972b98afd30b3c0cffb01b3e3bbec0312299144d3f1a0d3cdc5
FILE brcm/brcmfmac4364b2-pcie.apple,midway-HRPN-m.txt SHA256 4569d87925bc32547ccdb808f8c63e74c4342780bccb5bf9b64a19a11babdd06
FILE brcm/brcmfmac4364b2-pcie.apple,midway-HRPN-u.txt SHA256 c9fbd7f104bb8dfe2c4048cecb7daafa97d3479822b5a8280f14e498b715e1c6
LINK brcm/brcmfmac4364b2-pcie.apple,midway.bin brcmfmac4364b2-pcie.apple,ekans.bin
FILE brcm/brcmfmac4364b2-pcie.apple,midway.clm_blob SHA256 751d4e8ad36591ebab47b004f7757bd9cb4265a67377e9b3ef3dedf23ea33781
FILE brcm/brcmfmac4364b2-pcie.apple,midway.txcap_blob SHA256 2bd58d46c4f20913177488fc812d0647f69fe8a67800bc9de60ac0bb2ed58ab7
FILE brcm/brcmfmac4364b2-pcie.apple,nihau-HRPN-m.txt SHA256 91efc667ca6f946d08654c6323092fd9ca7752f7f1cc6777eeb573b14535d0a2
FILE brcm/brcmfmac4364b2-pcie.apple,nihau-HRPN-u.txt SHA256 ef249f8dd037b916dbcbf85817a677e35e9788248838b668e218334791c759ec
LINK brcm/brcmfmac4364b2-pcie.apple,nihau.bin brcmfmac4364b2-pcie.apple,ekans.bin
FILE brcm/brcmfmac4364b2-pcie.apple,nihau.clm_blob SHA256 aed9511419c49724a170aeb5e68c3d4a2075ed01ab579f8f82953c0c66fdad0f
FILE brcm/brcmfmac4364b2-pcie.apple,nihau.txcap_blob SHA256 bf4cc46a86cb4d6d9aa55b1f95913d0bc0ee772a36c3a05ba755b0a1e8c4c543
FILE brcm/brcmfmac4364b2-pcie.apple,sid-HRPN-m-2.3.txt SHA256 bee4d379d5c78ac208a01d2724fba18a4233135a69c8727bc8a3f00278cf3105
LINK brcm/brcmfmac4364b2-pcie.apple,sid-HRPN-m-3.1.txt brcmfmac4364b2-pcie.apple,sid-HRPN-m-2.3.txt
FILE brcm/brcmfmac4364b2-pcie.apple,sid-HRPN-m-5.1.txt SHA256 7ea568c8d81e54b2e8303ab8a3fe43e16784ad2225250a853f0722be1bab963b
FILE brcm/brcmfmac4364b2-pcie.apple,sid-HRPN-m-6.1.txt SHA256 bd2943b5d4e2a64f2c1698a57f680d7ddd03c55946e50cfb564a41bba4bca29a
FILE brcm/brcmfmac4364b2-pcie.apple,sid-HRPN-m-6.3.txt SHA256 d3cd4cdddbd77a43e29c4897a08449ae5dc80637fb0dfc25f6412387662f89d3
FILE brcm/brcmfmac4364b2-pcie.apple,sid-HRPN-m-7.1.txt SHA256 c59aab48194ab27d1a44ef8aecc3b0380dc891bd4db212a3b99ff271d4908f26
LINK brcm/brcmfmac4364b2-pcie.apple,sid-HRPN-m-7.3.txt brcmfmac4364b2-pcie.apple,sid-HRPN-m-6.3.txt
FILE brcm/brcmfmac4364b2-pcie.apple,sid-HRPN-m-7.5.txt SHA256 14a6d5e101204b11fb213c641f587df6f17ae206ca27cb789ce1a4e8f85e54c9
FILE brcm/brcmfmac4364b2-pcie.apple,sid-HRPN-m-7.7.txt SHA256 f8a6a707cb7a30eb4374c9f56cc4765e3da739c9b20a291d3d4746895b57a7e5
FILE brcm/brcmfmac4364b2-pcie.apple,sid-HRPN-u-1.1.txt SHA256 9d6d22365f92e539cdd7005c10dd92efccaee5d1a50498dd346af7c46f8dc569
FILE brcm/brcmfmac4364b2-pcie.apple,sid-HRPN-u-6.1.txt SHA256 e0f194c622c87a76b2e25c4c17046ad0d35b6120cd533368fd713502740814c4
LINK brcm/brcmfmac4364b2-pcie.apple,sid-HRPN-u-7.1.txt brcmfmac4364b2-pcie.apple,sid-HRPN-u-6.1.txt
LINK brcm/brcmfmac4364b2-pcie.apple,sid-HRPN-u-7.3.txt brcmfmac4364b2-pcie.apple,sid-HRPN-u-6.1.txt
FILE brcm/brcmfmac4364b2-pcie.apple,sid-HRPN-u-7.5.txt SHA256 4c692583b09849f0dbdbf9caa6d1119126f178c062dc8caf1594be6415ba3e55
LINK brcm/brcmfmac4364b2-pcie.apple,sid.bin brcmfmac4364b2-pcie.apple,ekans.bin
FILE brcm/brcmfmac4364b2-pcie.apple,sid.clm_blob SHA256 f9e35d882a88fb518d6b446a67e172eca7cbc4a2890b578b5814acc9d949100e
FILE brcm/brcmfmac4364b2-pcie.apple,sid.txcap_blob SHA256 bf29f543633dfdf798d2c06f377631426cd41586ec86c672a6e26e63a6d9fa8d

Update 2: untar firmware.tar under /lib/firmware and wifi is working with latest kernel (5.15.16) 👍

@DavidDavidDavidDavidDavidDavidDavid

@berrfred
I know you wrote this over a year ago, but is there any chance you have a saved copy of that tar file? Thanks

@abjugard
Copy link

abjugard commented Jun 2, 2023

@DavidDavidDavidDavidDavidDavidDavid Those files exist in macOS, you can extract them yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests