2020–08–31:
Releasing p-boot GUI bootloader
Today I finally decided to release display support for p-boot. Along with
it, p-boot's code also got quite a bit of cleanup. At this point main.c is fairly
readable. There's also a new support for 3GiB variant of PinePhone, that TL Lim
sent me some time ago.
I've copied my megatools.megous.com website template, and made it work better
on mobile phones, to make a nice landing page for it, too: xnux.eu/p-boot
Since previous publicly released version, p-boot can now be configured to
show the name of the phone on
the boot screen, which is quite useful if you're like me and TL Lim keeps
sending you PinePhones for development every other full moon. :)
I also use the name to describe HW mods I did to the particular phone.
There are some things I'd still like the p-boot to do. Since p-boot has
direct access to PMIC, I thought of using it for following things:
- Show battery status on the boot screen, something like: (80% CHG/DIS)
I frequently charge my PinePhone herd while turned off, and having a quick way
to check the charging status would be nice.
- Configure PMIC to use the NTC on the battery to monitor battery temperature
during charging and limit/stop charging current if it gets too hot. By default
PMIC expects 10kOhm NTC, but the battery uses 3kOhm NTC, so Icenowy made a patch
early on, that everyone uses, to disable this protection. I plan to do this in
a backward compatible way, so that people can keep using my kernel branch with
u-boot. p-boot would simply configure the PMIC and patch the DT, to remove the
property that makes kernel driver disable the protection.
- By default, thermal shutdown protection when PMIC overheats is disabled in
PMIC, and nothing is enabling it. Curious default on Allwinner side. Something
needs to enable this, so why not the bootloader again. Eventually, I'll make
PinePhone safe for erveryone, lol. :) From lack of CPU thermal regulation, to
this… silicon gods sure favor PinePhone, based on the lack of blue smoke
complaints from users, so far. But we should not continue testing the gods'
patience, much further. ;)
And more:
- Allow to specify minimum working backlight level in the boot config file, so
that p-boot can patch the DT with a per-device customized backlight-levels
table. It seems like each PinePhone has a different minimum, so the defaults in
the mainline kernel don't work for everyone.
- Allow p-boot to use font loaded from the SD card, so that it doesn't need to
be bundled inside p-boot.bin. This would make more space for extra features in
p-boot, like touchscreen/audio support.
- Allow p-boot to load/execute extra bootloader modules to/from DRAM, in case
p-boot runs out of SRAM some day.
- Use HW scaler and blender to implement fade in + zoom in animation for
swithcing between boot option splashscreens.
In the other news, TODO
I tried to cleanup and organize my kernel upstreaming TODO list, and
it's still too long. So instead I decided to give p-boot a little boost in
exposure by preparing a multi-boot image that will feature a range of diverse
distributions. With help of #pinephone channel users, I came up with
this list:
Looks like making some of these share space and play nice with the others
will be quite a challenge. If you're a distro maintainer, publishing a
ready-made rootfs tarball is a great way to simplify your inclusion into a
multi-boot image.
The image will be great for people new to PinePhone to try various distros
with very little hassle. Just flash one image to SD card, and select the distro
on boot.
I'll try documenting the image creation steps, but it will most probably be a
one shot experiment for me. So if anyone will want to maintain this image
further into the future, they'll be very wellcome.
I'm still undecided whether I'll force my kernel on all the above distros, or
let them use their own. Probably the latter.