The Pinephone Pro, PostmarketOS, and Why Mainlining Phones is Important
Published 2022-09-07 on Anjan's Homepage
In #sxmo
on OFTC, users often ask why the pinephone pro is less functional on postmarketOS than other distros.
PostmarketOS uses a mainline pinephone pro kernel 1.
There exists a heavily patched fork of the linux kernel called the megi kernel with broader support for the functionality of the pinephone pro 2.
In this blog post, I will explain why postmarketOS has mainline-first approach.
Carrying around forks of the kernel is not sustainable as it becomes impossible to provide security patches after a short time. The only way to truly fix this for a device is mainlining it.
- Source: postmarketOS wiki https://wiki.postmarketos.org/wiki/The_Mainline_Kernel
Moreover, I have ran into stability issues when using heavily forked kernels with postmarketOS. Recall that postmarketOS is aiming for a 10 year lifecycle for smartphones. Forked kernels are a hurdle we must overcome to achieve this goal.
It is often suggested that we use the megi forked kernel for the pinephone pro in the postmarketOS distro as a temporary solution. However, it is easy to underestimate how permanent a temporary solution can be - the heavily forked megi kernel for the original pinephone is used in postmarketOS and has not been upstreamed 3. PostmarketOS cannot change from the megi kernel to the upstream kernel for the original pinephone without losing functionality. Indeed, postmarketOS is trying to change the status quo where phones are a throwaway insecure mess cause the code is so heavily patched. Only shipping the mainline kernel creates pressure for someone to mainline the megi kernel patches.
Options
PostmarketOS is the only linux distro I have used on my pinephone, pinephone pro, and android phones because of how well the distro is maintained. Indeed, the mainline-first approach encourages the community to enact best practices. If you are convinced of the importance of mainlining and postmarketOS’s approach, here is how you can help:
Help mainline the pinephone pro kernel
The megi kernel is not as bad as a typical downstream kernel. For example, megi’s kernel has a ~500k line diff and OnePlus 6’s downstream kernel has a ~5000k line diff 4. However, we should still work towards mainlining the megi kernel. Megi expressed in the past that he is not interested in mainlining because rebasing to the latest Linux release is less work for him. Megi’s work is valuable and a good start. I am thankful he is doing this work but we need to work as a community to make sure his work lives on forever.
There has been progress on mainlining the pinephone pro kernel!
The pinephone pro device tree has been merged into the upstream linux kernel 5.
If you want to help, please checkout the #cross-distro-kernel
channel on the libera.chat irc network and the gitlab 6.
There are lots of people in #postmarketos-mainline
channel on the oftc irc network to help you learn how to mainline.
Maybe you can mainline other Android phones?
Buy functional mainlined devices
I have been daily driving the poco f1 with Sxmo for a couple months and it’s the perfect phone 7. You can also use the OnePlus 6/6T for similar support. These devices have proper mainline support in postmarketOS and can be obtained in Canada for 150 Canadian dollars. Optionally, you can donate the money saved from buying SDM845 devices to the developers making sure we have lots of mainline devices to use 8.
Conclusion
I appreciate megi’s work as a start but we need to mainline devices to have a polished experience long term. If postmarketOS merged heavily forked kernels for devices, a lot of work would need to be done to maintain those devices. More likely, we wouldn’t bother and have severely insecure devices after a couple years. The large initial investment of mainlining is worth it.
Footnotes:
Read my blog post: Sxmo on the poco f1
Have a comment on one of my posts? Start a discussion in my public inbox by sending an email to ~anjan/public-inbox@lists.sr.ht [mailing list etiquette]
Articles from blogs I follow around the net
These articles/blogs do not represent my own opinions or views.Text processing on the Command Line - sharing my tools
Text processing on the command line - sharing my tools Introduction I'm quite fond of the command-line and spend a larger chunk of my life in a terminal emulator than I dare admit. I try to embrace the unix philosophy of using tools that "do one thing…
via Proycon's website July 7, 2024Linux phones are not automatically secure
A common point in the Linux community is that escaping the walled garden of ecosystems like Android or iOS is already a means to higher security. Having no contact with Google or Apple servers ever again, nor cloud providers ever snooping on your private …
via TuxPhones - Linux phones, tablets and portable devices January 25, 2023Generated by openring