From owner-freebsd-arm@freebsd.org Sun Mar 22 17:42:45 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 262EB26819F for ; Sun, 22 Mar 2020 17:42:45 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "www.zefox.org", Issuer "www.zefox.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48llGC08s7z3HFH for ; Sun, 22 Mar 2020 17:42:42 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.15.2/8.15.2) with ESMTPS id 02MHgwKg084979 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 22 Mar 2020 10:42:59 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id 02MHgwYa084978; Sun, 22 Mar 2020 10:42:58 -0700 (PDT) (envelope-from fbsd) Date: Sun, 22 Mar 2020 10:42:57 -0700 From: bob prohaska To: freebsd-arm@freebsd.org Subject: Re: Upgrading u-boot on an rpi3 Message-ID: <20200322174257.GA84906@www.zefox.net> References: <20200318054243.GA67865@www.zefox.net> <4B4CF1DF-F3C0-4ED3-AAC0-4FC0A8182787@yahoo.com> <20200318172339.GB67865@www.zefox.net> <456B1ED8-B335-405B-AB7B-B65968631323@yahoo.com> <20200319001353.GA70624@www.zefox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200319001353.GA70624@www.zefox.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-Rspamd-Queue-Id: 48llGC08s7z3HFH X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net X-Spamd-Result: default: False [3.85 / 15.00]; ARC_NA(0.00)[]; WWW_DOT_DOMAIN(0.50)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; IP_SCORE(0.06)[ip: (0.24), ipnet: 50.1.16.0/20(0.12), asn: 7065(-0.03), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zefox.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.89)[0.892,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(1.00)[0.998,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; MID_RHS_WWW(0.50)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 17:42:45 -0000 I'd lke to make some "notes to self" for upgrading u-boot on a self-hosted rpi3. Here's what I think got done: Build and install the u-boot-rpi3 port using -DBATCH. Copy the resulting /usr/local/share/u-boot/u-boot-rpi3/u-boot.bin to /boot/msdos/u-boot.bin Following buildworld/installworld copy and rename /boot/loader.efi to /boot/msdos/EFI/BOOT/bootaa64.efi Have I overlooked anything important? As an aside, the Pi3 is now at r359195 and seems to work normally. It does seem to become unresponsive for long periods during svnlite up or any process involving storage I/O despite top reporting ~98% idle. However, it hasn't crashed yet. Thanks for reading, and any comments! bob prohaska On Wed, Mar 18, 2020 at 05:13:53PM -0700, bob prohaska wrote: > On Wed, Mar 18, 2020 at 11:02:43AM -0700, Mark Millard wrote: > > > > > > On 2020-Mar-18, at 10:23, bob prohaska wrote: > > > > > On Tue, Mar 17, 2020 at 11:42:09PM -0700, Mark Millard wrote: > > >> > > >> > > > > >> > > >> Those last 2 lines above indicate that it found > > >> your microsd card media and its bootaa64.efi just > > >> fine. > > >> > > >> How old is this file? > > > > > > Rather ancient: > > > > > > -rwxr-xr-x 1 root wheel 637000 Oct 10 2018 /boot/msdos/EFI/BOOT/bootaa64.efi > > > > > > I have a newer version on a 12.x snapshot: > > > -rwxr-xr-x 1 root wheel 609960 Nov 1 02:29 /mnt/EFI/BOOT/bootaa64.efi > > > Is it prudent to simply substitute the newer version for the older? > > > > You may want to extract a more modern one from a snapshot > > if that does not work. > > > > Turns out that the version of bootaa64.efi from the 12.x snapshot did > the trick. > > > >> Have you been updating > > >> it via copying /boot/loader.efi to it as > /boot/loader.efi is updated? > > > Not following here. Loader.efi appears to be a file and seems to update > > > during normal build/install cycles. It's unclear where bootaa64.efi comes > > > from; there's only one copy in the filesystem after repeated OS update cycles. > > > > For the ARM boards involved, efi/boot/bootaa64.efi is a > > copy of /boot/loader.efi . The loader copy used in booting > > is placed on the msdosfs, not on ufs/zfs. > > > > Ahh, now bells are ringing. IIRC there were some messages issued > to this effect during either make or make install for u-boot-rpi3, > at least formerly. > > > > > Example from the RPi4 context: > > > > # file /boot/loader.efi > > /boot/loader.efi: MS-DOS executable PE32+ executable (EFI application) Aarch64, for MS Windows > > > > # file /boot/efi/EFI/BOOT/bootaa64.efi > > /boot/efi/EFI/BOOT/bootaa64.efi: MS-DOS executable PE32+ executable (EFI application) Aarch64, for MS Windows > > > > Thank you very much! > > bob prohaska > >