How can I build latest Linux kernel(not android branch) for hikey960

How can I build and deploy latest Linux kernel(not android branch) for hikey960

1 Like

The build method you could refer:

1 Like

What branch do you advice?
I want to have working USB

Yes, the USB with ADB can work well.

The booting image’s branch you can refer the page:; you can see every source code repo (ARM Trusted Firmware/edk2/OpenPlatformPkg/l-loader/uefi-tools) there have pointed the branch in it.

For kernel branch, I am using below repo and branch:
git clone kernel/hikey-linaro - Git at Google
cd hikey-linaro
git checkout -b android-hikey-linaro-4.4 origin/android-hikey-linaro-4.4

But I am looking for Linux Kernel with debian/ubuntu distro not android

@xlazom00, let me check this internally for debian distro with UEFI+ARM-TF, in the past time I mainly used AOSP or a very simple ramdisk for the works.

@xlazom00 Integration team told me this work will take ~1 week to add the debian build in CI and integrate with UEFI/GRUB. So currently UEFI+Debian is not available.

You could monitor the page after related stuffs have been prepared. After I receive some notification, will keep you posted in this thread as well.

We use OpenEmbedded version for now

but USB isn’t working

@xlazom00 could you confirm now you are using OE with kernel 4.9? If so, I will check now 4.9 kernel has supported USB driver or not?

Please aware, I think now kernel 4.4 branch is most readiness branch; 4.9 branch may miss many patches at current stage…

it really looks like 4.9 kernel :slight_smile:

Confirmed with landing team, now 4.9 kernel has not supported USB driver; but this is in their TODO list in next 1~2 weeks.

1 Like

Is it somehow possible to compile android working kernel that will work with OE rootfs or debian ?

this is my .config that work for branch working-android-hikey-linaro-4.4

and with qualcomm debian rootfs it all works kind of “fine”
at least usb with usb network adapter

Great! Thanks for sharing this.


Why we don’t have latest patches sets for kernel
branch working-android-hikey-linaro-4.4

And what is the purpose for android branches in this( ) repo ?

I get wired behaviour with android-hikey-linaro-4.4 from

My application use 8 thread but it only use one CPU core
And it don’t migrate to big core too.

All fine with
working-android-hikey-linaro-4.4 from

I disabled all android stuff from kernel
any idea ?

This may related with cpuset, could you do below setting before you run your program:

echo 0-7 > /dev/cpuset/background/cpus
echo 0-7 > /dev/cpuset/foreground/cpus
echo 0-7 > /dev/cpuset/top-app/cpus
echo 0-7 > /dev/cpuset/system-background/cpus

Please note, AFAIK is mainly used by Landing team to maintain two branches, one is for kernel 4.9 [1], another branch [2] is mainly used for Linux mainline kernel upstreaming. These branches are working in progress but not for release purpose.

So for common case, the official AOSP kernel release branch is [3] and this branch is encouraged to be used.

[3]; branch: origin/android-hikey-linaro-4.4

I don’t have any /dev/cpuset

Could you enable kernel config: CONFIG_SCHED_DEBUG=y; and after system boot up input below command: echo NO_ENERGY_AWARE > /sys/kernel/debug/sched_features

This try can disable energy awared scheduling, so the tasks can be spread to multi-cores. Otherwise, the scheduler may pack small tasks onto single core.