Massive move of docs to consolidate RP pages

Removed separation of 96Boards from Test HW platforms
and actual hardware platforms.

Signed-off-by: Robert Wolff <robert.wolff@linaro.org>
This commit is contained in:
Robert Wolff 2016-11-29 16:00:45 -08:00
parent 9ab43738d4
commit 6fc3cb9c8d
33 changed files with 15 additions and 149 deletions

View file

@ -0,0 +1,46 @@
## AOSP RPB 16.03 - Build from Source
Additional AOSP repositories are hosted here:
- https://github.com/96boards/android_hardware_ti_wpan
- https://github.com/96boards/android_device_linaro_hikey
- https://github.com/96boards/android_manifest
- https://github.com/96boards/linux (branch android-hikey-linaro-4.1)
**Build setup:**
Please setup the host machine by following the instructions here: [http://source.android.com/source/initializing.html](http://source.android.com/source/initializing.html)
###### Out of date:
NOTE: The build tries to mount a loop device as fat partition to create the boot-fat.uefi.img filesystem image. Please make sure your user is allowed to run those commands in sudo without password by running "visudo" and appending the following lines (replacing "<USER>" with your username):
```shell
<USER> ALL= NOPASSWD: /bin/mount
<USER> ALL= NOPASSWD: /bin/umount
<USER> ALL= NOPASSWD: /sbin/mkfs.fat
<USER> ALL= NOPASSWD: /bin/cp
```
***
**Download the code:**
```shell
mkdir android/
cd android/
```
Download and extract the Mali vendor binaries in the above directory: http://builds.96boards.org/snapshots/hikey/linaro/binaries/20150706/vendor.tar.bz2
**Build the image:**
```shell
repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r16 -g "default,-device,-non-default,hikey"
cd .repo/
git clone https://github.com/96boards/android_manifest -b android-6.0 local_manifests
cd -
repo sync -j8
source build/envsetup.sh
lunch hikey-userdebug
make droidcore -j8
cd out/target/product/hiked
```

View file

@ -0,0 +1,182 @@
## Debian RPB 16.06 - Build from Source
- Building Linux Kernel from Source
- Step 1: Setting up your environment on your host computer
- Step 2: Download the Linaro cross compiler toolchain
- Step 3: Export path to cross compiler tool and confirm version
- Step 5: Set the right kernel .config file
- Step 6: Build kernel image and debian package
- Step 7: Find HiKey IP Address
- Step 8: Transfer the modules to the target HiKey
- Step 9: Generate the initramfs
- Step 10: Create the device tree image and boot image
- Customize Bootloader
- Build Rootfs from source
***
#### Building the Linux kernel from source
The Linux kernel used in this release is available via tags in the git [repository](https://github.com/96boards/linux)
```shell
git: https://github.com/96boards/linux
Dynamic tag: 96b-kernelci
Fixed tag: 96b/releases/2016.06
defconfig: arch/arm64/configs/distro.config
```
The kernel image (`Image`) and the kernel modules are installed in the root file system (e.g. `/boot/vmlinuz-4.4.0-104-arm64` and `/lib/modules/4.4.0-104-arm64`). It is possible for a user to rebuild the kernel and run a custom kernel image instead of the released kernel. You can build the kernel using any recent GCC release using the git tree, tag and defconfig mentioned above. This release only supports booting with device tree, as such both the device tree blobs need to be built as well.
The HiKey is an ARMv8 platform, and the kernel is compiled for the Aarch64 target. Even though it is possible to build natively, on the target board, It is recommended to build the Linux kernel on a PC development host. In which case you need to install a cross compiler for the ARM architecture. It is recommended to download the Linaro GCC cross compiler [Aarch64 little-endian](http://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/aarch64-linux-gnu/gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu.tar.xz), also available [here](http://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/)
To build the Linux kernel, you can use the following instructions:
#### Step 1: Setting up your environment on your host computer
- Open your Terminal and cd into your desired directory
- Make a new folder using `mkdir`, name it something relevant
```shell
#Example of desired directory
$ cd ~/Desktop
#Example of relevant folder
$ mkdir HiKey-16.06
$ cd HiKey-16.06
```
#### Step 2: Step 2: Download the Linaro cross compiler toolchain
- From within the directory you just made
- Download and unzip by executing the following commands
###### Linaro Cross Compiler
```shell
#Download
$ wget http://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/aarch64-linux-gnu/gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu.tar.xz
#Unzip
$ tar -Jxvf gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu.tar.xz
```
#### Step 3: Export path to cross compiler tool and confirm version
- Exporting path will allow build system can find and use the right kernel
```shell
#Create path
$ export PATH=~/Desktop/HiKey-16.06/gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu/bin/:$PATH
#Check version
$ aarch64-linux-gnu-gcc --version
aarch64-linux-gnu-gcc (Linaro GCC 5.3-2016.02) 5.3.1 20160113
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
#### Step 4: Clone the Reference Platform kernel
- **96b-kernelci** is the development branch
- This branch will have the latest changes
- Use **96b/releases/2016.06** if you want the same version used by the 16.06 release
```shell
$ git clone -b 96b/releases/2016.06 http://github.com/96boards/linux.git
```
- Cloning the kernel may take a few minutes
- If you already have a local clone of another kernel git tree, use _--reference path/your/old/tree/.git_ for a faster clone process
- Once kernel source has been cloned cd into its directory
```shell
$ cd linux
```
#### Step 5: Set the right kernel .config file
- This step creates the '.config' file
- The .config file is used by the build system when compiling the kernel
- Current Reference Platform config can be made by using distro.config
- From with in kernel directory execute the following command:
```shell
$ cp arch/arm64/configs/distro.config .config
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- oldconfig
```
- New .config file will be hidden but can be seen by executing `ls -a` from within kernel folder
- To view all current configuration the .config file can be opened with a text editor such a `vim`
#### Step 6: Build kernel image and debian package
- This step will take some time (~20-30 minutes or more), depending on your cpu/memory
- Creating the kernel package is recommended for HiKey, as it supports Grub 2
```shell
#Replace X from -jX with the number of cores on your host computer
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -jX deb-pkg LOCALVERSION=-yourowntag
```
#### Step 7: Find HiKey IP Address
- On your HiKey board
- Connect to the internet through WIFI
- Open one of the Terminal applications
```shell
$ /sbin/ifconfig
```
- Look for your `wlan0` connection
- Here you will see an `inet addr`
- This is your board's IP address and should look something like this: `192.168.0.10`
#### Step 8: Transfer the modules to the target HiKey
- Using your board's IP Address for linaro@<yourIPaddress>
```shell
$ scp ../linux-image-4.4.0-yourowntag.deb linaro@192.168.1.15:~/
$ ssh linaro@192.168.1.15
#HiKey shell
$ hikey $ sudo dpkg -i linux-image-4.4.0-yourowntag.deb
```
Congratulations! Your new kernel is now ready to be used by your HiKey.
- You can check `/boot/grub/grub.cfg` for the new boot entry based on your own kernel
- If you want only your kernel to be available, you can remove the default linux-image package, and grub will be automatically updated
### Boot Loader
Please see go [here](BuildSourceBL.md) for instructions on how to built the boot loader from source.
#### How to get and customize Debian packages source code
This release is based on Debian 8.2 "Jessie".
Since all packages installed in Linaro Debian-based images are maintained either in Debian archives or in Linaro repositories, it is possible for users to update their environment with commands such as:
```shell
sudo apt-get update
sudo apt-get upgrade
```
All user space software is packaged using Debian packaging process. As such you can find extensive information about using, patching and building packages in The Debian New Maintainers Guide. If you quickly want to rebuild any package, you can run the following commands to fetch the package source code and install all build dependencies:
```shell
sudo apt-get update
sudo apt-get build-dep <pkg>
apt-get source <pkg>
```
Then you can rebuild the package locally with:
```shell
cd <pkg-version>
dpkg-buildpackage -b -us -uc
```
#### TODO
* Explain how to build the rootfs from source

View file

@ -0,0 +1,86 @@
## HiKey Bootloader - Building from source
The source code is available from:
- [**l-loader**](https://github.com/96boards-hikey/l-loader)
- [**ARM Trusted Firmware**](https://github.com/96boards-hikey/arm-trusted-firmware)
- [**OP-TEE**](https://github.com/OP-TEE/optee_os)
- [**Tianocore EDK2 UEFI**](https://github.com/96boards-hikey/edk2) and [**OpenPlatformPkg**](https://github.com/96boards-hikey/OpenPlatformPkg)
Since GRUB2 is currently consumed directly from the Debian package, debian package rebuild instructions applies.
### Build instructions
Prerequisites:
- GCC 5.3 cross-toolchain for Aarch64 available in your PATH
- You can download and use the Linaro GCC binary (Linaro GCC 5.3-2016.02), available at [http://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/aarch64-linux-gnu/gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu.tar.xz](http://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/aarch64-linux-gnu/gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu.tar.xz)
- GCC 5.3 cross-toolchain for gnueabihf available in your PATH
- You can download and use the Linaro GCC binary (Linaro GCC 5.3-2016.02), available at [http://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/arm-linux-gnueabihf/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz](http://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/arm-linux-gnueabihf/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz)
- GPT fdisk (gdisk package from your favorite distribution).
#### Installing pre-built toolchain(s)
```shell
mkdir arm-tc arm64-tc
tar --strip-components=1 -C ${PWD}/arm-tc -xf gcc-linaro-5.3-*arm-linux-gnueabihf.tar.xz
tar --strip-components=1 -C ${PWD}/arm64-tc -xf gcc-linaro-5.3-*aarch64-linux-gnu.tar.xz
export PATH="${PWD}/arm-tc/bin:${PWD}/arm64-tc/bin:$PATH"
```
#### Getting the source code
```shell
git clone -b hikey-aosp https://github.com/96boards-hikey/edk2.git
git clone -b hikey-aosp https://github.com/96boards-hikey/OpenPlatformPkg.git
git clone https://github.com/OP-TEE/optee_os.git
git clone -b hikey https://github.com/96boards-hikey/arm-trusted-firmware.git
git clone https://github.com/96boards-hikey/l-loader.git
git clone -b hikey-aosp https://github.com/96boards-hikey/uefi-tools.git
```
#### Building EDK2/UEFI for HiKey
Building EDK2/UEFI is simple if built with the _uefi-tools.sh_ script, since it already incorporates the platform specific configs and binaries.
To build EDK2/UEFI (use **-b** to select **RELEASE** or **DEBUG** build):
```shell
export AARCH64_TOOLCHAIN=GCC49
export EDK2_DIR=${PWD}/edk2
export OPTEE_DIR=${PWD}/optee_os
export ATF_DIR=${PWD}/arm-trusted-firmware
export UEFI_TOOLS_DIR=${PWD}/uefi-tools
cd ${EDK2_DIR}
rmdir OpenPlatformPkg; ln -s ../OpenPlatformPkg
${UEFI_TOOLS_DIR}/uefi-build.sh -b RELEASE -a ${ATF_DIR} -s ${OPTEE_DIR} hikey
```
And bl1.bin with l-loader (ptable files are also created as part of the l-loader Makefile):
```shell
cd ../l-loader
ln -s ${EDK2_DIR}/Build/HiKey/RELEASE_GCC49/FV/bl1.bin
ln -s ${EDK2_DIR}/Build/HiKey/RELEASE_GCC49/FV/fip.bin
make # requires sudo for creating the partition tables
```
The files 'fip.bin', 'l-loader.bin' and 'ptable-linux-8g.img' are now built. All the image files are in _$BUILD/l-loader_ directory. The Fastboot App is at _edk2/Build/HiKey/RELEASE_GCC49/AARCH64/AndroidFastbootApp.efi_.
#### EFI boot partition
The boot partition is a 64MB FAT partition only contains fastboot.efi and GRUB2, since the grub.cfg, kernel, initrd and device tree are all loaded from the root file system (grubaa64.efi searches for rootfs label/boot/grub/grub.cfg).
```shell
wget https://builds.96boards.org/snapshots/reference-platform/components/grub/latest/grubaa64.efi
mkdir boot-fat
dd if=/dev/zero of=boot-fat.uefi.img bs=512 count=131072
sudo mkfs.fat -n "boot" boot-fat.uefi.img
sudo mount -o loop,rw,sync boot-fat.uefi.img boot-fat
sudo mkdir -p boot-fat/EFI/BOOT
sudo cp ${EDK2_DIR}/Build/HiKey/RELEASE_GCC49/AARCH64/AndroidFastbootApp.efi boot-fat/EFI/BOOT/fastboot.efi
sudo cp grubaa64.efi boot-fat/EFI/BOOT/grubaa64.efi
sudo umount boot-fat
sudo mv boot-fat.uefi.img hikey-boot-linux-VERSION.uefi.img
rm -rf boot-fat
```
Now just flash the recently created 'hikey-boot-linux-VERSION.uefi.img' with the same instructions as used with the pre-built binaries.

View file

@ -0,0 +1,126 @@
#### Your Build Choice
[<img src="http://i.imgur.com/jl4GG0d.png" data-canonical-src="http://i.imgur.com/jl4GG0d.png" width="125" height="157" />]()
[<img src="http://i.imgur.com/yRQKDI6.png" data-canonical-src="http://i.imgur.com/yRQKDI6.png" width="125" height="157" />]()
[<img src="http://i.imgur.com/7wy1996.png" data-canonical-src="http://i.imgur.com/7wy1996.png" width="125" height="157" />]()
[<img src="http://i.imgur.com/yRQKDI6.png" data-canonical-src="http://i.imgur.com/yRQKDI6.png" width="125" height="157" />]()
[<img src="http://i.imgur.com/tXXN5bZ.png" data-canonical-src="http://i.imgur.com/tXXN5bZ.png" width="125" height="157" />]()
***
#### Step 1: Read about the Fastboot Method
Fastboot is supported by the board and can be used for installs. This is for advanced users who are most likely modifying/customizing source code and will need to download such updates to the board for test/execution.
This method requires the following hardware:
- HiKey with power supply
- Host machine (Linux, Mac OS X, or Windows)
- USB to microUSB cable
- USB Mouse and/or keyboard (not required to perform flash)
- HDMI Monitor with full size HDMI cable (not required to perform flash)
***
#### Step 2: Download the following files
>Note: Some files have 4G and 8G options, download file which best matches your HiKey board.
- All HiKey **CircuitCo boards** will use the **4G files**
- All HiKey **LeMaker 1G boards** will use the **4G files**
- All HiKey **LeMaker 2G boards** will use the **8G files**
Build Folders (<a href="http://builds.96boards.org/releases/reference-platform/aosp/hikey/16.03/bootloader/" target="_blank">**Binaries**</a> / <a href="http://builds.96boards.org/releases/reference-platform/aosp/hikey/16.03/" target="_blank">**Image**</a>)
- **l-loader.bin** ([**Download**](http://builds.96boards.org/releases/reference-platform/aosp/hikey/16.03/bootloader/l-loader.bin))
- **fip.bin** ([**Download**](http://builds.96boards.org/releases/reference-platform/aosp/hikey/16.03/bootloader/fip.bin))
- **nvme.img** ([**Download**](http://builds.96boards.org/releases/reference-platform/aosp/hikey/16.03/bootloader/nvme.img))
- **ptable-aosp.img** ([**4G Download**](http://builds.96boards.org/releases/reference-platform/aosp/hikey/16.03/bootloader/ptable-aosp-4g.img) / [**8G Download**](http://builds.96boards.org/releases/reference-platform/aosp/hikey/16.03/bootloader/ptable-aosp-8g.img))
- **hisi-idt.py** ([**Download**](http://builds.96boards.org/releases/reference-platform/aosp/hikey/16.03/bootloader/hisi-idt.py))
- **boot_fat.uefi.img** ([**Download**](http://builds.96boards.org/releases/reference-platform/aosp/hikey/16.03/boot_fat.uefi.img.tar.xz))
- **cache.img.tar.xz** ([**Download**](http://builds.96boards.org/releases/reference-platform/aosp/hikey/16.03/cache.img.tar.xz))
- **userdata.img.xz** ([**4G Download**](http://builds.96boards.org/releases/reference-platform/aosp/hikey/16.03/userdata.img.tar.xz) / [**8G Download**](http://builds.96boards.org/releases/reference-platform/aosp/hikey/16.03/userdata-8gb.img.tar.xz))
- **system.img.tar.xz** (<a href="http://builds.96boards.org/releases/reference-platform/aosp/hikey/16.03/system.img.tar.xz" target="_blank">**Download**</a>)
***
#### Step 3: Install AOSP Using Fastboot with Linux host
This section show how to install the AOSP operating system to your HiKey using the fastboot method on a Linux host computer.
1 - **Make sure fastboot is set up on host computer**
- Android SDK “Tools only” for Linux can be downloaded <a href="http://developer.android.com/sdk" target="_blank">here</a>
- The Linux “Tools Only” SDK download does not come with fastboot, you will need to use the Android SDK Manager to install platform-tools.
- To do this follow the “SDK Readme.txt” instructions included in your SDK “Tools Only” download.
If you are still having trouble setting up fastboot, <a href="https://youtu.be/W_zlydVBftA" target="_blank">click here</a> for a short tutorial video
2 - **Boot HiKey into Fastboot mode using J15 header**
- Link pins 1 and 2
- Link pins 5 and 6
- Connect host computer to HiKey board using USB to microUSB cable
Name | Link | State
---- | ---- | -----
Auto Power up | Link 1-2 | closed
Boot Select | Link 3-4 | open
GPIO3-1 | Link 5-6 | closed
- Power on HiKey board by plugging in power adapter
- Esure HiKey is detected by host computere
- Open Terminal application and execute the following:
```shell
$ sudo fastboot devices
0123456789abcdef fastboot
```
>Note: If your HiKey is not being detected by fastboot, you might want to try [Board Recovery](https://github.com/96boards/documentation/wiki/HiKey-Board-Recovery) and return to this step once your board is ready
3 - **Set HiKey into Recovery Mode using J15 header**
- Remove link between pins 5 and 6
- Link pins 1 and 2
- Link pins 3 and 4
Name | Link | State
---- | ---- | -----
Auto Power up | Link 1-2 | closed
Boot Select | Link 3-4 | closed
GPIO3-1 | Link 5-6 | open
4 - **Install Operating System update using downloaded files**
>**NOTE:** the ptable must be flashed first. Wait for a few seconds after the reboot command to allow the bootloader to restart using the new partition table.
```shell
$ sudo fastboot flash ptable ptable-aosp-8g.img
$ sudo fastboot reboot
$ sudo fastboot flash boot boot_fat.uefi.img
$ sudo fastboot flash cache cache.img
$ sudo fastboot flash system system.img
$ sudo fastboot flash userdata userdata-8gb.img
```
5 - **Reboot HiKey into new OS**
- Wait untill all files have been flashed onto HiKey board
- Power down HiKey by unplugging the power adapter
- Remove microUSB cable from HiKey
- Remove Link 3-4 from J15 header
Name | Link | State
---- | ---- | -----
Auto Power up | Link 1-2 | closed
Boot Select | Link 3-4 | open
GPIO3-1 | Link 5-6 | open
- Plug mouse/keyboard USB into type A USB ports
- Power up HiKey by plugging in power adapter
**Note:** the **username** and **password** are both **“linaro”** when the login information is requested.
**Congratulations! You are now booting your newly installed OS directly
from eMMC on the HiKey!**

View file

@ -0,0 +1,265 @@
# Install Instructions - Reference Software Platform
This page provides download and installation instructions inteded for those interested in flashing the HiKey board with pre-built Linaro Reference Software. Two methods are currently available: **SD card method** and **Fastboot method**. If you are already familiar with these methods, you may find all necessary files in the [96Boards RPB 16.06 build folder](http://builds.96boards.org/releases/reference-platform/debian/hikey/16.06/).
## Contents
- [SD Card Method](#sd-card-method)
- [Fastboot Method](#fastboot-method)
***
# SD Card Method
<img src="http://i.imgur.com/jl4GG0d.png" data-canonical-src="http://i.imgur.com/jl4GG0d.png" width="125" height="157" />
<img src="http://i.imgur.com/yRQKDI6.png" data-canonical-src="http://i.imgur.com/yRQKDI6.png" width="125" height="157" />
<img src="http://i.imgur.com/OQGR5yY.png" data-canonical-src="http://i.imgur.com/OQGR5yY.png" width="125" height="157" />
<img src="http://i.imgur.com/yRQKDI6.png" data-canonical-src="http://i.imgur.com/yRQKDI6.png" width="125" height="157" />
<img src="http://i.imgur.com/g8N21m1.png" data-canonical-src="http://i.imgur.com/g8N21m1.png" width="125" height="157" />
#### Step 1: Read about the SD Card Method
The SD card method allows you to place a microSD card into the HiKey to automatically boot and install the Linux Desktop onto the board. This method is generally simpler and should be used by beginners.
This method requires the following hardware:
- HiKey with power supply
- Host Linux machine (Linux, Mac OS X, or Windows)
- MicroSD card with 4GB or more of storage
- USB Mouse and/or keyboard
- HDMI Monitor with full size HDMI cable
***
#### Step 2: Download SD Card Image
**Debian Linux Reference Software Platform - SD Card Image**
[SD Card Image - Direct Download](http://builds.96boards.org/releases/reference-platform/debian/hikey/16.06/hikey-debian-jessie-alip-sdcard-*.img.gz)
***
#### Step 3: Prepare MicroSD card
- Ensure data from mircoSD card is backed up
- Everything on microSD card will be lost by the end of this procedure.
***
#### Step 4: Find SD Card Device name
- Use host Linux computer
- Open "Terminal" application
- Remove SD card from host computer and run the following command:
```shell
lsblk
```
- Note all recognized disk names
- **Insert SD card** and run the following command (again):
```shell
lsblk
```
- Note the newly recognized disk. This will be your SD card.
- You will need to remember this device name for a later step.
***
#### Step 5: Recall Download Location
- Locate SD card install file from Downloads page.
- This file will be needed for the next step.
***
#### Step 6: Unzip _SD Card Install Image_
- When unzipped, you will have a folder with the following contents:
- Linaro/Debian Install Image (.img)
- Readme
***
#### Step 7: Go to directory with _SD Card Install Image_ folder using Terminal
- Use host Linux computer
- Open "Terminal" application
- `cd` to the directory with your unzipped **SD Card Install Image**
```shell
cd <extraction directory>
#Example:
#<extraction directory> = /home/YourUserName/Downloads
#For this example we assume the "Debian SD Card Install Image" is in the Downloads folder.
cd /home/YourUserName/Downloads
```
***
#### Step 8: Install Image onto SD Card
**Checklist:**
- SD card inserted into host Linux computer
- Recall SD Card device name **Step 4**
- From within the extraction folder, using the Terminal execute the following commands:
**Execute:**
```shell
sudo dd if=hikey-jessie_alip_2015MMDD-nnn.img of=/dev/XXX bs=4M oflag=sync status=noxfer
```
**Note:**
- `if=hikey-jessie_alip_2015MMDD-nnn.img`: should match the name of the image that was downloaded.
- `of=/dev/XXX`: XXX should match the name of the SD Card device name from [**Step 2**](). Be sure to use the device name with out the partition.
- This command will take some time to execute. Be patient and avoid tampering with the terminal until process has ended.
- Once SD card is done flashing, remove from host computer and set aside for a later step
***
#### Step 9: Prepare HiKey with SD card
- Make sure HiKey is unplugged from power
- Connect an HDMI monitor to the HiKey with an HDMI cable, and power on the monitor
- Plug a USB keyboard and/or mouse into either of the two USB connectors on the HiKey
- Insert the microSD card into the HiKey
- Plug power adaptor into HiKey, wait for board to boot up.
***
#### Step 10: Install Linaro/Debian onto HiKey
<img src="http://i.imgur.com/F18wlgU.png" data-canonical-src="http://i.imgur.com/F18wlgU.png" width="400" height="250"/>
- If **Steps 1 - 8** were followed correctly, the above screen should be visible from your HiKey
- Select the image to install and click “Install” (or type “i”). OS will be installed into the eMMC memory
- This process can take a few minutes to complete
- Upon completion, “Flashing has completed and OS has installed successfully....” message will appear.
Before clicking "OK":
- Remove the SD Card
- Now click "OK" button and allow HiKey to reboot.
**Congratulations! You are now booting your newly installed operating system directly from eMMC on the HiKey**
[Back to top](#install-instructions---reference-software-platform)
***
# Fastboot Method
<img src="http://i.imgur.com/jl4GG0d.png" data-canonical-src="http://i.imgur.com/jl4GG0d.png" width="125" height="157" />
<img src="http://i.imgur.com/yRQKDI6.png" data-canonical-src="http://i.imgur.com/yRQKDI6.png" width="125" height="157" />
<img src="http://i.imgur.com/OQGR5yY.png" data-canonical-src="http://i.imgur.com/OQGR5yY.png" width="125" height="157" />
<img src="http://i.imgur.com/yRQKDI6.png" data-canonical-src="http://i.imgur.com/yRQKDI6.png" width="125" height="157" />
<img src="http://i.imgur.com/tXXN5bZ.png" data-canonical-src="http://i.imgur.com/tXXN5bZ.png" width="125" height="157" />
***
#### Step 1: Read about the Fastboot Method
Fastboot is supported by the board and can be used for installs. This is for advanced users who are most likely modifying/customizing source code and will need to download such updates to the board for test/execution.
This method requires the following hardware:
- HiKey with power supply
- Host Linux machine (Linux, Mac OS X, or Windows)
- USB to microUSB cable
- USB Mouse and/or keyboard (not required to perform flash)
- HDMI Monitor with full size HDMI cable (not required to perform flash)
***
#### Step 2: Download Debian partition table
> Note: Some files have 4G and 8G options, download file which best matches your HiKey board.
- All HiKey **CircuitCo boards** will use the **4G files**
- All HiKey **LeMaker 1G boards** will use the **4G files**
- All HiKey **LeMaker 2G boards** will use the **8G files**
**ptable-linux.img** ([**4G Download**](http://builds.96boards.org/releases/reference-platform/debian/hikey/16.06/bootloader/ptable-linux-4g.img) / [**8G Download**](http://builds.96boards.org/releases/reference-platform/debian/hikey/16.06/bootloader/ptable-linux-8g.img))
***
#### Step 3: Download Boot image and Root File System
- **Debian Boot** ([**Download**](http://builds.96boards.org/releases/reference-platform/debian/hikey/16.06/hikey-boot-linux-*.uefi.img.gz))
- **Debian Rootfs** (<a href="http://builds.96boards.org/releases/reference-platform/debian/hikey/16.06/hikey-rootfs-debian-jessie-alip-*.emmc.img.gz" target="_blank">**Download**</a>)
***
#### Step 4: Install Debian Using Fastboot with Linux host
This section show how to install the Linaro based Debian operating system to your HiKey using the fastboot method on a Linux host computer.
1 - **Make sure fastboot is set up on host computer**
- Android SDK “Tools only” for Linux can be downloaded <a href="http://developer.android.com/sdk" target="_blank">here</a>
- The Linux “Tools Only” SDK download does not come with fastboot, you will need to use the Android SDK Manager to install platform-tools.
- To do this follow the “SDK Readme.txt” instructions included in your SDK “Tools Only” download.
If you are still having trouble setting up fastboot, <a href="https://youtu.be/W_zlydVBftA" target="_blank">click here</a> for a short tutorial video
2 - **Boot HiKey into Fastboot mode using J15 header**
- Link pins 1 and 2
- Link pins 5 and 6
- Connect host computer to HiKey board using USB to microUSB cable
Name | Link | State
---- | ---- | -----
Auto Power up | Link 1-2 | closed
Boot Select | Link 3-4 | open
GPIO3-1 | Link 5-6 | closed
- Power on HiKey board by plugging in power adapter
- Esure HiKey is detected by host computere
- Wait for about 10 seconds
- Open Terminal application and execute the following:
```shell
$ sudo fastboot devices
0123456789abcdef fastboot
```
>Note: If your HiKey is not being detected by fastboot, you might want to try [Board Recovery](https://github.com/96boards/documentation/blob/master/ConsumerEdition/HiKey/Installation/BoardRecovery.md) and return to this step once your board is ready
3 - **Install Operating System update using downloaded files**
>**NOTE:** the ptable must be flashed first. Wait for a few seconds after the reboot command to allow the bootloader to restart using the new partition table.
```shell
$ sudo fastboot flash ptable <ptable_FILE_NAME>.img
$ sudo fastboot reboot
$ sudo fastboot flash boot <boot_FILE_NAME>.uefi.img
$ sudo fastboot flash system hikey-rootfs-debian-jessie-alip-YYYYMMDD-nnn.emmc.img
```
4 - **Reboot HiKey into new OS**
- Wait untill all files have been flashed onto HiKey board
- Power down HiKey by unplugging the power adapter
- Remove microUSB cable from HiKey
- Remove Link 5-6 from J15 header
Name | Link | State
---- | ---- | -----
Auto Power up | Link 1-2 | closed
Boot Select | Link 3-4 | open
GPIO3-1 | Link 5-6 | open
- Plug mouse/keyboard USB into type A USB ports
- Power up HiKey by plugging in power adapter
**Note:** the **username** and **password** are both **“linaro”** when the login information is requested.
**Congratulations! You are now booting your newly installed OS directly
from eMMC on the HiKey!**
[Back to top](#install-instructions---reference-software-platform)

View file

@ -0,0 +1 @@

View file

@ -0,0 +1,31 @@
## Reference Platform Build - 16.06
- **Install Instructions:** For "out-of-box" users. Instructions for installing pre-build Reference Platform images onto your 96Boards. Includes SD card and Fastboot method instructions.
- **Build from Source:** For Advanced users. Instructions for building and installing the various Reference Platform components used by Consumer Edition 96Boards.
- **Known Issues:** List of current bugs and issues for each Reference Platform Build. Includes links to bug reports for tracking resolution progress.
***
#### HiKey
| **CE Debian RPB - 16.06** |
|:-----------------------------:|
| [Install Instructions](InstallDebianRPB.md) |
| [Build from Source](BFSDebianRPB.md) |
| [Known issues](../../../Known-Issues.md) |
| **CE AOSP** |
|:---------------------------:|
| [Install Instructions](https://source.android.com/source/devices.html) |
| [Known issues](../../../Known-Issues.md) |
***
- Access **bootloader** build from source instructions [here](BuildSourceBL.md)
- Access **OpenEmbedded** build from source instructions [here](../../../CECommon/OE.md)