Hikey970 - Booting Custom Kernel Image


#1

Board based on the Kirin 970 - HI3670 Application Processor
More info: http://www.96boards.org/product/hikey970/ (Website coming soon…)
Buy now: https://www.seeedstudio.com/HiKey-970-Development-Board-p-3046.html

Hi All,

I want to customize the kernel so I followed the below steps (as given in https://github.com/wincle626/Hikey970_Debian_Linux_Installation)

  1. Download kernel source file from:https://github.com/96boards-hikey/linux/tree/hikey970-v4.9
  2. Make sure ARM64 GCC complier is installed: sudo apt install gcc-aarch64-linux-gnu g+±aarch64-linux-gnu
  3. Go to the source folder and set up the enviroment variable for cross compie and buld kernel .config:export CROSS_COMPILE=aarch64-linux-gnu-make ARCH=arm64 hikey970_defconfig
  4. Change .config with:make ARCH=arm64 menuconfig
  5. Build kernel:make ARCH=arm64
  6. The kernel image file is:arch/arm64/boot/Image

After completing the above steps:

  1. First I removed the the Image located in /boot/ of the board.
  2. Copy the Image from /arch/arm64/boot/Image.
  3. Reboot

After the Monitor just glows and no other screen comes up basically doesn’t reboot.

Can someone please help me or direct me to correct steps to do this.

Regards,
Siva


#2

When you build the custom kernel on system other than hikey970 you need to cross compile. To cross compile you need to use a tool chain.
I use the toolchain from ARM.


gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz

As per the instructions
Make sure ARM64 GCC complier is installed: sudo apt install gcc-aarch64-linux-gnu g+±aarch64-linux-gnu

That is for building the kernel on the hikey 970 I believe.
But you will find you cant simply
sudo apt install gcc-aarch64-linux-gnu g+±aarch64-linux-gnu

I did find a way to load the ARM64 GCC onto hikey 970 but not by normal means.
I reccomend to cros compile and use a Tool-Chain.

You also need to copy the DTB.
/boot/dts/kirin970_hikey970.dtb
Your custom kernel will be both ( Image and kirin970_hikey970.dtb)

The trouble is even with a good kernel build the Monitor still will not work.
I keep saying this but have not found a fully working solution yet.
The DRM Drive in the Kernel source isnt quite right.

I have patched up a kernel and added lots of debugging output for the DRM driver to dmesg. I’m still working on some things but i’m pretty close to having it working.
Once i finish up everything i am capable of we will probably need the help of an expert to finish fixing the DRM.
I will post my patched kernel after i finish up a few more test.


#3

Hi,

Thank you for your reply.

I initially installed Lebuntu from http://www.lemaker.org/product-hikey970-download-84.html.
I then downloaded the kernel source from the link given above onto the board.

I am compiling the kernel on hikey970 as after installing Lebuntu, it had all gcc compilers installed and i did apt-get install for other required software for the installation (like bc).

I did copy the Image and kirin970_hikey970.dtb to the /boot/ folder but still has the same monitor glowing problem.

Do you think compiling the kernel on a different machine will have a better chance? (Cross-compiling).

Great. Looking forward for the patch. Thank you so much.

Regards,
Siva


#4

If you compiled the kernel on the Hikey970 its good.

The problem is in the DRM Driver.
I have been trying to fix it but im not an expert.
For me its a slow process but i have made some progress