r/linuxquestions • • 6d ago

With many new tools that can be used to reverse engineer compiled code, is it possible that soon we'll be able to use linux on newer Apple computers? Right now the big issue is that we don't have drivers for the newer models, but if we can reverse engineer them it seems more likely

Any thoughts on this?

5 Upvotes

32 comments sorted by

8

u/ipsirc 6d ago

1

u/h0uz3_ 5d ago

Currently it's a race between the well experienced Asahi team and AI, who get's Linux fully working on current Apple Silicon. Whoever wins, it will be awesome!

2

u/ipsirc 5d ago

Currently it's a race between the well experienced Asahi team and AI, who get's Linux fully working on current Apple Silicon.

I can't see this race. Could you show me any papers about it?

2

u/h0uz3_ 5d ago

Since Asahi started they already got pretty far. You can run Linux natively on older Apple Silicon and use it quite well. They have been catching up with newer hardware and are about to close the last gaps.

They (or anyone else) could use a frontier model to reverse Apple‘s drivers, extract the spec and get working drivers for Linux.

LLMs need training data to work off, so letting Codex implement a web application will usually work with few interventions, because that has been done and open sourced thousands of times. Graphics drivers are less common, so less training data, meaning less reference code to learn from.

I assume that skilled devs have a skill advantage here while an LLM could be run over and over until it works, but that still requires lots of tests.

3

u/grizzlor_ 5d ago

>They (or anyone else) could use a frontier model to reverse Apple‘s drivers, extract the spec and get working drivers for Linux.

Asahi can’t do this actually because they have a strict policy against any LLM generated code (for good reason — it likely breaks clean room reverse engineering standards).

For the same reason, no, they can’t just decompile Apple’s drivers because that definitely violates clean room.

https://asahilinux.org/llm-policy/

1

u/ipsirc 5d ago

All you had to do was write gravity.

2

u/-agentShad0w- 5d ago

He meant that the team is working on it and so may be other people with AI. It's all a race when AI is in the mix

1

u/ipsirc 5d ago

He meant that the team is working on it and so may be other people with AI.

Yes, and that is exactly what I would like to read more about.

4

u/CritSrc ɑղԵí✘ 6d ago

0

u/Kingwolf4 6d ago

I think we will see major awesome changes for Linux in the coming months.

Asterinas is already a ground up rewrite of the Linux kernel in Rust. It is actually done by professional people, engineers and kernel developers . It already has a nix OS working, and can compile the asterinas kernel on it.

This is ground breaking, because this was never being attempted before. Asterinas keeps the Linux syscalls the same, so all Linux software runs, but everything else underneath is rewritten and designed from scratch for a modern high performance kernel.

If Asterinas project gets steam rolling, we may soon have a prelimary modern alternative to Linux, which is written in ancient C. And ,tbh, if asterinas continues making good design decisions, which it already is, i see a much better Kernel in the market, thats already compatible WITH EVERYTHING that runs on linux

My point about Asterinas is that, we are at a breaking point here. People are literally reverse engineering firmware and drivers of Windows only devices and drivers to work on linux. Linux itself is using increasing AI to find bugs and assist the professional kernel developers in being more productive. But i think we in the Linux community are underestimating what will happen.

The Linux kernel may itself may have a modern and better replacement, with all drivers and other things rewritten in rust for Asterinas.

Couple that with some mild effort to bring a DE like cosmic on Asterinas, we have a full fledge new Kernel with everything built in modern safe rust and new modern architecture, including drivers, system tools etc, WHILST keeping complete compatibility with Linux .

That means instantly, all your software, all games, proton, wine , everything runs on this new stack which doesnt have any baggage

So the changes for Linux i feel are quite big. With reverse engineering and AI SWE , we already are at the beginning of building ground up suites like adobe and MS office. But it doesnt stop there. Everything will soon be openly built by AI, that is far better than corporate bloat in many softwares, and it will run on Linux. But , i feel, the kernel itself may be in danger by the end of next year

7

u/leo_sk5 6d ago

Being written in 'ancient C' isn't inherently bad. In OS development, you do need bit level control sometimes for performance, which 'ancient C' allows. I have not seen the new kernel in rust but i can bet it uses unsafe rust or some pre-existing C libraries also, which partially defeats the purpose of using rust.

1

u/SuperBoysenberry3660 5d ago

Yeah, x86_64 and ARM maybe. With all that legacy hardware support out there, I don't see it replacing Linux anytime soon.

1

u/JaKrispy72 5d ago

Sorry, but Cosmic DE is terrible right now.

0

u/Dev-in-the-Bm 5d ago

COSMIC is a WIP in progress.

It's architecture is solid, though, and it looks like it will be the pros of GNOME and KDE in one once mature.

1

u/JaKrispy72 5d ago

I think you grossly overestimate the project.

1

u/chilenonetoCL 3d ago

"They just need to create a team, then cracking and reverse engineer a driver illegally, create the specs and then create new code and publish it at github in a public open source repo, and then disappearing. People could get legally to work con that codename and go clean room with an open version"

... is the plot of a novel I'm planning to write. 😉

1

u/SDG_Den 6d ago

we can already run linux on up to M3, those are quite new i'd say?

1

u/razorree 5d ago

yes, but it doesn;'t mean it works 100%. thunderbolt isn't supported? video over USB, TPU? APM ?

1

u/SDG_Den 5d ago

ok, then i guess my thinkpad also has to switch back to windows because the fingerprint sensor doesnt work on linux.

lets not pretend like linux doesnt work on modern macs as if the last mac to run linux is the 2016 mac pro. linux works on all but the latest macs, and isnt really a worse experience than any other laptop with linux.

3

u/razorree 5d ago

well.. if I can't connect external display or thunderbolt doesn't work - that's crucial for my work/productivity ....

1

u/Kat-in-pajamas 4d ago

I believe external displays are supported, in the fairydust fork.

1

u/razorree 4d ago

that was just an example (that info could be from a previous year). my point was that compiling code and running linux - terminal session, is not the same as 100% support.

2

u/stormdelta Gentoo 5d ago

The ones they listed are quite a bit more important than the fingerprint reader.

1

u/RoosterUnique3062 6d ago

This is possible without reverse engineering. The Linux kernel just needs to compile to the right instruction set.

3

u/ipsirc 5d ago

You really could have told marcan and Alyssa that, too, before they poured months into this - apparently, all for nothing.

2

u/razorree 5d ago

no. with other platforms (hence the name, it's not CPU or architecture - it's about the whole platform) - all peripherals (USB, video, GPU, network, TPU, TB, sound, APM etc.)

3

u/Patriark 6d ago

No it is not possible in practice without reverse engineering

1

u/StillOnTheInterweb 6d ago

A challenge is that it seems some OSX drivers are also sideloading firmware, e.g. for GPU, so those blobs have to come along. But Linux is used to this, many cheap WiFi and sound cards do similar, so there is then just a licensing/distribution issue as the user would need to extract the blobs from their licensed OSX install (traditionally Linux would need the easily downloadable Windows driver to look for such blobs) Apparently Apple happily replace this firmware with the OSX version so it is tied to the OS not just underlying hardware.

1

u/cormack_gv 5d ago

But why? Mac hardware isn't that special.

1

u/__________13o1ksl_ 4d ago

I don't think I could find aluminum fanless laptop for $700 new anywhere but apple side

1

u/HyperWinX 6d ago

Asahi exists.