2021-02-03
00:07amwmarcan: I cloned it and pushed it to my own git repository: git@github.com:amworsley/asahi-wiki.git
00:09amwcdesai: git lfs is available on debian - I haven't enabled it on my repositories yet - any downsides to this?
00:11amwmarcan: Would git lfs - https://git-lfs.github.com/ be acceptable for some binary blobs such as m1n1 / kernel builds?
00:40acelogic has joined #asahi-dev
00:58Namidairoit may be better to just have something automated like a github action and put it into releases
00:59davidrysk[m]amw: I concur with Namidairo. lfs is not a great idea because you don't want the releases in the repo proper, and lfs puts them there
01:00bastilianamw: There is also a simple trick to get images hosted on github: https://github.com/RWTH-EBC/AixLib/wiki/How-to:-Add-images-to-the-Wiki I think it should also work for Gists.
01:01Namidairothe threshold for when lfs is mandated there is high anyway, >100mb size on individual files
01:17bastilianHm. I tried the macvdmtool, but I can't seem to be able to get the target to boot into serial, it just boots normally as far as I can see.
01:24vafanlignardebastilian: see #asahi about 5h30m ago. there's no serial output by default.
02:18vafanlignardei tried 'macvdmtool serial' with actions 0x206 and 0x304 on an MBA'18 where i had done 'csrutil enable --without nvram;nvram boot-args="-v debug=0x8 serial=1 serialbaud=115200"' (recovery os). nothing showed up on my m1's debug-console. figured it could be worth a try at least. :)
02:20davidrysk[m]vup2: I played with it a little on a MBP '19, the key is wrong
02:20davidrysk[m]unlock key derivation rather
02:20vafanlignarde(https://git.io/JtEHe has a short list of what VDM get action list and actions info report on the apple devices I have)
02:22vafanlignardedavidrysk[m]: sorry for the confusion. i actually ran macvdmtool on the m1 (which was connected to the MBA'18 via cable). but that's interesting, does that mean that it might be possible to get macvdmtool running on non-m1 hardware too?
02:23davidrysk[m]vafanlignarde: I think it might be possible to get it running on T2 hardware. Not sure with what features, and not sure about T1
02:24davidrysk[m]vafanlignarde: when running on the M1, it does successfully reboot the T2 machine
02:25davidrysk[m]vafanlignarde: how are you extracting those actions?
02:29vafanlignardedavidrysk[m]: sounds cool. the reboot action just powers off my MBP'17 and MBA'18 (not sure if they're T1 or T2; neither have touchbar).
02:30davidrysk[m]sounds like T2
02:30vafanlignardedavidrysk[m]: https://git.io/JtBD7 (essentially asahilinux/vdmtool but for an USB-PD trigger device which had an FUSB302 onboard and for which an OSS firmware existed)
02:31davidrysk[m]oh nice. (I don't have a FUSB302)
02:34vafanlignardei've looked around but I haven't found anything that comes with both an FUSB302 and the Type-C D+/- or SBU1/2 pins broken out.. but at least those USB-PD triggers and type-c breakout boards are easy (albeit slow) to source
02:34rafaelmartins has quit [Ping timeout: 256 seconds]
02:49rafaelmartins has joined #asahi-dev
02:49KindOne has quit [Ping timeout: 272 seconds]
03:00davidrysk[m]yeah I think that's what marcan was wanting to make
03:06vafanlignardedavidrysk[m]: returning zero from GetUnlockKey() makes the code print "Unlocking: OK". not sure if that means it does succeed in unlocking it or not.. it however fails to both enter and exit 'DBMa' mode on the MacbookAir8,1. I also tried using the board IDs from https://www.theiphonewiki.com/wiki/T8012 as unlock keys with no success.
03:27davidrysk[m]vafanlignarde: I'll have to mess around with it some more.
03:27davidrysk[m]Turns out I have only one data-capable USB-C cable handy :/
03:28PhilippvK has quit [Ping timeout: 260 seconds]
03:28phiologe has joined #asahi-dev
03:44dibas has quit [Ping timeout: 272 seconds]
03:49marcanvafanlignarde: I think you might be able to get serial *for the T2* on those macs this way
03:56davidrysk[m]CST1 seems to unlock it once I swap it (char deviceName[5] = "1TSC";)
03:57davidrysk[m]DBMa mode does not seem to work
03:57qyousef has quit [Ping timeout: 256 seconds]
03:57marcanfrom M1 source to T2 target, you can also try changing the target action to 0x301 (0x1840306 -> 0x1840301 in DoSerial, just the first instance)
03:58marcanthere is also 303, which is on *both* ports on those. worth trying that one on both ports probably
03:59davidrysk[m]"source" is the machine running macvdmtool?
03:59davidrysk[m]I'm trying T2 source -> M1 target
03:59marcanyou might need to undo the old actions first if the "exit conflicting modes" feature gets confused (0x2040306 = unmap)
03:59davidrysk[m](since I'm more interested in messing with the M1)
03:59qyousef has joined #asahi-dev
03:59davidrysk[m]ahh alright
04:00davidrysk[m]sorry :)
04:25qyousef has quit [Ping timeout: 240 seconds]
04:27qyousef has joined #asahi-dev
04:29dibas has joined #asahi-dev
04:29dibas has joined #asahi-dev
04:30Namidairo has quit [Read error: Connection reset by peer]
04:30Namidairo has joined #asahi-dev
04:30odmir has quit [Remote host closed the connection]
04:31odmir has joined #asahi-dev
04:35odmir has quit [Ping timeout: 240 seconds]
04:38dibas has quit [Remote host closed the connection]
04:39dibas has joined #asahi-dev
04:39dibas has joined #asahi-dev
05:02odmir has joined #asahi-dev
05:21odmir has quit [Ping timeout: 258 seconds]
05:21acelogic has quit [Remote host closed the connection]
05:23acelogic has joined #asahi-dev
05:24awordnot has quit [Ping timeout: 256 seconds]
05:33odmir has joined #asahi-dev
05:45odmir has quit [Ping timeout: 240 seconds]
05:58awordnot has joined #asahi-dev
06:06amwmarcan: Just sent you an email about latest m1n1 proxyclient change causing qemu serial port loading failures
06:15acelogic has quit [Remote host closed the connection]
06:17marcanI tried to keep that short because otherwise it makes script startup slow and for real hardware it should be enough
06:25VinDuv has joined #asahi-dev
06:28amwmarcan: I changed it down to .6 and the first two attempts fail then worked for several in a row
06:28amwMore tests had it work 4 times in a row and then fail with proxy.UartCMDError: Reply command mismatch: Expected 0x01aa55ff, got 0x00aa55ff
06:31amw.8 gave 2 failures in about 10+ tries (2 in a row so perhaps one failure led to the next...)
06:33odmir has joined #asahi-dev
06:39odmir has quit [Ping timeout: 240 seconds]
07:23VinDuv has quit [Quit: Leaving.]
07:39amw has quit [Ping timeout: 240 seconds]
08:09sumoon[m] has left #asahi-dev ["User left"]
08:10jn__ has quit [Ping timeout: 272 seconds]
08:13jn__ has joined #asahi-dev
08:43amw has joined #asahi-dev
09:10amw has quit [Quit: WeeChat 2.3]
09:11zkrx has quit [Ping timeout: 240 seconds]
09:20amw has joined #asahi-dev
09:26KindOne has joined #asahi-dev
09:32Mary_ has quit [Quit: Bye!]
09:41zkrx has joined #asahi-dev
09:42Mary_ has joined #asahi-dev
10:02amw has quit [Quit: WeeChat 2.3]
10:07amw has joined #asahi-dev
10:11vafanlignardemarcan: i see, thanks for the clarification. +1 on what davidrysk[m] wrote, return '1TSC' in GetUnlockKey() works on olders Macs (MacBookAir8,1; MacBookPro14,1; iMac19,1), DBMa does not.
10:46amw has quit [Ping timeout: 258 seconds]
10:56TomJepp has quit [Ping timeout: 272 seconds]
10:56TomJepp has joined #asahi-dev
11:19bastilianIs there a document somewhere describing how to install m1n1? I assume it is, compiling it and configure it as boot via kmutil, or is there more to it?
11:29zkrx has quit [Ping timeout: 256 seconds]
11:46zkrx has joined #asahi-dev
12:22Glanzmannbastilian: If you find it, let me know. I ordered a mac mini m1 in order to try vdmtool. Look forward to try it out.
12:25bastilianGlanzmann: sure. I'm gonna dig into later after work. I guess it should be just that, and probably "blessing" the compiled mach file, but there might be more to it.
12:58GlanzmannIt would also be super interesting to have a kernel tree with the correlliumhq drivers. I have not tried them, but according to their twitter post they have most of the essential hardware running (ssd, touchpad, keyboard, network card, wifi).
13:01acelogic has joined #asahi-dev
13:11_jannau_https://github.com/corellium/linux-m1 kernel is not compatible with m1ni but requires preloader-m1. works self compiled on a mac mini (my last update was a week ago though)
13:34marcanI mentioned this on -re already, but the corellium kernel is developed via binary reverse engineering, which means I will not merge anything from it blindly; it needs to be audited since they are not open about their development process and they have not earned my confidence
14:30odmir has joined #asahi-dev
14:50modwizcodeamw: yes I forgot to mention that I have local timeout adjustments (although the linux loader didn't need adjustments). Tbh the adjustments aren't needed at all now that I enable the FIFO by default in qemu and fixed it from being totally broken.
14:51KindOne has quit [Ping timeout: 256 seconds]
14:51modwizcodeI'm surprised you had to fuss with it but it's possible I never tested again with the current timeouts, and if it didn't work I'd just rerun the commands
14:59odmir has quit [Remote host closed the connection]
15:00odmir has joined #asahi-dev
15:37Bluerisemarcan: how do I change the usb debug command to use a different pinset? 840306 is SBU1/2?
15:40marcancaveat emptor: if you're thinking of using this for serial, note that standard cables crossover SBU1/2 but not D+/D-
15:41BlueriseI have a breakout... but SBU1/2 don't work depending on the orientation of the cable... I'm testing it with ... uhm... you know, connection tester
15:42marcanthe orientation of the cable is compensated for on the mac side, but presumably not on your board side
15:43Blueriseyeah, but the weird thing is when I flipped it, I only got SBU1 connected, but SBU2 connected nowhere
15:45davidrysk[m]modwizcode: would be worth mentioning which port Apple says is the dfu port since it differs
15:51acelogic has quit [Remote host closed the connection]
15:54acelogic has joined #asahi-dev
15:56davidrysk[m]Bluerise: it's complicated :P
15:56davidrysk[m]some of the more expensive thunderbolt cables are active and we don't want that :p
15:58davidrysk[m]just make sure they're data and not power-only
15:58davidrysk[m]most of my usbc cables are power-only :(
15:59davidrysk[m]was trying to do data migration and was frustrated by it heh
16:01Bluerisemarcan: when I use cu on /dev/tty.debug-console I get "couldn't enable hardwar eflow control"
16:01modwizcodemarcan: speaking of picocom what omap and imap do you use for that? I always get weird newlines when I throw picocom on the pty for qemu
16:03Bluerisepatrick@mone:~/work/github/macvdmtool$ sudo picocom -q --omap crlf --imap lfcrlf -b 115200 /dev/tty.debug-console
16:06jamadazi has joined #asahi-dev
16:07marcanotherwise the timing will be messed up, you will either enable serial after the startup messages are already sent, or before a reset that breaks it
16:20vimal has quit [Remote host closed the connection]
17:40KindOne has joined #asahi-dev
17:40VinDuv has joined #asahi-dev
17:49taziden has quit [Ping timeout: 272 seconds]
17:58taziden has joined #asahi-dev
18:30Blueriseif I use the mUART to send 1.8V TX through the voltage divier, the 1.8V serial can't read it
18:31davidrysk[m]fwiw I've found homebrew to be full of bugs on M1; if you have it in /usr/local that's the Rosetta version. I switched back to MacPorts.
18:32davidrysk[m]I tried it, but it has way more bugs than MacPorts
18:32davidrysk[m]I had both installed for a time but I got tired of dealing with the bugs and just ditched it
18:34zkrx has quit [Ping timeout: 240 seconds]
19:00zkrx has joined #asahi-dev
19:38mxw39 has joined #asahi-dev
20:11vimal has joined #asahi-dev
21:49Bluerisemarcan: have a solution for the uart. the "bad" 1.8V uart provides 1.8V as reference to the mUART. mUART does TX/RX. That works well
21:49Blueriseunfortunately I only have one uart, but since I have two M1s I'll just ship that muart to kettenis
21:59BlueriseYeah, exactly. I have one that I ordered to replace my 12" Macbook, that I use with OSX
22:05VinDuv has quit [Quit: Leaving.]
22:22zkrx has quit [Ping timeout: 246 seconds]
23:07zkrx has joined #asahi-dev
23:57amw has joined #asahi-dev