summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/bootloader.pm5
-rw-r--r--perl-install/common.pm11
3 files changed, 13 insertions, 4 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 50f4c76d3..93abefc46 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -2,6 +2,7 @@
- recognize new kernel 5.2 - 5.4 drivers
- drakfont:
o don't crash when fonts.cache-1 to delete doesn't exist anymore (mga#21086)
+- drakboot: initial support for setting up uefi on aarch64
Version 18.21 - 23 June 2019
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 7e956cf87..fa678bce4 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -318,7 +318,7 @@ sub read {
}
# still no boot loader found? let's check for ESP if using UEFI:
if (is_uefi()) {
- if (-f "/boot/EFI/EFI/mageia/grubx64.efi" || -f "/boot/EFI/EFI/mageia/grubia32.efi") {
+ if (-f "/boot/EFI/EFI/mageia/grubx64.efi" || -f "/boot/EFI/EFI/mageia/grubia32.efi" || -f "/boot/efi/EFI/mageia/grubaa64.efi") {
my $bootloader = bootloader::read_grub2();
return $bootloader if read_($bootloader);
}
@@ -2503,6 +2503,9 @@ sub ensure_pkg_is_installed {
if (uefi_type() eq 'ia32') {
$prefix = 'i386-efi';
$pkg = 'grub2-efi(x86-32)';
+ } elsif (uefi_type() eq 'aa64') {
+ $prefix = 'arm64-efi';
+ $pkg = 'grub2-efi(aarch-64)';
} else {
$prefix = 'x86_64-efi';
$pkg = 'grub2-efi(x86-64)';
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 474d34c21..265f7365c 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -733,8 +733,11 @@ Returns the short name of the UEFI machine type supported by the kernel stub loa
=cut
sub kernel_uefi_type() {
- # No support for ARM yet
- arch() =~ /i.86/ ? 'ia32' : 'x64';
+ my $arch = arch();
+ if ($arch eq 'aarch64') {
+ return 'aa64'
+ }
+ $arch =~ /i.86/ ? 'ia32' : 'x64';
}
=item uefi_type()
@@ -744,8 +747,10 @@ Returns the UEFI machine type short name
=cut
sub uefi_type() {
+ if (arch() eq 'aarch64') {
+ return 'aa64'
+ }
if (-e '/sys/firmware/efi/fw_platform_size') {
- # No support for ARM yet
cat_('/sys/firmware/efi/fw_platform_size') =~ /32/ ? 'ia32' : 'x64';
} else {
'none';