When I run FreeBSD 12-CURRENT r336739 on a homebuilt PC with an Asus H87M-E motherboard and try to use the UEFI Bootloader if I have my main partition as ZFS, I get stuck at the BootOrder line. I do not have this problem on the same computer in BIOS/CSM mode or when booting via USB with UEFI, nor do I have this problem on a HP EliteBook 1040 G3 in UEFI mode with ZFS on Root.
I am having the same issue on FreeBSD 12-CURRENT amd64 20180726 r336739 efi zfs root and a ASUS H87I-PLUS motherboard. After I install FreeBSD I get stuck at the BootOrder line. I have also found that Refind can not boot FreeBSD boot1.efi. The only way it fix the boot issue is to use efibootmgr on linux.
FreeBSD should write to the bios boot manager after installation.
Boot a Linux Live CD distro that has efibootmgr. Issue this command.
"sudo efibootmgr -c -d /dev/sda -p 1 -L FreeBSD -l /EFI/FreeBSD/boot1.efi"
Where "-d /dev/sda" is your boot disk, "-p 1" is the EFI partion number, -L is the uefi label name and -l is the path to boot1.efi. You may have to change the uefi boot order in the bios as an extra step.
Can you try using /boot/loader.efi instead of /boot/boot1.efi as the boot\bootx64.efi file?
With Refind I tried loader.efi and boot1.efi. Both did not work.
As for renaming /boot/loader.efi and /boot/loader.efi to
/boot/loader.efi instead of /boot/boot1.efi to boot\bootx64.efi. I dont remember trying that. I believe I did though.
see also bug#219957
This is no longer an issue with 12.0-RELEASE.