Introduction
This documentation provides a general overview for getting started with Estuary Release Distributions such as ubuntu, debian and so on to support the HiKey board, There are two primary ways to install software onto the HiKey board as thissample of ubuntu systerm.
First and simplest, you can install uefi image, boot image into eMMC on HiKey board while installing Estuary Release Distributions such as ubuntu, debian and so on into SD card. You can download uefi image and boot image by fastboot mode while using SD card to load Estuary Release Distributions. It follows the instructions in “Update systerm” chapter.
Second, you also can install uefi image, boot image and Estuary Release Distributions such as ubuntu, debian and soon into eMMC on HiKey board. You can download uefi image and boot image by fastboot mode while loading Estuary Release Distributions into eMMC by wifi mode. It follows the instructions in “Update systerm” chapter.
Preparation
The HiKey board is ready to use “out of the box” with a preinstalled version of the Debian Linux distribution from the factory. To get started you need power supply(9V~15V ,2A), a standard microUSB cable, usb to serial port(TTL 1.8V),SD card and PC.
Hardware Connect
- Connect standard microUSB to USB connector between the HiKey microUSB port and Linux PC.
- Connect usb to serial port to USB connector between the HiKey (UART3 J2) and Linux PC.
- Link 1-2 (J601) pin causes HiKey to auto-power up when power is applied.
- Connect the HiKey power supply to the HiKey board (Uart3 P301).
NOTE: please refer to the Hardware User Guide for more information on board link options. you can visit: http://open-estuary.com/hikey/
PC Environment
- Ensure PC is Linux systerm.
- Config a serial com on PC such as kermit, mincom and so on.
Install fastboot tool, you do it as follows:
12$ sudo apt-get update$ sudo apt-get install android-tools-fastbootInstall Python, you can do it as follows:
123$ sudo apt-get update$ sudo apt-get install python2.7 python2.7-dev$ alias python=python2.7
Image File
|
|
NOTE: you can get more information about Image explaination from this Readme.md document.
Upgrade Systerm
When most users get HiKey board first, they want to reload the all system image by using instructions. However, this section will describes how to reinstall all system image.
Flash Uefi image to eMMC
The flashing process requires to be in “recovery mode” which will link 1-2 (J601) and link 3-4(J601) with setting board link options as follow:
Link 1-2 causes HiKey to auto-power up when power is installed. Link 3-4 causes the HiKey SoC internal ROM to start up in at a special “install bootloader” mode which will install a supplied bootloader from the microUSB OTG port into RAM, and will present itself to a connect PC as a ttyUSB device.
Note: USB does NOT power the HiKey board because the power supply requirements in certain use cases can exceed the power supply available on a USB port. You must use an external power supply.
If you can understand above information, you will start to flash this image according to this instruction:
- Turn off HiKey board
- Connect debug UART3 on HiKey to PC (used to monitor debug status)
- Make sure pin1-pin2 and pin3-pin4 on J601 are linked (recovery mode)
- Connect HiKey MicroUSB to PC with USB cable
Turn on HiKey board and flash this image
On serial console, you should see some debug message (NULL packet) run HiKey recovery tool to flash l-loader.binNote: if the serial port recorded in hisi-idt.py isn’t available, adjust the command line below by manually setting the serial port with “-d /dev/ttyUSBx” where x is usually the last serial port reported by “dmesg” command
12$ cd hikey-image$ sudo python hisi-idt.py -d /dev/ttyUSBx --img1=l-loader.binDo not reboot yet. Run fastboot commands to flash the images (order must be respected)
123$ sudo fastboot flash ptable ptable-linux.img$ sudo fastboot flash fastboot UEFI_HiKey.fd$ sudo fastboot flash nvme nvme.imgTurn off HiKey board
- Remove the jumper of pin3-pin4 on J601
- Connected the jumper of pin5-pin6 on J601(fastboot mode)
Flash Boot image to eMMC
The boot partition is a 64MB FAT partition and contains kernel/dtb, grub files and so on. You should make the boot-fat.uefi.img image and flash this image according to follow this instruction:
NOTE: More detail information about how to write this grub.cfg, please refer to GRUB_Manual.md document.
If you finish making boot-fat.uefi.img image, you start to flash this image according to this instruction:
- Turn off HiKey board
- Connect debug UART3 on HiKey to PC (used to monitor debug status)
- Make sure pin1-pin2 and pin5-pin6 on J601 are linked (recovery mode)
- Connect HiKey Micro-USB to PC with USB cable
- Turn on HiKey board and flash this image
$ sudo fastboot flash boot boot-fat.uefi.img - Turn off HiKey board
Update Distrubition
You can select SD card or eMMC on HiKey board to place the Estuary release distrubition such as ubuntu. This part will explain how to use SD card and eMMC on HiKey board to boot ubuntu.
SD card placing this ubuntu systerm
You should partion SD card (8G) and tar this Ubuntu_ARM64.tar.gz into your SD card according to this instruction:
- Insert SD card into your linux PC by card reader
Grep SD card node and fdisk or partion SD card in your linux PC
12345$ sudo parted /dev/sdx(parted) mklabel gpt(parted) mkpart primary ext4 1MB 7086MB(parted) q$ sudo mkfs.ext4 -L "ubuntu" /dev/sdx1Remove and insert SD card in your PC
Tar Ubuntu_ARM64.tar.gz into your SD card
12$ cd hikey-image$ tar -xvzf Ubuntu_ARM64.tar.gz -C /media/{admin}/ubuntuInsert SD card into HiKey board
- Turn on HiKey board
- Select “grub on eMMC” from uefi options
- Select “Hikey Ubuntu SD card” from grub options
- Success to boot ubunt system
NOTE: WIFI config about mini-rootfs systerm please refer to Setup_HiKey_Wifi_Env.md document
eMMC on HiKey placing this ubuntu systerm
If you purchase HiKey board which eMMC is 8G, We recommend you to use eMMC HiKey placing this ubuntu systerm. Estuary provides ptable image which will suport 8G eMMC HiKey board.In return you purchase HiKey board which eMMC is 4G, We recommend you to use SD card placing this ubuntu syterm because Estuary release distribution volume is 4G~5G or so. However, you also may use HiKey board which eMMC is 4G to place this clipping ubuntu systerm.
You can place this ubuntu systerm into eMMC on HiKey according to this following instruction:
- Turn on HiKey board
- Select “grub on eMMC” from uefi options
- Select “Hikey minilinux eMMC” from grub options (boot min rootfs)
- Refer to Setup_HiKey_Wifi_Env.md document to config WIFI link
Download this ubuntu systerm into eMMC on HiKey board
123456$ mount /dev/mmcblk0p9 /tmp$ cd /tmp$ false; while [ $? -ne 0 ]; do wget -c http://7xjz0v.com1.z0.glb.clouddn.com/dist_<version>/Ubuntu_ARM64.tar.gz; done$ tar -xvzf Ubuntu_ARM64.tar.gz$ cd /$ mount /tmpReboot HiKey board
- Select “grub on eMMC” from uefi options.
- Select “Hikey Ubuntu eMMC” from grub options
- Success to boot ubunt systerm
NOTE: WIFI config about ubuntu systerm please refer to Setup_HiKey_Wifi_Env.md document
Appendix 1: Partition Information
Table 1 describes the partition layout on the HiKey eMMC.