0%

HiSilicon Hikey 970 - Flash Lebuntu

Hi, everyone... I've been so busy and haven't written anything for a bit. My previous boss at Lenovo is now in Vancouver for annual executive meeting. She brought me a Huawei HiSilicon Hikey 970.

Several things before testing: * Lenovo and Huawei are two BIGGEST and possibly BEST IT companies from China. * HiSilicon is a chip design and manufacturing company spinned off from Huawei. * 96Boards hosts various SBCs (Single Board Computers), including Hikey 970. * A lot more resource can be found on LeMaker, who has designed several low-cost single board computers (SBCs). - LeMaker Hikey 970 Home Page - LeMaker Hikey 970 Specification - LeMaker Hikey 970 Resource

Now, let's start today's journey.

PART A: Introduction

1. Layout of Hikey 970

Hikey 970 looks like (cited from Hikey 970 ):

HiSilicon Hikey 970

2. Connection of Hikey 970

HiSilicon Hikey 970

Please pay attention to that pink rectangle, where 4 TINY switches are located and will be adjusted while flashing.

PART B: Install Lebuntu onto Hikey 970

1. Download Lebuntu for Hikey 970

We FIRST go visiting the website http://www.lemaker.org/product-hikey970-download-84.html and click Download icon, a file named Hikey 970 Lebuntu.rar will be automatically downloaded. After the extraction, a folder named hikey970-lebuntu-16.04 will be generated.

2. Preparations for Making Full Use of Flash Memony On Hikey 970

By integrating the following 2 contents:

we should be able to successfully install Lebuntu, and make FULL use of the whole flash memory on board.

2.1 Mount Boot Image

Make sure the current path is hikey970-lebuntu-16.04, then:

1
2
sudo mkdir /mnt/boot-hikey970
sudo mount -o loop boot-hikey970.uefi.img /mnt/boot-hikey970

2.2 Edit grub.cfg

1
sudo vim /mnt/boot-hikey970/boot/grub/grub.cfg
  • sdd12 -> sdd15
  • gpt12 -> gpt15

2.3 Edit flash scripts

There are 3 flash scripts:

  • flash-all-binaries.sh
  • flash-minimum-binaries.sh
  • binaries/recovery-flash.sh

Change all cases in the above 3 files:

  • sudo fastboot flash system leubuntu-16.04.img -> sudo fastboot flash userdata leubuntu-16.04.img.

3 Flash Lebuntu onto Hikey 970

3.1 Adjust the Switches

  • Switch 1 : ON
  • Switch 2 : ON
  • Switch 3 : ON
  • Switch 4 : OFF

3.2 Connect Type C USB cable and Power Adapter

  • Connect Type C USB cable between the host computer and Hikey 970.
  • Connect power adapter.
  • Make sure Hikey 970 is configured as ttyUSB0.
1
$ ls -ls /dev/ttyUSB0

3.3 System Installation

1
./binaries/recovery-flash.sh

3.4 Unplug Power Supply then Re-adjust the Switches

Unplug the power adapter, and then re-adjust the switches: * Switch 1 : ON * Switch 2 : OFF * Switch 3 : OFF * Switch 4 : OFF

3.5 Connect HDMI Cable then Power Adapter

  • Connect HDMI cable.
  • Connect the Power Adapter.

NOTE: Plug the HDMI cable before powering up. Lebuntu may NOT boot up without plugging in the HDMI.

3.6 Boot up

You may have to re-plug in the power adapter multiple times, in order to boot up Lebuntu. Username and password are respectively:

  • Username: shunya
  • Password: shunya

Expand the Partition

In order to make full use of the partition, we need to resize the file system as:

1
shunya@hikey970:~$ sudo resize2fs /dev/sdd15

PART C: Waiting for HuaWei HiAI

Longer Vision Technology is waiting for HuaWei Developer account activation:

HuaWei Developer Account Activation

I may talk about Lebian with Pre-built Tensorflow some time later.

So tired these days... Nice dream...