4.19.5 kernel based Debian snapshot image release for HiKey960

Hi @sreenad,

is there any specific reason to build all the features into the kernel, not as module?

Is it possible to use modules too? As I would like to unload/load a specific module at run-time.


Hi @marcodip,

You can use modules. I prefer ‘inbuilt’ to avoid

  • missing drivers.
  • Vermagic mismatches
  • Additional task of installing modules.


Hi @sreenad,

got it, thanks! Just another question: why you call this?

make olddefconfig


Hello @Mani,

Is there any Debian/Ubuntu release in which HDMI & WiFi works ?
Thanks in advance !

@Rajagopal No HDMI for now but WiFi should work with latest release.


Hello Mani,

Appreciate the timely reply.

No HDMI for now but WiFi should work with latest release.
Wondering why in Android we can get HDMI o/p but NOT in Linux.
Or, is it right in Android also HDMI doesn’t work & only MIPI-DSI works ?


@Rajagopal The debian image is based on the latest LTS kernel and it doesn’t contain many out of tree drivers (of course there are usb patches but they are taken from mailing list). If you want to use HDMI but doesn’t worry about kernel version, then you can try below kernel:

This kernel has almost most of the features supported by Hikey960. And you can update this kernel on the board using below guide:

You can also refer previous conversations in this thread for more info.


@Mani Thank you for the links. When I tried to boot from the newly built upstream-rebase kernel, it complains saying “could not open builtin file /lib/modules/4.14.0-rc7-hikey-linaro-00001-ge2e79b4/modules.builtin.bin”.

I enable loadable module support in kernel config and built bindeb-pkg, modules & modules_install with custom INSTALL_MOD_PATH.

Still, I don’t see any .ko inside the entire linux directory !!!

How/where to get .ko for above kernel or how to get around the above error ?


Hello @Mani,

For the above issue, tried the solution by @sumit.garg in [1] and was able to boot successfully but, no HDMI ouput yet !

Our monitor is a full-HD 32" Samsung monitor and tried passing video=HDMI-A-1:1920x1080@60 by appending to the “linux …” line in grub entry.

Does upstream-rebase support HDMI or de we have to run any additional commands/script to get HDMI output ?


[1] Does latest rpb desktop image (Debian) supports hdmi on hikey960?

Did you update device-tree as well via grub menu as stated here?

How can I extract rootfs-linaro-stretch-developer-hikey-20191020-39.img

How can I make rootfs-linaro-stretch-developer-hikey-20191020-39.img

@lihuadong You can use simg2img utility to extract the raw rootfs image as below:

$ simg2img rootfs-linaro-stretch-developer-hikey-20191020-39.img rootfs.raw

Then the raw image(ext4 file system) can be mounted as below:

$ mkdir mnt
$ sudo mount rootfs.raw mnt/
1 Like

How can I produce a new img file? I use make_ext4fs but there is problem. can’t set android permissions.

Use, img2simg for repacking the raw image into Android sparse image format:

$ img2simg image.raw rootfs-linaro-stretch-developer-hikey-20191020-39.img

Hello @Mani,

Are they applicable for HiKey960 also ?

When I try them on Ubuntu-16.04 + gcc-4.9(aarch64-linux-android-gcc), I get the below (my signature) error, after exporting ARCH and CROSS_COMPILE.

Is there a certain gcc version recommended here or which is better older or newer ?


*rajagopal@ubuntu-rajagopal:~/Workspace/hikey960/upstream-rebase/linux$ make defconfig distro.config
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
*** Default configuration is based on ‘defconfig’

configuration written to .config

scripts/kconfig/Makefile:117: *** No configuration exists for this target on this architecture. Stop.
Makefile:547: recipe for target ‘distro.config’ failed
make[1]: *** [distro.config] Error 2
Makefile:526: recipe for target ‘__build_one_by_one’ failed
make: *** [__build_one_by_one] Error 2


Yes, it should be applicable.

This means, there is no distro.config file in the kernel source. Which tree and branch are you trying?

FYI, the kernel tree used for this release is here: https://git.linaro.org/people/manivannan.sadhasivam/hikey.git Branch: master


I am currently trying branch hikey960-upstream-rebase from [1].

I think there are > 1 repos for HiKey960 and I am tuning into the wrong combination :upside_down_face:

Where can I find build instructions for [1] ?

Thanks, shall give it a try.


[1] https://github.com/96boards-hikey/linux/tree

You can just use make defconfig and build the kernel. After that, build the boot image using following commands:

cat Image hi3660-hikey960.dtb > Image-dtb
abootimg --create ${OUTPUT_DIR}/boot-uefi.img \
    -k Image-dtb \
    -r ${RAMDISK_FILE} \
    -f bootimg-960.cfg

The bootimg-960.cfg file can be found here: https://github.com/96boards-hikey/l-loader/blob/testing/hikey960_v1.2/bootimg-960.cfg

I had to disable Wifi for this kernel, because half of the times the command “ip addr” gets the board stuck.

&dwmmc2 { /* WIFI /
pinctrl-names = “default”;
pinctrl-0 = <&sdio_pmx_func
WL_EN */
vmmc-supply = <&wlan_en>;
status = “disable”;

wlcore: wlcore@2 {
	compatible = "ti,wl1837";
	reg = <2>;      /* sdio func num */
	interrupt-parent = <&gpio22>;
	interrupts = <3 IRQ_TYPE_EDGE_RISING>;