From cc058dfd41051f372b7efc3fe889c7434a6aafc121e86d4e8d9a55c5f8347683 Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Mon, 16 Mar 2015 11:14:54 +0000 Subject: [PATCH] Accepting request 290940 from home:Andreas_Schwab:Factory - grub2-arm64-set-correct-length.patch: arm64: set correct length of device path end entry OBS-URL: https://build.opensuse.org/request/show/290940 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=146 --- grub2-arm64-set-correct-length.patch | 31 ++++++++++++++++++++++++++++ grub2.changes | 6 ++++++ grub2.spec | 4 +++- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 grub2-arm64-set-correct-length.patch diff --git a/grub2-arm64-set-correct-length.patch b/grub2-arm64-set-correct-length.patch new file mode 100644 index 0000000..c347407 --- /dev/null +++ b/grub2-arm64-set-correct-length.patch @@ -0,0 +1,31 @@ +From 4d21c1019904598a991e847eef049c65f9c49bd9 Mon Sep 17 00:00:00 2001 +From: Leif Lindholm +Date: Tue, 7 Jan 2014 17:52:50 +0000 +Subject: [PATCH] arm64: set correct length of device path end entry + +The length of the Device Path End entry in the grub_linux_boot() +function was incorrectly set to 0. This triggers an assert failure +in debug builds of Tianocore. + +Set it to sizeof (grub_efi_device_path_t). +--- + ChangeLog | 4 ++++ + grub-core/loader/arm64/linux.c | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c +index 9d15aad..75ad871 100644 +--- a/grub-core/loader/arm64/linux.c ++++ b/grub-core/loader/arm64/linux.c +@@ -268,7 +268,7 @@ grub_linux_boot (void) + + mempath[1].header.type = GRUB_EFI_END_DEVICE_PATH_TYPE; + mempath[1].header.subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE; +- mempath[1].header.length = 0; ++ mempath[1].header.length = sizeof (grub_efi_device_path_t); + + b = grub_efi_system_table->boot_services; + status = b->load_image (0, grub_efi_image_handle, +-- +2.3.2 + diff --git a/grub2.changes b/grub2.changes index 24b6ff6..f1635ac 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 16 08:08:32 UTC 2015 - schwab@suse.de + +- grub2-arm64-set-correct-length.patch: arm64: set correct length of + device path end entry + ------------------------------------------------------------------- Wed Mar 4 04:03:37 UTC 2015 - mchang@suse.com diff --git a/grub2.spec b/grub2.spec index ab4f6fc..038740d 100644 --- a/grub2.spec +++ b/grub2.spec @@ -1,7 +1,7 @@ # # spec file for package grub2 # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -219,6 +219,7 @@ Patch231: grub2-xfs-V5-filesystem-format-support.patch Patch232: grub2-efi_gop-avoid-low-resolution.patch Patch233: grub2-ppc64le-fix-64bit-trampoline-in-dyn-linker.patch Patch234: grub2-arm64-Reduce-timer-event-frequency-by-10.patch +Patch235: grub2-arm64-set-correct-length.patch Requires: gettext-runtime %if 0%{?suse_version} >= 1140 @@ -433,6 +434,7 @@ mv po/grub.pot po/%{name}.pot %patch232 -p1 %patch233 -p1 %patch234 -p1 +%patch235 -p1 # Generate po/LINGUAS for message catalogs ... ./linguas.sh