This is a cache of https://discuss.96boards.org/t/linux-support-issue-on-hikey-960/5143. It is a snapshot of the page at 2024-10-31T09:35:49.136+0000.
Linux support issue on hikey 960 - HiKey 960 - 96Boards Forum

Linux support issue on hikey 960

Hi, I’m currently working on hikey 960 board, and I wanna this board with linux host such as debian or ubuntu

And I found that hikey 960 supports debian linux, and actually shows an instruction to flash debian linux to 960 board.

But, when I flash this image, reboot-bootloader or booting was failed after flash.
I think I have same problems as this thread (Error occurs druing procedures of installing Debian).

And also I found this thread (Is there a basic guide to installing Linux on Hikey960? - #7 by susmithagankidi) which mentions that hdmi supporting linux kernel can be found in latest 960 kernel.

So, in summary, from my best understanding,

  1. Currently default debian linux doesn’t support hdmi & usb driver, so when I don’t have any uart daughter board for hikey, I cannot use this linux host.

  2. Secondly, laetest 4.9 linux kernel for 960 supports hdmi and usb drivers, but still if I wanna switch linux kernel into this latest kernel, first I need to flash and boot the debian linux host using uart serial port, and I switch the kernel from grub menu through uart.

  3. So, when I don’t have any uart addon board, I cannot boot this board with linux host.

Is that right??

Additionally, is hikey 960 board supports gicv3 or gicv2? or gicv3 with gicv2 compatible?

Please answer me.

Thanks,

Yes for default Debian Linux, you need UART mezzanine board.

For latest Linux version 4.14-rc7, please use https://github.com/96boards-hikey/linux/commits/hikey960-upstream-rebase branch. It has support for hdmi and usb drivers.

Hikey960 has integrated GIC-400 which complies to GICv2 architecture.

Regards,
Sumit

Thanks for reply,
So then, can I compile and flash the 4.14-rc7 directly without using uart board? or should I firstly boot up my board with uart console, then switch the kernel into 4.14?

Thanks,

@wangmir you need to boot up board with uart console first and then switch to 4.14 kernel. Actually kernel image is part of Debian rootfs as /boot/vmlinuz-4.15-hikey.

1 Like

Ok, then do you have any guide to make new rootfs from the scratch based on 960 source with 4.14?

1 Like

Can you guide me to build & deloy latest kernel, which supports USB and HDMI drivers, to hikey 960?

I boot up basic debian linux with uart console, but then how can I build and switch to new and USB supported linux kernel when the basic debian linux does not support USB driver?

Hi @wangmir,

For the USB and HDMI support, you can use the landing team kernel [1]. Then just use the instructions in below guide for building and deploying it on HiKey960 running debian.

Note:

After installing the kernel using dpkg utility, you should boot with your devicetree. Please see the last section in above document.

Thanks,
Mani

3 Likes

Hi, what do you mean “landing team kernel”?

Hi, what do you mean “landing team kernel”?

The kernel tree maintained by HiSilicon landing team. They use this tree for the whole development around HiKey960 board.

Hi Mani, those instructions appear to be for the Hikey 620, will those instructions work without change on a Hikey 960?

Hi @morgdx,

Yes it should work for HiKey960 too. Only prerequisite is to have a running Linaro debian image on the board.

Thanks,
Mani

1 Like

@Mani

I’m trying to complete the host build steps on an ubuntu 18.04.1 LTS host and have run into some trouble.

wget releases.linaro.org/components/toolchain/binaries/latest/aarch64-linux-gnu/gcc-*-x86_64_aarch64-linux-gnu.tar.xz
mkdir ~/toolchain
tar -xf gcc-*-x86_64_aarch64-linux-gnu.tar.xz -C ~/toolchain --strip-components=1
git clone https://github.com/suihkulokki/linux.git
cd linux/
git checkout -t origin/hikey-v4.15
sudo apt update
sudo apt install build-essential fakeroot bc kmod cpio libssl-dev bison flex
export ARCH=arm64
export CROSS_COMPILE=~/toolchain/aarch64-linux-gnu-gcc-
make defconfig distro.config
make bindeb-pkg LOCALVERSION=-hikey-linaro

And I get the following error:

arch/arm64/Makefile:27: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
arch/arm64/Makefile:48: Detected assembler with broken .inst; disassembly will be unreliable
CHK     include/config/kernel.release
/bin/bash ./scripts/package/mkdebian
dpkg-buildpackage -j1 -r"fakeroot -u" -a$(cat debian/arch) -b -nc -uc
dpkg-buildpackage: info: source package linux-4.15.3-hikey-linaro-00154-gf449b3ca0861
dpkg-buildpackage: info: source version 4.15.3-hikey-linaro-00154-gf449b3ca0861-1
dpkg-buildpackage: info: source distribution bionic
dpkg-buildpackage: info: source changed by Anonymous <x@x-MacBookPro>
dpkg-buildpackage: info: host architecture arm64
 dpkg-source --before-build linux
dpkg-checkbuilddeps: error: Unmet build dependencies: libssl-dev
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
scripts/package/Makefile:75: recipe for target 'bindeb-pkg' failed
make[1]: *** [bindeb-pkg] Error 3
Makefile:1345: recipe for target 'bindeb-pkg' failed
make: *** [bindeb-pkg] Error 2

I definitely have libssl-dev installed!

Any ideas?

I’ve just tried these exact kernel build steps on two different machines, one of which was a clean ubuntu AWS EC2 instance that I created just to do this build:

make bin deb-pkg LOCALVERSION=-hikey-linaro
CHK include/config/kernel.release
/bin/bash ./scripts/package/mkdebian
dpkg-buildpackage -j1 -r"fakeroot -u" -a$(cat debian/arch) -b -nc -uc
dpkg-buildpackage: source package linux-4.15.3-hikey-linaro-00154-gf449b3c
dpkg-buildpackage: source version 4.15.3-hikey-linaro-00154-gf449b3c-1
dpkg-buildpackage: source distribution xenial
dpkg-buildpackage: source changed by Anonymous ubuntu@ip-172-31-17-129.eu-west-2.compute.internal
dpkg-buildpackage: host architecture arm64
dpkg-source --before-build linux
dpkg-checkbuilddeps: error: Unmet build dependencies: libssl-dev
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
scripts/package/Makefile:75: recipe for target ‘bindeb-pkg’ failed
make[1]: *** [bindeb-pkg] Error 3
Makefile:1345: recipe for target ‘bindeb-pkg’ failed
make: *** [bindeb-pkg] Error 2

@morgdx,

Can you please verify whether you have openssl installed or not?

sudo apt install openssl

Hi @Mani thanks, yes I do:

sudo apt install openssl
Reading package lists… Done
Building dependency tree
Reading state information… Done
openssl is already the newest version (1.1.0g-2ubuntu4.1).
0 to upgrade, 0 to newly install, 0 to remove and 17 not to upgrade.

got the same error, completely useless information.

/bin/sh ./scripts/package/mkdebian
dpkg-buildpackage -j1 -r"fakeroot -u" -a$(cat debian/arch) -b -nc -uc
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: source package linux-4.15.3-hikey-linaro-00154-gf449b3c
dpkg-buildpackage: source version 4.15.3-hikey-linaro-00154-gf449b3c-1
dpkg-buildpackage: source distribution xenial
dpkg-buildpackage: source changed by Anonymous root@ubuntu
dpkg-buildpackage: host architecture arm64
dpkg-source --before-build linux
dpkg-checkbuilddeps: error: Unmet build dependencies: libssl-dev
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
scripts/package/Makefile:75: recipe for target ‘bindeb-pkg’ failed
make[1]: *** [bindeb-pkg] Error 3
Makefile:1345: recipe for target ‘bindeb-pkg’ failed
make: *** [bindeb-pkg] Error 2

dpkg-checkbuilddeps: error: Unmet build dependencies: libssl-dev

This line states that you are lacking libssl-dev. You’ll need to put it using apt. Just run the command
sudo apt install openssl libssl-dev

This should solve your error.

no, I am much sure it has been installed.
install openssl libssl-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
libssl-dev is already the newest version (1.0.2g-1ubuntu4.10).
openssl is already the newest version (1.0.2g-1ubuntu4.10).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

I spun up a fresh 18.04.1 container and did a quick test.

I couldn’t reproduce this behaviour… the instructions worked exactly as documented (although I did apt install git before I started reading the instructions).

I notice that I have a newer version of libssl-dev installed but I very much doubt that matters.

yes, I also have doubt about this. I tried many times to uninstall libssl-dev and then re-install again, but it always will re-install the 1.0.2g-1ubuntu4.10.

I have updated my kernel into 4.18 through this way:

Step 1: make ARCH=arm64 hikey960_defconfig
Step 2: make
Step 3: cp arch/arm64/boot/Image to your board boot folder, name it, eg, 4.18.image

Cp arch/arm64/boot/dts/hinis/ hi3660-hikey960.dtb to your board boot folder, and name it, eg, 4.18.dtb.

Step 4: modify grup.cfg

set default=“0”
set timeout=5
menuentry ‘CE Reference Platform (HiKey960 rpb)’ {
linux /boot/Image console=tty0 console=ttyAMA6,115200n8 root=/dev/sdd10 rootwait rw quiet efi=noruntime
devicetree /boot/hi3660-hikey960.dtb
}
menuentry ‘my-4.18’ {
linux /boot/4.18.image console=tty0 console=ttyAMA6,115200n8 root=/dev/sdd10 rw quiet efi=noruntime
devicetree /boot/4.18.dtb
}