[efi] Honor ABR one-shot bootloader flag on EFI reset When GBL handles 'fastboot reboot-bootloader', it sets the ABR one-shot bootloader flag in durable_boot and calls UEFI ResetSystem(), which invokes efi_reset_system_boottime(). Unconditionally running 'reboot' sets the Amlogic reboot mode register (AO_SEC_SD_CFG15) to normal boot, causing legacy U-Boot to boot Zircon instead of entering fastboot after a bootloader rollback. Add GetAndClearOneShotBootloaderFlag() in zircon_boot.c (preserving one-shot recovery if set) and call it in efi_reset_system_boottime() to run 'reboot fastboot' when requested, logging a warning if the reboot command returns before falling back to do_reset(). TAG=agy CONV=d6901459-7b8c-4e0a-8447-092869375046 Bug: 571205565 Test: Built VIM3 U-Boot with ./fuchsia_build.py Change-Id: I020bcd960f94135f3266512cb170c9204eec2107 Reviewed-on: https://turquoise-internal-review.googlesource.com/c/third_party/u-boot/+/1683274 Reviewed-by: David Pursell <dpursell@google.com> Commit-Queue: Sergii Parubochyi <sergiip@google.com> GitOrigin-RevId: 8e7ac1835c7d1d9a54fca2fa5b4a3a139b887fd6
This is a version of u-boot, modified to support Fuchsia on the Khadas vim3
To build the vim3 bootloader for Fuchsia:
CIPD access. All build tools are downloaded to cipd_deps.
Run the build script from repo root
./fuchsia_build.py
Options:
--clean-cipd option can be used to make sure CIPD checkout is clean. It will remove cipd_deps directory and download dependencies again.--gbl-path <path> option specifies a path to a local GBL (gbl.efi) binary. If provided, CIPD GBL is not used; otherwise, the script downloads GBL from CIPD and uses gbl_aarch64_dev.efi.You now have a build/u-boot.bin.unsigned that you can flash to a target using fastboot.
go/fuchsia-firmware-licensing-publishing