Enable UKI support for the Limine bootloader option (#3207)
This commit is contained in:
parent
0b551d729e
commit
645e8d0144
|
|
@ -1231,7 +1231,8 @@ class Installer:
|
|||
self,
|
||||
boot_partition: PartitionModification,
|
||||
efi_partition: PartitionModification | None,
|
||||
root: PartitionModification | LvmVolume
|
||||
root: PartitionModification | LvmVolume,
|
||||
uki_enabled: bool = False
|
||||
) -> None:
|
||||
debug('Installing limine bootloader')
|
||||
|
||||
|
|
@ -1306,12 +1307,19 @@ Exec = /bin/sh -c "{hook_command}"
|
|||
|
||||
for kernel in self.kernels:
|
||||
for variant in ('', '-fallback'):
|
||||
entry = [
|
||||
'protocol: linux',
|
||||
f'kernel_path: boot():/vmlinuz-{kernel}',
|
||||
f'kernel_cmdline: {kernel_params}',
|
||||
f'module_path: boot():/initramfs-{kernel}{variant}.img',
|
||||
]
|
||||
if uki_enabled:
|
||||
entry = [
|
||||
'protocol: efi',
|
||||
f'path: boot():/EFI/Linux/arch-{kernel}.efi',
|
||||
f'cmdline: {kernel_params}',
|
||||
]
|
||||
else:
|
||||
entry = [
|
||||
'protocol: linux',
|
||||
f'path: boot():/vmlinuz-{kernel}',
|
||||
f'cmdline: {kernel_params}',
|
||||
f'module_path: boot():/initramfs-{kernel}{variant}.img',
|
||||
]
|
||||
|
||||
config_contents += f'\n/Arch Linux ({kernel}{variant})\n'
|
||||
config_contents += '\n'.join([f' {it}' for it in entry]) + '\n'
|
||||
|
|
@ -1463,7 +1471,7 @@ Exec = /bin/sh -c "{hook_command}"
|
|||
case Bootloader.Efistub:
|
||||
self._add_efistub_bootloader(boot_partition, root, uki_enabled)
|
||||
case Bootloader.Limine:
|
||||
self._add_limine_bootloader(boot_partition, efi_partition, root)
|
||||
self._add_limine_bootloader(boot_partition, efi_partition, root, uki_enabled)
|
||||
|
||||
def add_additional_packages(self, packages: str | list[str]) -> None:
|
||||
return self.pacman.strap(packages)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class Bootloader(Enum):
|
|||
|
||||
def has_uki_support(self) -> bool:
|
||||
match self:
|
||||
case Bootloader.Efistub | Bootloader.Systemd:
|
||||
case Bootloader.Efistub | Bootloader.Limine | Bootloader.Systemd:
|
||||
return True
|
||||
case _:
|
||||
return False
|
||||
|
|
|
|||
Loading…
Reference in New Issue