HiKey Recovery fails (Fastboot issue)


#1

The Hikey is linked via USB to PC Ubuntu. It is also linked via UART3 to the same PC, to see output traces. It is also connected to a power adapter. It runs OPTEE environment.

I have corrupted the 2e bootloader in OPTEE to understand how the boot process works. It is not possible to flash the device after that, because it is blocked at the end of 2nd bootloader.

Recovery

I followed these instructions : https://github.com/96boards/documentation/blob/master/ConsumerEdition/HiKey/Installation/BoardRecovery.md

Configuration: pins 1-2 and 3-4 connected
No LED is lighted in this configuration.

(1) sudo python hisi-idt.py -d /dev/ttyUSB0 --img1=l-loader.bin
(2) sudo fastboot flash ptable ptable-linux-8g.img

The first command seems to work, it prints :
Done!

The second command waits endlessly :
<waiting for device>

and fastboot devices returns nothing.

SD Card

I tried to install Debian OS on the HiKey using SD card. I followed the instructions : https://github.com/Linaro/documentation/blob/master/Reference-Platform/Releases/RPB_16.06/ConsumerEdition/HiKey/InstallDebianRPB.md#sd-card-method

After loading system image into SD card, it is inserted in the HiKey. Even the device should boot from SD card it boots from flash memory (same traces of execution).

Every times the pins 3 - 4 are connected, the system does not react
(no LED lighted and no uart execution traces).

In all configurations fastboot devices returns nothing.

How to make fastboot detect the device in configuration 3-4 connected ?
Why doesn’t the system boot from SD card when it is inserted ?


#2

Disconnect pins 3-4 when using SD card. 3-4 is for recovery only. fastboot command is also not required/used for installation via SD card.


#3

Thanks for your quick reply.

Disconnect pins 3-4 when using SD card

Yes, that is what I did (only pins 1 - 2 are connected) and it boots from eMMC, according to output traces.

The last 3 paragraphs are general and refer to recovery using fastboot (no boot from SD card). Sorry it wasn’t very clear.

Do you have any ideas of solutions ?


#4

The problem has been solved after several repetitions of the process. I can’t see how because I haven’t changed anything in the process described above.

sudo python hisi-idt.py -d /dev/ttyUSB0 --img1=l-loader.bin

When the recovery finally worked, the command has completed faster and didn’t print any failed message. After that, fastboot was able to detect the HiKey and to proceed the remaining commands.

Thanks.


#5

I got the same issue. If the bootloader is damged, we cannot got into the fastboot mode, or uart download mode. Accoding the source of atf, fastboot protocol is implemented in bl1. How can we get into this mode when the fip in damged and failed to boot to bl33. It seems that there is hardware bug for hikey LeMaker version.

Could you show me how to reflash the device if the fip.bin is damaged? Thanks!


#6

@XevenQC looks like you’re already receiving help on HiKey LeMaker Recovery Failed and https://github.com/ARM-software/tf-issues/issues/533.