SakeTami
marcan
marcan

patreon


Community Livestream this Sunday

See 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

Q: 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

Q: Will there be support for Wayland in the GPU driver?

Q: 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?

Q: 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?

Q: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?

Q: which functionalities might likely remain unsupported, e.g. due to lack of documentation?

What do you envision being your "milestones"? i.e. What will you shoot for first, second, etc. ?

Q: do you think the Linux port will have similar pros to the vanilla Mac, such as good battery/ performance per watt?

Purple Rose

Q: 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?

Q: 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?

Q: 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?

Yes! It'll be preserved as usual on my channel.

Hector Martin

Will there be a recording of the livestream for those who can't watch it live? I hope so!

Q: 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.

Only 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 :)

Q: 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.

Native 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.

As 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

Q: 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?

Q: 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

I 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.

Q: 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

I'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

I 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?

Good point! I'll update the post.

Hector Martin

Maybe you could set up a way for us to already post some questions in advance to be answered during the livestream?

That'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

Did 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


More Creators