Differences between revisions 7 and 8
Revision 7 as of 2016-12-01 02:22:47
Size: 5449
Editor: wookey
Comment: Add some more details for UEFI install section
Revision 8 as of 2016-12-01 21:58:59
Size: 6244
Editor: wookey
Comment:
Deletions are marked like this. Additions are marked like this.
Line 30: Line 30:
If your board comes with that then life is simple: put debian installer on an SD card, put the SD card in the device, have a console connected and run the installer. 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.
Line 32: Line 32:
If the board does not have UEFI on it (early boards didn't) you need to follow the instructions below for 'Installing UEFI' 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.

HiKey

The HiKey is based on a HiSilicon Kirin processor. There are two variants of the HiKey: the original from CircuitCo and a new version in 1GB and 2GB variants from LeMaker.

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:

  • Bug 816350 missing firmware for wlan 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:

  • Micro USB cable
  • Hikey with 8-18V PSU (board is not powered by USB)
  • android-tools-fastboot installed
  • hisi.py bootloader-update script
  • Files to flash

$ 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.

  • power off
  • Close links 1 ('auto-power-on') and 2 ('install bootloader from USB') on J15
  • Connect micro USB cable from the Hikey micro USB ('USB OTG') socket to your computer
  • power on (No LEDs will light)

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
  • Note: You get 90 seconds to do the initial l-loader.bin upload - power-cycle if you took too long

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

(remember ttyUSB* may be different)You should see:

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

Sending l-loader.bin ...
Done
  • If you see 'Done' then it's worked. Wait 10 seconds for the board to restart into fastboot.
  • Install the partition table first, then the other files/images

$ 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
  • The board should now have UEFI installed. Now dmesg should show something like:

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
  • Power off
  • Move link 2 on J15 to open (storing it closed on posititon 3 is smart)
  • Power on (after a couple of seconds a couple of green LEDs should come on

and you should now be able to boot debian-installer