Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/stand/efiboot Workaround a bug with ROCKPro64's U-Boot E...



details:   https://anonhg.NetBSD.org/src/rev/7ff5e0c76643
branches:  trunk
changeset: 449517:7ff5e0c76643
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Mar 09 13:16:42 2019 +0000

description:
Workaround a bug with ROCKPro64's U-Boot EFI implementation. The booted
device path when booting from SD card sometimes does not include a
MEDIA_DEVICE_PATH component, so in this case fallback to doing an exact
match on the booted device path with the block device path to detect the
default boot device.

diffstat:

 sys/stand/efiboot/efiblock.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 7a1f73360b7e -r 7ff5e0c76643 sys/stand/efiboot/efiblock.c
--- a/sys/stand/efiboot/efiblock.c      Sat Mar 09 10:04:41 2019 +0000
+++ b/sys/stand/efiboot/efiblock.c      Sat Mar 09 13:16:42 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efiblock.c,v 1.4 2018/11/01 00:43:38 jmcneill Exp $ */
+/* $NetBSD: efiblock.c,v 1.5 2019/03/09 13:16:42 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka <nonaka%netbsd.org@localhost>
@@ -315,6 +315,8 @@
                depth = efi_device_path_depth(efi_bootdp, MEDIA_DEVICE_PATH);
                if (depth == 0)
                        depth = 1;
+               else if (depth == -1)
+                       depth = 2;
        }
 
        for (n = 0; n < efi_nblock; n++) {



Home | Main Index | Thread Index | Old Index