Diff between recovery-flash.sh and recovery-flash-uefi.sh


I understand that recovery-flash-uefi installs the Uefi bootloader. But which bootloader does recovery-flash.sh load onto the board? And is it also possible to install AOSP with the UEFI bootloader?


recovery-flash.sh installs the pre-Uefi bootloader and is old/outdated so please avoid using it. Yes possible to install AOSP with the UEFI bootloader. Just flash the android images (boot, cache, system and userdata) listed in https://github.com/96boards-hikey/tools-images-hikey960/blob/master/build-from-source/README-ATF-UEFI-build-from-source.md, step 4, ‘Update images’. Don’t think the last 3 images in recovery-flash-uefi.sh (nvme, fw_lmp3 and trustfirmware) are needed either. They’re maybe still there to support older legacy builds.


Update: nvme, fw_lmp3 and trustfirmware have been removed from recovery-flash-uefi.sh.


The current xloader is still trying to access 2 NVE variables (RSV272 and HIMNTN), which can be seen in the console output:

UsbMode, nvData invalid
rtc_nve_read failed !

UsbMode, nvData invalid
UsbMode, nvData invalid
UsbMode, nvData invalid


@helg Sorry I don’t get you. Are you saying that the 2 NVE variables are contained within the 3 images that were removed from the script?


The removed nvme.img image contains 2 variables (RSV272 and HIMNTN), this can be checked with

$ od -A x -t c -w128 nvme.img

The xloader searches for them and fails to find (see the error messages “UsbMode, nvData invalid”). This is not a fatal error, but still something to consider in cleaning up the code.