Merge 6b738a8023 into 39dbebf26c
This commit is contained in:
commit
ad31080eee
|
|
@ -1359,7 +1359,7 @@ class Installer:
|
|||
boot_dir = boot_partition.mountpoint
|
||||
|
||||
add_options = [
|
||||
f'--target={platform.machine()}-efi',
|
||||
f'--target={"arm64" if platform.machine() == "aarch64" else platform.machine()}-efi',
|
||||
f'--efi-directory={efi_partition.mountpoint}',
|
||||
*boot_dir_arg,
|
||||
'--bootloader-id=GRUB',
|
||||
|
|
@ -1480,6 +1480,11 @@ class Installer:
|
|||
|
||||
parent_dev_path = get_parent_device_path(efi_partition.safe_dev_path)
|
||||
|
||||
if platform.machine() == 'aarch64':
|
||||
efi_binaries = ('BOOTAA64.EFI',)
|
||||
else:
|
||||
efi_binaries = ('BOOTIA32.EFI', 'BOOTX64.EFI')
|
||||
|
||||
try:
|
||||
efi_dir_path = self.target / efi_partition.mountpoint.relative_to('/') / 'EFI'
|
||||
efi_dir_path_target = efi_partition.mountpoint / 'EFI'
|
||||
|
|
@ -1494,14 +1499,12 @@ class Installer:
|
|||
|
||||
efi_dir_path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
for file in ('BOOTIA32.EFI', 'BOOTX64.EFI'):
|
||||
for file in efi_binaries:
|
||||
(limine_path / file).copy_into(efi_dir_path)
|
||||
except Exception as err:
|
||||
raise DiskError(f'Failed to install Limine in {self.target}{efi_partition.mountpoint}: {err}')
|
||||
|
||||
hook_command = (
|
||||
f'/usr/bin/cp /usr/share/limine/BOOTIA32.EFI {efi_dir_path_target}/ && /usr/bin/cp /usr/share/limine/BOOTX64.EFI {efi_dir_path_target}/'
|
||||
)
|
||||
hook_command = ' && '.join(f'/usr/bin/cp /usr/share/limine/{file} {efi_dir_path_target}/' for file in efi_binaries)
|
||||
|
||||
if not bootloader_removable:
|
||||
# Create EFI boot menu entry for Limine.
|
||||
|
|
@ -1512,7 +1515,7 @@ class Installer:
|
|||
raise OSError(f'Could not open or read /sys/firmware/efi/fw_platform_size to determine EFI bitness: {err}')
|
||||
|
||||
if efi_bitness == '64':
|
||||
loader_path = '\\EFI\\arch-limine\\BOOTX64.EFI'
|
||||
loader_path = f'\\EFI\\arch-limine\\{"BOOTAA64.EFI" if platform.machine() == "aarch64" else "BOOTX64.EFI"}'
|
||||
elif efi_bitness == '32':
|
||||
loader_path = '\\EFI\\arch-limine\\BOOTIA32.EFI'
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue