Porting Manjaro to Librem 5

Hello all,

I hope you are all doing well. I recently received my Librem 5 and had mixed feelings. In the end, I like it, but it needs work. The application available through the Pure store leaves me wanting; also, for some reason, my phone runs hotter than the recommended temp at idle without anything running. I have tried out PostmarketOS, which I liked better, but I still just wanted Manjaro on there since that is what I use on all of my other devices. I host my own mirror locally and I am serving the arm branch of applications too. I have many years experience with Linux as a user, I have somehow installed a usable installation of Gentoo. I have over 20 years of programming experience, 10 of which professional, and I have contributed to an open source project over the many years, less than I should, but that is because I didn’t find a cause that I found worth it or struck close enough to home, but clearly needed help.

So now that you know me and my situation, here’s what I want to do and how I need help from you guys, the Manjaro community. I want to try to port Manjaro to the Librem 5. Since the code for their (Purism’s) kernel is available, installer tools, example images, and drivers, I figured it should be theoretically possible to take that and build a Manjaro Distro/image that will run on the Librem 5. I would be willing to share all of my logs, try to patch applications, troubleshoot and document the process, but I don’t exactly know where to start. I would almost assume I would start by tearing apart one of their images and see how they get it to boot in the first place, because that doesn’t seem to be super well documented.

Does anybody have experience with doing something like this and would be willing to help me with this?

I will warn you, I am not the fastest developers and most other things in my life will take priority, but I am eager and willing to do what I can.

Thank you for your interest.

The first thing you need is to get familiar with our tools, so that you can modify it to create images for the device.

Once you are familiar with how they work (they are bash scripts), the best place to start would be to create a u-boot package that works on the device.

When you have that working, you can start looking into what patches are needed to the mainline kernel.
If it’s a lot of patches and there exists a separate kernel git repository that has all the required patches, it’s a good idea to create a separate kernel package (maybe called linux-librem5) and make sure it works.

When you can create an image that works, you can submit your changes to arm-profiles and manjaro-arm-tools as issues linking the patches needed to those tools.

1 Like

Looking at how things are done for the PinePhone and PinePhone Pro ports is definitely a good idea for a start. (E.g., the “custom kernel” incantation is done there too, as well as on several other embedded devices. So linux-librem5 would be just one more package of the same kind.)