Hikey960 linux 4.14 kernel hangs on Freeing unused kernel memory: 1792K

hi,
I am using the 4.14 Linux kernel, but after compiled and flashed, the kernel will hang on the Freeing unused kernel memory: 1792K. The kernel is from ‘git clone kernel/hikey-linaro - Git at Google’ origin/android-hikey-linaro-4.14.

[ 4.887998] mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[ 4.914545] dwmmc_k3 ff37f000.dwmmc1: ‘num-slots’ was deprecated.
[ 4.920652] dwmmc_k3 ff37f000.dwmmc1: fifo-depth property not found, using value of FIFOTH register as default
[ 4.932789] dwmmc_k3 ff37f000.dwmmc1: IDMAC supports 64-bit address mode.
[ 4.943388] dwmmc_k3 ff37f000.dwmmc1: Using internal DMA controller.
[ 4.949767] dwmmc_k3 ff37f000.dwmmc1: Version ID is 270a
[ 4.955091] dwmmc_k3 ff3ff000.dwmmc2: card claims to support voltages below defined range
[ 4.963320] dwmmc_k3 ff37f000.dwmmc1: DW MMC controller at irq 55,32 bit host data width,64 deep fifo
[ 4.973321] input: keys as /devices/platform/keys/input/input0
[ 4.979752] dwmmc_k3 ff37f000.dwmmc1: ‘num-slots’ was deprecated.
[ 4.985876] dwmmc_k3 ff37f000.dwmmc1: fifo-depth property not found, using value of FIFOTH register as default
[ 4.995896] rtc-pl031 fff04000.rtc: setting system clock to 1970-01-01 01:37:53 UTC (5873)
[ 4.998033] dwmmc_k3 ff37f000.dwmmc1: IDMAC supports 64-bit address mode.
[ 5.004552] dwmmc_k3 ff37f000.dwmmc1: Using internal DMA controller.
[ 5.004559] dwmmc_k3 ff37f000.dwmmc1: Version ID is 270a
[ 5.004586] dwmmc_k3 ff37f000.dwmmc1: DW MMC controller at irq 55,32 bit host data width,32 deep fifo
[ 5.032278] ALSA device list:
[ 5.035254] No soundcards found.
[ 5.038863] uart-pl011 fff32000.serial: no DMA platform data
[ 5.045111] Freeing unused kernel memory: 1792K

hi,
I re-compiled the whole android source code with "TARGET_KERNEL_USE=4.14 -j24 ” after that, it can boot further, but still cannot successfully boot from 4.14. the log as below.

[ 5.608364] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=6,+++
[ 5.608371] [I/hisi_pd] pd_dpm_handle_pe_event unkonw event
[ 5.608645] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=5,+++
[ 5.608653] Pending event is same → ignore this event 2
[ 5.608782] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=3,+++
[ 6.226042] Freeing unused kernel memory: 3648K
[ 6.240294] init: init first stage started!
[ 6.245217] init: Using Android DT directory /proc/device-tree/firmware/android/
[ 6.253528] init: [libfs_mgr]dt_fstab: Skip disabled entry for partition vendor
[ 6.261240] init: [libfs_mgr]dt_fstab: Skip disabled entry for partition system
[ 6.268762] init: [libfs_mgr]fs_mgr_read_fstab_dt(): failed to read fstab from dt
[ 6.276534] init: Failed to read fstab from device tree
[ 6.281880] init: Reboot start, reason: reboot, rebootTarget: bootloader
[ 6.288747] init: property_set(“persist.sys.boot.reason”, “reboot”) failed: __system_property_add failed
[ 6.298533] init: Shutdown timeout: 6000 ms
[ 6.302860] init: terminating init services
[ 6.348905] hci-ti serial0-0: Direct firmware load for ti-connectivity/TIInit_11.8.32.bts failed with error -2
[ 6.359054] hci-ti serial0-0: Falling back to user helper
[ 6.408889] Bluetooth: hci0: request_firmware failed(errno -11) for ti-connectivity/TIInit_11.8.32.bts
[ 6.409162] wl18xx_driver wl18xx.0.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2
[ 6.409172] wl18xx_driver wl18xx.0.auto: Falling back to user helper
[ 6.435585] Bluetooth: hci0: download firmware failed, retrying…
[ 6.567996] hci-ti serial0-0: Direct firmware load for ti-connectivity/TIInit_11.8.32.bts failed with error -2
[ 6.578150] hci-ti serial0-0: Falling back to user helper
[ 10.311917] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=6,+++
[ 10.317935] [I/hisi_pd] pd_dpm_handle_pe_event unkonw event
[ 10.324215] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=5,+++
[ 10.330214] Pending event is same → ignore this event 2
[ 10.335896] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=3,+++
[ 15.044547] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=6,+++
[ 15.050562] [I/hisi_pd] pd_dpm_handle_pe_event unkonw event
[ 15.056839] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=5,+++
[ 15.062839] Pending event is same → ignore this event 2
[ 15.068548] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=3,+++
[ 19.775601] [I/hisi_pd] PE:TYPE-C Only Charger!
[ 19.780384] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=3,+++
[ 19.786384] [I/hisi_pd] pd_dpm_report_pd_sink_vbus : Sink 5000 mV, 500 mA
[ 19.793358] [E/hisi_pd] pd_dpm_vbus_notifier_call: pd_dpm_vbus_notifier_call!!!,++++
[ 19.801306] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=8,+++

There’s your problem.

Try reading this to understand the nature of the problem: Bootloop in db410c for Linaro AOSP using custom Kernel - #3 by asssanti

thanks, I will try tomorrow.

hi,
After fixed the dts, now it can boot, but there is died loop print. it is really noisy.
how to kill this damned loop print.

[ 32.642031] init: starting service ‘zygote’…
[ 32.650188] type=1400 audit(703.911:673): avc: denied { create } for pid=1 comm=“init” name=“cgroup.procs” scontext=u:r:init:s0 tcontext=u:object_r:cgroup:s0 tclass=file permissive=0
[ 32.654921] init: Created socket ‘/dev/socket/zygote’, mode 660, user 0, group 1000
[ 32.655836] init: starting service ‘netd’…
[ 32.658077] audit: audit_lost=663 audit_rate_limit=5 audit_backlog_limit=64
[ 32.658083] audit: rate limit exceeded
[ 32.663538] init: Created socket ‘/dev/socket/netd’, mode 660, user 0, group 1000
[ 32.664897] init: Created socket ‘/dev/socket/dnsproxyd’, mode 660, user 0, group 3003
[ 32.665984] init: Created socket ‘/dev/socket/mdns’, mode 660, user 0, group 1000
[ 32.666929] init: Created socket ‘/dev/socket/fwmarkd’, mode 660, user 0, group 3003
[ 32.711545] init: starting service ‘surfaceflinger’…
[ 32.715471] init: Failed to bind socket ‘pdx/system/vr/display/client’: No such file or directory
[ 32.715505] init: starting service ‘wificond’…
[ 32.740118] type=1400 audit(708.927:761): avc: denied { dac_read_search } for pid=1 comm=“init” capability=2 scontext=u:r:init:s0 tcontext=u:r:init:s0 tclass=capability permissive=0
[ 32.756954] type=1400 audit(708.931:764): avc: denied { dac_read_search } for pid=1 comm=“init” capability=2 scontext=u:r:init:s0 tcontext=u:r:init:s0 tclass=capability permissive=0 duplicate messages suppressed
[ 32.776047] type=1400 audit(708.931:765): avc: denied { create } for pid=1 comm=“init” name=“cgroup.procs” scontext=u:r:init:s0 tcontext=u:object_r:cgroup:s0 tclass=file permissive=0
[ 32.875848] logd: logdr: UID=1000 GID=1003 PID=2541 n tail=50 logMask=8 pid=2514 start=0ns timeout=0ns
[ 32.886011] logd: logdr: UID=1000 GID=1003 PID=2541 n tail=50 logMask=1 pid=2514 start=0ns timeout=0ns
[ 32.904855] logd: logdr: UID=1000 GID=1003 PID=2541 n tail=0 logMask=8 pid=2514 start=0ns timeout=0ns
[ 32.914910] logd: logdr: UID=1000 GID=1003 PID=2541 n tail=0 logMask=1 pid=2514 start=0ns timeout=0ns

Could you reflash vendor.img? Now vendor.img has dependency with different kernel versions for WIFI and HDMI, so after you use new kernel version, please reflash vendor.img as well.

thanks leo-yan.
do you know where is vendor.img?
I am using android which is pre-downloaded and compiled. I just want to update kernel. so only flashed below images:

           fastboot flash boot out/target/product/hikey960/boot.img              
           fastboot flash dts out/target/product/hikey960/dt.img               
            fastboot flash system out/target/product/hikey960/system.img            
            fastboot flash cache out/target/product/hikey960/cache.img  
            fastboot flash userdata out/target/product/hikey960/userdata.img

hi, leo-yan
I noticed that vendor.img is required for the latest AOSP. But I am still using the old one which downloaded last year. Since I did lots of changes based on this one. I want to keep this, don’t want to update.
do you know if I can flash the vendor.img from https://snapshots.linaro.org/96boards//hikey960/linaro/aosp-master/latest/?
Thanks.

So are you using latest 4.14 kernel + old AOSP code base (based on last year’s)?

Please note, the snapshot build in upper linkage is built for kernel 4.9 so the vendor.img in the snapshot folder is compatible with kernel 4.9 but not with kernel 4.14.

I think the vendor.img is recently introduced and used on Hikey960, if you are using old AOSP code, it might not use vendor.img at all due the old AOSP code base doesn’t support vendor.img.

yes, I am now using the Android source code downloaded last year.
and now I only want to update its linux kernel to 4.14. seems this doesn’t work.