[Pkg-raspi-maintainers] Bug#1102607: Add support for U-Boot + grub-arm64-efi boot flow
Aaron Rainbolt
arraybolt3 at gmail.com
Thu Apr 10 22:58:47 BST 2025
Source: raspi-firmware
Version: 1.20220830+ds-1
Severity: wishlist
X-Debbugs-Cc: adrelanos at whonix.org
It's currently possible to convert a Debian RPi4 installation to use
U-Boot and grub-arm64-efi for booting, with some effort. This comes
with several advantages:
* The kernel command line can be modified by /etc/default/grub and
files under /etc/default/grub.d. Some software requires or benefits
from modifications made to the kernel command line, and uses this
mechanism in GRUB to make non-invasive changes to the command line.
With direct kernel boot, these changes will be silently ignored,
while with U-Boot + GRUB, these changes will be correctly used.
* In the event of a bad kernel update, users can trivially boot into
older kernels like they would on a normal desktop system.
* Recovering from broken boot without a secondary system becomes much
easier, since users can use the GRUB console and U-Boot console to
debug issues and boot the system manually.
* Multiboot installations on the Pi become possible.
Doing this isn't too complicated, I documented the process at
https://www.kicksecure.com/wiki/Dev/boot#Booting_Debian_Trixie_with_GRUB_+_u-boot_on_Raspberry_Pi_4
Actually doing this is currently a hassle though for two main reasons:
* The u-boot-rpi image in /boot/firmware isn't updated when the
u-boot-rpi package gets an update. It has to be manually copied by the
end user to be updated.
* The config.txt (and possbily also cmdline.txt) files need
modifications that simply can't be expressed by raspi-firmware's
configuration files to provide an optimal (or even functional)
experience. raspi-firmware will overwrite these files during updates.
It will also copy unnecessary kernel and initramfs files to the
firmware partition.
I would like to suggest (and if acceptable, contribute) the following
two features:
* A configuration option somewhere in raspi-firmware that disables
automatic generation and updating of config.txt and cmdline.txt and
copying of kernels and initramfs files.
* An option for U-Boot that will check if the bootloader image in the
firmware partition is up-to-date and copy it if it is out of date.
Both of these things would be optional, so that both direct kernel boot
and booting via U-Boot + GRUB would be possible.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-raspi-maintainers/attachments/20250410/4450a9c2/attachment.sig>
More information about the Pkg-raspi-maintainers
mailing list