For a Raspberry PI, I've got the initial workings of a script to accomplish this goal.
First, install u-boot-rpi, raspi-firmware, and grub-efi-arm64. Next, create a filesystem on a device the Raspberry PI will boot from. For anything pre-RP4, this will have to VFAT and show up in a MBR. A system I've done has a GPT with entry #3, which matches with entry #1 in MBR. The Raspberry PI will find this and boot from it, Linux will see it as /dev/sda3. Mount this filesystem on /boot/efi. Do the following: cp /usr/lib/raspi-firmware/* /boot/efi # cp /usr/share/doc/raspi-firmware/copyright /boot/efi/LICENSE.broadcom cp /usr/lib/u-boot/rpi_arm64/u-boot.bin /boot/efi/u-boot64.bin cp /usr/lib/u-boot/rpi_3/u-boot.bin /boot/efi/u-boot3.bin cp /usr/lib/u-boot/rpi_4/u-boot.bin /boot/efi/u-boot4.bin cp /boot/dtbs/`uname -r`/broadcom/bcm2*-rpi*.dtb /boot/efi grub-install --bootloader-id=BOOT cp /boot/efi/EFI/BOOT/grubaa64.efi /boot/efi/EFI/BOOT/bootaa64.efi echo bootaa64 > /boot/efi/startup.nsh Now, I'm using SuSE as a starting point. They copy a series of device-tree overlays into /boot/efi/overlays. These may come from the Raspberry PI Foundation for optional hardware/configuration the RPF provides. Next would be to to create /boot/efi/config.txt. I'm unsure of which directives would be appropriate for Debian. Debian would certainly need to configure distinct "kernel=" lines depending upon which variant was being booted. This is rather badly damaged by bug #939633. Until the device-trees are fixed, this is completely broken. Not ready for most people, but almost there... -- (\___(\___(\______ --=> 8-) EHM <=-- ______/)___/)___/) \BS ( | ehem+sig...@m5p.com PGP 87145445 | ) / \_CS\ | _____ -O #include <stddisclaimer.h> O- _____ | / _/ 8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445