Our Journey Towards a Sustainable Mobile OS
Let's start our summary of what happened since the last update post with UI related news. Alpine developer @maxice8 packaged elogind in our upstream distribution, which means we can finally use a proper display manager. @PureTryOut created a patch to use lightdm instead of the previous approach of hacking
/etc/inittab for autologin on TTY1 and kicking off a
/etc/profile.d/ script that does a half-hearted job of setting up the session. Almost all UIs expect such a display manager, therefore we will have less compatibility problems moving forward.
Even though the patches have obviously not seen much testing at this point, @MartijnBraam has already managed to run it on the PinePhone devkit. The display resolution is clearly off, but touch input was reported to be working.
As usually, @PureTryOut has been keeping the Plasma Mobile stack up-to-date with the latest versions. He also created a
postmarketos-ui-plasma-mobile-extras package which effectively allows users to choose whether they want only the base installation, or a fully blown one with extra apps like a PDF reader, calendar and music player.
We like to upstream everything that makes sense, so with help from our Alpine friends, @PureTryOut got all of the KDE Frameworks 5 and Plasma desktop into Alpine and is maintaining them there from now on. The only packages we plan to keep specifically in postmarketOS are either mobile specific or development versions.
Besides giving a presentation on his current progress of porting the free software baseband firmware osmocom-bb to MediaTek devices, @unrznbl got his Shelli UI into postmarketOS. The essential piece is a Grafitti-inspired gesture recognition program that he started six years ago: it allows writing single letters at a time by drawing a rough shape of the letter across the whole screen. As you can see in the video, the gesture for tab (to use tab completion), is slashing from bottom left to top right, and "Enter" is the reverse gesture.
Now what does this strange input method have to offer in contrary to the usual on-screen-keyboard way of doing things? The radical difference that sets it apart from literally all other mobile UIs today is that it runs entirely on the TTY. Users get a minimalist environment with nothing but tiny and resource-efficient terminal applications. Certainly not for everyone, but there are folks who like to do the same on their PC and there are more use cases that can be explored from here, such as using Shelli as a fallback UI in case the graphical UI does not start up, or extending it with text-to-speech for blind people.
He created an initial port, and now most applications can be installed on postmarketOS. As of writing, the postmarketOS port is missing proper theming for CoreApps, which is why it looks a bit weird on the images below. For comparison, we have added a reference screenshot of how it should look once proper theming support is added.
Sway, the Wayland drop-in replacement for the i3 window manager, is already packaged in Alpine so it was a rather easy exercise for @Danct12 to make it available in the postmarketOS UI selection that is provided by pmbootstrap. He reminded us in the merge request that it needs hardware acceleration to work.
You may have noticed in previous blog posts that @opendata26 has been one of the driving forces in the mainline-related aspects of postmarketOS. Unfortunately he has been seemingly absent from the Internet for the last few months. We certainly miss him not only because of his great contributions, but because it was fun talking to him and he was always incredibly helpful towards anyone. From his username, and the way he answered questions, some newcomers would even be under the impression that they were chatting with an AI. We sincerely hope all is well with him!
Nevertheless, his absence does not mean all mainlining progress work as stopped. There is more motivation than ever in our community to get devices mainlined. So much actually, that we had to create a dedicated #postmarketOS-mainline channel.
Google (Samsung) Galaxy Nexus
So he applied his best hacking skills and configured the kernel to wait forever when said panic occurs, and edited the code to do an emergency_restart() in one particular interesting location. After compiling and booting once more, the device would either hang forever, or reboot at once. That way he knew whether the code where he patched in the restart would get executed or not. A few hours later, he patiently narrowed down the troublemakers (mostly clock setup related).
You are probably wondering what the video next to this paragraph is all about: it shows that even the earphone audio is working! (The video is muted by default, you can enable the audio manually or try this direct link). Also we have another video of the Galaxy Nexus booting into XFCE4 with the 5.1.0 based kernel. For anyone looking to mainline their own smartphone, reading the original issue is worthwhile: a lot of the steps that were taken are so well documented, that they could practically serve as blueprint for future mainline ports.
Google (LG) Nexus 5
While the mainlining tale just began for the Galaxy Nexus, the Nexus 5 (MSM8974 SoC) is on the other end of the spectrum. Pretty much everything besides audio has been working one year ago, with comparatively few small patches on top of the 4.17-rc3 kernel instead of the nearly two million lines of added code in the 3.4-based downstream kernel. But do not underestimate what it takes to resolve the remaining quirks, and to rebase and replace the remaining out-of-tree hacks up to the very last line with beautiful patches that integrate with the rest of the kernel source and are finally worth of getting accepted upstream. @masneyb is determined to get this task done for the Nexus 5. You can take a look at the crazy amount of patches he has gotten merged in this undertaking, together with a few patches that are still in review.
Thanks to these efforts, we can run postmarketOS on the Nexus 5 with a 5.2-rc3 based kernel (WIP merge request) that has less out-of-tree patches than ever before!
We are publishing this blog post by coincidence one month before the online services of the Ouya Android gaming console get shut down. Once this happens, the once highly anticipated crowdfunding sensation will be as useful as a paper weight with the original software stack. However, it is possible to install postmarketOS on it. Moreover @ryang2678's patches allow running a slightly patched 5.0 mainline kernel and use the grate free software userspace driver to get accelerated graphics with its Tegra 3 SoC. The latter is not exactly stable so far, and audio support is still missing, but this is a nice foundation for expanding the lifetime of a gaming console that should surely be able to run a bunch of retro emulators for the next ten years.
Finally @Mis012 started mainlining his sm-a300fu (Samsung Galaxy A3 2015) and teamed up with @lambdadroid who is working on the similar sm-a500fu (both have a MSM8916 SoC).
Bad infrastructure news first: we did not manage to move our binary package repository to sourcehut just yet. As outlined in the 600 days post, building on top of sourcehut will make maintaining the binary repo easier and more transparent. The whole thing will scale better and allow us to move towards a stable postmarketOS version. But we are still working on the postmarketOS specific part that will orchestrate the build jobs. In fact, we have a PHP based version that is about 90% feature complete, but has some hard to resolve bugs and no test cases. Long story short, we made the tough decision of starting over with a Python 3 version and with focus on testing from the beginning. Using the same programming language as pmbootstrap decreases friction for development, for writing tests, and increases the bus factor. If somebody is interested in helping us out, get in touch.
In more pleasant announcements, cross-compiling in pmbootstrap was completely revamped with @zhuowei's crossdirect method. With this change there is no longer a need to run distccd on localhost anymore, which neatly resolves the distccd-behind-sshd performance bottleneck that had to be introduced earlier for security reasons.
The heart of postmarketOS development are the package build recipes in pmaports.git. In order to shorten code reviews, @ollieparanoid has once again improved the CI scripts. A new check makes sure that we always increase versions of modified packages. Sometimes we don't want to bump the version though, for example when we only enable another architecture. In that case, we can skip the new check with
[ci:skip-vercheck] in the commit message. Similarly
[ci:skip-build] allows skipping the test build (e.g. because we know it won't finish within the one hour timeout), while still running checksum verification and all other CI tests.
Pre-built Images / hwtest
One thing we have learned from the long list of ported devices is that some downstream kernels will only compile with certain GCC versions. Or, even worse, they may compile with a newer GCC but then they won't boot. The latter is of course a nightmare to resolve. @mberndt did it anyway and allowed his HTC Desire Z to be built with GCC-6 instead of GCC-4! To spare other porters from this pain, @drebrez added GCC-4 shortly afterwards. So now we have GCC-8 (in Alpine), GCC-6 and GCC-4.
While on the subject of workarounds for vendor kernels, @asriel-danctnix, @Danct12 and @minlexx are trying to get optional Android driver support for their phones integrated into postmarketOS. They are targeting their Xiaomi Redmi 4X (first photo) and Samsung Galaxy S5 (second photo), and are of course streamlining the necessary libhybris packaging for all devices in the process, for example with the new hybris-base meta package. The photos show the libhybris test for GPU functionallity running successfully. Support for audio is being worked on by packaging pulseaudio-modules-droid from SailfishOS.
26 new booting devices (139 total)
- CHUWI Hi10 Plus
- HTC One XL
- HTC One SV
- HTC One M7
- HTC One S
- HTC Desire Z (vision)
- LG G3 Beat
- LG Optimus L5
- LG Optimus L7 II
- Meizu Pro 5
- Motorola Moto G5
- Motorola Moto G5s
- Nokia 1
- OPPO Find 7a
- PINE64 PinePhone devkit
- Planet Gemini PDA
- Purism Librem 5 Devkit
- Samsung Galaxy S Relay 4G
- Samsung Galaxy Tab S2 9.7 LTE (SM-T819)
- Samsung Galaxy S7 edge
- Samsung Galaxy S7
- Samsung Captivate Glide
- Samsung Galaxy Tab 3 8.0
- TrekStor SurfTab wintron 7.0
- Xiaomi Mi 2
- Xiaomi A1
- ZTE Blade AF3
Thanks to: everyone who ported these devices, see the contributors section in each device's wiki page.
- 243 people in the main channel (-172)
- 3066 /r/postmarketOS readers (+974)
- 1474 merged MRs (+329)
- 987 closed issues (+142)
- 359 open issues (+108)
- 173 contributors in pmaports.git (
git shortlog --summary --numbered | wc -l) (+40)
Another thing we did not want to miss out on is of course convergence. That is a fancy word people use to describe a consistent interface for both your desktop and your phone. Next to this paragraph is a prime example of how convergence should be done with postmarketOS.
With that critical piece of information out there, and with grateful thoughts towards everybody who contributed: let's get right into the next year of exciting postmarketOS development! \o/