blob: 6c488b827308bf07aaed60c176ff71b193a1aa70 [file] [log] [blame]
HiKey is one of 96boards. Hisilicon Kirin6220 processor is installed on HiKey.
More information are listed in `link`_.
How to build
Code Locations
- Trusted Firmware-A:
`link <>`__
`link <>`__
- edk2:
`link <>`__
- OpenPlatformPkg:
`link <>`__
- l-loader:
`link <>`__
- atf-fastboot:
`link <>`__
Build Procedure
- Fetch all the above repositories into local host.
Make all the repositories in the same ${BUILD\_PATH}.
.. code:: shell
git clone -b integration
git clone
git clone -b testing/hikey960_v2.5
git clone -b testing/hikey960_v1.3.4
git clone -b testing/hikey960_v1.2
git clone
- Create the symbol link to OpenPlatformPkg in edk2.
.. code:: shell
$cd ${BUILD_PATH}/edk2
$ln -sf ../OpenPlatformPkg
- Prepare AARCH64 && AARCH32 toolchain. Prepare python.
- If your hikey hardware is built by CircuitCo, update *OpenPlatformPkg/Platforms/Hisilicon/HiKey/HiKey.dsc* first. *(optional)*
console on hikey.**
.. code:: shell
If your hikey hardware is built by LeMaker, nothing to do.
- Build it as debug mode. Create your own build script file or you could refer to **build\** in l-loader git repository.
.. code:: shell
cd {BUILD_PATH}/arm-trusted-firmware
sh ../l-loader/ hikey
- Generate l-loader.bin and partition table for aosp. The eMMC capacity is either 8GB or 4GB. Just change "aosp-8g" to "linux-8g" for debian.
.. code:: shell
cd ${BUILD_PATH}/l-loader
ln -sf ${EDK2_OUTPUT_DIR}/FV/bl1.bin
ln -sf ${EDK2_OUTPUT_DIR}/FV/bl2.bin
ln -sf ${BUILD_PATH}/atf-fastboot/build/hikey/${FASTBOOT_BUILD_OPTION}/bl1.bin fastboot.bin
make hikey PTABLE_LST=aosp-8g
Setup Console
- Install ser2net. Use telnet as the console since UEFI fails to display Boot Manager GUI in minicom. **If you don't need Boot Manager GUI, just ignore this section.**
.. code:: shell
$sudo apt-get install ser2net
- Configure ser2net.
.. code:: shell
$sudo vi /etc/ser2net.conf
Append one line for serial-over-USB in below.
.. code:: shell
2004:telnet:0:/dev/ttyUSB0:115200 8DATABITS NONE 1STOPBIT banner
- Start ser2net
.. code:: shell
$sudo killall ser2net
$sudo ser2net -u
- Open the console.
.. code:: shell
$telnet localhost 2004
And you could open the console remotely, too.
Flash images in recovery mode
- Make sure Pin3-Pin4 on J15 are connected for recovery mode. Then power on HiKey.
- Remove the modemmanager package. This package may cause the idt tool failure.
.. code:: shell
$sudo apt-get purge modemmanager
- Run the command to download recovery.bin into HiKey.
.. code:: shell
$sudo python -d /dev/ttyUSB1 --img1 recovery.bin
- Update images. All aosp or debian images could be fetched from `link <>`__.
.. code:: shell
$sudo fastboot flash ptable prm_ptable.img
$sudo fastboot flash loader l-loader.bin
$sudo fastboot flash fastboot fip.bin
$sudo fastboot flash boot boot.img
$sudo fastboot flash cache cache.img
$sudo fastboot flash system system.img
$sudo fastboot flash userdata userdata.img
Boot UEFI in normal mode
- Make sure Pin3-Pin4 on J15 are open for normal boot mode. Then power on HiKey.
- Reference `link <>`__
.. _link: