Hikey 960 UEFI boot hangs when SD card present

I have flashed the latest UEFI bootloader firmware and Debian images to my hikey960 and booted successfully from NVRAM. However, I am unable to boot Debian (or anything else) from the SD card, as others on this forum have apparently been able to do. The issue is the the UEFI firmware hangs at “Press ESCAPE for boot options” whenever an SD card is present, and never responds to the console, nor proceeds to the Boot Manager menu or to fastboot or to boot from the SD card.

Is anyone else experiencing this problem, and perhaps know of workarounds or solutions?

@sbsteele I just sent an internal email to the UEFI developer hoping for a response. Will update this thread once I have any information.


I may be having a similar issue with the latest AOSP firmware from https://android.googlesource.com/device/linaro/hikey/+/refs/heads/master/installer/hikey960 (tree: 819f4d51283f272f75b4ba4a03af1c419cbf5b03) and after that Linux “Hikey build - #33” (20190720).

When an SD card is inserted, the board only gets me as far as:

[    3.807252]   No soundcards found.
[    3.809909] mmc_host mmc1: Bus speed (slot 0) = 25000000Hz (slot req 25000000Hz, actual 25000000HZ div = 0)
[    3.820886] uart-pl011 fff32000.serial: no DMA platform data
[    3.822818] mmc1: new SDIO card at address 0001
[    3.831519] Freeing unused kernel memory: 1344K
[    3.836085] Run /init as init process
Loading, please wait...
starting version 232
[    3.854706] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    3.857322] random: udevadm: uninitialized urandom read (16 bytes read)
[    3.864321] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    3.869778] random: udevadm: uninitialized urandom read (16 bytes read)

and then hangs.

Without an SD card, however, the board boots fine. I even can insert the card later:

[   19.312447] mmc_host mmc0: Bus speed (slot 0) = 200000000Hz (slot req 200000000Hz, actual 200000000HZ div = 0)
[   19.797236] dwmmc_k3 ff37f000.dwmmc1: tuning ok best_clksmpl 18 tuning_sample_flag cbfffbff
[   19.805663] mmc0: new ultra high speed SDR104 SDXC card at address aaaa
[   19.813192] mmcblk0: mmc0:aaaa AFGCF 119 GiB 
[   19.822877]  mmcblk0: p1 p2

and manipulate it.

You mean, the board boots linux kernel but it hangs while waiting for rootfs? Could you please paste the full log right from the bootloader for SD boot? (please use pastebin)

Our initial suspection was the SD controller frequency setting in UEFI.

@Mani I’m not even sure that the board gets to rootfs. [1] is the log with SD card inserted (hangs at 3.8 seconds); [2] - without (boots fine).

[1] https://pastebin.com/SyDaYJx8
[2] https://pastebin.com/ZLL6SxhF

@psyhtest Since your case is different than @sbsteele, could you please try changing the kernel command line arguments as below in grub while booting from SD card?

root=/dev/mmcblk0p2 rootwait rw

But my root is still in the internal flash memory? I only intend to put /home on the SD card.

Ah, okay. So you still want to use UFS for rootfs! But that’s your actual goal, why specifically booting from SD card?

Anyway, the SD boot log shows that the UFS controller didn’t get probed and I need to look into this.

I’m not booting from the SD card. It’s just when it’s inserted, even if it’s completely blank, the board doesn’t boot at all.

Oops. Then please open a separate thread as this thread discusses boot from SD issue. Sorry for the confusion.

Well, the title still seems appropriate. I didn’t say I have exactly the same issue, only that I may be having a similar issue…

Agree. The title is a bit misleading and I don’t have rights to change that. @sbsteele Could you please change the title to reflect that the issue is with SD boot?

Yes, but still taking this issue to a separate thread might help others also :wink:

My issue is not just booting from SD card, it is booting at all if SD card is inserted. @psyhtest is getting farther than I am as I get no boot messages at all. So I will clarify the title that it is boot that hangs but otherwise it seems to be a similar issue.

Is your sdcard bootable? Or possibly WAS at some point bootable and perhaps not entirely cleaned since then? I have sdcards inserted in all my hikey960’s all of the time, and never had it lock at boot like you’re describing.

And FWIW: I’m running UEFI build #95 (older builds won’t boot reliably on my Toshiba UFS)

True, unless it is indeed the same issue, as @sbsteele also suspects :slight_smile:

I believe it is bootable, but have never booted it successfully on hikey960 (obviously). I also tried booting Debian using the SD image that has been successful for others. I have also tried booting from UFS with a cleaned SD card inserted with the same results.

Also, when I boot from UFS without SD card inserted, and then insert the card, it is recognized and I can mount it successfully.

And to clarify, which UEFI build are you running?


That’s pretty ancient.

Try this;

  1. Update to 95, which you can find here: https://android.googlesource.com/device/linaro/hikey/+/refs/heads/master/installer/hikey960/

  2. Wipe your sdcard entirely. Use “dd if=/dev/zero of=/path/to/sdcard”.

  3. Create a partition table and add a single partition, format as ext4.