-
Notifications
You must be signed in to change notification settings - Fork 174
Description
I've been using bootc with RPI5's for a bit over a year now. I love bootc for managing my PI images. I dont want to manage my PI's any other way anymore.
But there are still some painful rough edges.
The built in bootloader in the PI doesn't support UEFI. There seem to be 2 chain loaders that can get you to an UEFI environment enough to get grub going. But one went unsupported, and one takes a lot of patching and only supports some of the RPI5 variants so far. So it can be hit or miss.
In addition, the PI likes to (and kind of needs to) assemble its own device tree from overlays. So even when the UEFI chain loading of the kernel is worked out, the dtb's are a pain to maintain currently. They are using it for some of their board variants now. so even getting some PI's to boot requires overlays.
So, I'd like the ability to work with the RPI5's bootloader rather then work against it.
How?
I think maybe I need a post install hook to run after the image is updated that can look at the grub files, generate an updated config.txt, and make a copy of the dtb/overlay dir to the right places on the rpi boot partition.
This would also enable some special features of the pi bootloader that would be really useful to unlock.
The first is Tryboot. The bootloader can be setup to try to boot a particular os. If it fails, the next boot after that will revert to the known good one. This would allow bootc switch to automatically rollback if it fails to boot properly. This would be extremely useful for headless PI nodes. It can even be used in conjunction with the built in watchdog timer to ensure if the os boot is unresponsive enough for long enough, it automatically reverts.
Another is hardware based bootc image selection. Its possible to wire a button to one of the gpio pins of a PI and affect the config.txt's settings based on if the button is pressed or not. This would allow booting the previous image by just holding down a button during powerup, without needing a screen/keyboard or a serial to usb adapter and laptop to select a grub menu entry. Again, making for a cheep headless PI node setup.
What can we do to unlock this functionality?