On Sunday, March 6, 2022 at 12:43:24 PM UTC-5, bob prohaska wrote:
> Very glad it helped! The idea came from a correspondent on the
> freebsd-arm mailing list, not my own insights...8-(
>
> There still remains need for a readable u-boot manual. I have
> figured out that even if a Pi (3 in this case) has no microSD
> card and still managed to find and start u-boot on a USB device
> it's unable to save environment variable to the USB device, it
> still wants to write the change to microSD.
>
> Perhaps recompiling u-boot with appropriate options will either
> make the location of uboot.env selectable, or maybe there's a
> more clever trick. If anybody knows please make a noise.....
These lines in /usr/ports/sysutils/u-boot-rpi3/files/rpi3_fragment:
CONFIG_OF_EMBED=n
CONFIG_OF_BOARD=y
CONFIG_CMD_BMP=y
CONFIG_ENV_IS_IN_FAT=y
CONFIG_ENV_FAT_INTERFACE="usb"
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_ENV_FAT_FILE="uboot.env"
CONFIG_RPI_EFI_NR_SPIN_PAGES=2
CONFIG_PREBOOT="setenv usb_pgood_delay 4000; usb start"
seem to produce a u-boot which will delay by default and *save* it's environment to the fat on usb, but it still doesn't *load* those. Still trying to figure that out. This commit seems to have added a way to delay loading the environment:
https://github.com/u-boot/u-boot/commit/06fd853890f23491605bfd6c9ab0116b79e15aaa
but I'm not sure how to trigger it after the (properly delayed) usb start finishes.