Skip to content
Snippets Groups Projects
Commit effc8001 authored by Steve McIntyre's avatar Steve McIntyre
Browse files

Fix up arm64 SB patch to fix build failure on 32-bit systems

parent 8818b1d7
No related merge requests found
grub2 (2.06-12) unstable; urgency=medium
* Fix up arm64 SB patch to fix build failure on 32-bit arm systems
-- Steve McIntyre <93sam@debian.org> Fri, 21 Apr 2023 13:30:26 +0100
grub2 (2.06-11) unstable; urgency=medium grub2 (2.06-11) unstable; urgency=medium
* And try again... :-/ * And try again... :-/
......
...@@ -10,10 +10,10 @@ Signed-off-by: Emanuele Rocca <ema@debian.org> ...@@ -10,10 +10,10 @@ Signed-off-by: Emanuele Rocca <ema@debian.org>
Origin: vendor, https://github.com/rhboot/grub2/commit/2786ab864cf00c15123320671f653e9a36ba12b4 Origin: vendor, https://github.com/rhboot/grub2/commit/2786ab864cf00c15123320671f653e9a36ba12b4
--- ---
Index: grub2-2.06/grub-core/loader/arm64/linux.c Index: grub.git/grub-core/loader/arm64/linux.c
=================================================================== ===================================================================
--- grub2-2.06.orig/grub-core/loader/arm64/linux.c --- grub.git.orig/grub-core/loader/arm64/linux.c
+++ grub2-2.06/grub-core/loader/arm64/linux.c +++ grub.git/grub-core/loader/arm64/linux.c
@@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
* along with GRUB. If not, see <http://www.gnu.org/licenses/>. * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/ */
...@@ -92,13 +92,13 @@ Index: grub2-2.06/grub-core/loader/arm64/linux.c ...@@ -92,13 +92,13 @@ Index: grub2-2.06/grub-core/loader/arm64/linux.c
return GRUB_ERR_NONE; return GRUB_ERR_NONE;
failure: failure:
@@ -114,8 +148,38 @@ grub_arch_efi_linux_boot_image (grub_add @@ -116,6 +150,39 @@ grub_arch_efi_linux_boot_image (grub_add
grub_efi_boot_services_t *b;
grub_efi_status_t status;
grub_efi_loaded_image_t *loaded_image; grub_efi_loaded_image_t *loaded_image;
+ handover_func hf;
int len; int len;
+#ifdef __aarch64__ /* SB only enabled for arm64 */
+ handover_func hf;
+
+ if (grub_efi_get_secureboot() == GRUB_EFI_SECUREBOOT_MODE_ENABLED) { + if (grub_efi_get_secureboot() == GRUB_EFI_SECUREBOOT_MODE_ENABLED) {
+ grub_dprintf ("linux", "GRUB_EFI_SECUREBOOT_MODE enabled\n"); + grub_dprintf ("linux", "GRUB_EFI_SECUREBOOT_MODE enabled\n");
+ /* + /*
...@@ -127,11 +127,12 @@ Index: grub2-2.06/grub-core/loader/arm64/linux.c ...@@ -127,11 +127,12 @@ Index: grub2-2.06/grub-core/loader/arm64/linux.c
+ } + }
+ +
+ grub_dprintf ("linux", "GRUB_EFI_SECUREBOOT_MODE is NOT enabled\n"); + grub_dprintf ("linux", "GRUB_EFI_SECUREBOOT_MODE is NOT enabled\n");
+#endif
+ +
mempath = grub_malloc (2 * sizeof (grub_efi_memory_mapped_device_path_t)); mempath = grub_malloc (2 * sizeof (grub_efi_memory_mapped_device_path_t));
if (!mempath) if (!mempath)
return grub_errno; return grub_errno;
@@ -285,6 +349,7 @@ grub_cmd_linux (grub_command_t cmd __att @@ -285,6 +352,7 @@ grub_cmd_linux (grub_command_t cmd __att
{ {
grub_file_t file = 0; grub_file_t file = 0;
struct linux_arch_kernel_header lh; struct linux_arch_kernel_header lh;
...@@ -139,7 +140,7 @@ Index: grub2-2.06/grub-core/loader/arm64/linux.c ...@@ -139,7 +140,7 @@ Index: grub2-2.06/grub-core/loader/arm64/linux.c
grub_err_t err; grub_err_t err;
grub_dl_ref (my_mod); grub_dl_ref (my_mod);
@@ -330,6 +395,9 @@ grub_cmd_linux (grub_command_t cmd __att @@ -330,6 +398,9 @@ grub_cmd_linux (grub_command_t cmd __att
grub_dprintf ("linux", "kernel @ %p\n", kernel_addr); grub_dprintf ("linux", "kernel @ %p\n", kernel_addr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment