RPI3 fails to boot: boot1.efi as bootaa64.efi on RPI3 [patch]
Keith White
kwhite at eecs.uottawa.ca
Sun Nov 12 13:27:54 UTC 2017
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);
+ }
}
}
More information about the freebsd-arm
mailing list