Add EFI loader fix

This commit is contained in:
Peter Robinson 2017-11-21 12:30:37 +00:00
parent e6b91d581b
commit f9dc956b0c
2 changed files with 48 additions and 1 deletions

View File

@ -0,0 +1,43 @@
From patchwork Tue Nov 21 12:24:32 2017
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [U-Boot] efi_loader: initialise partition_signature memory
X-Patchwork-Submitter: Jonathan Gray <jsg@jsg.id.au>
X-Patchwork-Id: 839994
Message-Id: <20171121122432.88805-1-jsg@jsg.id.au>
To: u-boot@lists.denx.de
Cc: agraf@suse.de, kettenis@openbsd.org
Date: Tue, 21 Nov 2017 23:24:32 +1100
From: Jonathan Gray <jsg@jsg.id.au>
List-Id: U-Boot discussion <u-boot.lists.denx.de>
Zero partition_signature in the efi_device_path_hard_drive_path
structure when signature_type is zero.
This is required so that efi_dp_match() will work as expected
when doing memcmp() comparisons.
Corrects a problem where the loaded image protocol would not return a
device path with MEDIA_DEVICE causing the OpenBSD bootloader to fail
on rpi_3 and other targets.
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
---
lib/efi_loader/efi_device_path.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index f6e368e029..8045532a29 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -431,6 +431,9 @@ static void *dp_part_fill(void *buf, struct blk_desc *desc, int part)
if (hddp->signature_type != 0)
memcpy(hddp->partition_signature, &desc->guid_sig,
sizeof(hddp->partition_signature));
+ else
+ memset(hddp->partition_signature, 0,
+ sizeof(hddp->partition_signature));
buf = &hddp[1];
}

View File

@ -2,7 +2,7 @@
Name: uboot-tools
Version: 2017.11
Release: 1%{?candidate:.%{candidate}}%{?dist}
Release: 2%{?candidate:.%{candidate}}%{?dist}
Summary: U-Boot utilities
License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+
URL: http://www.denx.de/wiki/U-Boot
@ -23,6 +23,7 @@ Patch3: usb-kbd-fixes.patch
Patch4: fdt-fixes.patch
Patch5: arm64-support-running-at-addr-other-than-linked-to.patch
Patch6: envtools-make-sure-version-timestamp-header-file-are-available.patch
Patch7: efi_loader-initialise-partition_signature-memory.patch
# Board fixes and enablement
Patch10: dragonboard-fixes.patch
@ -285,6 +286,9 @@ cp -p board/warp7/README builds/docs/README.warp7
%endif
%changelog
* Tue Nov 21 2017 Peter Robinson <pbrobinson@fedoraproject.org> 2017.11-2
- Add EFI loader fix
* Wed Nov 15 2017 Peter Robinson <pbrobinson@fedoraproject.org> 2017.11-1
- 2017.11