From 0993459d926369264457bd22fa14d7aeca20713c Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Fri, 5 Jun 2020 12:52:02 +0200 Subject: [PATCH] Install GRUB as \EFI\BOOT\BOOTARM.EFI in armv7hl The Default Boot Behavior for EFI if no BootOrder and Boot#### variables are found is to look for an ESP and start \EFI\BOOT\BOOT{$arch}.efi. This is usually fallback.efi installed by the shim package, but since shim isn't used on armv7, there's no \EFI\BOOT\BOOTARM.EFI installed in the ESP. So install GRUB as \EFI\BOOT\BOOTARM.EFI for armv7 so there is a default EFI binary to be started. Signed-off-by: Javier Martinez Canillas --- grub.macros | 6 ++++++ grub2.spec | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/grub.macros b/grub.macros index 9c87491..56d6bbd 100644 --- a/grub.macros +++ b/grub.macros @@ -496,6 +496,9 @@ ln -sf ..%{efi_esp_dir}/grub.cfg \\\ $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg \ install -m 700 %{2} $RPM_BUILD_ROOT%{efi_esp_dir}/%{2} \ install -m 700 %{3} $RPM_BUILD_ROOT%{efi_esp_dir}/%{3} \ +%ifarch %{arm} \ +install -D -m 700 %{2} $RPM_BUILD_ROOT%{efi_esp_boot}/BOOTARM.EFI \ +%endif \ install -D -m 700 unicode.pf2 \\\ $RPM_BUILD_ROOT%{efi_esp_dir}/fonts/unicode.pf2 \ ${RPM_BUILD_ROOT}/%{_bindir}/%{name}-editenv \\\ @@ -590,6 +593,9 @@ touch ${RPM_BUILD_ROOT}/boot/%{name}/grub.cfg \ %defattr(0700,root,root,-) \ %config(noreplace) %{_sysconfdir}/%{name}-efi.cfg \ %attr(0700,root,root)%{efi_esp_dir}/%{2} \ +%ifarch %{arm} \ +%attr(0700,root,root)%{efi_esp_boot}/BOOTARM.EFI \ +%endif \ %dir %attr(0700,root,root)%{efi_esp_dir}/fonts \ %dir %attr(0700,root,root)/boot/loader/entries \ %ghost %config(noreplace) %attr(0700,root,root)%{efi_esp_dir}/grub.cfg \ diff --git a/grub2.spec b/grub2.spec index b3f9a0f..418260f 100644 --- a/grub2.spec +++ b/grub2.spec @@ -9,7 +9,7 @@ Name: grub2 Epoch: 1 Version: 2.04 -Release: 22%{?dist} +Release: 23%{?dist} Summary: Bootloader with support for Linux, Multiboot and more License: GPLv3+ URL: http://www.gnu.org/software/grub/ @@ -504,6 +504,9 @@ rm -r /boot/grub2.tmp/ || : %endif %changelog +* Fri Jun 05 2020 Javier Martinez Canillas - 2.04-23 +- Install GRUB as \EFI\BOOT\BOOTARM.EFI in armv7hl + * Tue May 26 2020 Javier Martinez Canillas - 2.04-22 - Fix an out of memory error when loading large initrd images Resolves: rhbz#1838633