Fix a merge error from 2.02-21 that affected kernel loading on Aarch64.

Fix a merge error from 2.02-21 that affected kernel loading on Aarch64.
Related: rhbz#1519311
Related: rhbz#1506704
Related: rhbz#1502312

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2018-01-23 16:33:52 -05:00
parent d51395ea7f
commit 8b3d200862
2 changed files with 12 additions and 7 deletions

View File

@ -71,7 +71,7 @@ index 746edd104..03ff83563 100644
void *fdt; void *fdt;
@@ -100,6 +103,26 @@ finalize_params_linux (void) @@ -100,6 +103,25 @@ finalize_params_linux (void)
if (grub_fdt_install() != GRUB_ERR_NONE) if (grub_fdt_install() != GRUB_ERR_NONE)
goto failure; goto failure;
@ -86,8 +86,7 @@ index 746edd104..03ff83563 100644
+ loaded_image->load_options_size = len = + loaded_image->load_options_size = len =
+ (grub_strlen (linux_args) + 1) * sizeof (grub_efi_char16_t); + (grub_strlen (linux_args) + 1) * sizeof (grub_efi_char16_t);
+ loaded_image->load_options = + loaded_image->load_options =
+ grub_efi_allocate_pages_max (0, + grub_efi_allocate_any_pages (GRUB_EFI_BYTES_TO_PAGES (loaded_image->load_options_size));
+ GRUB_EFI_BYTES_TO_PAGES (loaded_image->load_options_size));
+ if (!loaded_image->load_options) + if (!loaded_image->load_options)
+ return grub_error(GRUB_ERR_BAD_OS, "failed to create kernel parameters"); + return grub_error(GRUB_ERR_BAD_OS, "failed to create kernel parameters");
+ +
@ -98,7 +97,7 @@ index 746edd104..03ff83563 100644
return GRUB_ERR_NONE; return GRUB_ERR_NONE;
failure: failure:
@@ -107,72 +130,47 @@ failure: @@ -107,72 +129,47 @@ failure:
return grub_error(GRUB_ERR_BAD_OS, "failed to install/update FDT"); return grub_error(GRUB_ERR_BAD_OS, "failed to install/update FDT");
} }
@ -199,7 +198,7 @@ index 746edd104..03ff83563 100644
} }
static grub_err_t static grub_err_t
@@ -249,6 +247,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), @@ -249,6 +246,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
{ {
grub_file_t file = 0; grub_file_t file = 0;
struct grub_arm64_linux_kernel_header lh; struct grub_arm64_linux_kernel_header lh;
@ -207,7 +206,7 @@ index 746edd104..03ff83563 100644
grub_dl_ref (my_mod); grub_dl_ref (my_mod);
@@ -293,6 +292,15 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), @@ -293,6 +291,15 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
grub_dprintf ("linux", "kernel @ %p\n", kernel_addr); grub_dprintf ("linux", "kernel @ %p\n", kernel_addr);

View File

@ -7,7 +7,7 @@
Name: grub2 Name: grub2
Epoch: 1 Epoch: 1
Version: 2.02 Version: 2.02
Release: 23%{?dist} Release: 24%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more Summary: Bootloader with support for Linux, Multiboot and more
Group: System Environment/Base Group: System Environment/Base
License: GPLv3+ License: GPLv3+
@ -454,6 +454,12 @@ fi
%endif %endif
%changelog %changelog
* Tue Jan 23 2018 Peter Jones <pjones@redhat.com> - 2.02-24
- Fix a merge error from 2.02-21 that affected kernel loading on Aarch64.
Related: rhbz#1519311
Related: rhbz#1506704
Related: rhbz#1502312
* Fri Jan 19 2018 Peter Jones <pjones@redhat.com> - 2.02-23 * Fri Jan 19 2018 Peter Jones <pjones@redhat.com> - 2.02-23
- Only nerf annobin, not -fstack-crash-protection. - Only nerf annobin, not -fstack-crash-protection.
- Fix a conflict on /boot/efi directory permissions between -cdboot and the - Fix a conflict on /boot/efi directory permissions between -cdboot and the