This is the step for me to do this thing:
- download aosp master branch code
2.add BOARD_KERNEL_CMDLINE += overlay_mgr.overlay_dt_entry=hardware_cfg_spidev0
on device/linaro/hikey/hikey960/BoardConfig.mk
3.build with hikey960-userdebug
and flash img with build
- building the kernel
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
5.update the kernel in the boot image
Copy `hi3660-hikey960.dtb` ( `arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dtb` ) to the `hikey-kernel` directory as file: `hi3660-hikey960.dtb-4.9`
Copy the Image file `(arch/arm64/boot/Image.gz-dtb` ) to the `hikey-kernel` directory as file: `Image.gz-dtb-hikey960-4.9`
and make bootimage
6.flash boot.img