Re: Saving environment variables in u-boot

From: bob prohaska <fbsd_at_www.zefox.net>
Date: Fri, 17 Dec 2021 01:36:13 UTC
On Thu, Dec 16, 2021 at 11:12:01AM -0800, Mark Millard via freebsd-arm wrote:
> 
> 
> On 2021-Dec-16, at 10:07, bob prohaska <fbsd@www.zefox.net> wrote:
> 
> > U-Boot> saveenv
> > Saving Environment to FAT... Failed (1)
> 
> I expect that is based on there being a microsd card with
> a FAT file system on it, possibly containing the u-boot that
> is in use. I doubt that it supports saving to a FAT on USB
> media. Do you have an appropriate microsd card in place?
> 

Yes, the microSD contains a dd of 
FreeBSD-13.0-RELEASE-arm64-aarch64-RPI.img
The DOS partition is writeable, AFAIK.


> But that was for the u-boot-rpi4 or u-boot-rpi-arm64 ports.
> (They also later mentioned using "usb_pgood_delay=2000\0"
> instead, a figure they found in a bunch of configrations.)
>
The Pi3 in question is capable of booting from solid-state USB
storage without any microSD card, but fails to detect a mechanical
disk. Which is the appropriate u-boot-rpi3 port to tamper with? I 
tried sysutils/u-boot-rpi3 as an upgrade but that simply froze. 
The u-boot from FreeBSD-13.0-RELEASE-arm64-aarch64-RPI.img finds
the USB mechanical disk,  but erratically. 
 
> So something somewhat analogous might help if you are willing
> to build and use your own u-boot port variant.

Obviously, that's a fraught enterprise at my skill level....
I'm still somewhat hazy on the actual boot sequence when
chaining from microSD to USB. 

Indeed, it's unclear how or if u-boot plays a role in starting 
RasPiOS. The term u-boot isn't found on the Raspberry Pi doc 
website, and the Pi isn't mentioned in the Denx manuals. Those
discoveries surprised me.

Thanks for replying!

bob prohaska