You’re welcome. I’ve notified the repo owner, but until that is updated, you can maybe try just skipping the first ‘echo overlay…’ step and use the package from Debian directly. However, going over this thread again from the top, it looks like neither package will work anyway because that was the reason you were trying to build from source in the first place! Sorry for going down the wrong path. :s So, again, for building natively:
GRUB_MODULES="boot chain configfile echo efinet eval ext2 fat font gettext gfxterm gzio help linux loadenv lsefi normal part_gpt part_msdos read regexp search search_fs_file search_fs_uuid search_label terminal terminfo test tftp time xen_hypervisor xen_module"
git clone http://git.savannah.gnu.org/r/grub.git -b grub-2.02-beta3
cd grub
mkdir out
#sd card
cat << EOF > out/grub-sd.configfile
set root=(hd1,msdos2)
set prefix=(\$root)'/boot/grub'
configfile \$prefix/grub.cfg
EOF
#emmc
cat << EOF > out/grub.configfile
search.fs_label rootfs root
set prefix=(\$root)'/boot/grub'
configfile \$prefix/grub.cfg
EOF
./autogen.sh
./configure
make
#sd card
./grub-mkimage \
--verbose \
--output=out/grubaa64-sd.efi \
--config=out/grub-sd.configfile \
--format=arm64-efi \
$GRUB_MODULES
#emmc
./grub-mkimage \
--verbose \
--output=out/grubaa64.efi \
--config=out/grub.configfile \
--format=arm64-efi \
$GRUB_MODULES
Please note that these instructions have not been tested so you might have some debugging to do.