pipcet / pearl

GNU/Linux on Apple M1 hardware
GNU General Public License v3.0
35 stars 6 forks source link

M1 Mini - Boot persistence #31

Open Johnnie390 opened 2 years ago

Johnnie390 commented 2 years ago

Pip,

as discussed in thread/issue #29. I would like to know when boot persistance might become available on this hardware using an NVME SSD. As I am not familiar with apple internals or this stage1/2/3 stuff, being a humble Linux soldier. Any assistance you need, please let me know.

Regards,

Ry

PS I have booted to RAM in the past using tmpfs and initramfs, but as stated already, I am not familiar with apple's walled garden.

pipcet commented 2 years ago

Well, first, the obligatory warning: using the NVMe disk might put your device into a state that requires DFU mode to restore. (That said, this only happened to me once, when I deliberately modified the recovery partition to see what would happen.)

The most important part is not to touch the Apple partitions. That means using the Apple Disk Utility to create one (or several) MS-DOS partitions that Linux can then use (it doesn't care much about the partition type in the partition table). The second most important part is that fatfs currently is not supported: it syncs to disk in a way the Linux NVMe driver doesn't understand yet, so changes might not be written after an fsync.

So, from memory:

  1. boot into Recovery Mode
  2. launch the Disk Utility and repartition so you have a large MS-DOS partition, but keep the existing Apple partitions
  3. decide whether you want to use LVM or not
  4. (if using LVM) configure pearl to boot from /dev/mapper/[volume group name]-[logical volume name], even though the volume group doesn't exist yet. Just choose any useful pair of names.
  5. (if not using LVM) configure pearl to boot from /dev/mapper/nvme0n1p3 /dev/nvme0n1p3, unless you have additional partitions, in which case you might have to go back and fix the partition number later
  6. launch the Debian installer
  7. when reaching that point, choose "manual" partitioning. Do not choose "guided-use entire disk" as the Apple parts of the disk need to be present for pearl to work.
  8. (if using LVM) use the existing MS-DOS partition as an LVM physical volume, set up an LVM volume group (name as above), a logical volume in it (name as above), and set it up as an ext4 root file system
  9. (if not using LVM) use the existing MS-DOS partition as an ext4 root file system
  10. proceed to install
  11. reboot

If all goes well, you will boot to your new Debian system automatically. If things do not go well, do the following:

  1. start pearl
  2. open a shell prompt (in the lower right window)
  3. enter
    echo shell > /persist/finalchoices
    final
  4. get a shell prompt (hopefully) to figure out what's gone wrong, mount the root file system to /mnt, and execute exec switch_root /mnt /sbin/init
  5. note that you will have to do this every time until you fix your pearl nvram variable, in Recovery Mode, by executing nvram pearl="root /dev/nvme0n1p17;delay 180;no4k" or similar. Also, pearl does additional magic to install WiFi firmware and kernel modules, so it's better not to use the finalchoices=shell approach unless you have to for some reason, or to copy the relevant magic from bin/init-final

Btrfs does work but requires extra setup (debian defaults, when creating a btrfs root file system, to putting its stuff in a subvolume, and pearl attempts to mount the main volume, so /sbin/init doesn't exist). Ext4 should work. Other file systems most likely will not work, and become corrupted after you attempt to mount them because some data will be written back to the file system and some won't. In particular, this means FAT.

(Edited to fix incorrect /dev/ path)

Johnnie390 commented 2 years ago

Hello Pip,

be MS-DOS partition, I presume you mean an EX-FAT partition?

Regards,

Ry

pipcet commented 2 years ago

I use the option called "MS-DOS (FAT32)" in Disk Utility, but ExFAT ought to work as well if you don't see the option for some reason. The partition is then reformatted as a different file system which macOS should be unable to recognize...

pipcet commented 2 years ago

Oh, and of course, do feel free to leave questions or comments. As I said, it was from memory, though I'm currently going through an install with the new kernel on the update branch and it appears to be working so far.

One gotcha is that it's very advisable to suggest a desktop environment; without it, you won't get network-manager, and it'll be harder to connect the machine to a network again.

Just as a reminder, it is of course possible to install different distributions, as long as those distributions accept being switched to using a foreign kernel (and, alas, as long as they're okay with a 16 KB page size). Technically, of course, we're not running Debian, but the Debian userspace with our own kernel and modules.

Johnnie390 commented 2 years ago

Hello Pip, did as you suggested until I got to the Debian (11) Installer, manually partition disk (NVME) etc. no problems. At the end of the Debian install, I get this message (see attached photo).

Regards, IMG_0149

I have tried a straight reboot and a power recycle, in both cases, your pearl script starts again. Am I missing a step here?

Regards

Ry

pipcet commented 2 years ago

Are you saying you are selecting "final" in the boot menu, and it boots to the installer again, after the installation? Can you open a shell and cat /persist/root in it to see it's correct?

(Unfortunately, there's a bug that I only fixed today which means you have to hit enter once on the pearl screen rather than just waiting for it to go away. Sorry about that).

pipcet commented 2 years ago

The message is okay, by the way. Pearl is the boot loader, the Debian installer just doesn't know it exists :-)

Johnnie390 commented 2 years ago

"Are you saying you are selecting "final" in the boot menu, and it boots to the installer again, after the installation? Can you open a shell and cat /persist/root in it to see it's correct? - I select Install (Debian Installer) from your menu.

No, after the "successful" Debian install, after a power off/on, your perl script (no4k, delay, root /dev/... etc.) starts automatically.

Johnnie390 commented 2 years ago

cat /persist/root /dev/mapper/nvme0n1p3. This looks correct.

pipcet commented 2 years ago

I'm not sure I understand how that can happen. What should happen is that after the power on, you see the pearl 4-screen split-screen again, select "final", and it should boot to Debian. Are you saying you're seeing Recovery Mode instead?

Maybe a screenshot could help me understand what you're seeing.

Johnnie390 commented 2 years ago

Pip,

"What should happen is that after the power on, you see the pearl 4-screen split-screen again, select "final", and it should boot to Debian." No, it would seem the Perl/Debian installer is starting again when I select "final". Please see screen shot. IMG_0150

Regards,

Ry

pipcet commented 2 years ago

Oh, you have /dev/mapper/nvme0n1p3, not /dev/nvme0n1p3. Can you try fixing that for one boot by opening a shell (from the pearl menu) and running

root /dev/nvme0n1p3
final

If you're happy with the results, you can go into the Recovery Mode terminal and run

nvram pearl='no4k;root /dev/nvme0n1p3;delay 180'

(or whatever) to see whether it works automatically, though you'll still have to select "final" manually until tomorrow's release.

pipcet commented 2 years ago

Sorry about that mistake, by the way. Entirely my fault, should be fixed in the instructions now.

Johnnie390 commented 2 years ago

Hello Pip,

you boot persistence Debian Installer works! My compliments on the brain cells expended to get this to work. Chapeau! A few observations.. When I select "final" from your Pearl menu, the Debian code I installed appears to kick-off, but halts.
I can however open another TTY and type "startx" which brings me to the LXQT which I chose yesterday from the Debian Installer (tasksel). In directory /persist, I have two tar files - i) brcmfmac.tar and ii) wifi.tar. should I do anything with these files? When I started the Debian Installer yesterday, it installed a 5.10.0-10-arm64 kernel. When I boot using the Pearl script, I eventually land on the LXQt desktop, but using (your) kernel 5.16.0-rc5. root@magalas:/Transit# ll /lib/modules total 16 4 drwxr-xr-x 4 1001 sddm 4096 Dec 22 02:50 . 4 drwxr-xr-x 77 1001 sddm 4096 Dec 23 11:42 .. 4 drwxr-xr-x 3 root root 4096 Dec 23 08:34 5.10.0-10-arm64 4 drwxr-xr-x 3 1001 sddm 4096 Dec 23 12:54 5.16.0-rc5 root@magalas:/Transit# uname -a Linux magalas 5.16.0-rc5 #1 SMP Wed Dec 22 00:45:55 UTC 2021 aarch64 GNU/Linux Maybe there are too many abstraction layers at play here?

I also observe the (ethernet) internet speed is not what I expect, somwehat slow. Can I at this stage, enable 4K dynamically or do I have to go back to the Pearl script? My LXQT monitor settings is still reporting 1920x1080 @ 0Hz... XRANDR also.

Regards,

Ry

pipcet commented 2 years ago

Hello Ry, that's excellent news!

When I select "final" from your Pearl menu, the Debian code I installed appears to kick-off, but halts.

Hmm. What does cat /proc/cmdline say? It's possible a debug setting was left in there.

In directory /persist, I have two tar files - i) brcmfmac.tar and ii) wifi.tar. should I do anything with these files?

I think we're currently unpacking them automatically, so you can probably delete them; in any case, they're both necessary for WiFi but nothing else.

When I started the Debian Installer yesterday, it installed a 5.10.0-10-arm64 kernel. When I boot using the Pearl script, I eventually land on the LXQt desktop, but using (your) kernel 5.16.0-rc5.

Yes. The way it currently is is that Debian installs a 5.10 kernel but it's never used. Uninstalling the Debian kernel package causes dependency woes, so I just left both installed for now.

It's true that /lib/modules contains subdirectories for both kernels; right now, the way that happens is a bit of a hack, because I've been stuck in a system that couldn't get the network modules to get the other modules once too often :-)

Anyway, apart from the wasted disk space, this shouldn't cause major issues.

Maybe there are too many abstraction layers at play here?

Almost certainly :-)

I also observe the (ethernet) internet speed is not what I expect, somwehat slow.

Is this with or without the EEE firmware? dmesg should have some messages from the tigon/tg driver explaining whether the firmware was found. (I have Ethernet set up to the mini but don't use it much, usually going for WiFi only; I did notice some connection speed issues but thought they had since been fixed...)

Can I at this stage, enable 4K dynamically or do I have to go back to the Pearl script?

I'm afraid at this point you'll have to go back to Recovery Mode and modify the nvram variable, either directly or by running the Pearl perl script again (note, though, that there was just a new "release" and I haven't been able to test it yet).

Thanks, again, for all the testing, Pip

Johnnie390 commented 2 years ago

Pip,

EEE firmware??? Here is an excerpt from dmesg -

root@magalas:~# dmesg |grep -i tg [ 6.314179] tg3 0000:03:00.0: deferred probe timeout, ignoring dependency [ 6.314990] tg3 0000:03:00.0: of_irq_parse_pci: failed with rc=-22 [ 6.315795] tg3 0000:03:00.0: enabling device (0000 -> 0002) [ 6.332721] tg3 0000:03:00.0 eth0: Tigon3 [partno(BCM57762) rev 57766000] (PCI Express) MAC address 00:10:18:00:00:00 [ 6.333545] tg3 0000:03:00.0 eth0: attached PHY is 57765 (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[1]) [ 6.334366] tg3 0000:03:00.0 eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] TSOcap[1] [ 6.335187] tg3 0000:03:00.0 eth0: dma_rwctrl[00000001] dma_mask[64-bit] [ 16.781417] tg3 0000:03:00.0: Adding to iommu group 3 [ 16.782088] tg3 0000:03:00.0: of_irq_parse_pci: failed with rc=-22 [ 16.794344] tg3 0000:03:00.0 eth0: Tigon3 [partno(BCM57762) rev 57766000] (PCI Express) MAC address 00:10:18:00:00:00 [ 16.794826] tg3 0000:03:00.0 eth0: attached PHY is 57765 (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[1]) [ 16.795305] tg3 0000:03:00.0 eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] TSOcap[1] [ 16.795780] tg3 0000:03:00.0 eth0: dma_rwctrl[00000001] dma_mask[64-bit] [ 40.116549] tg3 0000:03:00.0 eth0: Link is up at 100 Mbps, full duplex [ 40.118160] tg3 0000:03:00.0 eth0: Flow control is off for TX and off for RX [ 40.119756] tg3 0000:03:00.0 eth0: EEE is disabled

Regards,

Ry

Johnnie390 commented 2 years ago

The penny drops - root@magalas:~# ethtool --show-eee eth0 EEE settings for eth0: EEE status: enabled - inactive Tx LPI: 2047 (us) Supported EEE link modes: 100baseT/Full 1000baseT/Full Advertised EEE link modes: 100baseT/Full 1000baseT/Full Link partner advertised EEE link modes: Not reported

Johnnie390 commented 2 years ago

Pip,

just tried your latest release, this time omitting the "no4k" NVRAM parameter. Kernel panic, please see screenshot -

IMG_0155

pipcet commented 2 years ago

Yes, I messed up that one :-( It's salvageable (I'm running it), but that's probably not necessary or useful. The release has been deleted, so if you reinstall it should go back to the previous, kinda-working one.

Johnnie390 commented 2 years ago

Have done so. Unfortunately, I will have to start the no4k dance with Pearl again.

Johnnie390 commented 2 years ago

Pip,

also seeing this -

@magalas:~# dmesg |grep brcmf [ 12.911927] brcmfmac 0000:01:00.0: Adding to iommu group 5 [ 12.912513] brcmfmac 0000:01:00.0: of_irq_parse_pci: failed with rc=-22 [ 12.912906] brcmfmac 0000:01:00.0: enabling device (0000 -> 0002) [ 13.022162] brcmfmac 0000:01:00.0: module revision data: chip 4378, chip rev B1, module RASP, module rev 6.11, vendor m [ 13.022587] brcmfmac 0000:01:00.0: module serial number: 0c06f00020e53d76 [ 13.023030] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378-pcie for chip BCM4378/3 [ 15.901687] ieee80211 phy0: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 15.902159] ieee80211 phy0: brcmf_c_preinit_dcmds: Retrieving cur_etheraddr failed, -5 [ 15.902630] ieee80211 phy0: brcmf_bus_started: failed: -5 [ 15.903108] ieee80211 phy0: brcmf_attach_postirq: dongle is not responding: err=-5 [ 19.059089] brcmfmac 0000:01:00.0: of_irq_parse_pci: failed with rc=-22 [ 19.166177] brcmfmac 0000:01:00.0: module revision data: chip 4378, chip rev B1, module RASP, module rev 6.11, vendor m [ 19.167456] brcmfmac 0000:01:00.0: module serial number: 0c06f00020e53d76 [ 19.168805] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378-pcie for chip BCM4378/3 [ 25.317688] brcmfmac 0000:01:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize [ 28.222945] brcmfmac 0000:01:00.0: of_irq_parse_pci: failed with rc=-22 [ 28.330175] brcmfmac 0000:01:00.0: module revision data: chip 4378, chip rev B1, module RASP, module rev 6.11, vendor m [ 28.331755] brcmfmac 0000:01:00.0: module serial number: 0c06f00020e53d76 [ 28.333370] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378-pcie for chip BCM4378/3 [ 28.983964] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378-pcie for chip BCM4378/3 [ 29.002651] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4378/3 wl0: Oct 26 2021 16:10:41 version 18.20.310.15.7.8.120 FWID 01-5d6c3867 [ 35.165689] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 37.181685] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 37.182375] ieee80211 phy2: brcmf_dongle_scantime: Scan assoc time error (-5) [ 39.197688] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 39.198421] ieee80211 phy2: brcmf_netdev_open: failed to bring up cfg80211 [ 41.213686] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command

[ 83.549685] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 85.565685] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 87.581689] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 87.582689] ieee80211 phy2: brcmf_dongle_scantime: Scan assoc time error (-5) [ 89.597684] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 89.598666] ieee80211 phy2: brcmf_netdev_open: failed to bring up cfg80211 [ 91.613685] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 91.614661] ieee80211 phy2: brcmf_cfg80211_get_channel: chanspec failed (-5) [ 93.629688] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 93.630673] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-5) [ 95.645686] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 97.661687] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 99.677684] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 99.678635] ieee80211 phy2: brcmf_dongle_scantime: Scan assoc time error (-5) [ 101.693684] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 101.694641] ieee80211 phy2: brcmf_netdev_open: failed to bring up cfg80211 [ 103.709686] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 103.710640] ieee80211 phy2: brcmf_cfg80211_get_channel: chanspec failed (-5) [ 105.725683] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 105.726611] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-5) [ 107.741686] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 107.742612] ieee80211 phy2: brcmf_cfg80211_get_channel: chanspec failed (-5) [ 109.757681] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 109.758593] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-5) [ 111.773683] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 111.774621] ieee80211 phy2: brcmf_cfg80211_get_channel: chanspec failed (-5) [ 113.789686] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 113.790626] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-5) [ 115.805681] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 115.806594] ieee80211 phy2: brcmf_cfg80211_get_channel: chanspec failed (-5) [ 117.821682] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 117.822589] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-5) [ 119.837687] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 119.838592] ieee80211 phy2: brcmf_cfg80211_get_channel: chanspec failed (-5) [ 121.853687] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 121.854575] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-5) [ 123.869694] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 125.885684] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 127.902906] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 127.903796] ieee80211 phy2: brcmf_dongle_scantime: Scan assoc time error (-5) [ 129.923090] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 129.923993] ieee80211 phy2: brcmf_netdev_open: failed to bring up cfg80211 [ 131.942759] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 131.943675] ieee80211 phy2: brcmf_cfg80211_get_channel: chanspec failed (-5) [ 133.961991] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 133.962946] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-5) [ 135.980809] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 137.999294] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 140.017473] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 140.018384] ieee80211 phy2: brcmf_dongle_scantime: Scan assoc time error (-5) [ 142.035386] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 142.036293] ieee80211 phy2: brcmf_netdev_open: failed to bring up cfg80211 . . . [ 158.173194] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-5) [ 158.174666] ieee80211 phy2: brcmf_msgbuf_tx_ioctl: Failed to reserve space in commonring [ 158.175599] ieee80211 phy2: brcmf_cfg80211_get_channel: chanspec failed (-12) [ 158.176538] ieee80211 phy2: brcmf_msgbuf_tx_ioctl: Failed to reserve space in commonring [ 158.177475] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-12) [ 158.178429] ieee80211 phy2: brcmf_msgbuf_tx_ioctl: Failed to reserve space in commonring [ 158.179359] ieee80211 phy2: brcmf_msgbuf_tx_ioctl: Failed to reserve space in commonring

Any ideas?

Johnnie390 commented 2 years ago

Pip,

also seeing this -

@magalas:~# dmesg |grep brcmf [ 12.911927] brcmfmac 0000:01:00.0: Adding to iommu group 5 [ 12.912513] brcmfmac 0000:01:00.0: of_irq_parse_pci: failed with rc=-22 [ 12.912906] brcmfmac 0000:01:00.0: enabling device (0000 -> 0002) [ 13.022162] brcmfmac 0000:01:00.0: module revision data: chip 4378, chip rev B1, module RASP, module rev 6.11, vendor m [ 13.022587] brcmfmac 0000:01:00.0: module serial number: 0c06f00020e53d76 [ 13.023030] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378-pcie for chip BCM4378/3 [ 15.901687] ieee80211 phy0: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 15.902159] ieee80211 phy0: brcmf_c_preinit_dcmds: Retrieving cur_etheraddr failed, -5 [ 15.902630] ieee80211 phy0: brcmf_bus_started: failed: -5 [ 15.903108] ieee80211 phy0: brcmf_attach_postirq: dongle is not responding: err=-5 [ 19.059089] brcmfmac 0000:01:00.0: of_irq_parse_pci: failed with rc=-22 [ 19.166177] brcmfmac 0000:01:00.0: module revision data: chip 4378, chip rev B1, module RASP, module rev 6.11, vendor m [ 19.167456] brcmfmac 0000:01:00.0: module serial number: 0c06f00020e53d76 [ 19.168805] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378-pcie for chip BCM4378/3 [ 25.317688] brcmfmac 0000:01:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize [ 28.222945] brcmfmac 0000:01:00.0: of_irq_parse_pci: failed with rc=-22 [ 28.330175] brcmfmac 0000:01:00.0: module revision data: chip 4378, chip rev B1, module RASP, module rev 6.11, vendor m [ 28.331755] brcmfmac 0000:01:00.0: module serial number: 0c06f00020e53d76 [ 28.333370] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378-pcie for chip BCM4378/3 [ 28.983964] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378-pcie for chip BCM4378/3 [ 29.002651] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4378/3 wl0: Oct 26 2021 16:10:41 version 18.20.310.15.7.8.120 FWID 01-5d6c3867 [ 35.165689] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 37.181685] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 37.182375] ieee80211 phy2: brcmf_dongle_scantime: Scan assoc time error (-5) [ 39.197688] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 39.198421] ieee80211 phy2: brcmf_netdev_open: failed to bring up cfg80211 [ 41.213686] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command

[ 83.549685] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 85.565685] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 87.581689] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 87.582689] ieee80211 phy2: brcmf_dongle_scantime: Scan assoc time error (-5) [ 89.597684] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 89.598666] ieee80211 phy2: brcmf_netdev_open: failed to bring up cfg80211 [ 91.613685] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 91.614661] ieee80211 phy2: brcmf_cfg80211_get_channel: chanspec failed (-5) [ 93.629688] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 93.630673] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-5) [ 95.645686] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 97.661687] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 99.677684] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 99.678635] ieee80211 phy2: brcmf_dongle_scantime: Scan assoc time error (-5) [ 101.693684] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 101.694641] ieee80211 phy2: brcmf_netdev_open: failed to bring up cfg80211 [ 103.709686] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 103.710640] ieee80211 phy2: brcmf_cfg80211_get_channel: chanspec failed (-5) [ 105.725683] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 105.726611] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-5) [ 107.741686] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 107.742612] ieee80211 phy2: brcmf_cfg80211_get_channel: chanspec failed (-5) [ 109.757681] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 109.758593] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-5) [ 111.773683] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 111.774621] ieee80211 phy2: brcmf_cfg80211_get_channel: chanspec failed (-5) [ 113.789686] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 113.790626] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-5) [ 115.805681] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 115.806594] ieee80211 phy2: brcmf_cfg80211_get_channel: chanspec failed (-5) [ 117.821682] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 117.822589] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-5) [ 119.837687] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 119.838592] ieee80211 phy2: brcmf_cfg80211_get_channel: chanspec failed (-5) [ 121.853687] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 121.854575] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-5) [ 123.869694] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 125.885684] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 127.902906] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 127.903796] ieee80211 phy2: brcmf_dongle_scantime: Scan assoc time error (-5) [ 129.923090] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 129.923993] ieee80211 phy2: brcmf_netdev_open: failed to bring up cfg80211 [ 131.942759] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 131.943675] ieee80211 phy2: brcmf_cfg80211_get_channel: chanspec failed (-5) [ 133.961991] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 133.962946] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-5) [ 135.980809] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 137.999294] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 140.017473] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 140.018384] ieee80211 phy2: brcmf_dongle_scantime: Scan assoc time error (-5) [ 142.035386] ieee80211 phy2: brcmf_msgbuf_query_dcmd: Timeout on response for query command [ 142.036293] ieee80211 phy2: brcmf_netdev_open: failed to bring up cfg80211 . . . [ 158.173194] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-5) [ 158.174666] ieee80211 phy2: brcmf_msgbuf_tx_ioctl: Failed to reserve space in commonring [ 158.175599] ieee80211 phy2: brcmf_cfg80211_get_channel: chanspec failed (-12) [ 158.176538] ieee80211 phy2: brcmf_msgbuf_tx_ioctl: Failed to reserve space in commonring [ 158.177475] ieee80211 phy2: brcmf_cfg80211_get_tx_power: error (-12) [ 158.178429] ieee80211 phy2: brcmf_msgbuf_tx_ioctl: Failed to reserve space in commonring [ 158.179359] ieee80211 phy2: brcmf_msgbuf_tx_ioctl: Failed to reserve space in commonring

Any ideas?

Johnnie390 commented 2 years ago

Github playing tricks again. I had to close and reopen this issue again. Now on 4K FWIW.

pipcet commented 2 years ago

Any ideas?

Problem in the wifi driver. Are you using it? Maybe it doesn't like being loaded but unused, and you could just rmmod it?

Johnnie390 commented 2 years ago

Pip,

trying to. The wifi part is proving to be a stubborn beast - modprobe -r brcmfmac; modprobe brcmfmac debug=2097150 [Thu Dec 23 16:19:04 2021] cfg80211: Loading compiled-in X.509 certificates for regulatory database [Thu Dec 23 16:19:04 2021] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [Thu Dec 23 16:19:04 2021] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid [Thu Dec 23 16:19:04 2021] brcmfmac 0000:01:00.0: of_irq_parse_pci: failed with rc=-22 [Thu Dec 23 16:19:04 2021] brcmfmac 0000:01:00.0: module revision data: chip 4378, chip rev B1, module RASP, module rev 6.11, vendor m [Thu Dec 23 16:19:04 2021] brcmfmac 0000:01:00.0: module serial number: 0c06f00020e53d76 [Thu Dec 23 16:19:04 2021] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378-pcie for chip BCM4378/3 [Thu Dec 23 16:19:10 2021] brcmfmac 0000:01:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize

Regards,

Ry

Johnnie390 commented 2 years ago

"cfg80211: loaded regulatory.db is malformed or signature is missing/invalid" is fixed. The ...FW failed to initialise stuff persists.

Johnnie390 commented 2 years ago

Pip,

and tips on how I can get wireless working. I am still receiving this error -

"[Fri Dec 24 07:55:36 2021] cfg80211: Loading compiled-in X.509 certificates for regulatory database [Fri Dec 24 07:55:36 2021] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [Fri Dec 24 07:55:36 2021] brcmfmac 0000:01:00.0: of_irq_parse_pci: failed with rc=-22 [Fri Dec 24 07:55:37 2021] brcmfmac 0000:01:00.0: module revision data: chip 4378, chip rev B1, module RASP, module rev 6.11, vendor m [Fri Dec 24 07:55:37 2021] brcmfmac 0000:01:00.0: module serial number: 0c06f00020e53d76 [Fri Dec 24 07:55:37 2021] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378-pcie for chip BCM4378/3 [Fri Dec 24 07:55:43 2021] brcmfmac 0000:01:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize"

Regards

Ry

pipcet commented 2 years ago

Hmm. Does unloading/reloading the module a few more times help? That's not a fix, obviously :-)

Also, are you using the nvram_mac_addr module parameter?

Johnnie390 commented 2 years ago

"Does unloading/reloading the module a few more times help? That's not a fix, obviously :-)" - Have done so already, does not help.

I have done a complete re-install of Debian (Debian Installer) to rule out any mistakes with the wireless driver I might have made yesterday. Still the same. This is happening during the Debian Install itself. See messages below - Fri Dec 24 10:54:26 2021] brcmfmac 0000:01:00.0: module revision data: chip 4378, chip rev B1, module RASP, module rev 6.11, vendor m [Fri Dec 24 10:54:26 2021] brcmfmac 0000:01:00.0: module serial number: 0c06f00020e53d76 [Fri Dec 24 10:54:26 2021] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378-pcie for chip BCM4378/3 [Fri Dec 24 10:54:32 2021] brcmfmac 0000:01:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize

"Also, are you using the nvram_mac_addr module parameter? No, no idea what this parameter does/achieves.

Regards

Ry

Johnnie390 commented 2 years ago

Pip,

I can also confirm that my eth0 (ethernet) connection is very slow. I am not getting more than 860 KB/s max on this interface. I have just done the same test on a Debian (AMD64) machine on the same network, the throughput on this machine is more than ten times faster.

Ry

pipcet commented 2 years ago

Can you show what

cat /proc/interrupts

has to say after you try downloading something over the ethernet link?

Johnnie390 commented 2 years ago

Tried a medium sized Wikipedia dump download (500MB) -

root@magalas:~# cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7
34: 0 0 0 0 0 0 0 0 KVM 0 Level kvm guest ptimer 35: 0 0 0 0 0 0 0 0 KVM 1 Level kvm guest vtimer 36: 111443 82596 134170 76296 69139 84572 67323 65572 FIQ 0 Level arch_timer 38: 7609 0 0 0 0 0 0 0 AIC 627 Level 235010000.i2c0 39: 0 0 0 0 0 0 0 0 AIC 781 Level apple-dart fault handler, apple-dart fault handler 40: 0 0 0 0 0 0 0 0 AIC 861 Level apple-dart fault handler, apple-dart fault handler 55: 0 0 0 0 0 0 0 0 AIC 617 Level 23510c000.spi 56: 0 0 0 0 0 0 0 0 AIC 696 Level apple-dart fault handler 57: 0 0 0 0 0 0 0 0 AIC 699 Level apple-dart fault handler 58: 0 0 0 0 0 0 0 0 AIC 702 Level apple-dart fault handler 59: 1889 68 0 0 0 0 0 0 AIC 400 Level 23e408000.smc_mbox 60: 1890 64 0 0 0 0 0 0 AIC 403 Level 23e408000.smc_mbox 61: 0 0 0 0 0 0 0 0 AIC 445 Level apple-dart fault handler, apple-dart fault handler 62: 1 0 0 0 0 0 0 0 AIC 427 Level 231c08000.dcp_mbox 63: 1 0 0 0 0 0 0 0 AIC 430 Level 231c08000.dcp_mbox 64: 38 2 0 0 0 0 0 0 AIC 583 Level 277408000.mbox 65: 37 0 0 0 0 0 0 0 AIC 586 Level 277408000.mbox 66: 69145 56 0 0 0 0 0 0 AIC 590 Level nvme-apple 102: 0 0 0 0 0 0 0 0 AIC 777 Level xhci-hcd:usb1 103: 43639 5 0 0 0 0 0 0 AIC 857 Level xhci-hcd:usb3 104: 0 0 0 0 0 0 0 0 23c100000.pinctrl 106 Level 0-0038, 0-0038, 0-003f, 0-003f 105: 0 0 0 0 0 0 0 0 PCIe MSI 0 Edge PCIe PME 106: 0 0 0 0 0 0 0 0 PCIe MSI 16384 Edge PCIe PME 107: 0 0 0 0 0 0 0 0 PCIe MSI 32768 Edge PCIe PME 108: 5631 13 0 0 0 0 0 0 PCIe MSI 1048576 Edge xhci_hcd 109: 0 0 0 0 0 0 0 0 PCIe MSI 1048577 Edge xhci_hcd 110: 0 0 0 0 0 0 0 0 PCIe MSI 1048578 Edge xhci_hcd 111: 0 0 0 0 0 0 0 0 PCIe MSI 1048579 Edge xhci_hcd 112: 0 0 0 0 0 0 0 0 PCIe MSI 1048580 Edge xhci_hcd 113: 0 0 0 0 0 0 0 0 PCIe MSI 1048581 Edge xhci_hcd 114: 0 0 0 0 0 0 0 0 PCIe MSI 1048582 Edge xhci_hcd 115: 0 0 0 0 0 0 0 0 PCIe MSI 1048583 Edge xhci_hcd 116: 7565 0 0 0 0 0 0 0 PCIe MSI 1572864 Edge enp3s0-tx-0 117: 0 0 0 0 0 0 0 0 PCIe MSI 1572865 Edge enp3s0-rx-1 118: 0 0 0 0 0 0 0 0 PCIe MSI 1572866 Edge enp3s0-rx-2 119: 0 0 0 0 0 0 0 0 PCIe MSI 1572867 Edge enp3s0-rx-3 120: 0 0 0 0 0 0 0 0 PCIe MSI 1572868 Edge enp3s0-rx-4 IPI0: 330238 378487 334329 350413 280137 288291 289907 301782 Rescheduling interrupts IPI1: 66855 27368 19930 18859 5078 5453 5462 5205 Function call interrupts IPI2: 0 0 0 0 0 0 0 0 CPU stop interrupts IPI3: 0 0 0 0 0 0 0 0 CPU stop (for crash dump) interrupts IPI4: 0 0 0 0 0 0 0 0 Timer broadcast interrupts IPI5: 2 0 0 0 0 0 0 0 IRQ work interrupts IPI6: 0 0 0 0 0 0 0 0 CPU wake-up interrupts Err: 0 root@magalas:~#

Ry

Johnnie390 commented 2 years ago

Pip,

a post of yours from 29th April with instructions (https://github.com/pipcet/m1/issues/5). Tried same, error message(s) identical.

pipcet commented 2 years ago

I'm seeing rx interrupts as well.

Could you try re-binding the driver by doing

cd /sys/bus/pci/drivers/tg3
echo 0000:03:00.0 > unbind
sleep 1
echo 0000:03:00.0 > bind

(then set up the network interface again)

to see whether it helps?

Thanks, Pip

Johnnie390 commented 2 years ago

Pip,

the difference between night and day. Ethernet speed now > 8MB/s. How do I make this permanent?

Ry

Johnnie390 commented 2 years ago

Pip,

the difference between night and day. Ethernet speed now > 8MB/s. How do I make this permanent?

Ry

Johnnie390 commented 2 years ago

Pip, regarding the wireless driver problems, the firmware loading would seem to have worked in November -

journalctl -k --grep=brcmfmac -- Journal begins at Fri 2021-11-19 21:11:45 CET, ends at Fri 2021-12-24 16:02:15 CET. -- Nov 19 21:11:45 magalas kernel: brcmfmac 0000:01:00.0: Adding to iommu group 5 Nov 19 21:11:45 magalas kernel: brcmfmac 0000:01:00.0: of_irq_parse_pci: failed with rc=-22 Nov 19 21:11:45 magalas kernel: brcmfmac 0000:01:00.0: enabling device (0000 -> 0002) Nov 19 21:11:45 magalas kernel: brcmfmac 0000:01:00.0: module revision data: chip 4378, chip rev B1, module RASP, module rev 6.11, vendor m Nov 19 21:11:45 magalas kernel: brcmfmac 0000:01:00.0: module serial number: 0c06f00020e53d76 Nov 19 21:11:45 magalas kernel: brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378-pcie for chip BCM4378/3 Nov 19 21:11:45 magalas kernel: brcmfmac 0000:01:00.0: of_irq_parse_pci: failed with rc=-22 Nov 19 21:11:45 magalas kernel: brcmfmac 0000:01:00.0: module revision data: chip 4378, chip rev B1, module RASP, module rev 6.11, vendor m Nov 19 21:11:45 magalas kernel: brcmfmac 0000:01:00.0: module serial number: 0c06f00020e53d76 Nov 19 21:11:45 magalas kernel: brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378-pcie for chip BCM4378/3 Nov 19 21:11:45 magalas kernel: brcmfmac 0000:01:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize Nov 19 21:11:45 magalas kernel: brcmfmac 0000:01:00.0: of_irq_parse_pci: failed with rc=-22 Nov 19 21:11:45 magalas kernel: brcmfmac 0000:01:00.0: module revision data: chip 4378, chip rev B1, module RASP, module rev 6.11, vendor m Nov 19 21:11:45 magalas kernel: brcmfmac 0000:01:00.0: module serial number: 0c06f00020e53d76 Nov 19 21:11:45 magalas kernel: brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378-pcie for chip BCM4378/3 Nov 19 21:11:45 magalas kernel: brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378-pcie for chip BCM4378/3 Nov 19 21:11:45 magalas kernel: brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4378/3 wl0: Oct 26 2021 16:10:41 version 18.20.310.15.7.8.120 FWID 01-5d6c3867 Dec 24 15:12:36 magalas kernel: brcmfmac 0000:01:00.0: of_irq_parse_pci: failed with rc=-22 Dec 24 15:12:36 magalas kernel: brcmfmac: brcmf_chip_get_raminfo: RAM size is undetermined Dec 24 15:12:36 magalas kernel: brcmfmac: brcmf_pcie_probe: failed 14e4:4425 Dec 24 15:12:36 magalas kernel: brcmfmac: probe of 0000:01:00.0 failed with error -12

pipcet commented 2 years ago

Hmm. I'm a bit stumped, because my experience with the brcmfmac driver has been that once it initializes the firmware (which may take a second or third attempt at loading brcmfmac with nvram_mac_addr set), it works very reliably.

In general, the problem here is the setup of the PCI bus, its IOMMUs, and the power gate that's controlled by the SMC coprocessor. I think I'm currently getting that order wrong, since I'm setting up the power gate, then the PCI bus, then the IOMMUs, when it would make more sense to do the power gate first, then the IOMMUs, then finally the PCI bus. Currently experimenting with that...

Johnnie390 commented 2 years ago

Pip,

what value(s) do you use for nvram_mac_addr??

Ry

pipcet commented 2 years ago

Currently, a randomized valid mac address in hexadecimal notation (so nvram_mac_addr=161616161616, for example). At some point, we're probably going to switch back to using the mac address from the ADT.

Johnnie390 commented 2 years ago

Pip,

using _rmmod brcmfmac brcmutil && sleep 2 && modprobe brcmfmac nvram_macaddr=161616161616 even several times, results in "Sat Dec 25 08:31:06 2021] brcmfmac 0000:01:00.0: of_irq_parse_pci: failed with rc=-22 [Sat Dec 25 08:31:06 2021] brcmfmac 0000:01:00.0: module revision data: chip 4378, chip rev B1, module RASP, module rev 6.11, vendor m [Sat Dec 25 08:31:06 2021] brcmfmac 0000:01:00.0: module serial number: 0c06f00020e53d76 [Sat Dec 25 08:31:06 2021] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378-pcie for chip BCM4378/3 [Sat Dec 25 08:31:12 2021] brcmfmac 0000:01:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize" consistently.

Ry

pipcet commented 2 years ago

Hmm. I wonder whether it is the right firmware:

Can you show the output of

ls -l /lib/firmware/brcm
sha1sum /lib/firmware/brcm/*

?

Johnnie390 commented 2 years ago

Telegraphy.

I have gone to the extreme of bringing up macos on the M1 and pedantically copying over the firmware files I need using this website as a rough guide - https://wiki.t2linux.org/guides/wifi/. Still no luck, the same error message(s).

4 drwxr-xr-x 3 root root 4096 Dec 25 10:46 . 4 drwxrwxrwx 33 root root 4096 Dec 24 15:23 .. 0 lrwxrwxrwx 1 root root 17 Aug 24 17:46 BCM-0a5c-6410.hcd -> BCM-0bb4-0306.hcd 56 -rw-r--r-- 1 root root 54734 Aug 24 17:46 BCM-0bb4-0306.hcd 8 -rwxr-xr-x 1 root root 7571 Dec 25 10:57 'brcmfmac4378-pcie.Apple Inc,j274.txt' 4 -rwxr-xr-x 1 root root 1067 Dec 25 10:33 'brcmfmac4378-pcie.Apple Inc.-Macmini9,1.txt' 1316 -rw-r--r-- 1 root root 1345130 Jan 1 1970 brcmfmac4378-pcie.apple,j274.bin 8 -rw-r--r-- 1 root root 7571 Jan 1 1970 brcmfmac4378-pcie.apple,j274.txt 8 -rwxr-xr-x 1 root root 7571 Dec 25 10:56 brcmfmac4378-pcie.Apple,j274.txt 1316 -rw-r--r-- 1 root root 1345130 Jan 1 1970 brcmfmac4378-pcie.apple,j293.bin 8 -rw-r--r-- 1 root root 7571 Jan 1 1970 brcmfmac4378-pcie.apple,j293.txt 1316 -rw-r--r-- 1 root root 1345130 Jan 1 1970 brcmfmac4378-pcie.apple,j313.bin 8 -rw-r--r-- 1 root root 7571 Jan 1 1970 brcmfmac4378-pcie.apple,j313.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 10:33 brcmfmac4378-pcie.bin 4 -rw-r--r-- 1 root root 1067 Dec 25 10:33 brcmfmac4378-pcie.clm_blob 4 -rw-r--r-- 1 root root 697 Jan 1 1970 brcmfmac4378-pcie.txcb 4 drwxr-xr-x 2 root root 4096 Dec 25 10:58 C-4378__s-B1

ot@magalas:/uu/burty# ll /lib/firmware/brcm/C-4378__s-B1/ total 44 4 drwxr-xr-x 2 root root 4096 Dec 25 10:58 . 4 drwxr-xr-x 3 root root 4096 Dec 25 10:46 .. 8 -rwxr-xr-x 1 root root 7571 Dec 25 10:59 'brcmfmac4378-pcie.Apple Inc,j274.txt' 4 -rwxr-xr-x 1 root root 1067 Dec 25 10:59 'brcmfmac4378-pcie.Apple Inc.-Macmini9,1.txt' 8 -rw-r--r-- 1 root root 7571 Dec 25 10:58 brcmfmac4378-pcie.apple,j274.txt 8 -rwxr-xr-x 1 root root 7571 Dec 25 10:58 brcmfmac4378-pcie.Apple,j274.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 10:33 brcmfmac4378-pcie.bin 4 -rwxr-xr-x 1 root root 1067 Dec 25 10:33 brcmfmac4378-pcie.clm_blob root@magalas:/uu/burty#

Ry

Johnnie390 commented 2 years ago

Appalling formatting. Another try -

root@magalas:/uu/burty# ll /lib/firmware/brcm/ total 4072 4 drwxr-xr-x 3 root root 4096 Dec 25 11:09 . 4 drwxrwxrwx 33 root root 4096 Dec 24 15:23 .. 0 lrwxrwxrwx 1 root root 17 Aug 24 17:46 BCM-0a5c-6410.hcd -> BCM-0bb4-0306.hcd 56 -rw-r--r-- 1 root root 54734 Aug 24 17:46 BCM-0bb4-0306.hcd 8 -rwxr-xr-x 1 root root 7571 Dec 25 10:57 'brcmfmac4378-pcie.Apple Inc,j274.txt' 4 -rwxr-xr-x 1 root root 1067 Dec 25 10:33 'brcmfmac4378-pcie.Apple Inc.-Macmini9,1.txt' 1316 -rw-r--r-- 1 root root 1345130 Jan 1 1970 brcmfmac4378-pcie.apple,j274.bin 8 -rw-r--r-- 1 root root 7571 Jan 1 1970 brcmfmac4378-pcie.apple,j274.txt 8 -rwxr-xr-x 1 root root 7571 Dec 25 10:56 brcmfmac4378-pcie.Apple,j274.txt 1316 -rw-r--r-- 1 root root 1345130 Jan 1 1970 brcmfmac4378-pcie.apple,j293.bin 8 -rw-r--r-- 1 root root 7571 Jan 1 1970 brcmfmac4378-pcie.apple,j293.txt 1316 -rw-r--r-- 1 root root 1345130 Jan 1 1970 brcmfmac4378-pcie.apple,j313.bin 8 -rw-r--r-- 1 root root 7571 Jan 1 1970 brcmfmac4378-pcie.apple,j313.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 10:33 brcmfmac4378-pcie.bin 4 -rw-r--r-- 1 root root 1067 Dec 25 10:33 brcmfmac4378-pcie.clm_blob 4 -rw-r--r-- 1 root root 697 Jan 1 1970 brcmfmac4378-pcie.txcb 0 -rw-r--r-- 1 root root 0 Dec 25 11:09 burty.txt 4 drwxr-xr-x 2 root root 4096 Dec 25 10:58 C-4378__s-B1

ot@magalas:/uu/burty# ll /lib/firmware/brcm/C-4378__s-B1/ total 44 4 drwxr-xr-x 2 root root 4096 Dec 25 10:58 . 4 drwxr-xr-x 3 root root 4096 Dec 25 10:46 .. 8 -rwxr-xr-x 1 root root 7571 Dec 25 10:59 'brcmfmac4378-pcie.Apple Inc,j274.txt' 4 -rwxr-xr-x 1 root root 1067 Dec 25 10:59 'brcmfmac4378-pcie.Apple Inc.-Macmini9,1.txt' 8 -rw-r--r-- 1 root root 7571 Dec 25 10:58 brcmfmac4378-pcie.apple,j274.txt 8 -rwxr-xr-x 1 root root 7571 Dec 25 10:58 brcmfmac4378-pcie.Apple,j274.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 10:33 brcmfmac4378-pcie.bin 4 -rwxr-xr-x 1 root root 1067 Dec 25 10:33 brcmfmac4378-pcie.clm_blob root@magalas:/uu/burty#

Johnnie390 commented 2 years ago

root@magalas:/uu/burty# sha1sum /lib/firmware/brcm/* e8f24c1761bd03ea2838cbc828dd14a11ce9ac34 /lib/firmware/brcm/BCM-0a5c-6410.hcd e8f24c1761bd03ea2838cbc828dd14a11ce9ac34 /lib/firmware/brcm/BCM-0bb4-0306.hcd 6fdff421d908e12572951a45b826204c7e651bef /lib/firmware/brcm/brcmfmac4378-pcie.Apple Inc,j274.txt d4b9bb1a956b48b3c618f2af46b3c5b5ff8639ad /lib/firmware/brcm/brcmfmac4378-pcie.Apple Inc.-Macmini9,1.txt c74f61e61bddb8e2cdf61efb80c4aee281b6e3a6 /lib/firmware/brcm/brcmfmac4378-pcie.apple,j274.bin 6fdff421d908e12572951a45b826204c7e651bef /lib/firmware/brcm/brcmfmac4378-pcie.apple,j274.txt 6fdff421d908e12572951a45b826204c7e651bef /lib/firmware/brcm/brcmfmac4378-pcie.Apple,j274.txt c74f61e61bddb8e2cdf61efb80c4aee281b6e3a6 /lib/firmware/brcm/brcmfmac4378-pcie.apple,j293.bin 6fdff421d908e12572951a45b826204c7e651bef /lib/firmware/brcm/brcmfmac4378-pcie.apple,j293.txt c74f61e61bddb8e2cdf61efb80c4aee281b6e3a6 /lib/firmware/brcm/brcmfmac4378-pcie.apple,j313.bin 6fdff421d908e12572951a45b826204c7e651bef /lib/firmware/brcm/brcmfmac4378-pcie.apple,j313.txt 244506443e7a1aceaf60e12b71c97270c23aff38 /lib/firmware/brcm/brcmfmac4378-pcie.bin e1f21c7ea2e40e5a08cde55a939dd0b30de3527f /lib/firmware/brcm/brcmfmac4378-pcie.clm_blob 86cb87b5820a87b2c858aa99fce612f55ceba3c5 /lib/firmware/brcm/brcmfmac4378-pcie.txcb

pipcet commented 2 years ago

The .clm_blob looks wrong. It's 36416 bytes here.

Johnnie390 commented 2 years ago

Before it was overwritten with the files I copied over from macos it was the same file size. I have a backup though. All of the file sizes of the macos firmware files copied over seem to be (more or less) similiar -

8 drwxr-xr-x 3 root root 65536 Dec 25 10:33 . 4 drwxr-xr-x 6 root root 32768 Dec 25 10:27 .. 8 -rwxr-xr-x 1 root root 33493 Dec 25 09:00 atlantisb.clmb 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 atlantisb-ID.clmb 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 atlantisb-ID.trx 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 atlantisb-ID.txcb 4 -rwxr-xr-x 1 root root 2647 Dec 25 09:00 atlantisb-PlatformConfig.plist 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 atlantisb.trx 4 -rwxr-xr-x 1 root root 304 Dec 25 09:00 atlantisb.txcb 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 atlantisb-X0.clmb 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 atlantisb-X0.trx 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 atlantisb-X0.txcb 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 atlantisb-X2.clmb 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 atlantisb-X2.trx 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 atlantisb-X2.txcb 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 atlantisb-X3.clmb 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 atlantisb-X3.trx 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 atlantisb-X3.txcb 4 -rwxr-xr-x 1 root root 2499 Dec 25 09:00 atlantis-PlatformConfig.plist 4 -rwxr-xr-x 1 root root 1067 Dec 25 10:33 'brcmfmac4378-pcie.Apple Inc.-Macmini9,1.txt' 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:37 brcmfmac4378-pcie.bin 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:39 brcmfmac4378-pcie.clm_blob 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-ID_M-RASP_V-mm-6.11.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-ID_M-RASP_V-mm-6.1.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-ID_M-RASP_V-mm-6.3.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-ID_M-RASP_V-mm-6.9.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-ID_M-RASP_V-um-3.7.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-ID_M-RASP_V-um-4.1.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-ID_M-RASP_V-um-6.1.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-ID_M-RASP_V-um-6.3.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-ID_M-RASP_V-um-6.5.txt 4 -rwxr-xr-x 1 root root 7666 Dec 25 09:00 P-atlantisb_M-RASP_V-mm-6.11.txt 4 -rwxr-xr-x 1 root root 7666 Dec 25 09:00 P-atlantisb_M-RASP_V-mm-6.1.txt 4 -rwxr-xr-x 1 root root 7666 Dec 25 09:00 P-atlantisb_M-RASP_V-mm-6.3.txt 4 -rwxr-xr-x 1 root root 7666 Dec 25 09:00 P-atlantisb_M-RASP_V-mm-6.9.txt 4 -rwxr-xr-x 1 root root 7605 Dec 25 09:00 P-atlantisb_M-RASP_V-um-3.7.txt 4 -rwxr-xr-x 1 root root 7605 Dec 25 09:00 P-atlantisb_M-RASP_V-um-4.1.txt 4 -rwxr-xr-x 1 root root 7605 Dec 25 09:00 P-atlantisb_M-RASP_V-um-6.1.txt 4 -rwxr-xr-x 1 root root 7605 Dec 25 09:00 P-atlantisb_M-RASP_V-um-6.3.txt 4 -rwxr-xr-x 1 root root 7605 Dec 25 09:00 P-atlantisb_M-RASP_V-um-6.5.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X0_M-RASP_V-mm-6.11.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X0_M-RASP_V-mm-6.1.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X0_M-RASP_V-mm-6.3.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X0_M-RASP_V-mm-6.9.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X0_M-RASP_V-um-3.7.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X0_M-RASP_V-um-4.1.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X0_M-RASP_V-um-6.1.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X0_M-RASP_V-um-6.3.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X0_M-RASP_V-um-6.5.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X2_M-RASP_V-mm-6.11.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X2_M-RASP_V-mm-6.1.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X2_M-RASP_V-mm-6.3.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X2_M-RASP_V-mm-6.9.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X2_M-RASP_V-um-3.7.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X2_M-RASP_V-um-4.1.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X2_M-RASP_V-um-6.1.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X2_M-RASP_V-um-6.3.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X2_M-RASP_V-um-6.5.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X3_M-RASP_V-mm-6.11.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X3_M-RASP_V-mm-6.1.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X3_M-RASP_V-mm-6.3.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X3_M-RASP_V-mm-6.9.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X3_M-RASP_V-um-3.7.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X3_M-RASP_V-um-4.1.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X3_M-RASP_V-um-6.1.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X3_M-RASP_V-um-6.3.txt 4 -rwxr-xr-x 1 root root 1067 Dec 25 09:00 P-atlantisb-X3_M-RASP_V-u__m-6.5.txt

Ry

pipcet commented 2 years ago

That's a lot of files 1067 bytes in size (I don't have any), can you have a look at them to see what's up?

Can you show the output of tar tvf /persist/wifi.tar?

Johnnie390 commented 2 years ago

I have just discovered this (https://github.com/AdityaGarg8/macOS-Big-Sur-WiFi-Firmware) online. Give me a while.

Johnnie390 commented 2 years ago

Pip,

/lib/firmware/brcm

root@magalas:/lib/firmware/brcm# ll total 5360 4 drwxr-xr-x 3 root root 4096 Dec 25 11:09 . 4 drwxrwxrwx 33 root root 4096 Dec 24 15:23 .. 0 lrwxrwxrwx 1 root root 17 Aug 24 17:46 BCM-0a5c-6410.hcd -> BCM-0bb4-0306.hcd 56 -rw-r--r-- 1 root root 54734 Aug 24 17:46 BCM-0bb4-0306.hcd 8 -rwxr-xr-x 1 root root 7666 Dec 25 11:34 'brcmfmac4378-pcie.Apple Inc,j274.txt' 8 -rwxr-xr-x 1 root root 7666 Dec 25 11:33 'brcmfmac4378-pcie.Apple Inc.-Macmini9,1.txt' 1316 -rw-r--r-- 1 root root 1345130 Jan 1 1970 brcmfmac4378-pcie.apple,j274.bin 8 -rw-r--r-- 1 root root 7666 Dec 25 11:50 brcmfmac4378-pcie.apple,j274.txt 8 -rwxr-xr-x 1 root root 7666 Dec 25 11:50 brcmfmac4378-pcie.Apple,j274.txt 1316 -rw-r--r-- 1 root root 1345130 Jan 1 1970 brcmfmac4378-pcie.apple,j293.bin 8 -rw-r--r-- 1 root root 7571 Jan 1 1970 brcmfmac4378-pcie.apple,j293.txt 1316 -rw-r--r-- 1 root root 1345130 Jan 1 1970 brcmfmac4378-pcie.apple,j313.bin 8 -rw-r--r-- 1 root root 7571 Jan 1 1970 brcmfmac4378-pcie.apple,j313.txt 1256 -rwxr-xr-x 1 root root 1282925 Dec 25 11:52 brcmfmac4378-pcie.bin 36 -rw-r--r-- 1 root root 33493 Dec 25 11:52 brcmfmac4378-pcie.clm_blob 4 -rw-r--r-- 1 root root 697 Jan 1 1970 brcmfmac4378-pcie.txcb

Still no luck.