Fastboot fails during HiKey board recovery process

Hi folks,

I’m trying to bring my CircuitCo HiKey back to life, but it hasn’t been successful so far. I followed the board recovery mode steps outlined here[1]. I downloaded the latest bootloader files[2] as instructed. Pins 1-2, 3-4 are closed on J15.

I ran the hisi-idt.py script fine, and this is what I saw from the console side[3]. If I try to run ‘sudo fastboot devices’ on the host (Debian), I don’t see any output. Fastboot is installed on the host for sure[4], but I still can’t run any fastboot commands because the device isn’t detected. I also saved some dmesg output[5] if it’s helpful.

Any idea what is happening or other steps I can try? I attempted to build the UEFI from source and followed the board recovery steps again, but I still run into the same problem.

Best regards,
Lisa

[1] https://github.com/96boards/documentation/blob/master/ConsumerEdition/HiKey/Installation/BoardRecovery.md
[2] http://builds.96boards.org/releases/reference-platform/debian/hikey/16.06/bootloader/
[3] https://hastebin.com/aniqiladoq.http
[4] https://hastebin.com/tuseruwexe.vbs
[5] https://hastebin.com/kehikeloke.vbs

Hi Lisa,

Do you have other things connected to the regular USB ports of the board? If yes, please remove them and try again.

HTH

No, I don’t. Here’s my current Hikey setup: https://ibin.co/37nlbFfIdYqA.jpg

It’s plugged to an external power adapter along with micro USB cables (one for UART, the other plugged into the host for fastboot).

Not totally sure about this but try again without the SD card inserted and see if it works?

Best I can offer is the “good” kernel logs:

[166187.229403] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB0
[166214.856605] usb 2-1.2: USB disconnect, device number 52
[166214.856882] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[166214.856905] option 2-1.2:1.0: device disconnected
[166215.044609] usb 2-1.2: new high-speed USB device number 53 using xhci_hcd
[166215.134342] usb 2-1.2: New USB device found, idVendor=18d1, idProduct=d00d
[166215.134345] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[166215.134346] usb 2-1.2: Product: Android 2.0
[166215.134347] usb 2-1.2: Manufacturer: Androi
[166215.134348] usb 2-1.2: SerialNumber: 0123456789ABCDEF

Rather obviously these differ from the logs you posted so rather than worry about the fastboot tool I guess we have to focus on why the USB device did not re-enumerate.

I haven’t got much of a clue about that except to say that hisi-idt.py isn’t 100% reliable and that both the “GSM modem” mode and fastboot mode have timeouts (~60 seconds). However if the timeout is reached then the fastboot device should still show up on the dmesg logs.

PS Looking at some of my notes I think I still use the old 15.11 firmware on my CircuitCo Hikey. So, a long shot, but before giving up it might be worth trying with http://builds.96boards.org/releases/hikey/linaro/binaries/15.11/l-loader.bin instead.

@vchong: The results were the same with or without a SD card inserted. Still stuck unfortunately.

@danielt: I agree that the hisi-idt.py script isn’t 100% reliable. I’m not sure if there is something not being cleared or reset properly. I tried the 15.11 l-loader.bin file as you suggested and nothing changed. I also tried downloading old versions of fastboot1.img and fastboot2.img files from the binaries folder and ran the alternate command “sudo python hisi-idt.py -d <device> --img1 fastboot1.img --img2 fastboot2.img” just to see what would happen. The output from dmesg hasn’t changed.

Regardless, I definitely appreciate the responses! It’s frustrating (it would be nice to get my hikey to cooperate), but I’ll take a break until another idea comes up :slight_smile:

Sorry to hear that! 2 more things I can think of to try:

  1. If you have python 3 on your pc, try switching to 2.7. v3 has been known to have issues.

$ sudo apt-get install python2.7 python2.7-dev
$ alias python=python2.7

  1. Try installing images using the SD card method as noted here. Then connect jumpers 1-2 5-6 to boot into fastboot mode and see if your pc recognizes the device this way.

Hi Lisa,

Two extra things you can try:

  • Firstly we found in some corner case the daemon program modemmanager will interfere data transferring for ttyUSBx. So you can try to remove the program: sudo apt-get remove modemmanager

  • You can try the C version hisi-idt [1], it has exactly same functionality with hisi-idt.py, but I rewrite it for more reliable mode (like SYNC mode for UART port manipulation). You can use command: sudo ./hisi-idt /dev/ttyUSBx to download l-loader.bin, it downloads file ./l-loader.bin by default.

[1] http://people.linaro.org/~leo.yan/binaries/hikey_idt

Thanks,
Leo Yan

Thanks @vchong and @leo-yan for the suggestions. My host already uses python 2.7, but I checked the version to be sure.

I still have the same problem, yet someone just gave me another idea to try. I’ll keep you all updated on that.

I just had a couple new LeMaker Hikeys arrive today, but I am always open to more suggestions and hopefully save my CircuitCo Hikey someday :slight_smile:

Hi Lisa,

Just curious, using the same instructions and power supply and usb cable you’d used on the CircuitCo board for the LeMaker board, you were able to run the recovery process without any fastboot issues?

Regards

I was able to run the same instructions on my LeMaker board fine. No issues with fastboot. I think my CircuitCo one is a rare case when it didn’t work, but oh well :slight_smile:

Hi Lisa,

Any update?

I have the same problem. First I flashed Linaro Android which works fine. Then I got a modified version but I forgot erasing the user space. Now the HiKey is unavailable with fastboot (“sudo fastboot devices” return nothing).

Is there a way to recover the device?

Regards

@Tristar Have you tried the recovery process as listed in [1]?

[1] https://github.com/96boards/documentation/blob/master/ConsumerEdition/HiKey/Installation/BoardRecovery.md

Hi vchong,

Thanks for your replay. Yes I did:

x@x:~/hikey/hiKeyBoardRecovery> ls dev/ttyUSB*
/dev/ttyUSB0
x@x:~/hikey/hiKeyBoardRecovery> sudo python hisi-idt.py -d /dev/ttyUSB0 --img1=l-loader.bin
Traceback (most recent call last):
File “hisi-idt.py”, line 6, in
import serial, time
ImportError: No module named serial

I have to install the serial module for python. But the machine is offline, so it takes time to do it manually (I ask myself why this script must be written in Python—which implies side effects, why not a Bash script?).

Thanks,
Tristar