To install perf tools on hikey960 board for accessing the HPC's

I believe I have installed debian on my hikey960 board using this link.

uname-a gives me the following output

Linux hikey960 4.14.0-rc7-linaro-hikey960 #1 SMP PREEMPT Wed Mar 14 17:54:05 IST 2018 aarch64 GNU/Linux.

In order to create containers, are there are pre-req’s.?

Also I was trying to install the performance monitoring tool ,i.e perf using the command

apt-get install perf
I get the error of
E: Unable to locate package perf.

Is perf not supported in this distro of linux? Or is there any other way to get a performance monitoring tool ?

Here is the image for commands used for more details.


Since the perf tool is tightly coupled with the kernel, you can compile perf from kernel source itself.

Note: The below instructions are for cross compiling perf tools.

Just execute the below step in the directory where you have cloned kernel for Hikey960:

$ export ARCH=arm64
$ export CROSS_COMPILE=<path-to-cross-compiler>/aarch64-linux-gnu-gcc-
$ make -C tools/perf/

Once compilation is finished, you can copy the binaries under tools/perf to /usr/bin of the Hikey960 Root File System and start using perf tools.

PS: You can clone the Hikey960 kernel from: Branch: hikey-v4.15

Hope this helps!


So do I have to clone the kernel provided in the link and the do a cross complile?
Also in order to cross complile, I need to have serial console access or ssh access to the board right ?


You can either cross-compile the perf tools on a linux host machine or you can do a native compilation on the Hikey960 itself. In both cases, you need to clone the kernel.

For cross compilation, you don’t need any ssh/serial console access but for transferring the perf tool binary you need to have some sort of communication to the board. (You can also copy the binary using SD card)

Hope this helps!

Could you please provide more details with respect to native compilation on the board itself

Hi @susmithagankidi,

Recently I use native compilation perf at my side for amount time on Hikey620 (I use the same Debian stretch both for Hikey620 and Hikey960 so should be similar with each other), below is my experience:

  1. git clone kernel on my PC side and use nfs to mount the folder on board. This can use large disk from PC for building. Alternatively, Hikey960 has 32GB Flash so you also can use ‘userdata’ partition (>20GB) to save kernel source code.

For nfs setting, I completely follow up Ubuntu wiki page for that [1].

  1. On the board, I need install these dependencies:

apt-get install flex bison libelf-dev libaudit-dev libdw-dev libunwind* python-dev binutils-dev libnuma-dev libgtk2.0-dev libbfd-dev libelf1 libperl-dev libnuma-dev libslang2 libslang2-dev libunwind8 libunwind8-dev binutils-multiarch-dev elfutils libiberty-dev

  1. As Mani suggests, you could build perf with below command:

cd $kernel
make VF=1 -C tools/perf

[1] SettingUpNFSHowTo - Community Help Wiki

Hi @susmithagankidi,
Can you post a list of counters available? With that version of Debian, can you read the clusters temperature values?

I mainly focused on reading the CPU cycles. I think the temperature values can be read , but I’m sorry I’m not sure about it

Hi, thanks for the reply. Is it possible for you to verify for the temperature, because I am considering to buy the board but I need to read cluster temperatures, so I need to be sure. Thanks a lot.