HiSilicon HiKey970 Technical manual

HiKey970
Update Image Guide
Issue 01
Date 2018-03-11

Issue 01 (
2018-03-11
) HiSilicon Proprietary and Confidential
Copyright © HiSilicon Technologies Co., Ltd.
i
Copyright © HiSilicon Technologies Co., Ltd. 2018. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any means without prior written
consent of HiSilicon Technologies Co., Ltd.
Trademarks and Permissions
, , and other HiSilicon icons are trademarks of HiSilicon Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective holders.
Notice
The purchased products, services and features are stipulated by the contract made between HiSilicon and the
customer. All or part of the products, services and features described in this document may not be within the
purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information,
and recommendations in this document are provided "AS IS" without warranties, guarantees or
representations of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute a warranty of any kind, express or implied.
HiSilicon Technologies Co., Ltd.
Address: Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.hisilicon.com
Email: support@hisilicon.com

HiKey970
Update Image Guide Change History
Issue 01 (2018-03-11) HiSilicon Proprietary and Confidential
Copyright © HiSilicon Technologies Co., Ltd.
i
Change History
Changes between document issues are cumulative. The latest document issue
contains all the changes made in earlier issues.
Issue 01 (2018-03-11)
The first version.

HiKey970
Update Image Guide Contents
Issue 01 (2018-03-11) HiSilicon Proprietary and Confidential
Copyright © HiSilicon Technologies Co., Ltd.
ii
Contents
Change History..................................................................................................................................i
Contents ............................................................................................................................................ ii
1 Base Firmware Files and Installation ........................................................................................1
1.1 Step 1: Materials and Preperations ................................................................................................................... 1
1.2 Step 2: Dependencies ....................................................................................................................................... 1
1.3 Step 3: Enter recovery/forced-download mode on HiKey970: ........................................................................ 2
1.4 Step 4: Flash base firmware ............................................................................................................................. 2
1.5 Step 5: Explore other modes, proceed to OS installation ................................................................................. 3
1.6 Troubleshooting................................................................................................................................................ 3
2 Hisi-idt ............................................................................................................................................4
2.1 Command ......................................................................................................................................................... 4
2.2 Download Steps................................................................................................................................................ 4
2.3 Burn Images ..................................................................................................................................................... 5
2.4 Troubleshooting................................................................................................................................................ 5

HiKey970
Update Image Guide
1 Base Firmware Files a
nd Installation
Issue 01 (2018-03-11) HiSilicon Proprietary and Confidential
Copyright © HiSilicon Technologies Co., Ltd.
1
1
Base Firmware Files and Installation
This sections shows how to install all base firmware components for the HiKey970. Once
finished with these instructions, please continue to the HiKey970 documentation landing
page to flash an operating system.
Step 1: Material and Preperations
Step 2: Dependencies
Step 3: Enter recovery/forced-download mode on HiKey970
Step 4: Flash Base Firmware
Step 5: Explore other modes, proceed to OS installation
Troubleshooting
1.1 Step 1: Materials and Preperations
Materials
HiKey970
USB Type-A (Host machine) to USB Type-C (96Boards) cable
96Boards compliant power supply
To boot into fastboot mode everytime set switch 1 & 3 to ON state and switch 2
to OFF state.
To boot into fastboot mode at every alternate reboot set switch 1 to ON and
switch 2 & 3 to OFF state.
To boot into recovery mode set switch 1 & 2 & 3 to ON state
1.2 Step 2: Dependencies
Host Linux Machine

HiKey970
Update Image Guide
1 Base Firmware Files a
nd Installation
Issue 01 (2018-03-11) HiSilicon Proprietary and Confidential
Copyright © HiSilicon Technologies Co., Ltd.
2
Remove modemmanager. At least in Ubuntu 14.04 and 16.04 verions, we found a
conflicting issue if modemmanager is installed and active. Modemmanager monitors
ttyUSBx's incoming data, when it reads some given pattern, it will send some bytes back
into the tty as response. And those bytes sent by modemmanager can make board side
recovery flashing tool confuse and fail. Solution is to uninstall this service. If you have a
doubt whether you are safe to remove it or not, double confirm here: ModemManager
homepage.
$ sudo dpkg -s modemmanager
$ sudo apt-get remove modemmanager
Android SDK “Platform-Tools” for Linux can be downloaded here
Use terminal to clone this repository into desired folder and cd into
tools-images-HiKey970
$ git clone https://github.com/96boards-hikey/tools-images-hikey970.git
$ cd tools-images-hiKey970
1.3 Step 3: Enter recovery/forced-download mode on
HiKey970:
Remove power from the board
Change Jumper/DIP switch settings, to enter recovery/forced-download mode:
Name Switch State
Auto Power up Switch 1 ON
Recovery Switch 2 ON
Fastboot Switch 3 ON
Apply power to the board using 96Boards compliant power supply
Insert USB Type-C cable (OTG port) to the board, and connect the other end to your
Linux PC
Check whether there is a device node "/dev/ttyUSBx". If there is, it means your PC has
detected the target board; If there is not, try to repeat previous steps.
1.4 Step 4: Flash base firmware
Once again using the terminal on your host machine, execute the following command. Be sure
to replace /dev/ttyUSBx with the USB value detected by your machine.
$ sudo ./reco ery-flash.sh /de /ttyUSBx
After it completes, the base firmware will be flashed to the device, this does not mean OS.
The board will then be in fastboot mode.

HiKey970
Update Image Guide
1 Base Firmware Files a
nd Installation
Issue 01 (2018-03-11) HiSilicon Proprietary and Confidential
Copyright © HiSilicon Technologies Co., Ltd.
3
1.5 Step 5: Explore other modes, proceed to OS installation
sw2402 mode
Proceed to OS "Installation" through the HiKey970 documentation landing page
Switch Normal Mode Fastboot Mode Recovery Mode
Switch 1 ON ON ON
Switch 2 OFF OFF ON
Switch 3 OFF ON ON
1.6 Troubleshooting
If recovery script "./recovery-flash.sh /dev/ttyUSBx" fail to run to completion and you
see "< waiting for any device >" in a loop, then try uninstalling modem manager from
your host machine. The script will work after that. Don't forget to install modem
manager back after recovery.
If you run into trouble, see the README-technical.md file in this directory.

HiKey970
Update Image Guide 2 Hisi-idt
Issue 01 (2018-03-11) HiSilicon Proprietary and Confidential
Copyright © HiSilicon Technologies Co., Ltd.
4
2
Hisi-idt
A tool for downloading binaries to soc ram and ddr through serial port.
2.1 Command
Linux:
sudo python hisi-idt.py -d /dev/ttyUSBx --img1 ./ sec_usb_xloader.img
–-img2 ./sec_usb_xloader2.img --img3 ./l-loader.bin
Windows:
python hisi-idt.py -d commxx --img1 sec_usb_xloader.img
–-img2 sec_usb_xloader2.img --img3 l-loader.bin
2.2 Download Steps
a. Insert USB cable and connect with PC;
b. Enter force downloand mode:
For hikey970 board: sw2402
swich 1 mode: ON
swich 2 mode: ON
swich 3 mode: ON
release “Reset” key then will enter into “force download” mode;
c. Check if there have the device node “/dev/ttyUSBx”, if there have device node that means
the PC has detected the target board; d. Use command "sudo python hisi-idt.py" to run the
script; after idt download binaries successfully, it will print out below log:
+----------------------+
Serial: /dev/ttyUSB1

HiKey970
Update Image Guide 2 Hisi-idt
Issue 01 (2018-03-11) HiSilicon Proprietary and Confidential
Copyright © HiSilicon Technologies Co., Ltd.
5
Image1: fastboot1.img
Image2: fastboot2.img
+----------------------+
Sending fastboot1.img ...
Done
Sending fastboot2.img ...
Done
2.3 Burn Images
After download fastboot1.img and fastboot2.img on the board, then can use fastboot
command to burn images:
sudo fastboot flash fip fip.bin
sudo fastboot flash fastboot l-loader.bin
2.4 Troubleshooting
a. After enter the force download mode, if Ubuntu PC cannot recognize the device ttyUSBx;
this issue can be fixed by input below commands: sudo echo 12D1 3609 >
/sys/bus/usb-serial/drivers/option1/new_id sudo makenod /dev/ttyUSB0 c 188 0
b. Need supervisor permission for hisi-idt.py: "sudo python hisi-idt.py"
c. Need supervisor permission for fastboot: "sudo fastboot"
d. If download binaries failed with below message:
Sending fastboot1.img ...
failed
failed
Usually this means you are using the wrong ttyUSBx device; the reason is when connect
board with the uart cable and usb cable, then PC will create two device nodes /dev/ttyUSB0
and /dev/ttyUSB1;
But the nodes which are randomly binding to uart and usb, so sometimes /dev/ttyUSB0 is
created for the uart and /dev/ttyUSB1 is for the usb port, in this case should use /dev/ttyUSB1
for the idt; if PC exchanges the nodes then should use /dev/ttyUSB0.

Table of contents
Other HiSilicon Motherboard manuals
Popular Motherboard manuals by other brands

Asus
Asus M4A78-EM - Motherboard - Micro ATX quick start guide

Gigabyte
Gigabyte GA-X38-DQ6 user manual

Asus
Asus P5P41C user manual

Asus
Asus PREMIUM P5N72-T user guide

National Semiconductor
National Semiconductor ADC08200 instruction manual

NXP Semiconductors
NXP Semiconductors Freescale MCIMX6Q-SL user manual