megi's PinePhone Development Log RSS

+972

2023–06–09: Multi-distro image supporting both Pinephone and Pinephone Pro

With some tweaks, it's possible for one SD card image to share both bootloaders for Pinephone (A64 SoC) and Pinephone Pro (RK3399 SoC). Normally, A64 BROM searches for bootable block at 8 KiB offset and RK3399 uses 32 KiB offset, so even when using a very small bootloader like p-boot, that fits everything it needs just under the size of 32 KiB, the bootloaders would overlap. Thankfully there are ways around this limitation. :)

I've modified my multi-distro image to support the new partition layout, where each functionally separate section of the SD card has its own partion. It is no longer needed to remember special offsets in the empty space before the first partition, where the bootloaders need to be flashed. Each bootloader has its own partition now. I had to add GPT support to p-boot in order for it to coexist nicely in this new scheme of things with U-Boot for Pinephone Pro on the same SD card.

The result is that you can have a single image that will work in original Pinephone and in Pinephone Pro. The image contains currently 23 distributions, some of which don't have their own official Pinephone Pro port, but can nevertheless still be booted and tested on Pinephone Pro.

So a new build of multi-distro image is comming. :)

Boot selection works, but individual distributions need to be tested, and perhaps tamed in order to not muck around with partition layout.

It really is quite disheartening when you make a nice custom partition layout, which the distro should notice is clearly not the original layout of the installation image, and it regardless starts changing partitions without asking or warning, and without checking that it's modifying its own expected partition layout and not something that the user painstakingly prepared to allow coexistence of multiple distributions in multi-boot environment.

This is the least fun part of preparing a release of multi-distro image. Meh.

My U-Boot builds

Along with the release of the multi-distro image, I'll publish a pre-built U-Boot 2023.07 with patches for improved Pinephone Pro support, which will finally fix the charging issues with empty battery that many people have experienced, and will allow you to make your own boot menus.

There will be two variants. One with DRAM down-clocking support, that will introduce very significant power savings to Pinephone Pro and one without, but based on fully FOSS components.

My latest Linux 6.3 branch is already prepared to realize these new power savings, when used with the new U-Boot version.