Linux support issue on hikey 960


#1

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?) 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,


#2

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


#3

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,


#4

@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.


#5

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


#6

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?


#7

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


#9

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


#10

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.


#11

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


#12

Hi @morgdx,

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

Thanks,
Mani


#13

@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?


#14

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


#15

@morgdx,

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

sudo apt install openssl


#16

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.