In this page we provide information about building kernel and UEFI from source code for D01 board.



Kernel

Pre-built Images

There are two types of pre-built images: one is snapshot build, which is in daily base; the other is Linaro's monthly release, which is in monthly base.

Snapshot builds

A daily snapshot build for D01 kernel can be found here: http://snapshots.linaro.org/ubuntu/hwpacks/lt-d01/latest

Linaro monthly release

D01 is also supported in Linaro's monthly release website http://www.linaro.org/downloads/. Follow the link to find "HiSilicon D01", then you can find the download page. Eg. in 2014.04, it will points you to: http://releases.linaro.org/14.04/ubuntu/saucy-hwpacks/lt-d01

Souce code

Here is the kernel source code git tree. Both of the above pre-built images are built from this git branch/tree.

Build steps:

export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
make O=../linux-next.build hip04_defconfig
make O=../linux-next.build -j16 zImage
make O=../linux-next.build hip04-d01.dtb
cat ../linux-next.build/arch/arm/boot/zImage ../linux-next.build/arch/arm/boot/dts/hip04-d01.dtb > /$(FTP-server-path)/.kernel

linux-linaro tracking

HiSilicon Landing Team also maintains a branch for linux-linaro tracking tree. This branch usually keep track with latest mainline kernel, pending on linux-linaro's schedule.

This branch is integrated into linux-linaro tracking tree since Feb/2014. You can find out more here: https://git.linaro.org/?p=kernel/linux-linaro-tracking.git;a=summary

Build steps:

export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
make O=../linux-next.build hip04_defconfig
make O=../linux-next.build -j16 zImage
make O=../linux-next.build hip04-d01.dtb
cat ../linux-next.build/arch/arm/boot/zImage ../linux-next.build/arch/arm/boot/dts/hip04-d01.dtb > /$(FTP-server-path)/.kernel

Note: These two config generation methods are not maintained on D01. Verification shows they don't work at this moment.

./scripts/kconfig/merge_config.sh -O ../linux-next.build/ linaro/configs/linaro-base.conf linaro/configs/distribution.conf linaro/configs/hip04.conf
./scripts/kconfig/merge_config.sh -O ../linux-next.build/ linaro/configs/hip04.conf arch/arm/configs/multi_v7_lpae_defconfig

UEFI

Source code

Landing Team git tree

Linaro EDK2 git tree

HiSilicon D01 UEFI package was included by Linaro EDK2 tree since 2014/May.

"Release Cycle" of Linaro EDK2 tree is explained here, please have a look for detail.

How to build

A general guideline is here: https://wiki.linaro.org/LEG/Engineering/Kernel/UEFI/build

For simplicity, to build UEFI for D01 board, follow these steps:

  1. Prepare build environment on your Ubuntu PC:

     sudo apt-get install uuid-dev build-essential gcc-arm-linux-gnueabi
     sudo apt-get install gcc-arm-linux-gnueabihf
  2. Clone Linaro's uefi tools.

     cd ~
     git clone git://git.linaro.org/uefi/uefi-tools.git
     export PATH=$PATH:~/uefi-tools.git
  3. Enter uefi-tools, add a build item for D01.
    • Note: This will be submitted into Linaro uefi-tools.git soon. If you found it already there, don't panic.

diff --git a/platforms.config b/platforms.config
index 2c29a29..7710b80 100755
--- a/platforms.config
+++ b/platforms.config
@@ -132,3 +132,10 @@ BUILDFLAGS=
 DSC=BeagleBoardPkg/BeagleBoardPkg.dsc
 ARCH=ARM
 [/]
+
+[d01]
+LONGNAME=HiSilicon D01 Cortex-A15 16-cores
+BUILDFLAGS=-D EDK2_ARMVE_STANDALONE=1
+DSC=HisiPkg/D01BoardPkg/D01BoardPkg.dsc
+ARCH=ARM
+[/]
  1. Enter your uefi source code folder, and run uefi-build.sh to build.

     cd your/path/to/uefi/source;
     uefi-build.sh -b DEBUG d01
    • Note: for a release version.

      uefi-build.sh -b RELEASE d01
  2. When finished, you can find the build result here:

     ls -la Build/D01/DEBUG_GCC46/FV/D01.fd
    • Note: for a release version:

       ls -la Build/D01/RELEASE_GCC46/FV/D01.fd
  3. Rename D01.fd to EFI-BOOT.fd, and follow instructions here to download it to D01 board.

Boards/D01/BuildFromSource (last modified 2015-01-08 13:53:36)