HiKey

The HiKey is based on a HiSilicon Kirin processor. There are variants of the HiKey, which are different products:

Do not expect that any hints for the original Hikey also work on Hikey960 or Hikey970.

Technical specification

CPU

HiSilicon Kirin 620 1.2 GHz

GPU

Mali 450-MP4

RAM

1GB (CircuitCo or LeMaker) or 2GB (LeMaker)

Storage

4GB (CircuitCo) or 8GB (LeMaker) eMMC flash

WIFI

yes

Audio

yes

Bluetooth

yes

Connectors

micro SD, USB (2 standard, 1 micro), HDMI

Other

96Boards 40-pin low speed and 60-pin high speed expansion connector

Debian support

The HiKey uses UEFI, so Debian should work out of the box once there's a kernel.

Kilian Krause requested ARCH_HISI to be enabled in the kernel recently. However, it seems that HiSilicon Kirin support in the kernel is still very basic (e.g. no USB support).

Current bug list associated with the HiKey support:

Installation

to install Debian, you need UEFI installed on the board.

If your board comes with that then life is simple: put debian installer on an SD card, put the SD card in the device, plug in screen and keyboard and power up to run the installer.

If the board does not have UEFI on it (early boards didn't) you need to follow the instructions below for 'Installing UEFI bootloader' first.

Getting installer image

Get an arm64 installer image. Either netinst or full CD can work.

wget http://cdimage.debian.org/cdimage/stretch_di_alpha8/arm64/iso-cd/debian-stretch-DI-alpha8-arm64-netinst.iso

Preparing SD card

Use lsblk or dmesg to find out what device your card is. Lets say it's /dev/sdd (ignore partitions - we are copying this to the bare device - the file contains partitioning info. Your device needs to be at least 400MB)

sudo dd if=debian-stretch-DI-alpha8-arm64-netinst.iso of=/dev/sdd bs=4M oflag=sync status=noxfer

Running the installer

You need to plug in a screen (HDMI) and keyboard. The board does not currently support installation over serial/USB console.

Installing UEFI bootloader

This page gives good detail on how to get the board set up from scratch. https://github.com/96boards/documentation/blob/master/ConsumerEdition/HiKey/Installation/BoardRecovery.md

The short(er) version is:

Preparation

You need:

$ wget http://builds.96boards.org/releases/reference-platform/debian/hikey/16.06/bootloader/hisi-idt.py

$ wget http://builds.96boards.org/releases/reference-platform/debian/hikey/16.06/bootloader/l-loader.bin
$ wget http://builds.96boards.org/releases/reference-platform/debian/hikey/16.06/bootloader/fip.bin
( $ wget http://builds.96boards.org/releases/reference-platform/debian/hikey/16.06/bootloader/ptable-linux-4g.img )
$ wget http://builds.96boards.org/releases/reference-platform/debian/hikey/16.06/bootloader/ptable-linux-8g.img
$ wget http://builds.96boards.org/releases/reference-platform/debian/hikey/16.06/bootloader/nvme.img
$ wget http://builds.96boards.org/releases/reference-platform/debian/hikey/16.06/hikey-boot-linux-*.uefi.img.gz

ptable-linux-4g.img is for boards with 4G eMMC flash, ptable-linux-8g.img is for boards with 8g flash. So far as I know they all have 8G in practice.

Doing the install

Use the Hardware Guide for details on setting up links and power etc.

lsusb should show

ID 12d1:3609 Huawei Technologies Co., Ltd.

dmesg should show something like:

usb 4-2: New USB device found, idVendor=12d1, idProduct=3609
usb 4-2: New USB device strings: Mfr=1, Product=4, SerialNumber=0
usb 4-2: Product: \xffffffe3\xffffff84\xffffffb0㌲㔴㜶㤸
usb 4-2: Manufacturer: 䕇䕎䥎
option 4-2:1.0: GSM modem (1-port) converter detected
usb 4-2: GSM modem (1-port) converter now attached to ttyUSB0

$ sudo python hisi-idt.py --img1=l-loader.bin

You should see:

+----------------------+
 Serial:  /dev/ttyUSB0
 Image1:  l-loader.bin
 Image2:  
+----------------------+

Sending l-loader.bin ...
Done

$ sudo fastboot flash ptable ptable-linux-8g.img

(choose 4/8 by board flash size - 4 should always work, but might waste half your flash)

$ sudo fastboot flash fastboot fip.bin
$ sudo fastboot flash nvme nvme.img
$ sudo fastboot flash boot boot-fat.uefi.img 

You should see stuff like:

target reported max download size of 268435456 bytes
sending 'ptable' (17 KB)...
OKAY [  0.001s]
writing 'ptable'...
OKAY [  0.002s]
finished. total time: 0.004s

usb 8-2: new high-speed USB device number 15 using ehci-pci
usb 8-2: New USB device found, idVendor=18d1, idProduct=d00d
usb 8-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 8-2: Product: Android 2.0
usb 8-2: Manufacturer: Androi
usb 8-2: SerialNumber: 0123456789ABCDEF

and you should now be able to boot debian-installer