1These instructions will help you in flashing the prebuilt bootloader
2images and AOSP images (built from sources) on hikey960.
3
4There are two versions of HiKey960: v1 and v2.
5* v1 is using Jumper (J2001)
6* v2 is using DIP switch (SW2201).
7Both are located at the bottom side of the board.
8
9Jumper Pin 1-2 = DIP switch 1 (AutoBoot)
10Jumper Pin 3-4 = DIP switch 2 (Recovery Mode)
11JUmper Pin 5-6 = DIP switch 3 (Fastboot Mode)
12
13* Always power off the board before changing the switches or
14  jumpers.
15* To boot into fastboot mode set switch 1 & 3 to ON state and
16  switch 2 to OFF state.
17* To boot into normal mode set switch 1 to ON and switch 2 & 3 to
18  OFF state.
19
20To flash the OS to the board, set the jumpers to fastboot mode, and
21power on the device. Connect a USB-C cable to the OTG port and your
22host device.
23
24On your host device, run the flash-all.sh script to update boot files
25using fastboot. It assumes that you have already build hikey960 AOSP
26images locally, or are flashing a factory image.
27$ ./flash-all.sh
28
29After that completes, power the board off, and set the switches back
30to normal mode and boot the device.
31
32Known Issues:
33-------------
34When flashing ontop of the HiSi bootloader, you may see the following
35failure:
36  sending 'xloader' (151 KB)...
37  OKAY [  0.006s]
38  writing 'xloader'...
39  FAILED (remote: flash write back vrl failure)
40
41This is a transient error and can be ignored.
42
43
44Trouble shooting:
45-----------------
46If you have any trouble booting the device after running ./flash-all.sh
47you may need to do a board recovery. This is hopefully uncommon, but
48may be necessary in some cases (like if your board has pre-release
49firmware on it). In this case clone the git project here:
50  https://github.com/96boards-hikey/tools-images-hikey960/
51
52And follow the instructions in the README.md
53  https://github.com/96boards-hikey/tools-images-hikey960/blob/master/README.md
54