From owner-freebsd-arm@freebsd.org Sun Nov 12 14:50:14 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D156E7369D for ; Sun, 12 Nov 2017 14:50:14 +0000 (UTC) (envelope-from kwhite@eecs.uottawa.ca) Received: from courriel.site.uottawa.ca (eecsmail.engineering.uottawa.ca [137.122.24.224]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "courriel.site.uottawa.ca", Issuer "DigiCert SHA2 Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 695426A6A0; Sun, 12 Nov 2017 14:50:13 +0000 (UTC) (envelope-from kwhite@eecs.uottawa.ca) Received: from e6220 (dyn-pppoe-142-51-199-208.vianet.ca [142.51.199.208] (may be forged)) (authenticated bits=0) by courriel.site.uottawa.ca (8.14.5/8.14.5) with ESMTP id vACEoLe7066937 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 12 Nov 2017 09:50:21 -0500 (EST) (envelope-from kwhite@eecs.uottawa.ca) Date: Sun, 12 Nov 2017 09:50:20 -0500 (EST) From: Keith White X-X-Sender: root@e6220 To: Keith White cc: freebsd-arm@freebsd.org, imp@freebsd.org Subject: Re: RPI3 fails to boot: boot1.efi as bootaa64.efi on RPI3 [patch] In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (BSF 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 14:50:14 -0000 Umm, forget it. I see it's fixed now (r325681). ...keith On Sun, 12 Nov 2017, Keith White wrote: > 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); > + } > } > > } > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" >