Remote: No such partition after flashing


#1

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

Selection_053

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

#2

try flash ptable first then reboot and repeat the recover again.


#3

hisi-ptable.img's probably not built for android. Try building one yourself using instructions in https://github.com/96boards-hikey/tools-images-hikey960/blob/master/build-from-source/README-ATF-UEFI-build-from-source.md. Specifically the ‘Generate l-loader.bin and partition table’ section.


#4

Thanks for the idea. Actually none worked. The ptable.img comes with recovery.sh script is not compatible with android(atleast in my case). Just replaced the .img files in recovery.sh file with the images generated during android hikey960 compile and the problem is fixed. Used the below scripts…

This one for recovery
sudo fastboot flash ptable hisi-ptable.img
sudo fastboot flash xloader hisi-sec_xloader.img
sudo fastboot flash fastboot hisi-fastboot.img
sudo fastboot flash nvme nvme.img
sudo fastboot flash fw_lpm3 lpm3.img
sudo fastboot flash trustfirmware bl31.bin

And then the below script to push android and other stuffs…
#!/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

#5

I had similar issues with the recovery.sh script, can’t remember how I fixed it but I’m curious to what you mean with the images generated during android hikey960 complie, or more specifically where you got these.
Thanks in advance


#6

After the hikey960-userdebug build of Asop you can find all the image files that you need in
/device/linaro/hikey/installer/hikey960/ and in
/out/target/product/hikey960/


#7

I have troubled similar problem.
I was change kernel that makes serious booting problem. so I tried to recovery. But I met “FAILED (remote: No such partition.)” in fastboot update procedure.
In my case, first I change ptable another img.
“device/linaro/hikey/installer/hikey960$ fastboot flash ptable prm_ptable.img”
“reboot”
“device/linaro/hikey/installer/hikey960$ ./flash-all.sh”
It worked.