r/linux • • 5h ago

Hardware Claude Code / AI Shows Potential For Reverse-Engineering Hardware For Linux Support

https://www.phoronix.com/news/AI-Reverse-Engineer-Linux-HW
361 Upvotes

105 comments sorted by

318

u/CptSpeedydash 5h ago

AI being used to benefit consumers by training on Company's products is just pure poetry.

28

u/PilotGuy701 4h ago

The moment large corporations start losing profits because of AI is the exact moment regulations will be enacted.

7

u/Glum-Tuna1366 3h ago

if the ai bubble has burst, sure. but until then, no chance.

83

u/bingblangblong 5h ago

The restrictions are coming, no doubt about it. China will probably be happy for us to use theirs.

43

u/stormdelta 4h ago edited 4h ago

Cat's pretty much out of the bag there. GLM 5.3 alone is already sufficient as a near drop-in replacement for the mid models like Sonnet to the point companies are using it not just consumers, and is open weight so can run on commodity hardware (not quite consumer hardware yet though).

EDIT: Though it would still be nice to see more open source models. Open weight is a good start, but without knowing how it was trained it's harder to trust fully and can't be iterated on as easily by the community.

2

u/gjallerhorns_only 2h ago

Nemotron from Nvidia and some of the models ai² (Allen Institute for AI) are the only open source models that I know of.

31

u/natermer 4h ago

Binary is just machine code. And machine code is still code. Just a PITA for humans to read and understand.

Not so much a PITA for LLMs with the aid of traditional binary analysis tools.

This is what the "use AI to reverse engineer video games" have proven. It is a approach that works.

At the very least you can use it to document how drivers work and use that to help you write one with unencumbered fresh code. It has never been illegal to read other people's programs and learn how it works for research.

I am not a lawyer, but it is my understanding that using intermediate representations (aka decompiled) of other people's binaries for research purposes is protected under free use. They can't use copyright to stop you. (although if you agree to the restrictions via EULA then that is contract law and operates under very different rules). You can't share them with other people, but you can share the results of your research.

And other people are certainly free to make their own intermediate representations to follow along.

2

u/ILKLU 2h ago

my understanding that using intermediate representations (aka decompiled) of other people's binaries for research purposes is protected under free use

It is, because the decompiled code is never the same as the original. It's just what the decompiler generated to produce the same output the original code did. It's kinda sorta like a translation of a book from one language to another. Same story, different words.

38

u/eMperror_ 4h ago

I did the same for my brothers ptouch label printer. I now have a web interface to print my labels instead of their mobile app

10

u/YankeeLimaVictor 4h ago

Oooohhh!! Can you share this? I have a pTouch and their windows app SUCKS

•

u/eMperror_ 20m ago edited 0m ago

For sure, I only implemented my own model in the Rust protocol because I can only test with mine, but I basically extracted it from the MacOS app. If you tell me your model I can maybe try to add it, I just won't be able to test it.

My model is the "P-Touch Cube Plus" (PT-P710BT)

Works best on chrome, I have USB issues with Firefox. Also only tested on MacOS but I dont see why it wouldnt work on other platforms.

edit: I tested also on CachyOS with Chromium and it works fine after allowing it to detach USB from usblp through a flag.

Live app

https://fjanicki.github.io/ptouch/

Source: https://github.com/fjanicki/ptouch

5

u/jrandomslacker 4h ago

Literally same, Epson ksun, no official driver or label app for Linux. Claude code and antigravity solved that over a weekend. Not that there weren't open source projects for this kind of thing before, but Claude filled in the gaps that the human driven, open source projects had stumbled over for a long time.

•

u/1esproc 35m ago

Why both tools?

1

u/CondiMesmer 1h ago

I love that the technology we've become accustomed to is so God damn shitty that it's a big progress breakthrough when we can bypass the work of their anti-consumer bullshit.

•

u/SouthernFruit8768 55m ago

Learn Assembly and write your own drivers please. Stop fixing printers with AI slop

/s

18

u/zyzzogeton 4h ago edited 4h ago

Look at what happened with the MVAVE FM-1 that uses a kind of obscure JieLi AC791N SOC. Musicians with AI reverse engineered the firmware, and the abundance of new digital instruments and grooveboxes emerging on that platform is amazing. It costs less than $100 and various "marketplaces" for firmware are open-source and not run by mvave at all (see https://thefirmwarehub.com/ as an example).

Overpriced brands like Teenage Engineering are in trouble, because MVAVE accidentally released the musical equivalent of a general purpose computer. What started off as a decent Yamaha DX7 clone in a tiny package has become a monster.

Thanks to reverse engineering, if you want to try a dozen or more different synthesizers, all you need is $100 and some lead time.

FYI: The MVAVE SMK-37, uses the same chip, and it has a full keyboard, faders, and drum pads for $125... and the firmwares are interchangeable (mostly). I expect them to be all gone before Xmas.

1

u/IvanDSM_ 2h ago

So much for obscure, the JieLi SDK shows up on the first page of Google results...

2

u/betonchero 1h ago

Undocumented ISA, just a stripped clang 4 binary, the hal is just blobs with undocumented headers (maybe a couple Chinese comments here and there), at least when I tried, the sample apps did not even compile on linux, there is no complete reference manual.

18

u/RayneYoruka 4h ago

Maybe maybe maybe fingerprint readers will get all reverse engineered!?

4

u/DocDMD 3h ago

Already done. 

3

u/RayneYoruka 2h ago

I haven't seen anything for my Asus Zenbook 14 :)

3

u/DocDMD 2h ago

Just ask Claude to find the chipset, use binwalk on the windows drivers if it's not a supported chipset and then modify any of the Linux fingerprint readers to use it. 

72

u/shogun77777777 4h ago

Pretty interesting seeing AI sentiment turned on its head virtually overnight

23

u/stormdelta 4h ago

I wouldn't say it's changed so much as more people are aware it has uses beyond the godawful garbage being advertised heavily to consumers.

5

u/F3z345W6AY4FGowrGcHt 2h ago

People are realizing that it can actually be quite useful in the right hands and doesn't necessarily only produce slop.

10

u/Straight-Slip-6997 4h ago

goomba fallacy

20

u/Additional-Sky-7436 4h ago

Sabine Hossenfelder had an interesting observation a few weeks ago concerning AI adoption. She noticed that physicists scientists were a lot less upset about AI use than Mathematicians have been. Mathematicians see it as a crisis, physicists just see it as another useful tool. 

I think most people would agree. When it's used as a tool FOR humans, it's generally positively received. When it's used as a tool to REPLACE humans then it's a negative. 

50

u/gerbal100 4h ago

Sabine Hossenfelder is not someone whose observations warrant crediting.

11

u/turdas 4h ago

Sad but true. She wasn't always like this.

4

u/koziello 4h ago

What's the deal with Sabine? I'm out of loop apparently.

-11

u/Additional-Sky-7436 3h ago

She's a woman and that makes people uncomfortable

12

u/tadfisher 2h ago

If it were only that, then we could agree and move on. But in fact she is an anti-science grifter, and I say this with sadness as a former viewer.

https://www.youtube.com/playlist?list=PLYQBS5nGitbc

6

u/LinuxSBC-Anna 2h ago edited 4m ago

Not at all. To give some examples of much better physicist YouTubers who are also women, you should totally watch Dr. Becky and Angela Collier. Or, for a few others who aren't physicists but are also great: Xyla Foxlin, Astrid Lundberg, Philosophy Tube, Lily Alexandre, LaurieWired, J. Draper, and HGModernism are all great people with really interesting videos.

Sabine is a problem because she assumes her physics experience means she's an authority on other subjects. Personally, I know her videos on autism and trans people were inaccurate and bigoted. She also denigrates the scientific community and spreads antiscientific rhetoric, using her experience to imply that this is a reasonable, common belief among scientists.

4

u/gerbal100 2h ago edited 2h ago

Her old videos weren't bad, but her lack of success in her field (specifically her poor luck with a graduate advisor, which saddled her with a dead end of a subfield) has led to her espousing a profoundly conspiratorial view of the scientific process.

Espousing a conspiratorial view of the scientific process, in turn, resulted in audience capture by a conspiratorial audience which pushed her to ever escalating conspiratorial content to suit the preferences of that audience.

This has ended in her allying with the anti-intellectual elite who want to tear down the scientific establishment and be kings of the ashes.

3

u/SrPalcon 2h ago

Here. watch this video by another woman physicist (arguable, one of the better science communicators on youtube rn) and maybe you can challenge your ideas, instead of dismissing criticisms of her as just sexist attacks.

https://www.youtube.com/watch?v=miJbW3i9qQc

-17

u/Additional-Sky-7436 4h ago

You can disagree with her on her politics or whatever. But she's a very accomplished professional scientist and a very intelligent woman. 

Throwing out everything she says just because she said it is ignorant at best.

3

u/James20k 3h ago

There are plenty of respectable people who could be cited instead, that haven't done incredibly problematic things

-1

u/Additional-Sky-7436 3h ago

What specific problematic things are you referring to?

5

u/gerbal100 2h ago

She has squandered her reputation promoting unscientific ideas and conspiracy theories using her credentials as evidence for her credibility.

She routinely criticizes fields where she has no meaningful expertise or experience. If she were a layman, I would be much more willing to excuse her behavior. But as a credentialed academic, she should have the lived experience necessary to understand why her arguments are full of shit.

She also promoted unscientific propaganda from the anti-intellectual allies she has accumulated over the years, and appears to have made common cause with a number of Peter Theil and Joe Rogan flunkies.

She has defended blatant frauds like Eric Weinstein when she genuinely has the expertise to know better.

She has revealed herself to be a charlatan on multiple occasions, captured by her conspiratorial audience, and allied with elite anti-intellectuals.

15

u/J_E_E_VACATION 4h ago

Sabine is a hack

-17

u/Additional-Sky-7436 4h ago

A hack that is 100,000x more accomplished than you.

24

u/J_E_E_VACATION 4h ago

Not really. She's not the only scientist in the world lmao.

I have a phd and 2 masters. work in a photonics lab on cutting edge research. My name is on at least 200 papers.

And part of my work is literally running on every ARM device / cell phone in the world.

11

u/dydhaw 3h ago

Yeah but she has over a million subscribers on youtube, that's how you measure academic accomplishment these days, didn't you get the memo?

9

u/J_E_E_VACATION 3h ago

🤣😂 almost through you were serious.

9

u/SnooRegrets3590 4h ago

Not quite a hack but rather a sellout. And in terms of scientific accomplishments she is very mediocre.

Which is fine, but in the last few years she becomes manipulative and makes misleading claims for non-scientific people for her sponsors

7

u/EzeNoob 3h ago

Bragging about the accomplishments of other people is not a flex

7

u/stormdelta 4h ago

I think calling her a hack is way too far, but it's a classic case of someone who's an expert in one field speaking with way too much confidence about things they very much aren't an expert in.

2

u/gerbal100 2h ago

Most people with that sort of advanced expertise have a genuine understanding of how little they know about fields outside their expertise.

She is the exact sort of person who should know better from lived experience.

•

u/stormdelta 54m ago edited 49m ago

Most people with that sort of advanced expertise have a genuine understanding of how little they know about fields outside their expertise.

Most, yes, I've even say the overwhelming majority.

But you notice the loud exceptions of people whose success is public enough that it goes to their heads. Ben Carson is an infamously extreme example - total nutcase outside of his field despite being an accomplished neurosurgeon. DHH for a more recent example relevant to the sub - he's an excellent Ruby developer, but an incredibly shitty person outside of that.

1

u/stormdelta 4h ago

A lot of people take issue with it being used to replace creative work as well - for me at least, that's less about replacing people and more that I want creative decisions made by an actual person because that's half the point. In a hypothetical sci-fi scenario where we end up developing sapient AI that would be okay but only because in that scenario the AI would also be a person.

3

u/NightOfTheLivingHam 2h ago

A lot of the issue is with GenAI. Which is understandable.

It looks like shit, uncanny, and is an attempt to take away something people enjoy, with people saying shit "now instead of wasting your time doodling you can go work in a warehouse or be more productive"

Then AI being used for mass surveillance and data grabbing.

Outside of that AI does a lot right and does it well, but it still needs to be hand held and validated just as if you were validating someone else's work.

The third issue is that there are people who think AI is infallible and right, which has led to people being shot or arrested by cops based on faulty information.

AI has been helping smooth out bugs in code, helping advance biomedical science, and ironically fixing vendor lockin.

1

u/James20k 3h ago

Its more people enjoying the schadenfreude of these companies getting the same treatment of what they've applied to us, instead of necessarily people being pro AI IMO

1

u/VaporousMote 2h ago

Undeserved, literally nothing has materially changed.

3

u/shogun77777777 1h ago

That’s people for you

1

u/VaporousMote 1h ago

Can't argue!

1

u/Chickenfrend 4h ago

I'm still a bit worried about my job but I'll say I've gone from hating using it at work to not minding it so much. I think just as a product of it improving. It was useful at opus 4.6, but needed strict guidance and annoying things like BMAD. Now it still makes mistakes but less so and it gets rid of a lot of friction without introducing too much new friction. So, it's good enough to be clearly a very useful tool now, and this reverse engineering capability shows people are using it in interesting ways and is also just good PR.

-8

u/V-Right_In_2-V 4h ago

Reddit in general is like 3 years behind the curve on AI and somehow still believe it’s only an overhyped slop factory.

It’s very clearly one of the greatest tools ever invented, and marrying AI and Linux is a match made in heaven. I’m still blown away when I see anti AI comments on Linux forums of all places

0

u/MdxBhmt 4h ago

It make sense with what Cory Doctorow was saying (guy that wrote about enshitification and now AI). Part of the revolt its that it was a shitty replacement. As it gets less shitty, specially less shitty than products from notoriously shitty companies (like stuff happening with adobe and Sony), it fits that people see it more positively.

20

u/No-Skill4452 4h ago

Odd that driver development didn't show up earlier tbh. Seems like a no brainer.

2

u/Grippentech 3h ago

That's been the main use case for me for a while, driver fixes. Give an LLM ssh access temporarily and have it fix bugs from poor vendor implementations.

Problem remains actually putting in the time/effort to upstream of course.

2

u/F3z345W6AY4FGowrGcHt 2h ago

I don't know about giving an LLM ssh access to anything. One hallucination and God only knows how much damage was done. Unless you mean access to an isolated cloned VM or something like that.

18

u/Inside-Computer5358 5h ago

I know probably completely unrelated, but I have been using ReverseEngineerAnything (REA), to decompile and get Mercenaries 2 to source code. Mainly for preservation purposes, but also modding.

I am a tech savvy user, but I feel if you apply logic and reasoning ontop of AI and use it as a tool, it can do good. That's controversial here in r/linux, but I agree with torvalds. "Its a tool, use it. You're responsible though."

1

u/F3z345W6AY4FGowrGcHt 2h ago

Skilled people will use it to do impressive things. Dumb people will use it to do garbage. Same as all other tools.

0

u/Far_Calligrapher1334 2h ago

How do you even preserve something by making it kind of guess at a source code? That's porting, not preservation. The point of preservation is to... Well, preserve a thing, not to remake it like you're Theseus.

3

u/mr_frpdo 2h ago

You can confirm that the source builds a bit matching exe.

1

u/Far_Calligrapher1334 2h ago

For a PS2 game?

3

u/mr_frpdo 2h ago

Well it wouldn't be an exe in that case but yes, you can confirm against the existing pulled binary vs the built one.

11

u/gartstell 4h ago

Yesterday, I sent a large, single-page PDF to print: 18 copies. I have the printer set up with Brother's official drivers.

It was taking forever and wouldn't even start.

I asked Claude to look into it: the driver is a disaster. It basically converts the PDF about four times, making it larger each time, and then, instead of telling the printer to repeat the job 18 times, it generates a new 18-page file that was a ridiculous 7 GB (and sitting in RAM!). But on top of that, it actually duplicates it! it creates two identical files.

Within two minutes, it was fixed.

I had a similar issue with another printer about 10 years ago (also a Brother) and I was only able to solve it after nearly a full day of troubleshooting and testing.

1

u/spearmint_wino 2h ago

I hope you saved the driver as PCLoadLetter.dll

3

u/30secondstocali 3h ago

"I" was able to make the IR sensor on a Surface Pro 7 work on Linux in about a week using Codex. In the 7 years this tablet's been out for nobody had managed to get a single frame from it on Linux as far as I'm aware.

5

u/maccam94 3h ago edited 3h ago

Claude is really good at translating patterns. I had it reverse engineer a Windows driver for my Intel NUC's embedded controller and convert it to a Linux driver in under an hour. But I had to redirect it to that path after it initially just scraped /dev/mem for potential fan speed registers while ramping load up and down to make the values change 😆

https://github.com/ccope/nuc-ec-hwmon

4

u/-illusoryMechanist 4h ago

I would love to jailbreak my quest 2 and install steamos 3 onto it

0

u/DocDMD 3h ago

Couldn't you just side load games onto it? There so much hardware and rendering youd have to recreate for vr games no? 

2

u/the3gs 2h ago

Depends: Is your goal to sideload games, or to offload Meta?

1

u/DocDMD 2h ago

I'm all for offloading meta but I thought about this and it would be a whole lot of work to try to get everything recreated on there not that it's impossible but it's not a one person job I don't think

2

u/arttechadventure 4h ago

Can we request cricut and that 3d printer company everyone has been shitting on lately for the next? 

Fuck them and their anti-consumer behavior.

12

u/wowsomuchempty 5h ago

A lot of Apple M4 reverse engineering has been done by LLMs.

Can't be used for proper dev, but as a concept it's impressive.

6

u/adjudicator 4h ago

> ‘Can’t be used for proper dev’

???

4

u/zyzzogeton 4h ago

Remember when people thought calculators were cheating and that "proper math" required you know arithmetic really well?

Same energy.

5

u/Nychtelios 2h ago

Do you remember that?

And yes, they were right. Nowadays most people are unable to perform calculations manually or mentally. Imagine what would happen with a tool that claims to be able to offload the entire process of thinking to it. Without considering that accuracy of calculators is easily verifiable, LLMs' accuracy, well...

1

u/zyzzogeton 2h ago

Linus Torvalds on AI: /img/m5dxkewzfpvh1.jpeg

-3

u/Green_Ad5186 4h ago

thats called copium. ai is used heavily for "proper dev"

0

u/adjudicator 4h ago

Classic Reddit user larping as a dev

3

u/malloc_some_bitches 3h ago

Truth is in the middle, a human is still needed in the loop but can leverage the tool for solving problems quicker. Source: me dev

1

u/adjudicator 2h ago

Yep, and anyone who thinks AI can’t be used for dev work doesn’t get paid to do dev work.

1

u/crimsonscarf 2h ago

Counter-point: can create problems faster that I have to review, reject, and take flack for “slowing the team down”. Source: me, senior engineer and team lead

5

u/Teddy-Bloat 4h ago

This seems legally hazardous given the tendency of LLMs to vomit out code verbatim from their training data. There's a good chance the companies creating hardware are also using LLMs in driver development and there's little guarantee that their code isn't making it into the training data, given how desperate Anthropic and OpenAI have gotten. Putting that code into a GPL'd project just sounds incredibly risky

7

u/unski_ukuli 4h ago

Yup. There is no clean room with AI:s and untill the legal status is not up in the air, the only sustainable position is to ban ai generated code from widely used open source projects. Thats is unfortunately less and less the case.

2

u/siete82 3h ago

Pandora's box has already been opened, and almost all software written over the past three years contains generated code to a greater or lesser extent. The law isn't going to change, because that would simply be the end of the industry.

1

u/malloc_some_bitches 3h ago

How dramatic, regulations would not end the industry. Also, politicians are actively campaigning around these issues as well. Unless big tech can successfully bribe the other side of the aisle, there will most definitely be regulations introduced in the next 2-4 years

3

u/siete82 3h ago

the only sustainable position is to ban ai generated code from widely used open source projects

How could that not destroy the industry? Even the FSF doesn't agree with something like that.

1

u/ephemere_sloboda 1h ago

I agree there is legal hazard, but I wouldn't be too worried.

The hardware manufacturer would have to prove the hold copyright. Chances are they have been using gen AI in their develop, which makes proving copyright more complicated.

The code would have to be substantially the same beyond basic functional blocks. There are only so many reasonable ways to implement basic functions, that doesn't count as copyright violation.

Even if copyright is proven, the main remedy would be dropping the code, which would harm the manufacturer's sales; so why would they want that?

And finally, the SCO case has shown that mighty corporations would fight for Linux to continue being available, because it's fundamental to their business model. In 2026 even more than in 2003.

3

u/aaronsb 4h ago

Yeah my ongoing effort to own a Samsung tablet tracks here. https://github.com/aaronsb/sm-x800-linux

4

u/Size---Queen 5h ago

LET'S GO!!!

2

u/cm1802 4h ago

It would be nice to use my Creative SB AE-9 in Ubuntu!

1

u/jorshhh 3h ago

I own a Pakon F135 35mm film scanner that doesn't get support anymore. The only software that can run it is old and only supports Windows XP. It has taken me a lot of time and experimenting but I have a MacOS/Linux driver/client now. This was always possible but AI and decompilation has made it so fast: https://github.com/jorshhh/pakon-macos

1

u/RR321 2h ago

Time to get rid of that Nvidia bullshit

1

u/kudlitan 1h ago

Aside from drivers, using Claude for reverse engineering will be useful for projects like Wine, Mono, or ReactOS.

0

u/exeis-maxus 4h ago

That will be interesting if the new Nvidia kernel driver (Nova?) surpasses the proprietary, closed-sourced Nvidia driver because of AI.

-2

u/Most_Strike_93 1h ago

This post is a great place for me to block who I do not interact to. Great