I'm getting ideas again… I've been thinking for a while that a #Buildroot config for #Pinephone would be nice. I'm not really thinking of a fully working phone setup (though if someone wants to make that I'm curious), and more so I could use the A/B boot setup I have for Buildroot to quickly experiment with kernel changes. In pmOS I still can't install two kernels in parallel, so if one of my experiments breaks the kernel to the point of not booting far enough for USB network I have to open the phone, remove the battery, remove the SD card, fix it manually, and reverse. Annoying, and A/B boot avoids it.

And then the realization hit: U-Boot should be able to chainload U-Boot, right? So I could even include a second U-Boot in the A/B slots for experiments with that. Maybe not a perfect test, but should reduce the probability of having to manually fix it a lot…


Motivation to experiment is much higher if falling back from a failed experiment takes maybe 30 seconds, not 5 minutes.
This looks temptingly doable. The pmOS u-boot-pinephone package is pretty close to upstream U-Boot (old version 2023.01, but still). Biggest unknown seems to be if the Buildroot bare metal toolchain support will build the or1k-elf one for Crust SCP without trouble, simply because that seems like an unusual arch. But I really shouldn't dig further tonight… ​
GitHub - crust-firmware/crust: SCP (power management) firmware for sunxi SoCs

SCP (power management) firmware for sunxi SoCs. Contribute to crust-firmware/crust development by creating an account on GitHub.

GitHub