To make postmarketOS run on the PinePhone Pro I started with the kernel that was already packaged for the Pinebook Pro since that is also a Rockchip RK3399 based device. The kernel to make the PinePhone Pro run initially for me is just a patch that adds a driver for the new display and a new device tree describing the hardware for the PinePhone Pro. That's it, two patches on top of the 5.13 kernel from kernel.org.

I've decided to see how the original PinePhone runs if a kernel source directly from kernel.org was used, it should be better in theory. The display driver for the original PinePhone is already in mainline and the device trees for the various revisions also have been for quite a while. So I made a postmarketOS build with a completely unpatched kernel to try it.

The current PinePhone kernel on postmarketOS will use the kernel from Megi. It is at 5.14 at the moment and adds 16 more patches on top of that kernel. Most of these extra patches are for supporting the original developer edition of the PineTab and the Dontbeevil devkits for the PinePhone and some other devices with Allwinner chips in them.

For the test setup I used the 5.15.5 kernel. I also made a new build of u-boot that has crust disabled because there's warnings of crust causing issues in Megi's changelog.

The results

The first thing that's noticable on the kernel.org build is that the orientation of the accelerometer is wrong as can be seen in the picture at the top of this post. The sensor is offset by 90 degrees so rotating the phone will keep moving the UI in the wrong direction.

The second big issue I noted is that the display is really unstable, it still has the bugs from 1+ year ago where the panel would stop displaying correctly and would only show the odd or even columns and have a lot of streaking. This fine detail is pretty hard to capture in a picture but the streaking is somewhat visible:

Turning the display on and off a few times usually fixes this. This has already been fixed in the megi kernel.

The PinePhone also contains some complicated drivers that have been written from scratch like the driver for the USB-C controller that handles the PD charging and all the convergence features. This is not upstream yet and that's partially because it's complex and doesn't fit neatly in one driver category.

Convergence not working is not a huge dealbreaker for most use, but things that are also not working is the wifi, bluetooth, modem, usb and charging indication. All in total, it's not really usable on an unpatched kernel at the moment.

The latest 5.16 branch for the PinePhone

This is a lot of code to keep rebasing on top of the latest kernel releases. Hopefully more will flow upstream instead.