The efibootmgr package provides tools and libraries to manipulate EFI variables.
Build efibootmgr with the following commands:
make EFIDIR=LFS EFI_LOADER=grubx64.efi
For Systemd-boot use the following build line:
make EFIDIR=LFS EFI_LOADER=systemd-bootx64.efi
Now, Install the package:
make install EFIDIR=LFS
EFIDIR=LFS: This option
specifies the distro's subdirectory name under /boot/efi/EFI. The building system of this
package needs it to be set explicitly.
EFI_LOADER=grubx64.efi:
This option specifies the name of the default EFI boot loader. It
is set to match the EFI boot loader provided by GRUB.