[bootloader] Add secure-boot efiBootLoader

- add configuration option
 - check for sensible combinations of firmware, bootloader,
   and complain if it isn't.
This commit is contained in:
Adriaan de Groot 2018-02-20 04:22:35 -05:00
parent 092529da45
commit 7f53e970fc
2 changed files with 17 additions and 2 deletions

View file

@ -299,6 +299,12 @@ def install_grub(efi_directory, fw_type):
"-o", libcalamares.job.configuration["grubCfg"]])
def install_secureboot(efi_directory):
"""
Installs the secureboot shim in the system by calling efibootmgr.
"""
raise NotImplementedError
def vfat_correct_case(parent, name):
for candidate in os.listdir(parent):
if name.lower() == candidate.lower():
@ -320,8 +326,14 @@ def prepare_bootloader(fw_type):
if efi_boot_loader == "systemd-boot" and fw_type == "efi":
install_systemd_boot(efi_directory)
else:
elif efi_boot_loader == "sb-shim" and fw_type == "efi":
install_secureboot(efi_directory)
elif efi_boot_loader == "grub" or fw_type != "efi":
install_grub(efi_directory, fw_type)
else:
libcalamares.utils.debug( "WARNING: the combination of "
"boot-loader '{!s}' and firmware '{!s}' "
"is not supported.".format(efi_boot_loader, fw_type) )
def run():