Hikey960 and screen

@ric96 I think I have to run “make bootimage -j4” in hikey-linaro folder. Not in AOSP folder ? Because always command is running under platform/manifest - Git at Google after repo sync.

No, it has to be run in aosp folder.
Did you do lunch hikey960-userdebug before, make bootimage ? If not please do that as well. And no need to repo sync everytime if you’ve already done it once.

It is OK. @ric96 Thank you very much. I want to write all step I have done. Maybe, someone who has a same problem, can find solution quickly.

mkdir ~/aosp
cd ~/aosp
repo init -u https://android.googlesource.com/platform/manifest -b master
repo sync -j$(nproc)
wget https://dl.google.com/dl/android/aosp/arm-hikey960-OPR-cf4e0c80.tgz
tar xzf arm-hikey960-OPR-cf4e0c80.tgz
./extract-arm-hikey960.sh
. ./build/envsetup.sh
lunch hikey960-userdebug
make -j$(nproc)
git clone https://android.googlesource.com/kernel/hikey-linaro
cd hikey-linaro
git checkout -b android-hikey-linaro-4.9 origin/android-hikey-linaro-4.9
make ARCH=arm64 hikey960_defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- -j$(nproc)
cp ~/aosp/hikey-linaro/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dtb ~/aosp/device/linaro/hikey-kernel/hi3660-hikey960.dtb-4.9
cp ~/aosp/hikey-linaro/arch/arm64/boot/Image.gz ~/aosp/device/linaro/hikey-kernel/Image.gz-hikey960-4.9
cd ~/aosp
make bootimage -j$(nproc)

Enter fastboot mode by turning ON switch 1 and 3 on Hikey960.

sudo fastboot flash boot out/target/product/hikey960/boot.img

Unplug USB Type C. Reboot Hikey960.

mkdir ~/aosp
cd ~/aosp
repo init -u https://android.googlesource.com/platform/manifest -b master
repo sync -j$(nproc)
wget https://dl.google.com/dl/android/aosp/arm-hikey960-OPR-cf4e0c80.tgz
tar xzf arm-hikey960-OPR-cf4e0c80.tgz
./extract-arm-hikey960.sh
. ./build/envsetup.sh
lunch hikey960-userdebug
make clean # If you run make -j$(nproc) here and not do make clean before make bootimage, It doesn't rewrite the boot.img
git clone https://android.googlesource.com/kernel/hikey-linaro
cd hikey-linaro
git checkout -b android-hikey-linaro-4.9 origin/android-hikey-linaro-4.9
make ARCH=arm64 hikey960_defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- -j$(nproc)
cp ~/aosp/hikey-linaro/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dtb ~/aosp/device/linaro/hikey-kernel/hi3660-hikey960.dtb-4.9
cp ~/aosp/hikey-linaro/arch/arm64/boot/Image.gz ~/aosp/device/linaro/hikey-kernel/Image.gz-hikey960-4.9
cd ~/aosp
make bootimage -j$(nproc)
1 Like

Hello @ric96 again,

You said to me that We recently added support LCD at following link for hikey960. Can you give a link about source code for this LCD in linaro kernel?

@tesmnorth and @ric96 I was trying to repeat the commands from https://source.android.com/setup/devices but I always encounter the same problem.

When I execute ./flash-all.sh I can not program certain partitions as they don’t exist. Do you know what is the problem?

android out dir:./…/…/…/…/…//out/target/product/hikey960
target reported max download size of 134217728 bytes
sending ‘xloader’ (151 KB)…
OKAY [ 0.057s]
writing ‘xloader’…
OKAY [ 0.150s]
finished. total time: 0.207s
target reported max download size of 134217728 bytes
sending ‘ptable’ (196 KB)…
OKAY [ 0.102s]
writing ‘ptable’…
OKAY [ 0.016s]
finished. total time: 0.118s
target reported max download size of 134217728 bytes
sending ‘fastboot’ (3346 KB)…
OKAY [ 0.140s]
writing ‘fastboot’…
FAILED (remote: No such partition.)
finished. total time: 0.141s
rebooting into bootloader…
OKAY [ 0.001s]
finished. total time: 0.051s
< waiting for device >
target reported max download size of 134217728 bytes
sending ‘nvme’ (128 KB)…
OKAY [ 0.183s]
writing ‘nvme’…
FAILED (remote: No such partition.)
finished. total time: 0.184s
target reported max download size of 134217728 bytes
sending ‘fw_lpm3’ (212 KB)…
OKAY [ 0.126s]
writing ‘fw_lpm3’…
FAILED (remote: No such partition.)
finished. total time: 0.127s
target reported max download size of 134217728 bytes
sending ‘trustfirmware’ (145 KB)…
OKAY [ 0.035s]
writing ‘trustfirmware’…
FAILED (remote: No such partition.)
finished. total time: 0.036s
target reported max download size of 134217728 bytes
sending ‘boot’ (9868 KB)…
OKAY [ 0.337s]
writing ‘boot’…
FAILED (remote: No such partition.)
finished. total time: 0.338s

Just in case if I use the abovementioned images (prm_ptable.img) from prebuild or generated images I can program all the partitions but I can not run AOSP (the log is below):

[Bds]Booting Boot from SD
[Bds]Booting Grub
[Bds]Booting Android Boot
add-symbol-file /home/buildslave/workspace/96boards-reference-uefi-staging/38/edk2/Build/HiKey960/DEBUG_GCC49/AARCH64/EmbeddedPkg/Application/AndroidBoot/AndroidBootApp/DEBUG/AndroidBootApp.dll 0xBA175000
Loading driver at 0x000BA174000 EntryPoint=0x000BA175000 AndroidBootApp.efi

Synchronous Exception at 0x00000000BF0D784C
PC 0x0000BF0D784C (0x0000BF0CB000+0x0000C84C) [ 0] HiKey960Dxe.dll
PC 0x0000BF0CD130 (0x0000BF0CB000+0x00002130) [ 0] HiKey960Dxe.dll
PC 0x0000BA176744 (0x0000BA174000+0x00002744) [ 1] AndroidBootApp.dll
PC 0x0000BA1768D8 (0x0000BA174000+0x000028D8) [ 1] AndroidBootApp.dll
PC 0x0000BA175814 (0x0000BA174000+0x00001814) [ 1] AndroidBootApp.dll
PC 0x0000BA1753E0 (0x0000BA174000+0x000013E0) [ 1] AndroidBootApp.dll
PC 0x0000BA175064 (0x0000BA174000+0x00001064) [ 1] AndroidBootApp.dll
PC 0x0000BF1DF9EC (0x0000BF1D9000+0x000069EC) [ 2] DxeCore.dll
PC 0x0000BF02D20C (0x0000BF01C000+0x0001120C) [ 3] BdsDxe.dll
PC 0x0000BF01DE94 (0x0000BF01C000+0x00001E94) [ 3] BdsDxe.dll
PC 0x0000BF01F568 (0x0000BF01C000+0x00003568) [ 3] BdsDxe.dll
PC 0x0000BF1DB358 (0x0000BF1D9000+0x00002358) [ 4] DxeCore.dll
PC 0x0000BF1DA41C (0x0000BF1D9000+0x0000141C) [ 4] DxeCore.dll
PC 0x0000BF1DA024 (0x0000BF1D9000+0x00001024) [ 4] DxeCore.dll

[ 0] /home/buildslave/workspace/96boards-reference-uefi-staging/38/edk2/Build/HiKey960/DEBUG_GCC49/AARCH64/OpenPlatformPkg/Platforms/Hisilicon/HiKey960/HiKey960Dxe/HiKey960Dxe/DEBUG/HiKey960Dxe.dll
[ 1] /home/buildslave/workspace/96boards-reference-uefi-staging/38/edk2/Build/HiKey960/DEBUG_GCC49/AARCH64/EmbeddedPkg/Application/AndroidBoot/AndroidBootApp/DEBUG/AndroidBootApp.dll
[ 2] /home/buildslave/workspace/96boards-reference-uefi-staging/38/edk2/Build/HiKey960/DEBUG_GCC49/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll
[ 3] /home/buildslave/workspace/96boards-reference-uefi-staging/38/edk2/Build/HiKey960/DEBUG_GCC49/AARCH64/MdeModulePkg/Universal/BdsDxe/BdsDxe/DEBUG/BdsDxe.dll
[ 4] /home/buildslave/workspace/96boards-reference-uefi-staging/38/edk2/Build/HiKey960/DEBUG_GCC49/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll

X0 0x00000000DDB2507E X1 0x00000000BFFFF648 X2 0x00000000BF0CD114 X3 0x0000000000001000
X4 0x00000000BE372000 X5 0x0000000000000000 X6 0x00000000BF0D1440 X7 0x00000000BFFFF4F4
X8 0x00000000BE856BA8 X9 0x00000000BE6B4C20 X10 0x0000000000000004 X11 0x0000000000000000
X12 0x00000000703FE07A X13 0x0000000000000000 X14 0x0000000000000000 X15 0x0000000000000000
X16 0x00000000BFFFF9D0 X17 0x0000000000000000 X18 0x0000000000000000 X19 0x00000000BE73C718
X20 0x00000000BE73D218 X21 0x0000000000000000 X22 0x0000000000000000 X23 0x0000000000000000
X24 0x0000000000000000 X25 0x0000000000000000 X26 0x0000000000000000 X27 0x0000000000000000
X28 0x0000000000000000 FP 0x00000000BFFFF590 LR 0x00000000BF0CD130

V0 0xE9B5DBA5B5C0FBCF 71374491428A2F98 V1 0xAB1C5ED5923F82A4 59F111F13956C25B
V2 0x550C7DC3243185BE 12835B01D807AA98 V3 0xC19BF1749BDC06A7 80DEB1FE72BE5D74
V4 0x240CA1CC0FC19DC6 EFBE4786E49B69C1 V5 0x76F988DA5CB0A9DC 4A7484AA2DE92C6F
V6 0xBF597FC7B00327C8 A831C66D983E5152 V7 0x1429296706CA6351 D5A79147C6E00BF3
V8 0x0000000000000000 2E1B213827B70A85 V9 0x0000000000000000 766A0ABB650A7354
V10 0x0000000000000000 A81A664BA2BFE8A1 V11 0x0000000000000000 D6990624D192E819
V12 0x0000000000000000 1E376C0819A4C116 V13 0x0000000000000000 4ED8AA4A391C0CB3
V14 0x0000000000000000 78A5636F748F82EE V15 0x0000000000000000 A4506CEB90BEFFFA
V16 0x3C83709547545153 BC990E9F897D4FA8 V17 0xBEBEF297C5EC0578 E1D99AE8C2B92607
V18 0x13242833C5F05BAB 101C24C521387481 V19 0x0A50ABCAD0BDDA12 996865483E880969
V20 0x6C4ABAA53A9BE1CB 4416D9F479B08221 V21 0x60952147C3A68574 55B8AE51435C1A1A
V22 0x9FEB2A3B4AB8D3BF 88C1883495C7F76F V23 0xD0C224BC8FB77E09 3DB8D233CF470963
V24 0x0E72963E02D21C93 C95B757DA62B3A12 V25 0x2A77DBA1E4EE5D5C E08479A1B557DFA8
V26 0xB593F86668CA8129 927A0019CDEC1A76 V27 0xFE65F137EBB957DF 22E6BD909F47C7A9
V28 0x58F6FFF27DA778DC 4DFFE172EE360F9D V29 0xF9F949DFA1EF1FF2 AE89FB77F7F7174E
V30 0xEBB7FE7A08D936A7 0EDF0FB45E9D21FF V31 0xF1D7FCA9FF9DBEF9 2B39374FF77DA9BD

SP 0x00000000BFFFF590 ELR 0x00000000BF0D784C SPSR 0x60000209 FPSR 0x00000000
ESR 0x96000006 FAR 0x00000000DDB2507E

ESR : EC 0x25 IL 0x1 ISS 0x00000006

Data abort: Translation fault, second level

Stack dump:
00000BFFFF490: 996865483E880969 0A50ABCAD0BDDA12 4416D9F479B08221 6C4ABAA53A9BE1CB
00000BFFFF4B0: 55B8AE51435C1A1A 60952147C3A68574 88C1883495C7F76F 9FEB2A3B4AB8D3BF
00000BFFFF4D0: 3DB8D233CF470963 D0C224BC8FB77E09 C95B757DA62B3A12 0E72963E02D21C93
00000BFFFF4F0: E08479A1B557DFA8 2A77DBA1E4EE5D5C 927A0019CDEC1A76 B593F86668CA8129
00000BFFFF510: 22E6BD909F47C7A9 FE65F137EBB957DF 4DFFE172EE360F9D 58F6FFF27DA778DC
00000BFFFF530: AE89FB77F7F7174E F9F949DFA1EF1FF2 0EDF0FB45E9D21FF EBB7FE7A08D936A7
00000BFFFF550: 2B39374FF77DA9BD F1D7FCA9FF9DBEF9 00000000BF0D784C 0000000060000209
00000BFFFF570: 0000000000000000 0000000096000006 00000000DDB2507E 00000000BF0CD0EC

00000BFFFF590: 00000000BFFFF5B0 00000000BF0CD130 00000000B9BFA620 00000000DDB2507E
00000BFFFF5B0: 00000000BFFFF610 00000000BA176744 00000000BE73C718 00000000BE73D218
00000BFFFF5D0: 00000000BFFFF648 00000000DDB2507E 00000000BE856B18 00000000BE86053B
00000BFFFF5F0: 00000000BE84A0A8 00000000BE372000 00000000BE372000 0000000000000000
00000BFFFF610: 00000000BFFFF870 00000000BA1768D8 0000000000000020 00000000BE371698
00000BFFFF630: 00000000DDB2507E 00000000BD9C1000 59F111F13956C25B AB1C5ED5923F82A4
00000BFFFF650: 6264696F72646E61 647261682E746F6F 6B69683D65726177 6F63203036397965
00000BFFFF670: 74743D656C6F736E 6E61203051494679 6F6F6264696F7264 6C6F736E6F632E74
ASSERT [ArmCpuDxe] /home/buildslave/workspace/96boards-reference-uefi-staging/38/edk2/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c(265): ((BOOLEAN)(0==1))

Do you know if the images in device/linaro/hikey/installer/hikey960 are obsolete?

Do you know if I need to use certain sec_xloader or other images for correct AOSP work?

https://android-review.googlesource.com/#/c/kernel/hikey-linaro/+/505547/2/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c

@ric96 it has any document? Because, I want to try to add this driver to OP-TEE.

@ric96 now, I also have hikey board. How can I install these commands output to HiKey board. 7inch screen doesn’t run.

I am trying to get the WaveShare 7" screen to work with HiKey-960. The resolution is 1024x600.

I am seeing black screen. I assume the the adv7511 driver does not support 1024x600. What changes do I have to make to get this resolution working?

I actually have one of my hikey960’s running with a 1024x600 in native resolution, so it isn’t an issue of support, however I will give you some notes on it;

  1. My 1024x600 has a scaler, so you can throw anything at it and it will display it.

  2. My 1024x600 is very insensitive to timing inaccuracies.

  3. It doesn’t work very well at 60 Hz, it flickers all over the place and has rotating bands, so I had to crank it up to 70 Hz.

  4. The place where you need to make the change is in the kernel commandline, which you can modify HERE; hikey960/BoardConfig.mk - device/linaro/hikey - Git at Google

  5. You will need to add something like this; video=HDMI-A-1:1024x600@70

  6. The Hikey960 is NOT entirely compliant with HDMI standards. The timings are off a bit. Hardware issue, nothing you can do about it. Some monitors are OK with that and will work just fine. Others will freak out and shut down. If your monitor supports multiple resolutions, try some non-native ones if you have to, and maybe you’ll get something out of it. Or maybe not.

Download and extract HDMI binaries:
$ wget https://dl.google.com/dl/android/aosp/arm-hikey960-OPR-cf4e0c80.tgz
$ tar xzf arm-hikey960-OPR-cf4e0c80.tgz
$ ./extract-arm-hikey960.sh

Please tell the latest version of HDMI binary file “arm-hikey960-XXX-*”

You do not need any external binaries package. They are now all delivered with the Android device tree (devices/linaro/hikey/…)

Trying to add external binaries package will break display output.

Thanks @doitright

I am basically looking for the files
vendor/linaro/hikey960/hisilicon/proprietary/libOMX_Core.so
vendor/linaro/hikey960/hisilicon/proprietary/lib64/libOMX_Core.so
vendor/linaro/hikey960/hisilicon/proprietary/libstagefrighthw.so
vendor/linaro/hikey960/hisilicon/proprietary/lib64/libstagefrighthw.so

How could I get those ?

There are no such files.

Could any input and idea ?
I did below commands, but still no anything output on LED HDMI monitor,
this monitor can working 1080x800@60 on Windows 10 Home,

How come hikey960 HDMI output on this monitor still black screen,
I also try 5 different monitor on offices, nothing working,

what I did is below.

  1. Enter fastboot mode by turning ON switch 1 and 3.
  2. Flash images by running the following commands:

mkdir ~/aosp
cd ~/aosp
repo init -u platform/manifest - Git at Google -b master
repo sync -j$(nproc)
wget https://dl.google.com/dl/android/aosp/arm-hikey960-OPR-cf4e0c80.tgz
tar xzf arm-hikey960-OPR-cf4e0c80.tgz
./extract-arm-hikey960.sh
. ./build/envsetup.sh
lunch hikey960-userdebug
nano device/linaro/hikey/hikey960/BoardConfig.mk

add “BOARD_KERNEL_CMDLINE += video=HDMI-A-1:1280x800@60”

make clean
make -j4
git clone kernel/hikey-linaro - Git at Google
cd hikey-linaro
git checkout -b android-hikey-linaro-4.9 origin/android-hikey-linaro-4.9
make ARCH=arm64 hikey960_defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- -j4
cp ~/Desktop/hikey-linaro/hikey-linaro/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dtb ~/Desktop/androidsource/device/linaro/hikey-kernel/hi3660-hikey960.dtb-4.9
cp ~/Desktop/hikey-linaro/hikey-linaro/arch/arm64/boot/Image.gz ~/Desktop/androidsource/device/linaro/hikey-kernel/Image.gz-hikey960-4.9
cd ~/Desktop/androidsource
make bootimage -j4
sudo fastboot flash boot out/target/product/hikey960/boot.img

cd device/linaro/hikey/installer/hikey960
./flash-all.sh

  1. Turn OFF switch 3 and power cycle the board.

I can see hikey960 doing something on blink LED, but nothing on screen.

A computer monitor at 1280x800 will probably require DVI-D signalling rather than HDMI signalling (the two display standards are electrically compatible but not protocol compatible, and the tendancy for DVI-D devices to adopt HDMI connectors makes things even more confusing).

I’m afraid I’m not very familiar with how hikey960 works with DVI-D devices (AFAIK my monitor tolerates both). Do you get an image if you adopt 1280x720@60 instead?

Hey @danielt : most of my displays actually run at 1280x800. I also have one that runs 1024x600.

@powenko : Could you provide more details about your monitor?

  • Specifically what monitor is it? (i.e., provide a link to the manufacturer or vendor’s website)
  • What is the monitor’s POWER SOURCE? I’ve found that monitors that are powered by USB will NOT work on Hikey960, since the power is not applied early enough for the monitor to be available when being probed. In this case, you will need to power the monitor externally (which can be through the 5V pin on the LS header, which is powered much earlier than the USB ports).

A lot of monitors are excessively sensitive to input clock signals, and will not activate if the signal is even slightly out of “spec”. I would imagine that your office purchases monitors in bulk, and so they are probably all the same or similar model that you tried, right? The Hikey960 puts out about 58 Hz when it should put out 60 Hz. That makes it incompatible with a lot of monitors.

I have observed a 100% compatibility with monitors using the “PCB800xxx” series of HDMI boards, which includes most ebay and aliexpress LCDs. These boards are extremely forgiving when it comes to input signals.

1 Like