Hikey960 not booting

I followed the below instructions to build android kernel for hikey960

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- -j24

cp -f hikey-linaro/arch/arm64/boot/Image.gz Image.gz-hikey960
cp -f hikey-linaro/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dtb device/linaro/hikey-kernel/hi3660-hikey960.dtb

make bootimage -j64

./mkbootimg --kernel Image.gz-hikey960 --ramdisk ${RAMDISK_IMG} --cmdline “loglevel=15 androidboot.hardware=hikey960 androidboot.selinux=permissive firmware_class.path=/system/etc/firmware” --base 0x0 --tags-addr 0x07A00000 --kernel_offset 0x00080000 --ramdisk_offset 0x07c00000 --output ${PRODUCT_OUT}/boot.img

mkdtimg -d hi3660-hikey960.dtb -s 2048 -c -o ${PRODUCT_OUT}/dt.img
echo “dt.img boot.img build finished!”

Flash the boot & dt binaries

fastboot flash boot ${PRODUCT_OUT}/boot.img
fastboot flash dts ${PRODUCT_OUT}/dt.img

But with the above steps, it is crashing during init stage :

[ 6.017341] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=7,+++
[ 6.017344] [I/hisi_pd] pd_dpm_set_typec_state = 2
[ 6.017345] [I/hisi_pd] pd_dpm_set_cc_orientation cc_orientation =0
[ 6.017357] [I/hisi_pd] [TCPC-I]usb_port_attached
[ 6.017386] [I/hisi_pd] pd_dpm_report_device_attach
[ 6.024939] mmc_host mmc1: Bus speed (slot 0) = 25000000Hz (slot req 25000000Hz, actual 25000000HZ div = 0)
[ 6.028811] mmc1: new SDIO card at address 0001
[ 6.032110] wl18xx_driver wl18xx.1.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2
[ 6.032116] wl18xx_driver wl18xx.1.auto: Falling back to user helper
[ 6.137241] uart-pl011 fff32000.serial: no DMA platform data
[ 6.143886] Freeing unused kernel memory: 3328K
[ 6.152336] init: init first stage started!
[ 6.156820] init: [libfs_mgr]dt_fstab: Skip disabled entry for partition vendor
[ 6.164166] init: [libfs_mgr]dt_fstab: Skip disabled entry for partition system
[ 6.171489] init: [libfs_mgr]ReadFstabFromDt(): failed to read fstab from dt
[ 6.178620] init: [libfs_mgr]dt_fstab: Skip disabled entry for partition vendor
[ 6.185982] init: [libfs_mgr]dt_fstab: Skip disabled entry for partition system
[ 6.193734] init: Using Android DT directory /proc/device-tree/firmware/android/
[ 6.201593] init: [libfs_mgr]dt_fstab: Skip disabled entry for partition vendor
[ 6.208986] init: [libfs_mgr]dt_fstab: Skip disabled entry for partition system
[ 6.237364] init: [libfs_mgr]Failed to open ‘/dev/block/by-name/system’: No such file or directory
[ 6.248004] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -11
[ 6.248141] Bluetooth: hci0: request_firmware failed(errno -11) for ti-connectivity/TIInit_11.8.32.bts
[ 6.248144] Bluetooth: hci0: download firmware failed, retrying…
[ 6.272797] wlcore: WARNING falling back to default config
[ 6.376298] ------------[ cut here ]------------
[ 6.380950] WARNING: CPU: 1 PID: 936 at drivers/base/firmware_class.c:1166 _request_firmware+0x754/0xa1c
[ 6.390435] Modules linked in:
[ 6.393509]
[ 6.395009] CPU: 1 PID: 936 Comm: kworker/u17:1 Tainted: G S 4.9.170-12596-gba84e672-dirty #5

Any step have i missed to do ? Also generated system.img, vendor.img and updated those bins as well

Thanks in advance

Ok, so you’re compiling a 4.9 kernel, yet the device defaults to 4.14. Everything has to match up for it to work.

I suggest that after compiling the kernel, you copy the dtb file to ANDROID_ROOT/device/linaro/hikey-kernel/hi3660-hikey960.dtb-4.9 and the Image.gz to ANDROID_ROOT/device/linaro/hikey-kernel/Image.gz-dtb-hikey960-4.9

Then do a complete Android build for kernel 4.9;
make clean
TARGET_KERNEL_USE=4.9 make -j24

And when that finishes building, go into ANDROID_ROOT/device/linaro/hikey/installer/hikey960/ and run ./flash-all.sh

Once you have that working, then you go and try out the fancier stuff.

Thank you so much, lemme try your suggestion :slight_smile:

Tried doing as you suggested, but still same problem.
Any other suggestions please ?