@Zacchaeus_Liang It looks a bit ugly and counter intuitive, and obviously improvement is possible, but the bootloader flash script is currently written to run from the root/top of your AOSP source tree, due to the fact that the bootloader images are in
device/linaro/hikey/.. and the AOSP images are in
out/.., so don’t
device/linaro/hikey/.. but just do
sudo ./device/linaro/hikey/installer/hikey/flash-all.sh /dev/ttyUSBn. Also, the script always starts from ‘recovery’ mode (jumpers/switches 1-2 3-4 set, 5-6 not set), not ‘fastboot’ mode (jumpers/switches 1-2 5-6 set, 3-4 not set), because we don’t know if users have rewritten parts of the code that make up the recovery images or not.
At this point in time, chances of users making changes to the recovery images are probably not high. The same is true if you’re just doing TA development. This means you can start from ‘fastboot’ mode, and just flash the required images, as mentioned above. You can do this manually without using the script, i.e. just run from the command prompt any of the commands below with the image files in your current dir.
sudo might be required.
# bootloader images
fastboot flash ptable prm_ptable.img
fastboot flash xloader hisi-sec_xloader.img
fastboot flash fastboot l-loader.bin
fastboot flash fip fip.bin
fastboot flash nvme hisi-nvme.img
# AOSP images
fastboot flash boot boot.img
fastboot flash cache cache.img
fastboot flash system system.img
fastboot flash userdata userdata.img
fastboot flash vendor vendor.img
Just to make the list complete, below are recovery images which you probably don’t need to update.