Date: Sun, 12 Nov 2017 08:11:21 -0500 (EST) From: Keith White <kwhite@eecs.uottawa.ca> To: freebsd-arm@freebsd.org Cc: imp@freebsd.org Subject: RPI3 fails to boot: boot1.efi as bootaa64.efi on RPI3 [patch] Message-ID: <alpine.BSF.2.21.1711120758120.59718@e6220>
next in thread | raw e-mail | index | archive | help
I've tried FreeBSD-12.0-CURRENT-arm64-aarch64-RPI3-20171030-r325156.img and it fails to boot with an error similar to one reported by Mark Millard in https://lists.freebsd.org/pipermail/freebsd-arm/2017-September/016643.html (Synchronous abort after displaying Load Path). After I sprinkled some printf()s in boot1.c, it appears that efi_devpath_name() may return NULL on this platform. The following "works for me". Salt to taste. ...keith Index: /usr/src/sys/boot/efi/boot1/boot1.c =================================================================== --- /usr/src/sys/boot/efi/boot1/boot1.c (revision 325521) +++ /usr/src/sys/boot/efi/boot1/boot1.c (working copy) @@ -460,9 +460,11 @@ imgpath = NULL; if (status == EFI_SUCCESS) { text = efi_devpath_name(img->FilePath); - printf(" Load Path: %S\n", text); - efi_setenv_freebsd_wcs("Boot1Path", text); - efi_free_devpath_name(text); + if (text != NULL) { /* XXX aarch64 RPI3 */ + printf(" Load Path: %S\n", text); + efi_setenv_freebsd_wcs("Boot1Path", text); + efi_free_devpath_name(text); + } status = BS->HandleProtocol(img->DeviceHandle, &DevicePathGUID, (void **)&imgpath); @@ -471,9 +473,11 @@ EFI_ERROR_CODE(status)); } else { text = efi_devpath_name(imgpath); - printf(" Load Device: %S\n", text); - efi_setenv_freebsd_wcs("Boot1Dev", text); - efi_free_devpath_name(text); + if (text != NULL) { /* XXX aarch64 RPI3 */ + printf(" Load Device: %S\n", text); + efi_setenv_freebsd_wcs("Boot1Dev", text); + efi_free_devpath_name(text); + } } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.21.1711120758120.59718>