#!/bin/sh -eu kflavour= kflavour="${GLOBAL_KFLAVOURS%% *}" mkdir -p /boot/efi uboots="rpi_3 rpi_3_32b rpi_4 rpi_4_32b" for uboot in $uboots; do [ -d /usr/share/u-boot/$uboot ] && cp -f /usr/share/u-boot/$uboot/* /boot/efi/ [ -f /boot/efi/kernel8.img ] && mv /boot/efi/{kernel8.img,uboot-$uboot.bin} [ -f /boot/efi/kernel7.img ] && mv /boot/efi/{kernel7.img,uboot-$uboot.bin} done rm -f /boot/efi/config.txt [ "$GLOBAL_ARCH" = aarch64 ] && \ echo "arm_64bit=1" > /boot/efi/config.txt cat >> /boot/efi/config.txt <