2021-12-21
00:03chengsun has quit [Quit: Quit]
00:21joe[_]D has quit []
00:23Dcow has joined #asahi
00:27yuyichao_ has quit [Ping timeout: 480 seconds]
00:43bmrgz has quit [Quit: Page closed]
01:07chengsun has joined #asahi
01:14chengsunmarcan: also confirming both brcmfmac patches work on rpi3b. Tested on 5.15.0-1-ARCH aarch64; Firmware: BCM43430/1 wl0: Mar 30 2021 01:12:21 version 7.45.98.118 (7d96287 CY) FWID 01-32059766
01:14chengsun has quit [Quit: Quit]
01:15chengsun has joined #asahi
01:18Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:18Dcow has joined #asahi
01:51jmr2 has joined #asahi
01:53jmr2brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Jan 4 2021 19:56:29 version 7.45.229 (617f1f5 CY) FWID 01-2dbd9d2e
01:53jmr2Tested by overwriting the current release (bullseye)'s firmware files with those from Legacy (buster).
01:54jmr2 has quit []
02:02DarkShadow44 has quit [Quit: ZNC - https://znc.in]
02:07kode54marcan: I have three hubs. The one connected directly to the Mac mini is a 3.0 hub, optionally powered, and its topology shows that there's both a 3.0 and 2.0 hub attached directly to the system by it.
02:07kode54then a switchable 3.0 hub with its upstream ports connected to both that first hub, and to my Ryzen desktop that I mostly use headless
02:09kode54the only other reader I have on hand is a 5.25" bay mounted thing that plugs into 3.0, and it's so buggy that it frequently disconnects itself at random
02:47darkapex1 has joined #asahi
02:52darkapex has quit [Ping timeout: 480 seconds]
03:01DarkShadow44 has joined #asahi
03:28chadmed has joined #asahi
03:31c10l0 has joined #asahi
03:35yuyichao has joined #asahi
03:37c10l has quit [Ping timeout: 480 seconds]
03:38yuyichao has quit []
03:40yuyichao has joined #asahi
03:46c10l0 has quit []
03:47c10l0 has joined #asahi
03:47c10l0 is now known as c10l
03:49yuyichao has quit [Quit: Konversation terminated!]
04:01phiologe has quit [Ping timeout: 480 seconds]
04:02Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
04:03Dcow has joined #asahi
04:05Dcow has quit []
04:06yuyichao has joined #asahi
04:07yuyichao has quit []
04:15yuyichao has joined #asahi
04:25marvin24 has joined #asahi
04:29marvin24_ has quit [Ping timeout: 480 seconds]
04:31darkapex2 has joined #asahi
04:37darkapex1 has quit [Ping timeout: 480 seconds]
04:55fionera[m]heh I think I locked me out of my recovery. I recreated my Admin User but with a different username and now I cant authorize commands in 1TR
04:57fionera[m]I get a "Boot policy error: not a valid admin user for the volume at <>". Gonna recreate the apfs containers for the linux install lets see if it fixes it
05:00Dcow has joined #asahi
05:00c10l has quit [Quit: The Lounge - https://thelounge.chat]
05:00c10l has joined #asahi
05:17Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:19fionera[m]ok works again :)
05:33Dcow has joined #asahi
05:38Dcow_ has quit [Ping timeout: 480 seconds]
06:23sailorek1234 has joined #asahi
06:59bps2 has joined #asahi
07:20marcanyes, this is somewhat fragile, because we're basically cloning the user references that macOS has
07:20marcaneventually, once we support the SEP in Linux, we should do something on first boot to prompt the user to create new SEP-backed credentials, and ideally switch the Preboot stuff to point to that
07:21marcanI should probably also do something like stash some metadata into our stubs, like the VGID of the macOS that the users were cloned from, so that future invocations can refer to it and update that file if necessary
07:49thunfisch has quit [Ping timeout: 480 seconds]
08:02MajorBiscuit has joined #asahi
08:13Major_Biscuit has joined #asahi
08:15MajorBiscuit has quit [Ping timeout: 480 seconds]
09:01kit_ty_kate has quit [Quit: WeeChat 2.9]
09:41Dcow_ has joined #asahi
09:52nabaiste^ has quit [Ping timeout: 480 seconds]
09:57thunfisch has joined #asahi
10:00bps2 has quit [Ping timeout: 480 seconds]
10:26blassphemy[m] has joined #asahi
10:32tdmm has left #asahi [#asahi]
10:33FireFox317marcan, someone actually posted your tweet regarding the brcmfmac patch on r/linux lmao: https://www.reddit.com/r/linux/comments/rkmdbp/people_using_the_brcmfmac_linux_driver_can_you/
10:36aleasto has joined #asahi
10:52marcanjust pushed the wifi stuff to wifi/take1. It's on top of the current asahi branch (with one rebase/fixup applied).
10:52marcanit should add support for all the chips (including the T2 ones), but firmware selection for T2 machines isn't properly done yet.
10:53bps2 has joined #asahi
10:53marcanyou need to get the firmware manually from macOS for now; from asahi-installer: cd src; python -m firmware.wifi /usr/share/firmware/wifi firmware.tar
10:54marcanif I get a few reports that it works properly (and reliably), I'll push it to a future asahi rebase along with other updates
10:59marcanstill need to do a review pass to make sure I didn't screw up the commit splitting, but to a first approximation it should be a sane patch series
11:07bps2 has quit [Ping timeout: 480 seconds]
11:11j`eymarcan: in e2b4b1ea44b3d6be10bcc3fc28b8467e081d0da6, sizeof(const char *) * 7, Im guessing 7 is the max_num_dimensions?
11:13Dcow_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:14zsxhmarcan: Does this need any kernel option? Built the kernel but doesnt actually detect any wifi devices or anything relevant in dmesg
11:15marcanhttps://github.com/AsahiLinux/m1n1/blob/main/proxyclient/experiments/pcie_enable_devices.py
11:16ChaosPrincessasahi intends to use u-boot for bootloader/picker and for fake efi services, right?
11:34as400[m]kettenis: I wonder - is there a place where I can read on state of M1 machines running openbsd ?
11:39kettenisas400[m]: not really; I don't get paid to do this stuff, so I don't do any reporting ;)
11:48zsxhmarcan: U can only set the BRCMFMAC driver to module, am I doing something wrong? Wrong option maybe?
11:57Redecorating[m]I'm getting `ERROR: modpost: "iowrite64" [drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko] undefined!` when building for x86_64, but changing the ifdef on line 566 in pcie.c to false lets it build (but it could be an issue with my kernel config)
12:02chadmedsounds like a config problem, built fine and running right now on my A1708 macbook pro (skylake i5)
12:05chadmedi have it as well as its dependencies built as modules. what does dmesg say about it when it tries to load?
12:11Redecorating[m]on 4364 it's reading some other data for otp https://gist.github.com/Redecorating/175994acac2cd9c562f9b9bd0116bdd1
12:14Dcow_ has joined #asahi
12:35chadmed has quit [Remote host closed the connection]
12:37mpsso does BRCMFMAC must be compiled in kernel or it could be used as module, not sure I understood backlog here
12:44Dcow_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
12:49Redecorating[m]mps: module should be fine
12:50FireFox317remember that you need the firmware in a initramfs when you build the brcmfmac driver in the kernel itself
12:50FireFox317because in my case the brcm driver loads before the rootfs is actually mounted
12:51FireFox317zsxh, make sure to also enable pcie
12:52jkm has joined #asahi
12:56phire has quit [Ping timeout: 480 seconds]
12:58mpsI built it as module (as I have don't use initramfs), 'modprobe brcmfmac' load it and other required modules, but interface is not instantiated and dmesg doesn't shows it tries to load firmware
13:01j`eythis wont work unless you run https://github.com/AsahiLinux/m1n1/blob/main/proxyclient/experiments/pcie_enable_devices.py which means you need to be using the proxy
13:02kettenis12:15 <@marcan> https://github.com/AsahiLinux/m1n1/blob/main/proxyclient/experiments/pcie_enable_devices.py
13:03zsxhj`ey: I chainloaded latest m1n1, enabled pcie and still got nothing. Lspci does show broadcom however, so it must be my kernel config
13:06Redecorating[m]try searching for `brcm`
13:23jkm has quit [Quit: leaving]
13:32Dcow_ has joined #asahi
13:41marcanRedecorating[m]: thanks for the 4364 check, I'll see if I can figure out what's going on. something looks broken there.
13:42marcanRedecorating[m]: what machine is this, and can you let me know the revision? (lspci -vvnn will tell you)
13:46marcanhttps://github.com/AsahiLinux/linux/commit/ce352dbd1c276e3b64d02dbbb00bda0abb0c85b7#diff-8031660c6ab8477bad8cf8603eb34311776f8f8d0d6e1fd57c5c32027b04c577R2012
13:47marcanRedecorating[m]: if you feel like a bit of a brute force test, you can try changing BRCMF_OTP_MAX_WORDS to 0x800 and base to 0 and words = 0x800
13:47marcanand see what happens; it'll log a ton and will probabl complain a lot, but it might help us find the OTP if it's somewhere unexpected
13:54Redecorating[m]marcan: It's a MacBookPro16,1 with BCM4364 B3 which is rev 4 in lspci. The nvram macos uses is bali with vendor u, antenna X3. Tomorrow I'll see if increasing the words and starting at 0 gets anything.
14:02Guest7760 is now known as svenpeter[m]
14:19zsxhI built BRCMFMAC and its PCIe support into the kernel, so Im not quite sure why it would be missing
14:34marcanif you build in the driver then you need to put the firmware in an initramfs, otherwise it will fail to load it on boot
14:34yuyichao has quit [Ping timeout: 480 seconds]
14:51zsxh has quit [Ping timeout: 480 seconds]
15:03yuyichao has joined #asahi
15:14sailorek1234 has quit [Quit: sailorek1234]
15:25fionera[m]kettenis: i tried to add the m1 max dts to your uboot branch for fun and to see if it maybe gives stuff to serial, it doesnt xD
15:26darkapex3 has joined #asahi
15:29tpw_rulesfionera[m]: if you want any hope you will have to change the values here: https://github.com/kettenis/u-boot/blob/apple-m1-m1n1-nvme/arch/arm/mach-apple/board.c as the pro/max have ram at a different address (mentioned in the october/november progress report iirc). not sure about hose other memory regions
15:30fionera[m]Ah nice will give it a try
15:31darkapex2 has quit [Ping timeout: 480 seconds]
15:33tpw_rulesi think also they might have a different nvme and related hardware? at least the numbers are bigger in the device trees
15:37fionera[m]ok thats sadly nothing I trust myself to do
15:41FireFox317uboot isnt using interrupts right? otherwise aic also has to be updated
15:42kettenistpw_rules: the upstreamed code is using the device tree, but the branch still uses a hardcoded address I think
15:42Sebhl[m] has joined #asahi
15:44kettenisthe upstreamed version still uses a hardcoded address for the debug uart though, and the debug uart is still enabled by default
15:50kettenissince I don't start syslog and effectively nack crashlog and ioreport, I have nothing to put into the SART
15:51kettenisbit of a hack maybe, but as long as I can get away with that it is a nice simplification
16:10off^ has joined #asahi
16:26zimsneexh has joined #asahi
16:29zimsneexhmarcan: (zsxh, btw) I built it into the kernel. Would the kernel complain about missing firmware in the kernel log?
16:31FireFox317zimsneexh, yes it will definitely put a message in dmesg when it cannot find the firmware
16:31Glanzmann has joined #asahi
16:36Glanzmannmarcan[m]: Can you please apply to m1n1? https://tg.st/u/0001-make-proxyclient-experiments-pcie_enable_devices.py-.patch
16:45Glanzmannmarcan[m]: I'm on the mini. I turned the mini on it boots to m1n1, I chainload newest m1n1, than I run pcie_enable_devices.py. It appears to be crashing and m1n1 proxy is unresponsive afterwards. See: https://pbot.rmdir.de/u/9S8a8qr9NrLUFfa6F9Twig
16:48Glanzmannj`ey: I assume so because I always try until one works. And I'm also chainloading m1n1 using the same serial device (see pastebot).
16:49j`eyGlanzmann: no, look at it: "(nuc) [~/work/m1n1] CE=/dev/ttyACM1 ./proxyclient/tools/chainload.py build/m1n1.macho
16:50Glanzmannj`ey: Okay, I shut up. I just tried and you're right it works: https://pbot.rmdir.de/nV8Ps_9C3RwKGnb-YBJorw
16:51Glanzmannj`ey: Thank you. :-) Previously ttyACM device always stayed the same. Don't know why it now is changing after chainloading.
16:51Hotswap has quit [Remote host closed the connection]
16:52zimsneexhj`ey: Enabled the option and now I'm getting kernel logs from brcmfmac. It fails since it's not on initramfs, but i'll try to do that now
16:57GlanzmannRegarding wifi, I'm still on the mini, I chainloaded mini, run pci enable experiment, booted linux, do not have a ramdisk, built brcmfmac, extracted the firmware captures with the latest asahi-installer change. I see the pci device but wifi device does not show up after modprobe brcmfmac. See: https://pbot.rmdir.de/VdsEeKVaWZbh1SM-mQviTw
17:01zimsneexhj`ey: The initrd.gz would have this directory structure, right? /usr/lib/firmware/brcm/ with all the firmware files in that
17:06tpw_rules has quit [Ping timeout: 480 seconds]
17:09tpw_rules has joined #asahi
17:12zimsneexhhuh, the firmware file(s) it's looking for don't exist on my macOS install, guess i have to update
17:15zimsneexhI am, yes. It's looking for brcm/brcmfmac4378b1-pcie.apple,shikoku-RASP-m.bin but I dont have that in the extracted firmware from macOS
17:20j`eyin macOS you can run ioreg -l | grep RequestedFiles, that will show you which files macOS is using and you should have that in the directory you pass to the firmware py script
17:22FireFox317marcan, i think the driver before your changes retried to get the firmware after 60seconds or so, i dont think that happens currently, and maybe some people are relying on this behaviour (tho they prob shouldnt)
17:26Glanzmannmarcan[m]: I tried the mini and the air, both no luck. I used your latest installer script. sending you my dump via msg.
17:27FireFox317marcan, hmm no maybe somehow linux loads the driver again or something (was with a builtin driver btw, not a module)
17:28FireFox317Glanzmann, sure, you can also build it as amodule
17:28Glanzmannmarcan: Can you please upload me your kernel and module tree or your .config, than I rebuild try again.
17:30kit_ty_kate has joined #asahi
17:30yuyichao_ has joined #asahi
17:33sorearTIL there are cases where you need to build a modular kernel that don't come down to "extremely little ram" or "bootloader limitations". am curious if there is a list of other drivers that are limited in this way when compiled in
17:33yuyichao has quit [Ping timeout: 480 seconds]
17:34marcanit's not exactly surprising that if you build in drivers and not the firmware they require, things can break
17:34ChaosPrincessyou can also build firmware directly into kernel, there is a config field for that
17:34ChaosPrincessbut that makes it non-redistributable and other unpleasant stuff
17:35FireFox317so my initramfs should contain usr/lib/firmware/brcm/brcm* right?
17:35marcaneither way ~all distros are going to be building this as a module, and if you're building your own kernels you can handle building an initramfs to go along with it
17:35FireFox317j`ey, okay so usr/firmware/brcm/brcm*
17:36marcanzimsneexh: it should be loading brcm/brcmfmac4378b1-pcie.apple,shikoku.bin and brcm/brcmfmac4378b1-pcie.apple,shikoku-RASP-m.txt and brcm/brcmfmac4378b1-pcie.apple,shikoku.clm_blob
17:37FireFox317j`ey, oh sorry, i thought you meant dont include usr in that patch
17:37FireFox317my bad
17:37marcannote that it tries many variations on firmware names, since the copy script reduces them to a common denominator
17:37Glanzmannmarcan: Can you please upload me your config? This is the menu: https://tg.st/u/screenshot-air-2021-12-21-18_36_54.png
17:37zimsneexhmarcan: By it you mean Linux? It retries those constantly, I can get a dmesg if it would be useful
17:39ponkey364[m] has joined #asahi
17:42Glanzmannmarcan: probably not, I'll fix it. Stupid mistake. I used jannaus config. CONFIG_BRCMFMAC_PCIE was missing.
17:43zimsneexhmarcan: That's my initramfs: https://zimsneexh.eu/x/tree-initramfs.txt and that's dmesg https://zimsneexh.eu/x/dmesg.txt
17:45marcanzimsneexh: it's spending 60 seconds per firmware load. I think you have some config option that makes it ask userspace for firmware, and you don't have userspace listening
17:53zimsneexhmarcan: How would i specify boot-args if i create a .macho for the Hypervisor? Or do i get it some other way?
17:59FireFox317okay yeah, i run into the same kernel panic. m1 air (j313) brcmfmac4378b1-pcie.apple,shikoku-RASP-m-6.11-XX
17:59FireFox317systemd is however causing all the messages to be intertwined -_-
18:03Glanzmannmy kernel also crashes, X starts and than it is dead, I now disable X and make a hardcopy.
18:07FireFox317marcan, ip addr now shows the interface, lets see if i can connect to my wifi network
18:08Major_Biscuit has quit [Ping timeout: 480 seconds]
18:10marcanI've been running with a million debugs enabled so I haven't experienced the "normal" dmesg :p
18:10zimsneexhIt still panics on MBA for me, but i'll try to clean build the kernel first, just in case..
18:10Glanzmannzimsneexh: I try the macbook air right now. Give me a second. Here my config: https://tg.st/u/.config
18:11marcanclean build should never be necessary, more likely you didn't pull properly or you didn't copy the kernel or something silly like that
18:13jmr2 has joined #asahi
18:14marcanI moved the problem structure from stack to heap and I don't think there's anything overflowable on the stack left, so... I think that's probably you're still running the old one :)
18:14jmr2Glanzmann: you might want to disconnect your wired connection, to make your results more significant.
18:15Glanzmannjmr2: I only had so many wired connection because I was not sure if I screwed up the kernel config or the system was crashing.
18:16Glanzmannmarcan: Yes ghz. I got a new wifi 6 access point which can go upto 1200 Mbits (a little bit over 100 MB/s).
18:16marcanand yeah, some "general use / perf tests" would be good; I haven't really stressed it yet. it would at least validate that 1) performance is good with all the proper config files we use, and 2) it's reasonably stable, no weirdo random crash bugs
18:18marcanonce we confirm this isn't blatantly broken and I add T2 support though, I'll send an RFC to the maintainers anyway, see what they have to say
18:20jmr2marcan: I saw your previous comment regarding country code. It's not clear from me if it's stored somewhere or obtained from one of the questions asked during MacOS setup.
18:25FireFox317marcan, i get this in my dmesg now: ieee80211 phy0: brcmf_p2p_set_firmware: failed to update device address ret -52
18:26jmr2 has quit [Quit: Page closed]
18:26FireFox317not completely sure if it is related, my rootfs might also be screwed, or i dont have the correct configs enabled
18:28FireFox317okay, will try some stuff
18:34FireFox317marcan, watching youtube on firefox now, so it defintely works :)
18:40GlanzmannCan I capture the firmware on the mini and use it on the air or should I recapture on the macbook air?
18:40GlanzmannI also captured on the air but I'm not sure if I captured with the latest asahi-installer commit, so recaptyuring to be on the safe side
18:41GlanzmannOh and does someone managed to get the keyboard working with the 'wifi' branch on the air? If so which config options do I need (last time I tried the air that was with rc upstream kernel and jannaus config which worked fine).
18:42Raqbit4 has joined #asahi
18:44yuyichao has joined #asahi
18:47Raqbit has quit [Ping timeout: 480 seconds]
18:47Raqbit4 is now known as Raqbit
18:47zimsneexhmarcan: It does work on MBA, must've just used the wrong Image.gz or something. Great job!
18:48yuyichao_ has quit [Ping timeout: 480 seconds]
18:53Glanzmannzimsneexh: No, I boot from the nvme. no initrd. https://pbot.rmdir.de/oEJQm7VJ1zwhF-_8k8EG5Q
18:56marcanpresumably firmware versions do change e.g. to fix security bugs, but I'd hope they don't introduce breaking changes
18:56marcaneither way brcmfmac already has several firmware version feature gate mechanisms and I just added yet another one
18:58SamAdams[m]Is there a plan to enable pcie devices and allow for the wifi-firmware for direct payload in m1n1, so we can try out the Wi-Fi, or will we need to chainload it?
18:58marcanthat's coming up next after I spend tomorrow making this work on T2 too so I can submit it
18:59marcanI'm going to start with the critical ones (gpio, battery) and then we'll see about adding more features as we go along
19:00SamAdams[m]Yes! That would be cool. Kind of like virtualSMC for Hackintosh.
19:00marcanso working out SMC features and adding subdrivers is good territory for less experienced folks to help out
19:00Major_Biscuit has joined #asahi
19:02ketteniscurrently trying to figure out if I can shut down the SMC in u-boot and bring it back up in OpenBSD
19:23zimsneexhGlanzmann: That'll probably be outdated relatively soon once marcan pushes the wifi cahnges to asahi branch
19:38yuyichao_ has joined #asahi
19:42yuyichao has quit [Ping timeout: 480 seconds]
20:02aleasto has quit [Remote host closed the connection]
20:05zimsneexhGlanzmann: I don't have that. Like I said, I use networkmanager. You should give nmcli a shot, it's quite usable
20:19NightRaven[m]Question so the wifi now works ?
20:30___nick___ has joined #asahi
20:30___nick___ has quit []
20:32___nick___ has joined #asahi
20:35GlanzmannNightRaven[m]: Yes it does, but not with your setup because you need a second machine to run the pci enable experiment.
20:35Glanzmannzimsneexh: I tried, it doesn't get my interface up. I try now to compile an all modkernel and try again.
20:58Major_Biscuit has quit [Ping timeout: 480 seconds]
21:08___nick___ has quit [Ping timeout: 480 seconds]
21:42tdmm has joined #asahi
21:42Glanzmann has quit [Quit: EOF]
21:59ar has quit [Ping timeout: 480 seconds]
22:00off^ has quit [Ping timeout: 480 seconds]
22:01off^ has joined #asahi
22:08ar has joined #asahi
22:20Major_Biscuit has joined #asahi
22:48Major_Biscuit has quit [Ping timeout: 480 seconds]
23:02gladiac is now known as Guest9080
23:02gladiac has joined #asahi
23:07Guest9080 has quit [Ping timeout: 480 seconds]
23:58yuyichao_ has quit [Ping timeout: 480 seconds]