This is a cache of https://discuss.96boards.org/t/unable-to-boot-latest-morty-on-hkey960/6450. It is a snapshot of the page at 2024-10-31T10:29:45.121+0000.
Unable to boot latest morty on hkey960 - HiKey 960 - 96Boards Forum

Unable to boot latest morty on hkey960

I took rootfile system and boot images from
http://snapshots.linaro.org/reference-platform/embedded/morty/hikey960/170/rpb/

output:

Booting `CE Reference Platform (HiKey960 rpb)’

I/TC: Dynamic shared memory is enabled
[ 0.284473] dmi: Firmware registration failed.
[ 0.365853] [USB3][hisi_dwc3_probe]+
[ 0.366197] [USB3][get_phy_param]eye diagram param: 0x1c466e3
[ 0.366207] [USB3][get_phy_param]eye diagram host param: 0x1c466e3
[ 0.366216] [USB3][get_phy_param]usb3_phy_cr_param: 0xb80
[ 0.366222] [USB3][get_phy_param]usb3_phy_host_cr_param: 0x980
[ 0.366229] [USB3][get_phy_param]usb3_phy_tx_vboost_lvl: 5
[ 0.366255] [USB3][get_resource]this is asic platform (fpga flag 0)
[ 0.366263] [USB3][create_attr_file]+
[ 0.366322] [USB3][create_attr_file]-
[ 0.366331] [USB3][hi3660_usb3phy_init]+
[ 0.393811] [USB3][config_femtophy_param]set hs phy param 0x1c466e3 for device
[ 0.394320] [USB3][config_femtophy_param]set ss phy rx equalization 0xb80
[ 0.395265] [USB3][config_femtophy_param]set ss RX_SCOPE_VDCC 0x1
[ 0.395273] [USB3][config_femtophy_param]set ss phy tx vboost lvl 0x5
[ 0.395281] [USB3][set_hisi_dwc3_power_flag]set hisi_dwc3_power_flag 1
[ 0.395287] [USB3][hi3660_usb3phy_init]-
[ 0.396488] dwc3 ff100000.dwc3: dwc3_host_init if otg, otg will do device_add.
[ 0.398394] [USB3][hisi_dwc3_wake_lock]usb otg wake lock
[ 0.398410] [USB3][hisi_dwc3_probe]init state: OFF
[ 0.398417] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:1
[ 0.398422] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:1
[ 0.398429] [USB3][hisi_usb_otg_event]event: 1
[ 0.398444] [USB3][hisi_dwc3_probe]-
[ 0.398446] [USB3][event_work]+
[ 0.398449] [USB3][handle_event][handle_event] type: 1
[ 0.398494] [USB3][hisi_dwc3_wake_unlock]usb otg wake unlock
[ 0.398504] [USB3][handle_event]hisi usb status: DEVICE → OFF
[ 0.398511] [USB3][event_work]-
[ 0.403641] hi3660_thermal fff30000.tsensor: failed to register thermal sensor0: -19
[ 0.403673] hi3660_thermal fff30000.tsensor: failed to register thermal sensor1: -19
[ 0.403689] hi3660_thermal fff30000.tsensor: failed to register thermal sensor2: -19
[ 0.403705] hi3660_thermal fff30000.tsensor: failed to register thermal sensor3: -19
[ 0.403746] hi3660_thermal fff30000.tsensor: failed to register thermal sensor5: -19
[ 0.475512] ufshcd-hi3660 ff3b0000.ufs: ufshcd_print_pwr_info:[RX, TX]: gear=[1, 1], lane[1, 1], pwr[SLOWAUTO_MODE, SLOWAUTO_MODE], rate = 0
[ 0.567707] ufshcd-hi3660 ff3b0000.ufs: ufshcd_print_pwr_info:[RX, TX]: gear=[3, 3], lane[2, 2], pwr[FAST MODE, FAST MODE], rate = 2
[ 0.750206] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!+++++++++++
[ 0.757652] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!-----------
[ 0.765067] [E/hisi_pd] typec_unattached_power_entry:!!!+++++++++++
[ 0.772291] [E/hisi_pd] tcpci_disable_vbus_control: !!!++++++++
[ 0.778263] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=0,+++
[ 0.784136] [E/hisi_pd] typec_unattached_power_entry:!!!-----------
[ 0.790451] [E/GPIO_HUB] gpio_hub_switch_to_hub: switch to hub
[ 0.796347] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:1
[ 0.802126] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:1
[ 0.808255] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:2
[ 0.814033] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:2
[ 0.820158] [USB3][hisi_usb_otg_event]event: 2
[ 0.824893] [USB3][event_work]+
[ 0.828092] [USB3][handle_event][handle_event] type: 2
[ 0.833255] [USB3][set_vbus_power]set port power 1
[ 0.841111] [USB3][hisi_dwc3_wake_lock]usb otg wake lock
[ 0.846452] [USB3][handle_event]hisi usb_status: OFF → HOST
[ 0.852118] [USB3][event_work]-
[ 2.078086] ufshcd-hi3660 ff3b0000.ufs: ufshcd_query_flag: Sending flag query for idn 3 failed, err = -11
[ 3.615117] ufshcd-hi3660 ff3b0000.ufs: ufshcd_query_flag: Sending flag query for idn 3 failed, err = -11
[ 5.151108] ufshcd-hi3660 ff3b0000.ufs: ufshcd_query_flag: Sending flag query for idn 3 failed, err = -11
[ 5.160791] ufshcd-hi3660 ff3b0000.ufs: ufshcd_query_flag_retry: query attribute, opcode 5, idn 3, failed with error -11 after 3 retires
[ 6.687105] ufshcd-hi3660 ff3b0000.ufs: __ufshcd_query_descriptor: opcode 0x01 for idn 8 failed, index 0, err = -11
[ 8.222064] ufshcd-hi3660 ff3b0000.ufs: __ufshcd_query_descriptor: opcode 0x01 for idn 8 failed, index 0, err = -11
[ 9.759114] ufshcd-hi3660 ff3b0000.ufs: __ufshcd_query_descriptor: opcode 0x01 for idn 8 failed, index 0, err = -11
[ 9.769665] ufshcd-hi3660 ff3b0000.ufs: ufshcd_read_desc_param: Failed reading descriptor. desc_id 8, desc_index 0, param_offset 0, ret -11
[ 9.782228] ufshcd-hi3660 ff3b0000.ufs: ufshcd_init_icc_levels: Failed reading power descriptor.len = 98 ret = -11
‘’’

^H[ 31.007173] ufshcd-hi3660 ff3b0000.ufs: ufshcd_print_pwr_info:[RX, TX]: gear=[1, 1], lane[1, 1], pwr[SLOWAUTO_MODE, SLOWAUTO_MODE], rate = 0
[ 31.020741] ufshcd-hi3660 ff3b0000.ufs: UPIU[0] - issue time 9791104 us
[ 31.027360] ufshcd-hi3660 ff3b0000.ufs: UPIU[0] - Transfer Request Descriptor phys@0xdf058000
[ 31.035898] UPIU TRD: 00000000: 15000000 00000000 0000000f 00000000
[ 31.042164] UPIU TRD: 00000010: df040000 00000000 00800080 01000001
[ 31.048428] ufshcd-hi3660 ff3b0000.ufs: UPIU[0] - Request UPIU phys@0xdf040000
[ 31.055651] UPIU REQ: 00000000: 00d04001 00000000 00000000 24000000
[ 31.061916] UPIU REQ: 00000010: 00000012 00000024 00000000 00000000
[ 31.068181] ufshcd-hi3660 ff3b0000.ufs: UPIU[0] - Response UPIU phys@0xdf040200
[ 31.075490] UPIU RSP: 00000000: 00000000 00000000 00000000 00000000
[ 31.081755] UPIU RSP: 00000010: 00000000 00000000 00000000 00000000
[ 31.088020] UPIU RSP: 00000020: 00000000 00000000 00000000 00000000
[ 31.094284] UPIU RSP: 00000030: 00000000
[ 31.098203] ufshcd-hi3660 ff3b0000.ufs: UPIU[0] - PRDT - 1 entries phys@0xdf040400
[ 31.105860] UPIU PRDT: 00000000: 1954df00 00000002 00000000 00000023
[ 31.213538] ufshcd-hi3660 ff3b0000.ufs: ufshcd_print_pwr_info:[RX, TX]: gear=[3, 3], lane[2, 2], pwr[FAST MODE, FAST MODE], rate = 2

What am I doing incorrect. Thank you for your help in advance.

Could you confirm which ufs model you are using? AFAIK, the hynix UFS chip has one potential timing issue so there have patch to fix it [1], so it’s good to check if the ufs failure is impacted by this issue.

[1] LKML: John Stultz: [PATCH v3] scsi: ufs: Fix hynix ufs bug with quirk on hi36xx SoC

Atleast I was able to boot and go to login. Thanks for your help. When I connect my hdmi and run "startx’ I dont see anything in display.

root@hikey960:~# startx
hostname: hikey960: Unknown host
xauth: file /home/root/.serverauth.3008 does not exist

X.Org X Server 1.19.3
Release Date: 2017-03-15
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-138-generic x86_64
Current Operating System: Linux hikey960 4.14.0-linaro-hikey960+ #2 SMP PREEMPT Thu Nov 15 01:21:03 UTC 2018 aarch64
Kernel command line: BOOT_IMAGE=/boot/Image console=tty0 console=ttyAMA6,115200n8 root=/dev/sdd10 rootwait rw quiet efi=noruntime
Build Date: 14 November 2018 01:21:05AM

Current version of pixman: 0.34.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (–) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: “/var/log/Xorg.0.log”, Time: Wed Nov 14 00:32:11 2018
(==) Using system config directory “/usr/share/X11/xorg.conf.d”
gbm: failed to open any driver (search paths /usr/lib64/dri)
gbm: Last dlopen error: /usr/lib64/dri/kirin_dri.so: cannot open shared object file: No such file or directory
failed to load driver: kirin
gbm: failed to open any driver (search paths /usr/lib64/dri)
gbm: Last dlopen error: /usr/lib64/dri/kms_swrast_dri.so: cannot open shared object file: No such file or directory
failed to load driver: kms_swrast
EGL_MESA_drm_image required.
[ 34.924200] [drm:dss_irq_handler] ERROR ldi underflow!
[ 34.967618] [drm:dss_irq_handler] ERROR ldi underflow!
/etc/X11/xinit/xinitrc: line 51: twm: command not found
/etc/X11/xinit/xinitrc: line 52: xclock: command not found
Warning: locale not supported by Xlib, locale set to C
Warning: X locale modifiers not supported, using default
Warning: locale not supported by Xlib, locale set to C
Warning: X locale modifiers not supported, using default
Warning: locale not supported by Xlib, locale set to C
Warning: X locale modifiers not supported, using default
xterm: xterm: xterm: cannot load font “-Misc-Fixed-bold-R---13-120-75-75-C-60-ISO8859-1”
cannot load font “-Misc-Fixed-bold-R---13-120-75-75-C-60-ISO8859-1”
cannot load font “-Misc-Fixed-bold-R---13-120-75-75-C-60-ISO8859-1”
xterm: xterm: Failed to open input method
Failed to open input method
xterm: Failed to open input method

Hi,

Currently there is no support for HDMI and there is no support for HDMI driver now afaik. So, the x-server won’t be able to setup a display and start. In your output you can see it is failing to open any driver.

Hi,

Please check if below two discussions are helpful for HDMI enabling, though the discussion are based on Debian Rootfs, but it also uses /dev/fbdev for displaying:

Hi
I built latest morty updating ufs.patch. still not able to boot. if i remove device tree from grub commandline, i am able to login but video will not work because /dev/fb0 is not created. below is the boot log i see when i try to boot with devicetree

Booting `CE Reference Platform (HiKey960 rpb-eglfs)’

[ 0.284910] dmi: Firmware registration failed.
[ 0.366041] [USB3][hisi_dwc3_probe]+
[ 0.366386] [USB3][get_phy_param]eye diagram param: 0x1c466e3
[ 0.366395] [USB3][get_phy_param]eye diagram host param: 0x1c466e3
[ 0.366402] [USB3][get_phy_param]usb3_phy_cr_param: 0xb80
[ 0.366408] [USB3][get_phy_param]usb3_phy_host_cr_param: 0x980
[ 0.366416] [USB3][get_phy_param]usb3_phy_tx_vboost_lvl: 5
[ 0.366442] [USB3][get_resource]this is asic platform (fpga flag 0)
[ 0.366450] [USB3][create_attr_file]+
[ 0.366511] [USB3][create_attr_file]-
[ 0.366521] [USB3][hi3660_usb3phy_init]+
[ 0.398055] [USB3][config_femtophy_param]set hs phy param 0x1c466e3 for device
[ 0.398636] [USB3][config_femtophy_param]set ss phy rx equalization 0xb80
[ 0.399524] [USB3][config_femtophy_param]set ss RX_SCOPE_VDCC 0x1
[ 0.399531] [USB3][config_femtophy_param]set ss phy tx vboost lvl 0x5
[ 0.399540] [USB3][set_hisi_dwc3_power_flag]set hisi_dwc3_power_flag 1
[ 0.399546] [USB3][hi3660_usb3phy_init]-
[ 0.400867] dwc3 ff100000.dwc3: dwc3_host_init if otg, otg will do device_add.
[ 0.402761] [USB3][hisi_dwc3_wake_lock]usb otg wake lock
[ 0.402777] [USB3][hisi_dwc3_probe]init state: OFF
[ 0.402784] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:1
[ 0.402790] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:1
[ 0.402798] [USB3][hisi_usb_otg_event]event: 1
[ 0.402813] [USB3][hisi_dwc3_probe]-
[ 0.402816] [USB3][event_work]+
[ 0.402818] [USB3][handle_event][handle_event] type: 1
[ 0.402863] [USB3][hisi_dwc3_wake_unlock]usb otg wake unlock
[ 0.402873] [USB3][handle_event]hisi usb status: DEVICE → OFF
[ 0.402880] [USB3][event_work]-
[ 0.407978] hi3660_thermal fff30000.tsensor: failed to register thermal sensor0: -19
[ 0.408010] hi3660_thermal fff30000.tsensor: failed to register thermal sensor1: -19
[ 0.408027] hi3660_thermal fff30000.tsensor: failed to register thermal sensor2: -19
[ 0.408043] hi3660_thermal fff30000.tsensor: failed to register thermal sensor3: -19
[ 0.408084] hi3660_thermal fff30000.tsensor: failed to register thermal sensor5: -19
[ 0.501159] ufshcd-hi3660 ff3b0000.ufs: ufshcd_print_pwr_info:[RX, TX]: gear=[1, 1], lane[1, 1], pwr[SLOWAUTO_MODE, SLOWAUTO_MODE], rate = 0
[ 0.655606] ufshcd-hi3660 ff3b0000.ufs: ufshcd_print_pwr_info:[RX, TX]: gear=[3, 3], lane[2, 2], pwr[FAST MODE, FAST MODE], rate = 2
[ 0.655877] ufshcd-hi3660 ff3b0000.ufs: ufshcd_find_max_sup_active_icc_level: Regulator capability was not set, actvIccLevel=0
[ 0.718278] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:1
[ 0.724055] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:1
[ 0.730159] [E/GPIO_HUB] gpio_hub_switch_to_hub: switch to hub
[ 0.735994] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:2
[ 0.741742] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:2
[ 0.747839] [USB3][hisi_usb_otg_event]event: 2
[ 0.752288] [USB3][event_work]+
[ 0.752293] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!+++++++++++
[ 0.752295] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!-----------
[ 0.770353] [USB3][handle_event][handle_event] type: 2
[ 0.775507] [USB3][set_vbus_power]set port power 1
[ 0.782559] [USB3][hisi_dwc3_wake_lock]usb otg wake lock
[ 0.787896] [USB3][handle_event]hisi usb_status: OFF → HOST
[ 0.793569] [USB3][event_work]-
[ 0.899492] EXT4-fs (sdd10): couldn’t mount as ext3 due to feature incompatibilities
[ 0.900711] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!+++++++++++
[ 0.900714] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!-----------
[ 0.900743] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:3
[ 0.900745] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:3
[ 0.900748] [USB3][hisi_usb_otg_event]event: 3
[ 0.900770] [E/GPIO_HUB] gpio_hub_switch_to_typec: switch to typec
[ 0.900772] [USB3][event_work]+
[ 0.900773] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:0
[ 0.900775] [USB3][handle_event][handle_event] type: 3
[ 0.900777] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:0
[ 0.900779] [USB3][set_vbus_power]set port power 0
[ 0.900780] [USB3][hisi_usb_otg_event]event: 0
[ 0.900790] [E/hisi_pd] pd_dpm_vbus_notifier_call: pd_dpm_vbus_notifier_call!!!,++++
[ 0.900795] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!+++++++++++
[ 0.900796] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!-----------
[ 0.945113] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=3,+++
[ 0.945118] [E/hisi_pd] pd_dpm_vbus_notifier_call: pd_dpm_vbus_notifier_call!!!,++++
[ 0.945123] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=7,+++
[ 1.067090] [USB3][hisi_dwc3_wake_unlock]usb otg wake unlock
[ 1.072839] [USB3][handle_event]hiusb_status: HOST → OFF
[ 1.078324] [USB3][handle_event][handle_event] type: 0
[ 1.390113] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=6,+++
[ 1.393932] [USB3][detect_charger_type]DCD done
[ 1.400725] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=5,+++
[ 1.406669] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=3,+++
set source
last_keypoint0,reboot_type0
secdbg not DCU.
SecDbgVer exit

I am new to hikey960. from last 10 days i am trying to bring up the board with linux without success. can anyone please help…

Hi,

Could you confirm you can boot system with debian building images [1]? Maybe it’s good firstly to confirm if the board is healthy or not by using prebuilt images.

Sorry about that.

It might be the system is stuck and you could see the last four lines seems the output log from firmware but not the kernel. Could you confirm you are using Hisilicon legacy booting images or UEFI/ARM-TF open sourced boot images? I suggest you could use the latest UEFI/ARM-TF images [2].

The root FS has not been mounted successfully. Have you flashed rootFS to ‘system’ partition with below command:

sudo fastboot flash system xxx.img

[1] https://snapshots.linaro.org/96boards//hikey/linaro/debian/latest/
[2] https://snapshots.linaro.org/96boards/reference-platform/components/uefi-staging/latest/hikey960/debug/

Hi Leo-yan,

Thanks for the reply :slight_smile:

I confirmed, Debian image works fine. I wanted RPB because i need to remove some modules and evaluate this board for our qt application.

I am using the bootloader binaries built in master branch as bootloader binaries from Morty is not working while flasing prm_ptable.img. befory applying the ufs patch it used to get stuck as posted in original post. but after applying patch i can see kernel logs appearing if i remove “quiet” from kernel command line. also when i remove devicetree command from grub, i can login successfully only problem is /dev/fb0 will not get created so i can’t run my qt GUI applications.

yes I flashed the system partition correctly. i can see this log even in debian image but it boots properly.

I have built and tested on master branch and i can see same problem here also.

incidentally i set my dip pins to fastmode and forgot that it is continuously rebooting by chance sometimes device is coming up successfully and i can login successfully. may in one time in 20 to 30 reboots its coming up. i am continuing like this for now :frowning:

Try to pass something like “video=HDMI-A-1:1280x800@60” (I use it for my 24 inch monitor) via cmdline.

this is always part of my kernel commandline.
/dev/fb0 will not get created even when i pass this option without grub command
devicetree /boot/hi3660-hikey960.dtb