Accepting request 867843 from home:michael-chang:branches:Base:System

* 0009-squash-Add-support-for-linuxefi.patch

OBS-URL: https://build.opensuse.org/request/show/867843
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=370
This commit is contained in:
Michael Chang 2021-01-30 05:56:02 +00:00 committed by Git OBS Bridge
parent 5a314d1a22
commit 31d3c4f444
11 changed files with 50 additions and 8 deletions

View File

@ -1,7 +1,7 @@
From db4da8095b5ba722d22502c8d090e66816a5577d Mon Sep 17 00:00:00 2001 From db4da8095b5ba722d22502c8d090e66816a5577d Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg@redhat.com> From: Matthew Garrett <mjg@redhat.com>
Date: Fri, 6 Nov 2020 08:36:36 +0000 Date: Fri, 6 Nov 2020 08:36:36 +0000
Subject: [PATCH 1/8] Add support for Linux EFI stub loading on aarch64. Subject: [PATCH 1/9] Add support for Linux EFI stub loading on aarch64.
Add support for Linux EFI stub loading on aarch64. Add support for Linux EFI stub loading on aarch64.
--- ---

View File

@ -1,7 +1,7 @@
From e27acddebd30175587155613042abffd2e9a5de8 Mon Sep 17 00:00:00 2001 From e27acddebd30175587155613042abffd2e9a5de8 Mon Sep 17 00:00:00 2001
From: Mark Salter <msalter@redhat.com> From: Mark Salter <msalter@redhat.com>
Date: Mon, 17 Apr 2017 08:44:29 -0400 Date: Mon, 17 Apr 2017 08:44:29 -0400
Subject: [PATCH 2/8] arm64: make sure fdt has #address-cells and #size-cells Subject: [PATCH 2/9] arm64: make sure fdt has #address-cells and #size-cells
properties properties
Recent upstream changes to kexec-tools relies on #address-cells Recent upstream changes to kexec-tools relies on #address-cells

View File

@ -1,7 +1,7 @@
From 3526c4e467ee01a3cfd2f4d627433d078a1ab780 Mon Sep 17 00:00:00 2001 From 3526c4e467ee01a3cfd2f4d627433d078a1ab780 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Mon, 27 Aug 2018 13:14:06 -0400 Date: Mon, 27 Aug 2018 13:14:06 -0400
Subject: [PATCH 3/8] Make grub_error() more verbose Subject: [PATCH 3/9] Make grub_error() more verbose
Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Peter Jones <pjones@redhat.com>
--- ---

View File

@ -1,7 +1,7 @@
From 5d417346956bc3108183020a8a9f20ddda034b48 Mon Sep 17 00:00:00 2001 From 5d417346956bc3108183020a8a9f20ddda034b48 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Thu, 11 Jul 2019 14:38:57 +0200 Date: Thu, 11 Jul 2019 14:38:57 +0200
Subject: [PATCH 4/8] arm/arm64 loader: Better memory allocation and error Subject: [PATCH 4/9] arm/arm64 loader: Better memory allocation and error
messages. messages.
On mustang, our memory map looks like: On mustang, our memory map looks like:

View File

@ -1,7 +1,7 @@
From 669aa440ca34f6d8982c92b79fa2ee84c20618c6 Mon Sep 17 00:00:00 2001 From 669aa440ca34f6d8982c92b79fa2ee84c20618c6 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com> From: Peter Jones <pjones@redhat.com>
Date: Thu, 16 Aug 2018 11:08:11 -0400 Date: Thu, 16 Aug 2018 11:08:11 -0400
Subject: [PATCH 5/8] Make linux_arm_kernel_header.hdr_offset be at the right Subject: [PATCH 5/9] Make linux_arm_kernel_header.hdr_offset be at the right
place place
The kernel in front of me (slightly edited to make objdump work) looks like: The kernel in front of me (slightly edited to make objdump work) looks like:

View File

@ -1,7 +1,7 @@
From 3741c6807923ae97b0d87e61c59c8de8af544484 Mon Sep 17 00:00:00 2001 From 3741c6807923ae97b0d87e61c59c8de8af544484 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com> From: Javier Martinez Canillas <javierm@redhat.com>
Date: Thu, 23 Apr 2020 15:06:46 +0200 Date: Thu, 23 Apr 2020 15:06:46 +0200
Subject: [PATCH 6/8] efi: Set image base address before jumping to the PE/COFF Subject: [PATCH 6/9] efi: Set image base address before jumping to the PE/COFF
entry point entry point
Upstream GRUB uses the EFI LoadImage() and StartImage() to boot the Linux Upstream GRUB uses the EFI LoadImage() and StartImage() to boot the Linux

View File

@ -1,7 +1,7 @@
From 496890ebd2605eb1ff15f8d96c30b5d617f1bb85 Mon Sep 17 00:00:00 2001 From 496890ebd2605eb1ff15f8d96c30b5d617f1bb85 Mon Sep 17 00:00:00 2001
From: Michael Chang <mchang@suse.com> From: Michael Chang <mchang@suse.com>
Date: Fri, 6 Nov 2020 11:19:06 +0000 Date: Fri, 6 Nov 2020 11:19:06 +0000
Subject: [PATCH 7/8] linuxefi: fail kernel validation without shim protocol. Subject: [PATCH 7/9] linuxefi: fail kernel validation without shim protocol.
If certificates that signed grub are installed into db, grub can be If certificates that signed grub are installed into db, grub can be
booted directly. It will then boot any kernel without signature booted directly. It will then boot any kernel without signature

View File

@ -1,7 +1,7 @@
From 5f98e139f74a1280dee4f1579eeab05e08541e8c Mon Sep 17 00:00:00 2001 From 5f98e139f74a1280dee4f1579eeab05e08541e8c Mon Sep 17 00:00:00 2001
From: Michael Chang <mchang@suse.com> From: Michael Chang <mchang@suse.com>
Date: Tue, 10 Nov 2020 04:33:21 +0000 Date: Tue, 10 Nov 2020 04:33:21 +0000
Subject: [PATCH 8/8] squash! Add support for Linux EFI stub loading on Subject: [PATCH 8/9] squash! Add support for Linux EFI stub loading on
aarch64. aarch64.
Make efi handoff the default loader for arm64 platform. Make efi handoff the default loader for arm64 platform.

View File

@ -0,0 +1,39 @@
From 5d72f1ccbedcfc883e5f4cda60ea456cdc2b5dcd Mon Sep 17 00:00:00 2001
From: Michael Chang <mchang@suse.com>
Date: Sat, 30 Jan 2021 12:34:17 +0800
Subject: [PATCH 9/9] squash! Add support for linuxefi
The upstream commit
df84d6e94 efi: Print error messages to grub_efi_allocate_pages_real()
adds grub_error() to set error message and return grub_errno. We have to
unset the grub_errno if we want to ignore the error and proceed, or
the inadvertently provoked error handler would lead to unspecified
consequence.
Signed-off-by: Michael Chang <mchang@suse.com>
---
grub-core/loader/i386/efi/linux.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
index 3f6d51519..742b215a3 100644
--- a/grub-core/loader/i386/efi/linux.c
+++ b/grub-core/loader/i386/efi/linux.c
@@ -283,8 +283,11 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
BYTES_TO_PAGES(lh.init_size));
if (!kernel_mem)
- kernel_mem = grub_efi_allocate_pages_max(0x3fffffff,
+ {
+ grub_errno = GRUB_ERR_NONE;
+ kernel_mem = grub_efi_allocate_pages_max(0x3fffffff,
BYTES_TO_PAGES(lh.init_size));
+ }
if (!kernel_mem)
{
--
2.26.2

View File

@ -10,6 +10,7 @@ Wed Jan 27 04:13:32 UTC 2021 - Michael Chang <mchang@suse.com>
* 0006-efi-Set-image-base-address-before-jumping-to-the-PE-.patch * 0006-efi-Set-image-base-address-before-jumping-to-the-PE-.patch
* 0007-linuxefi-fail-kernel-validation-without-shim-protoco.patch * 0007-linuxefi-fail-kernel-validation-without-shim-protoco.patch
* 0008-squash-Add-support-for-Linux-EFI-stub-loading-on-aar.patch * 0008-squash-Add-support-for-Linux-EFI-stub-loading-on-aar.patch
* 0009-squash-Add-support-for-linuxefi.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jan 21 07:59:39 UTC 2021 - Michael Chang <mchang@suse.com> Thu Jan 21 07:59:39 UTC 2021 - Michael Chang <mchang@suse.com>

View File

@ -345,6 +345,7 @@ Patch734: 0005-Make-linux_arm_kernel_header.hdr_offset-be-at-the-ri.patch
Patch735: 0006-efi-Set-image-base-address-before-jumping-to-the-PE-.patch Patch735: 0006-efi-Set-image-base-address-before-jumping-to-the-PE-.patch
Patch736: 0007-linuxefi-fail-kernel-validation-without-shim-protoco.patch Patch736: 0007-linuxefi-fail-kernel-validation-without-shim-protoco.patch
Patch737: 0008-squash-Add-support-for-Linux-EFI-stub-loading-on-aar.patch Patch737: 0008-squash-Add-support-for-Linux-EFI-stub-loading-on-aar.patch
Patch738: 0009-squash-Add-support-for-linuxefi.patch
Requires: gettext-runtime Requires: gettext-runtime
%if 0%{?suse_version} >= 1140 %if 0%{?suse_version} >= 1140
@ -683,6 +684,7 @@ swap partition while in resuming
%patch735 -p1 %patch735 -p1
%patch736 -p1 %patch736 -p1
%patch737 -p1 %patch737 -p1
%patch738 -p1
%build %build
# collect evidence to debug spurious build failure on SLE15 # collect evidence to debug spurious build failure on SLE15