Community Livestream this Sunday
Added 2020-12-14 12:34:53 +0000 UTCSee update below
Mark the time: Sunday Dec 20th at 09:00 PST / 12:00 EST / 18:00 CET / 26:00* JST (Dec 21st 02:00 JST).
I just wrapped up some unrelated projects this past weekend (and stayed up a couple nights fixing years-old OBS bugs - hopefully this will help future streams go smoothly), so it's time to start ramping up this one!
This will be a fairly free-form stream where I'll cover progress this coming week, first steps for porting Linux, and answer your questions. There is no set end time, so we'll go with the flow, but I'm guessing anywhere from 1 to 3 hours depending on how many questions I get and how many tangents we end up going on.
There will be an update post with the YouTube live link, some time before the scheduled time. I should have more hardware coming in this week and I'll run some experiments, so we'll definitely have a bunch of things to talk about! See you then!
Update: To give patrons some priority over what may end up being quite a chaotic chat, and so I can have some answers well organized in advance, I'm taking questions ahead of time to answer during the stream. To ask a question for the stream, leave a comment on this post starting with "Q: ".
Comments
Iβd love to see this happen. Would definitely consider moving to M1 if this happened!
WhyNotHugo
2020-12-20 17:05:21 +0000 UTCQ: You mentioned you want to RE how macOS uses the hardware, but as far as I know, to use macOS you first need to accept the EULA which says "You may not [...], reverse-engineer, disassemble, attempt to derive the source code of, [...]". I believe there are some exceptions by law, but where do we stand on this matter? Q: Which peripherals do you plan to support? I would imagine SEP, TouchBar and TouchID are not in scope since they're not really needed.
Marco Burato
2020-12-20 12:20:43 +0000 UTCQ: Will there be support for Wayland in the GPU driver?
2020-12-20 01:11:51 +0000 UTCQ: Could you elaborate on the legal situation of the port? Bearing in mind that running mac OS in a virtual machine on non-Apple hardware is strictly speaking still illegal?
2020-12-19 13:35:26 +0000 UTCQ: Do you think it would be possible to use external GPU enclosures or external PCIE, if I understand it correctly in macOS they does not work because Apple does not included the drivers included in Intel version of OS, or you think there are some hardware limitations that prevent their usage?
2020-12-19 10:29:28 +0000 UTCQ:After successful booting ang GPU support, do you intend to implement support for other parts of HW: Wi-Fi, Microphones, Camera, Fingerprint reader, Touch Bar, Sensors (temperature, sensors used for True Tone), Neural Engine? What would be the priorities?
2020-12-19 10:26:06 +0000 UTCQ: which functionalities might likely remain unsupported, e.g. due to lack of documentation?
2020-12-19 07:15:19 +0000 UTCWhat do you envision being your "milestones"? i.e. What will you shoot for first, second, etc. ?
2020-12-18 19:05:53 +0000 UTCQ: do you think the Linux port will have similar pros to the vanilla Mac, such as good battery/ performance per watt?
Purple Rose
2020-12-18 00:26:50 +0000 UTCQ: Will there be a dedicated GitHub you open to the public for the code you write in this project and if so, how often will you update it?
2020-12-17 09:31:13 +0000 UTCQ: Do you expect major difficulty with non-GPU peripherals, since peripheral support in Linux is fairly shaky even in x86 Macs? Q: Do you expect any difficulty around power management on these systems?
2020-12-16 22:53:57 +0000 UTCQ: At what stage do you believe reversing the GPU ISA should begin -- once a kernel is booting? In parallel with that? In advance? Q: Do you expect to have your GPU-related kernel decisions influenced by the native macOS buffer management, or do you expect a 'from-scratch' DRM approach?
2020-12-15 10:48:12 +0000 UTCYes! It'll be preserved as usual on my channel.
Hector Martin
2020-12-15 07:03:20 +0000 UTCWill there be a recording of the livestream for those who can't watch it live? I hope so!
2020-12-15 05:50:32 +0000 UTCQ: I understand that supporting the full GPU can be difficult (compiler, power management and such), however, how difficult would it be to have basic display support. Would it be very different for the builtin screen (not the mini in this case) or an external one using usbc or whatever port they have on there? Also, I think I've read somewhere (can't find a reference) that the internal ssd might also be non-trivial to access? Is that true or did I misremembered and it was an intel macbook issue.
2020-12-15 03:19:36 +0000 UTCOnly tangentially related, but as a fellow streamer I can highly recommend https://everytimezone.com/ for posting dates+times in a way that's easy to pick up for people in any timezone :)
2020-12-15 02:25:03 +0000 UTCQ: Do you intend to expose an API under linux for using the Total Store Ordering mode that the M1 has for compatibility with the x86 memory model (that Rosetta uses for good performance)? I think it would be cool if this was exposed under Linux and made available to open source software, so that QEMU/wine/emulators could potentially add support and benefit bin similar ways to Apple's Rosetta.
2020-12-15 01:40:31 +0000 UTCNative booting would allow increased runtime performance of the operating system, and access to all the memory. Not everyone wants to run Mac OS, and Apple's hardware is generally pretty good both in terms of quality and looks.
2020-12-14 17:54:53 +0000 UTCAs an embedded security engineer: I'd honestly be very surprised if the JTAG/SWD on production devices was still enabled. You could enable JTAG on the T2 via an exploit to switch it to debug mode and a custom debug cable but that's a lot of work unrelated to getting Linux running and all known vulnerabilities were likely patched
Artemis Tosini
2020-12-14 17:21:08 +0000 UTCQ: What would you consider to be the "end goal" for your porting effort? As in, at which point will you stop working on this full time? Is this a case of "I'll continue as long as people continue funding me", or do you have a milestone in mind?
2020-12-14 16:38:28 +0000 UTCQ: Are you aware of other porting efforts? Is it possible to coordinate efforts? Are there specific tasks or projects that you hope someone else starts working on, since they do not play to your strengths? Is there a high-level summary (not necessarily by you) that describes the differences between booting on native metal and in virtualization for a non-Linux-guru? You're welcome to skip any or all of these
B J
2020-12-14 16:25:05 +0000 UTCI wonder if using the JTagulator on an M1 Mac Mini could find any debugging ports, which could help with figuring out the boot loader to OS transition. I bet the debug ports are there, but not with a pin or connector, hence the JTagulator. Might have the pins far apart to discourage customers messing around with it.
2020-12-14 15:49:55 +0000 UTCQ: When you're initially getting Linux booted how do you plan on getting output? Is there some UART you can sniff or an EFI framebuffer?
Artemis Tosini
2020-12-14 15:47:11 +0000 UTCI'll answer this in the stream for the benefit of others, but since you won't be able to join: as I understand it, not much. The reason for this is that those MBPs with the T2s are a horrible hack of a platform. The T2 is architecturally like the M1, and then runs a completely different OS, which communicates with the main Intel CPU over weird protocols like emulated USB peripherals on a virtual custom USB controller. All of this is for the benefit of this short-lived generation of Intel MBPs, that essentially frankenstein together an ARM+Intel computer. And so, the M1 macs don't replace the Intel CPU - they remove it. The T2 becomes the M1, and the strange BridgeOS they used to run is now macOS. But since macOS is now running directly on the bare metal of the new silicon, not communicating remotely, the drivers are completely different.
Hector Martin
2020-12-14 15:31:39 +0000 UTCI won't be able to join but I've got a question regardless: Will your work (esp. peripheral drivers) also possibly help Linux work on recent Intel MBPs?
2020-12-14 15:26:42 +0000 UTCGood point! I'll update the post.
Hector Martin
2020-12-14 15:18:40 +0000 UTCMaybe you could set up a way for us to already post some questions in advance to be answered during the livestream?
2020-12-14 13:02:13 +0000 UTCThat's mostly the userspace side in OSX, which isn't terribly useful, and the neural engine is not a priority. Totally different from my angle :-)
Hector Martin
2020-12-14 12:51:50 +0000 UTCDid you see that geohot already did some reverse engineering on M1? He would be the ideal partner for this project ;-) https://github.com/geohot/tinygrad/pull/130 https://www.youtube.com/watch?v=H6ZpMMDvB1M
Roland
2020-12-14 12:45:25 +0000 UTC