Native Linux is coming to our phones much more easily (Xiaomi Mi Max 2)

11 days ago by sv1sjp to c/linux

AI can speed up a lot of the manual labour needed to bring even an almost dead, 10-year-old device back to life. My Xiaomi Mi Max 2 (oxygen, MSM8953) was dead. With AI help and my own knowledge, I ported/rewrote the missing drivers, and it now runs Nura (postmarketOS) with working camera, torch, SIM, phone calls and SMS. Only the loudspeaker is still broken.

Everything is up for anyone who wants to install it, or to understand the changes and manually write the patches for mainline: https://github.com/... Testing, feedback and PRs welcome.

erebion 86 points 11 days ago

"AI" can also speed up the process of making a code base buggy and hard to debug, when the people that generated it do not understand the code.

Nura will not accept generated patches, by the way. It might run your own version of Nura, but will not run upstream Nura with your patches.

path: 0 26194854, hotness: undefined, score: 86, children: 54
Shayeta 41 points 11 days ago

Yeah, I personally prefer the bug-free old version:

On a more serious note, we're still in a period where people are figuring out what AI can/cannot be used for and what the best practices are. Ironically, since it's better at reverse engineering and bug hunting than developing when compared to a human, it is more useful for hacker and open-source projects than enterprise.

path: 0 26194854 26195106, hotness: undefined, score: 41, children: 45
altphoto 12 points 10 days ago

Also Google destroyed a huge chunk of Swedish forest to build a data centers for more AI.... That's the main feature of AI. Figure that one out.

path: 0 26194854 26195106 26208964, hotness: undefined, score: 12, children: 2
erebion 6 points 10 days ago

Sadly it's an extractive technology and business model, those are not good for society.

path: 0 26194854 26195106 26208964 26210161, hotness: undefined, score: 6, children: 0
fhein 4 points 8 days ago

*Finnish forest

It's Palantir (or maybe it was just of one of the founders?) that bought a large chunk of land in Sweden, but to my knowledge they haven't made their plans for what to do with public

path: 0 26194854 26195106 26208964 26246325, hotness: undefined, score: 4, children: 0
erebion 10 points 11 days ago

Well, we know the best practices for the Nura project:

We forbid the use of generative AI tools in Nura.

It's literally the first sentence of their policy.

since it’s better at reverse engineering and bug hunting than developing when compared to a human

Citation needed.

path: 0 26194854 26195106 26196835, hotness: undefined, score: 10, children: 41
Shayeta 6 points 11 days ago

It’s literally the first sentence of their policy.

Yes, but what about the 2nd sentence?

The following is not allowed in Nura:

  • Submitting contributions fully or in part created by generative AI tools to Nura.
  • Recommending generative AI tools to other community members for solving problems in the Nura space.

As you can see, it says nothing about researching, troubleshooting, reverse-engineering, etc. As long as you write and understand the code yourself AI is allowed for everything else. As long as you're not using generative AI it's fine.

Citation needed.

My personal experience working with AI over the past year. And if that's not enough, here's also Linus Torvalds himself.

The arguments regarding resource use and profiting off of theft are valid. The arguments regarding the nature and capabilities of the tech are not. Developers ARE responsible for the code they submit, regardless of how it was created.

path: 0 26194854 26195106 26196835 26199715, hotness: undefined, score: 6, children: 8
cypherpunks 4 points 10 days ago

As you can see, it says nothing about researching, troubleshooting, reverse-engineering, etc. As long as you write and understand the code yourself AI is allowed for everything else. As long as you’re not using generative AI it’s fine.

I'm not sure if you're joking or legitimately confused, but, assuming the latter, fyi the "AI" that people use for "researching, troubleshooting, reverse-engineering, etc" is part of what is called "generative AI". Given this, it's not much a stretch to read it as saying that even posting in Nura forums about the existence of @sv1sjp@lemmy.world's github repo would actually be a violation of Nura's policy (as of today; I expect it will evolve in the not-too-distant future).

path: 0 26194854 26195106 26196835 26199715 26212866, hotness: undefined, score: 4, children: 1
erebion -1 points 11 days ago

It's not a good tool for research, it will just generate a hallucination and you end up doing something which does not work or just works somehow, but is not done correctly and will break in the future.

I talked to quite a few people recently at the postmarketOS and Alpine Linux conference, it definitely was noticed that more contributions are now coming in that do things wrong or in a subtly broken way and the submitting people have no clue.

If you rely on a lying computer for research, then your code will lie to you.

path: 0 26194854 26195106 26196835 26199715 26199852, hotness: undefined, score: -1, children: 5
emergencyfood 3 points 11 days ago

They have given five reasons for not using AI:-

  • water and energy use
  • worker exploitatio
  • worker layoffs
  • use of other's work without consent
  • not understanding what the code is actually doing

Of these, the first is a result of using fossil fuels, the second and third are a result of capitalism, and the fourth is only a problem if you believe in the whole 'intellectual property' charade. Only the fifth is an actual issue with AI, and that can be solved by either mandating human review, or marking AI-generated code as such and letting users use or exclude it.

path: 0 26194854 26195106 26196835 26203224, hotness: undefined, score: 3, children: 20
diaphragmwp 4 points 10 days ago

You are forgetting that basically everything is de-facto capitalism. If you use this in Christiania, you step out to Denmark and suddenly you are no longer ethical because you are contributing to capitalism.

Oh, and you are forgetting 6: can only be trained by data harvesting corporations. Open weight != open source.

path: 0 26194854 26195106 26196835 26203224 26206611, hotness: undefined, score: 4, children: 5
GeorgimusPrime 2 points 10 days ago

"Intellectual property" is mostly a capitalist idea. To give a direct example of the harm caused by LLMs using others' work without attribution or credit, there is the recent case in which one of the models was being portrayed as finding a mathematical proof which was actually in it's training data. The original authors will not get the credit, academic support, exposure and funding they would have gotten otherwise.

Also, even if information is not "owned", it's epistemology and source are an important part of it. Consumption by LLMs degrades the information by removing such metadata, and even worse hallucinating sources.

path: 0 26194854 26195106 26196835 26203224 26218609, hotness: undefined, score: 2, children: 8
erebion 2 points 11 days ago

I just hear "Let's exploit others, it's the fault of capitalism, not the fault of those driving exploitation".

That's not how you make the world a better place.

path: 0 26194854 26195106 26196835 26203224 26205735, hotness: undefined, score: 2, children: 3
eremophila 1 point 10 days ago

the fourth is only a problem if you believe in the whole ‘intellectual property’ charade

wtf

path: 0 26194854 26195106 26196835 26203224 26217587, hotness: undefined, score: 1, children: 0
Ptsf 2 points 11 days ago

What a genuinely antithetical stance to take on a project meant to keep otherwise dying hardware alive, but that's the beauty of open source. You don't have to give a damn about upstream, just fork and rebase into your own little niche and move on.

path: 0 26194854 26195106 26196835 26197220, hotness: undefined, score: 2, children: 10
lenni 12 points 11 days ago

You should read the reasoning for the AI policy that explains very well why the use of LLMs is the actually unethical thing here: https://docs.nura.eco/... This thread by Casey goes more into the impact that allowing LLM usage would in her opinion have on the community/project: https://social.treehouse.systems/...

path: 0 26194854 26195106 26196835 26197220 26198362, hotness: undefined, score: 12, children: 9
geneva_convenience 20 points 11 days ago

On one hand you don't know what the code is doing but on the other hand it's impossible to write so much code by hand and do any amount of testing for projects this big

LLM code is getting less sloppy and you now have the choice between generating open-source projects which you will never read the code of, or using an artisan coded buggy project.

Nobody has the time to test every single communication protocol manually to see when a camera is able to take pictures or a microphone records audio. LLM's can do this driver development and even check when the result looks good. There's soooo much tedious labour which can already be automated.

OP managed to revive an abandoned phone with working drivers thanks to LLM development. That's a massive win.

path: 0 26194854 26197646, hotness: undefined, score: 20, children: 3
liberatedGuy 11 points 11 days ago

LLM code is getting less sloppy and you now have the choice between generating open-source projects which you will never read the code of, or using an artisan coded buggy project.

If nobody understands the code, then I might as well use proprietary software, at least somebody will understand that code.

path: 0 26194854 26197646 26199453, hotness: undefined, score: 11, children: 2
geneva_convenience 9 points 11 days ago

Too bad Android is locked down and the android versions on these devices don't support a lot of modern apps.

You can use Nura (PostMarketsOS) and have the LLM write the hardware drivers for your own phone which are missing from the project. This is often a pretty custom for most phones. Once you get the drivers you can use the rest of the OS like normal.

You can now revive obsolete devices and get them useable. There's probably some slop in there but the slop is really getting a lot better it would be great if people were more accepting for using LLM's for extremely labour intensive tedious tasks which nobody would else do anyways.

path: 0 26194854 26197646 26199453 26199493, hotness: undefined, score: 9, children: 0
jumping_redditor 3 points 10 days ago

proprietary software doesn't have easily accessed answers for why things don't work, source avaliable slop does.

path: 0 26194854 26197646 26199453 26213919, hotness: undefined, score: 3, children: 0
cypherpunks 14 points 10 days ago

Nura will not accept generated patches, by the way.

If you click OP's github link and scroll down you'll find this section which acknowledges that: https://github.com/...

The drivers, patches, scripts and write-ups here were produced in collaboration with an AI assistant and tested on a real Mi Max 2 (oxygen).

The Nura project does not accept LLM-generated contributions. One of its maintainers explains the reasons in this post: the social and environmental cost of these models, and the risk that people use them to produce private knowledge instead of joining and strengthening the community whose work the models learned from. We respect that decision. So:

  • This repository is not a contribution to Nura or pmaports, and its code should not be submitted there as it is.
  • It is public documentation, not private notes. The reusable part is the knowledge: how the hardware is wired, register addresses and meanings, root causes, what was tried and ruled out, and how to test safely. These are facts anyone can check on their own device. It can save time for anyone who wants to understand what works and what does not, and then write their own code to submit upstream.
  • If you want to get this into Nura or upstream, learn from it, verify it on your hardware and write your own implementation, following the rules of the project you contribute to (Nura, the Linux kernel and libcamera each have their own contribution policies).
  • Please engage with the community. The Nura wiki, the msm8953-mainline project and the people credited below did the groundwork this builds on.

@OP (@sv1sjp@lemmy.world) what isn't clear to me is why you don't try to upstream the kernel parts, since Linux is accepting LLM-assisted contributions (as is Nura actually, just only indirectly after their upstreams like Linux accept them).

path: 0 26194854 26211006, hotness: undefined, score: 14, children: 0
hexagonwin 3 points 11 days ago

upstream linux does accept AI "assisted" patches. if this gets properly mainlined, why wouldn't it run Nura?

path: 0 26194854 26202259, hotness: undefined, score: 3, children: 2
liberatedGuy 7 points 11 days ago

Upstream Linux kernel doesn't let people who don't understand things to just submit. They have rules.

path: 0 26194854 26202259 26206280, hotness: undefined, score: 7, children: 1
erebion 4 points 10 days ago

Yeah, if changes are requested and you don't know what the kernel maintainers want from you, you've lost.

path: 0 26194854 26202259 26206280 26207347, hotness: undefined, score: 4, children: 0
DonutsRMeh 16 points 10 days ago

You said the forbidden word. How dare you!

path: 0 26208235, hotness: undefined, score: 16, children: 0
Grass 14 points 11 days ago

any information on how you did it? Like what the setup was, what you asked the ai to do, etc. With the video game fusions people have been doing using claude lately I've become interested in AI for cutting out the most tedious, life wasting parts of reverse engineering but I haven't seen examples involving hardware

path: 0 26201097, hotness: undefined, score: 14, children: 0
BaraCoded 12 points 10 days ago

That's so cool, I wish I could go full linux on my redmi note 11

path: 0 26208081, hotness: undefined, score: 12, children: 0
AnimalsDream 8 points 10 days ago

Huh, Nura? I like the name PostmarketOS better, but that's just me.

Cool that you got it working with ai, but I hope that doesn't become a standard in device porting. Sure with proper vetting the code can be ensured to be maintainable, but that code had to come from somewhere. These systems don't just magically know how to make software work, so it sounds like they're probably just referencing code somewhere else that could be under any kind of copyright. Sounds like a legal nightmare waiting to happen.

The thing I'm really hoping for is these general purpose mobile Linux systems being ported to the plethora of bootleg retro handhelds out there. The majority of these devices already have unlocked bootloaders and are super friendly to third party firmware. The problem is people are only porting these hyper minimalist emulation-focused Linux builds when there's so much untapped potential.

path: 0 26213473, hotness: undefined, score: 8, children: 0
AndrewZabar 8 points 11 days ago

HUZZAH!!!!

path: 0 26193144, hotness: undefined, score: 8, children: 0
myusername 3 points 11 days ago

Good work !

path: 0 26199642, hotness: undefined, score: 3, children: 0
Rolive 3 points 10 days ago

Well well well, you have something to xiaomi.

path: 0 26223450, hotness: undefined, score: 3, children: 0
BreakingBigfoot 1 point 10 days ago

I have a pinephone pro, seems like manjaro bricked it and I can't flash the rom again ...Any theories on what to do?

path: 0 26219793, hotness: undefined, score: 1, children: 0
HotsauceHurricane 1 point 11 days ago

Can ai get past the AT&T fuckery on my galaxy s5 active?

path: 0 26198497, hotness: undefined, score: 1, children: 0
paper_moon -1 points 11 days ago
path: 0 26193119, hotness: undefined, score: -1, children: 0
eremophila -6 points 11 days ago

Can't the ai trash just f*ck back off to windows, apple, and google where they belong?

Nura is an anti ai distro

path: 0 26201216, hotness: undefined, score: -6, children: 19
wuphysics87 14 points 11 days ago

You don't have to use it? 🤷‍♀️

path: 0 26201216 26202441, hotness: undefined, score: 14, children: 17
eremophila -14 points 11 days ago

It's not that simple, even if you are.

path: 0 26201216 26202441 26203765, hotness: undefined, score: -14, children: 16
wuphysics87 15 points 11 days ago

Explain it to me like I'm five

path: 0 26201216 26202441 26203765 26204846, hotness: undefined, score: 15, children: 15
eremophila -24 points 11 days ago

Sure, let me know when you get there.

path: 0 26201216 26202441 26203765 26204846 26205308, hotness: undefined, score: -24, children: 14
sudoer777 2 points 11 days ago
path: 0 26201216 26205433, hotness: undefined, score: 2, children: 0
PushButton -13 points 11 days ago

The Chinese are going to save us once again? I never thought I would root for fucking China vs US in my life.

path: 0 26195622, hotness: undefined, score: -13, children: 12
elixir_fan 26 points 11 days ago

Depending on what you mean by saving us, I don't think China will, but they're not invading random countries, staging coups, droning civilians, etc, so these two countries are not even remotely comparable.

path: 0 26195622 26197556, hotness: undefined, score: 26, children: 10
gooeyglob -3 points 11 days ago
path: 0 26195622 26197556 26199628, hotness: undefined, score: -3, children: 9
KimBongUn420 7 points 11 days ago

path: 0 26195622 26197556 26199628 26204229, hotness: undefined, score: 7, children: 8
liberatedGuy -1 points 10 days ago
path: 0 26195622 26197556 26199628 26204229 26223322, hotness: undefined, score: -1, children: 7
eremophila 5 points 11 days ago

The usa could save us all by falling into the ocean

path: 0 26195622 26201267, hotness: undefined, score: 5, children: 0
linux
linux

@lemmy.ml

login for more options
68121
9464
5479

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

go to feed...