Tried to flash hikey960 with arm-trusted-firmware with the below script.
#!/bin/bash
fastboot flash xloader hisi-sec_xloader.img
fastboot flash ptable hisi-ptable.img
fastboot flash fastboot l-loader.bin
fastboot flash fip fip.bin
fastboot reboot-bootloader
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img
fastboot reboot
But the bootloader is stuck loading bl31.
snip....
iomcu_subsys_init
boot_c0 PROFILE 4
slave0 irq0:0x00000014
slave1 irq0:0x00000004
NOTICE: Booting Trusted Firmware
NOTICE: BL1: v1.4(release):v1.4-656-g15e5958
NOTICE: BL1: Built : 10:55:46, Feb 26 2018
NOTICE: BL1: Booting BL2
NOTICE: BL2: v1.4(release):v1.4-656-g15e5958
NOTICE: BL2: Built : 10:55:47, Feb 26 2018
NOTICE: BL1: Booting BL31
NOTICE: BL31: v1.4(release):v1.4-656-g15e5958
NOTICE: BL31: Built : 10:55:47, Feb 26 2018
The console log is not moving further.
Then tried to recover using https://github.com/96boards-hikey/tools-images-hikey960
But after that when I am trying to push normal android build I am getting partition not found error.
The script I am using is
#!/bin/bash
fastboot flash xloader hisi-sec_xloader.img
fastboot flash ptable hisi-ptable.img
fastboot flash fastboot hisi-fastboot.img
fastboot reboot-bootloader
fastboot flash nvme nvme.img
fastboot flash fw_lpm3 lpm3.img
fastboot flash trustfirmware bl31.bin
fastboot flash boot boot.img
fastboot flash dts dt.img
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img
fastboot reboot