This is a cache of https://discuss.96boards.org/t/installing-linux-on-hikey960/4552. It is a snapshot of the page at 2024-10-31T08:18:11.654+0000.
Installing Linux on Hikey960 - HiKey - 96Boards Forum

Installing Linux on Hikey960

I have tried a couple of links to install linux and I’m a beginner to all these boards and installations. I have tried this link and I get stuck at
https://github.com/96boards-hikey/tools-images-hikey960/blob/master/build-from-source/README-ATF-UEFI-build-from-source.md
I get stuck at step 2 and step 3. Under step 3 when I do telnet localhost 2004 , It says connection closed.

Another issue that I face is, Im unable to get serial console access to the board as it doesnt recognize the USB at all.I do not understand if there is a problem with my pc or the board.

When I connect the USB type C cable I get USB0 under dev, but now when I connect the UART port to my system, for some reason I see nothing under dev.

So I’m not able to minicom into it and neither am I able to telnet.

I do not understand if My board is corrupted or if I’m understanding the concept wrong.

My basic understanding is to install UEFI on the board first, and the use to UART port so that we can see the boot loading happening and following the links to install linux, we can install.

For some reason nothing works and any help is greatly appreciated.

Finally when I follow these steps, since I do not have my serial console working I do not know what went wrong, but after completing these steps, for some reason the board doesnt turn on.

Any help would be greatly appreciated as it is very difficult for me to understand things on my own.

This document describes how to build ATF, UEFI for HiKey960 from source, you don’t really need to follow these steps if you just want to install Linux. You can install Linux from existing snapshots (e.g. topic Is there a basic guide to installing Linux on Hikey960? - #2 by Loic).

I think the first step is having an operational UART/Serial. Do you see any trace in dmesg when plugging UART/USB ?

It worked when I changed my USB cable.

Now that I have both the USB’s dectected

/dev$ ls |grep ttyU
ttyUSB0
ttyUSB1

Is the next step having the UEFI ?

And When I run sudo minicom -b 115200 -o -D /dev/ttyUSB1 (Since USB1 is the UART cable in my PC)
I get the following screen

Welcome to minicom 2.7

OPTIONS: I18n
Compiled on Feb 7 2016, 13:37:27.
Port /dev/ttyUSB1, 09:17:33

Press CTRL-A Z for help on special keys
I have followed the steps of changing the settings of hardware flow to off, software flow to on and so on and have exited. But no screen flashes .Its just in the same screen

Also my UART jumpers are set to UART one, and no LED turns on expect the Power LED.

Could you please guide me with the next steps.

This is the output of dmesg.
[ 201.023127] do_trap: 51 callbacks suppressed
[ 201.023139] traps: pool[2119] trap int3 ip:7f37324e7a6b sp:7f370ec885b0 error:0
[ 752.273235] usb 1-2: new high-speed USB device number 5 using xhci_hcd
[ 752.458930] usb 1-2: New USB device found, idVendor=18d1, idProduct=4ee7
[ 752.458945] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 752.458955] usb 1-2: Product: ADB Gadget
[ 752.458964] usb 1-2: Manufacturer: HISILICON
[ 752.458973] usb 1-2: SerialNumber: 0123456789ABCDEF
[ 789.113609] usb 1-2: USB disconnect, device number 5
[ 819.499276] usb 1-2: new high-speed USB device number 6 using xhci_hcd
[ 819.694326] usb 1-2: New USB device found, idVendor=18d1, idProduct=4ee7
[ 819.694341] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 819.694351] usb 1-2: Product: ADB Gadget
[ 819.694360] usb 1-2: Manufacturer: HISILICON
[ 819.694368] usb 1-2: SerialNumber: 0123456789ABCDEF
[ 948.724106] usb 1-2: USB disconnect, device number 6
[ 992.978857] usb 1-2: new full-speed USB device number 7 using xhci_hcd
[ 1160.655386] usb 1-3: new full-speed USB device number 8 using xhci_hcd
[ 1160.841536] usb 1-3: New USB device found, idVendor=12d1, idProduct=3609
[ 1160.841552] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1160.841562] usb 1-3: Product: USB SER
[ 1160.841571] usb 1-3: Manufacturer: HISILICON
[ 1162.009606] usbcore: registered new interface driver usbserial
[ 1162.009621] usbcore: registered new interface driver usbserial_generic
[ 1162.009633] usbserial: USB Serial support registered for generic
[ 1162.053540] usbcore: registered new interface driver option
[ 1162.053623] usbserial: USB Serial support registered for GSM modem (1-port)
[ 1162.054006] option 1-3:1.0: GSM modem (1-port) converter detected
[ 1162.055105] usb 1-3: GSM modem (1-port) converter now attached to ttyUSB0
[ 1716.385524] wlp2s0: deauthenticating from 2c:7e:81:fb:10:5d by local choice (Reason: 3=DEAUTH_LEAVING)
[ 1717.766566] wlp2s0: authenticate with 2c:7e:81:fb:10:5d
[ 1717.772229] wlp2s0: send auth to 2c:7e:81:fb:10:5d (try 1/3)
[ 1717.779864] wlp2s0: authenticated
[ 1717.783274] wlp2s0: associate with 2c:7e:81:fb:10:5d (try 1/3)
[ 1717.788987] wlp2s0: RX AssocResp from 2c:7e:81:fb:10:5d (capab=0x431 status=0 aid=3)
[ 1717.807370] wlp2s0: associated
[ 2162.472991] usb 1-2: new full-speed USB device number 9 using xhci_hcd
[ 2162.665908] usb 1-2: New USB device found, idVendor=0403, idProduct=6015
[ 2162.665924] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2162.665934] usb 1-2: Product: FT230X 96Boards Console
[ 2162.665943] usb 1-2: Manufacturer: FTDI
[ 2162.665952] usb 1-2: SerialNumber: DA1WP5V7
[ 2163.837752] usbcore: registered new interface driver ftdi_sio
[ 2163.837877] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 2163.838183] ftdi_sio 1-2:1.0: FTDI USB Serial Device converter detected
[ 2163.838460] usb 1-2: Detected FT-X
[ 2163.841329] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB1
root@susmitha:/binaries/tools-images-hikey960#

Hello,
I have downloaded all the files and before I proceed for further steps I would want to cross check and verify if I’m doing all right.


From the link given about installing linux.

After I do this step

sudo ./hikey_idt -c config -p /dev/ttyUSB0

I have my serial cosole output as the following

Is this how it looks ?
and when I proceed to the next steps I get this outcome

root@susmitha:/home/susmitha/loiclinux# fastboot flash ptable prm_ptable.img
< waiting for device >

I have terminated with ctrl Z and have done the next steps again and I get the following.

The screen to the lest is the serial console screen and the screen to the right is my PC.

Please let me know if this looks correct

I have then turned on the board in normal boot operation and the green LED of the board turns on. Next how do I get access to the linux console? The HDMI displays nothing.

How should I get access via serial console?

This is the output on the serial console

Booting `CE Reference Platform (HiKey960 rpb)’

[ 0.308248] dmi: Firmware registration failed.
[ 0.393414] [USB3][hisi_dwc3_probe]+
[ 0.393813] [USB3][get_phy_param]eye diagram param: 0x1c466e3
[ 0.393823] [USB3][get_phy_param]eye diagram host param: 0x1c466e3
[ 0.393831] [USB3][get_phy_param]usb3_phy_cr_param: 0xb80
[ 0.393837] [USB3][get_phy_param]usb3_phy_host_cr_param: 0x980
[ 0.393844] [USB3][get_phy_param]usb3_phy_tx_vboost_lvl: 5
[ 0.393871] [USB3][get_resource]this is asic platform (fpga flag 0)
[ 0.393879] [USB3][create_attr_file]+
[ 0.393941] [USB3][create_attr_file]-
[ 0.393951] [USB3][hi3660_usb3phy_init]+
[ 0.421408] [USB3][config_femtophy_param]set hs phy param 0x1c466e3 for device
[ 0.421983] [USB3][config_femtophy_param]set ss phy rx equalization 0xb80
[ 0.422864] [USB3][config_femtophy_param]set ss RX_SCOPE_VDCC 0x1
[ 0.422872] [USB3][config_femtophy_param]set ss phy tx vboost lvl 0x5
[ 0.422880] [USB3][set_hisi_dwc3_power_flag]set hisi_dwc3_power_flag 1
[ 0.422886] [USB3][hi3660_usb3phy_init]-
[ 0.424228] dwc3 ff100000.dwc3: dwc3_host_init if otg, otg will do device_add.
[ 0.426124] [USB3][hisi_dwc3_wake_lock]usb otg wake lock
[ 0.426144] [USB3][hisi_dwc3_probe]init state: OFF
[ 0.426151] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:1
[ 0.426157] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:1
[ 0.426164] [USB3][hisi_usb_otg_event]event: 1
[ 0.426178] [USB3][hisi_dwc3_probe]-
[ 0.426181] [USB3][event_work]+
[ 0.426183] [USB3][handle_event][handle_event] type: 1
[ 0.426228] [USB3][hisi_dwc3_wake_unlock]usb otg wake unlock
[ 0.426238] [USB3][handle_event]hisi usb status: DEVICE → OFF
[ 0.426245] [USB3][event_work]-
[ 0.431422] hi3660_thermal fff30000.tsensor: failed to register thermal sensor0: -19
[ 0.431457] hi3660_thermal fff30000.tsensor: failed to register thermal sensor1: -19
[ 0.431474] hi3660_thermal fff30000.tsensor: failed to register thermal sensor2: -19
[ 0.431490] hi3660_thermal fff30000.tsensor: failed to register thermal sensor3: -19
[ 0.431532] hi3660_thermal fff30000.tsensor: failed to register thermal sensor5: -19
[ 0.552651] ufshcd-hi3660 ff3b0000.ufs: ufshcd_print_pwr_info:[RX, TX]: gear=[1, 1], lane[1, 1], pwr[SLOWAUTO_MODE, SLOWAUTO_MODE], rate = 0
[ 0.955846] ufshcd-hi3660 ff3b0000.ufs: ufshcd_print_pwr_info:[RX, TX]: gear=[3, 3], lane[1, 1], pwr[FAST MODE, FAST MODE], rate = 2
[ 0.981183] ufshcd-hi3660 ff3b0000.ufs: ufshcd_find_max_sup_active_icc_level: Regulator capability was not set, actvIccLevel=0
[ 1.389745] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:1
[ 1.395515] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:1
[ 1.401617] [E/GPIO_HUB] gpio_hub_switch_to_hub: switch to hub
[ 1.407452] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:2
[ 1.413199] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:2
[ 1.419295] [USB3][hisi_usb_otg_event]event: 2
[ 1.423748] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!+++++++++++
[ 1.423945] [USB3][event_work]+
[ 1.423947] [USB3][handle_event][handle_event] type: 2
[ 1.423950] [USB3][set_vbus_power]set port power 1
[ 1.427691] [USB3][hisi_dwc3_wake_lock]usb otg wake lock
[ 1.427694] [USB3][handle_event]hisi usb_status: OFF → HOST
[ 1.427696] [USB3][event_work]-
[ 1.458348] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!-----------
[ 1.677117] EXT4-fs (sdd10): couldn’t mount as ext3 due to feature incompatibilities
[ 1.821159] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!+++++++++++
[ 1.828646] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!-----------
[ 1.836125] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:3
[ 1.841920] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:3
[ 1.848131] [USB3][hisi_usb_otg_event]event: 3
[ 1.852648] [E/GPIO_HUB] gpio_hub_switch_to_typec: switch to typec
[ 1.852847] [USB3][event_work]+
[ 1.852853] [USB3][handle_event][handle_event] type: 3
[ 1.852859] [USB3][set_vbus_power]set port power 0
[ 1.852866] [I/hisi_pd] pd_dpm_report_bc12 : PD_WAKE_UNLOCK
[ 1.852872] [I/hisi_pd] pd_dpm_report_bc12 : event (4)
[ 1.852877] [E/hisi_pd] pd_dpm_vbus_notifier_call: pd_dpm_vbus_notifier_call!!!,++++
[ 1.852882] [dwc3_otg_work]+
[ 1.852882] evt = 1
[ 1.852886] [dwc3_otg_stop_host]+
[ 1.853024] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 1.853065] usb usb2: USB disconnect, device number 1
[ 1.853078] usb 2-1: USB disconnect, device number 2
[ 1.855577] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[ 1.855606] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 1.855633] usb usb1: USB disconnect, device number 1
[ 1.867301] Unable to handle kernel NULL pointer dereference at virtual address 00000090
[ 1.867305] Mem abort info:
[ 1.867311] Exception class = DABT (current EL), IL = 32 bits
[ 1.867315] SET = 0, FnV = 0
[ 1.867318] EA = 0, S1PTW = 0
[ 1.867321] Data abort info:
[ 1.867325] ISV = 0, ISS = 0x00000004
[ 1.867328] CM = 0, WnR = 0
[ 1.867337] user pgtable: 4k pages, 48-bit VAs, pgd = ffff8000b95fb000
[ 1.867342] [0000000000000090] *pgd=0000000000000000
[ 1.867353] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[ 1.867358] Modules linked in: ipv6
[ 1.867381] CPU: 0 PID: 1552 Comm: tcpc_timer_type Tainted: G S 4.14.0-linaro-hikey960 #1
[ 1.867385] Hardware name: HiKey960 (DT)
[ 1.867391] task: ffff8000b9d50000 task.stack: ffff00000c4c8000
[ 1.867412] PC is at xhci_irq+0x314/0x1340
[ 1.867418] LR is at xhci_irq+0x40/0x1340
[ 1.867424] pc : [] lr : [] pstate: 800001c5
[ 1.867427] sp : ffff000008003b20
[ 1.867431] x29: ffff000008003b20 x28: ffff8000b9b18228
[ 1.867440] x27: ffff000009d4d200 x26: ffff000008dbeb58
[ 1.867449] x25: ffff000009160bbb x24: ffff8000ba1d3000
[ 1.867458] x23: 0000000000000000 x22: 00000000000001c0
[ 1.867466] x21: ffff8000b9b18000 x20: ffff8000b9b18274
[ 1.867475] x19: ffff8000b9b18000 x18: 0000000000000010
[ 1.867483] x17: 0000000000000001 x16: 0000000000000019
[ 1.867491] x15: 0000000000000025 x14: 0720072007200720
[ 1.867500] x13: 0000000000000000 x12: 0000000000000025
[ 1.867508] x11: 0000000000000040 x10: ffff8000bb079940
[ 1.867517] x9 : ffff8000bb079950 x8 : 0000000000000000
[ 1.867525] x7 : ffff8000ba1d3000 x6 : 0000000000000001
[ 1.867532] x5 : 0000000000000000 x4 : ffff8000b9af1300
[ 1.867541] x3 : 0000000000000001 x2 : 0000000000000002
[ 1.867549] x1 : ffff8000b9b18000 x0 : 0000000000000003
[ 1.867560] Process tcpc_timer_type (pid: 1552, stack limit = 0xffff00000c4c8000)
[ 1.867565] Call trace:
[ 1.867574] Exception stack(0xffff0000080039e0 to 0xffff000008003b20)
[ 1.867583] 39e0: 0000000000000003 ffff8000b9b18000 0000000000000002 0000000000000001
[ 1.867591] 3a00: ffff8000b9af1300 0000000000000000 0000000000000001 ffff8000ba1d3000
[ 1.867599] 3a20: 0000000000000000 ffff8000bb079950 ffff8000bb079940 0000000000000040
[ 1.867607] 3a40: 0000000000000025 0000000000000000 0720072007200720 0000000000000025
[ 1.867615] 3a60: 0000000000000019 0000000000000001 0000000000000010 ffff8000b9b18000
[ 1.867622] 3a80: ffff8000b9b18274 ffff8000b9b18000 00000000000001c0 0000000000000000
[ 1.867631] 3aa0: ffff8000ba1d3000 ffff000009160bbb ffff000008dbeb58 ffff000009d4d200
[ 1.867640] 3ac0: ffff8000b9b18228 ffff000008003b20 ffff00000881bf70 ffff000008003b20
[ 1.867648] 3ae0: ffff00000881c244 00000000800001c5 ffff000008003af0 ffff000008003af0
[ 1.867656] 3b00: 0001000000000000 ffff00000868b144 ffff000008003b20 ffff00000881c244
[ 1.867666] [] xhci_irq+0x314/0x1340
[ 1.867678] [] usb_hcd_irq+0x2c/0x48
[ 1.867695] [] __handle_irq_event_percpu+0x9c/0x128
[ 1.867705] [] handle_irq_event_percpu+0x1c/0x58
[ 1.867714] [] handle_irq_event+0x48/0x78
[ 1.867723] [] handle_fasteoi_irq+0xa0/0x180
[ 1.867733] [] generic_handle_irq+0x24/0x38
[ 1.867742] [] __handle_domain_irq+0x5c/0xb8
[ 1.867754] [] gic_handle_irq+0x58/0xb0
[ 1.867759] Exception stack(0xffff000008003d90 to 0xffff000008003ed0)
[ 1.867766] 3d80: 0000000000000000 ffff000009033000
[ 1.867774] 3da0: 0000000000000000 000000000006cb80 0000000000000015 00ffffffffffffff
[ 1.867782] 3dc0: 0000000001c4078a 7fffffffffffffff 0000000000000020 ffff000009040380
[ 1.867790] 3de0: ffff8000bfef95b8 ffff000008a905f0 0000000000000025 0000000000000000
[ 1.867798] 3e00: 0720072007200720 0000000000000025 0000000000000019 0000000000000001
[ 1.867806] 3e20: 0000000000000010 ffff8000b9d50000 ffff000009034928 0000000000000000
[ 1.867815] 3e40: ffff00000917f680 ffff800032118000 ffff000009033000 ffff000009033000
[ 1.867823] 3e60: 0000000000000202 ffff000009059000 ffff8000b9d50000 ffff000008003ed0
[ 1.867832] 3e80: ffff00000808186c ffff000008003ed0 ffff0000080818a4 0000000040000145
[ 1.867840] 3ea0: ffff8000b9d50000 0000000000000003 0001000000000000 ffff00000917f680
[ 1.867846] 3ec0: ffff000008003ed0 ffff0000080818a4
[ 1.867854] [] el1_irq+0xb0/0x124
[ 1.867862] [] __do_softirq+0xa4/0x220
[ 1.867876] [] irq_exit+0xd0/0x108
[ 1.867884] [] __handle_domain_irq+0x60/0xb8
[ 1.867892] [] gic_handle_irq+0x58/0xb0
[ 1.867897] Exception stack(0xffff00000c4cb9a0 to 0xffff00000c4cbae0)
[ 1.867906] b9a0: 0000000000000000 ffff8000b9d50000 00008000b6eba000 ffffffffffffffff
[ 1.867914] b9c0: 0000000000000000 0000000000000000 ffff80001ad90f00 077907740720075d
[ 1.867923] b9e0: 0720073a07650770 0720072007200733 0720072007200720 0720072007200720
[ 1.867931] ba00: 0720072007200720 0720072007200720 0720072007200720 0000000000000006
[ 1.867939] ba20: 0000000000000019 0000000000000001 0000000000000010 0000000000000000
[ 1.867947] ba40: ffff000009184df8 ffff0000091a4bf8 ffff0000091a5380 0000000000000000
[ 1.867955] ba60: 0000000000000000 0000000000000140 ffff000009184e28 ffff000009059000
[ 1.867963] ba80: 000000000000003a ffff00000c4cbae0 ffff000008114bb0 ffff00000c4cbae0
[ 1.867971] baa0: ffff000008114bb4 0000000060000145 0000000000000140 ffff000009184e28
[ 1.867980] bac0: ffffffffffffffff 000000000000003a ffff00000c4cbae0 ffff000008114bb4
[ 1.867988] [] el1_irq+0xb0/0x124
[ 1.867997] [] console_unlock+0x284/0x438
[ 1.868006] [] vprintk_emit+0x260/0x2e0
[ 1.868014] [] vprintk_default+0x34/0x40
[ 1.868022] [] vprintk_func+0xf8/0x188
[ 1.868031] [] printk+0x4c/0x54
[ 1.868047] [] gpio_hub_switch_to_typec+0xa4/0xc8
[ 1.868061] [] tcpc_typec_handle_timeout+0x92c/0x11c0
[ 1.868072] [] tcpc_timer_thread+0x2a8/0x388
[ 1.868085] [] kthread+0xfc/0x128
[ 1.868097] [] ret_from_fork+0x10/0x18
[ 1.868109] Code: f9400797 34003300 7103fc1f 54004680 (b94092e5)
[ 1.868133] —[ end trace f6e740eabff70422 ]—
[ 1.868141] Kernel panic - not syncing: Fatal exception in interrupt
[ 1.868150] SMP: stopping secondary CPUs
[ 1.868396] Kernel Offset: disabled
[ 1.868403] CPU features: 0x082004
[ 1.868406] Memory Limit: none
[ 2.540656] —[ end Kernel panic - not syncing: Fatal exception in interrupt

You should have access to a console via the Serial/UART.
However here seems you meet a crash:

[ 2.540656] —[ end Kernel panic - not syncing: Fatal exception in interrupt

It seems related to usb, could you try rebooting you board without the USB-typec plugged in (but kee the UART/USB).

So just with the UART and following the same steps ?

Once your board is flashed with Linux, you can just reboot the board without restarting from scratch.

Hello,
I tried to do those steps again but it doesnt work

sudo ./hikey_idt -c config -p /dev/ttyUSB0
Config name: config
Port name: /dev/ttyUSB0
0: Image: sec_usb_xloader.img Downalod Address: 0x20000
1: Image: sec_uce_boot.img Downalod Address: 0x6a908000
2: Image: l-loader.bin Downalod Address: 0x1ac00000
Serial port open successfully!
Start downloading sec_usb_xloader.img@0x20000…
file total size 99648
downlaod address 0x20000
^Z
[2]+ Stopped sudo ./hikey_idt -c config -p /dev/ttyUSB0
susmitha@susmitha:~/loiclinux$ sudo fastboot flash ptable prm_ptable.img
< waiting for device >
^Z

Should I not do it this way ?

Asuuming my board already has linux, I get the following screen

Booting `CE Reference Platform (HiKey960 rpb)’

[ 0.305364] dmi: Firmware registration failed.
[ 0.386532] [USB3][hisi_dwc3_probe]+
[ 0.386925] [USB3][get_phy_param]eye diagram param: 0x1c466e3
[ 0.386935] [USB3][get_phy_param]eye diagram host param: 0x1c466e3
[ 0.386944] [USB3][get_phy_param]usb3_phy_cr_param: 0xb80
[ 0.386949] [USB3][get_phy_param]usb3_phy_host_cr_param: 0x980
[ 0.386957] [USB3][get_phy_param]usb3_phy_tx_vboost_lvl: 5
[ 0.386984] [USB3][get_resource]this is asic platform (fpga flag 0)
[ 0.386992] [USB3][create_attr_file]+
[ 0.387058] [USB3][create_attr_file]-
[ 0.387068] [USB3][hi3660_usb3phy_init]+
[ 0.418447] [USB3][config_femtophy_param]set hs phy param 0x1c466e3 for device
[ 0.418964] [USB3][config_femtophy_param]set ss phy rx equalization 0xb80
[ 0.419851] [USB3][config_femtophy_param]set ss RX_SCOPE_VDCC 0x1
[ 0.419858] [USB3][config_femtophy_param]set ss phy tx vboost lvl 0x5
[ 0.419867] [USB3][set_hisi_dwc3_power_flag]set hisi_dwc3_power_flag 1
[ 0.419873] [USB3][hi3660_usb3phy_init]-
[ 0.421191] dwc3 ff100000.dwc3: dwc3_host_init if otg, otg will do device_add.
[ 0.423084] [USB3][hisi_dwc3_wake_lock]usb otg wake lock
[ 0.423102] [USB3][hisi_dwc3_probe]init state: OFF
[ 0.423109] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:1
[ 0.423116] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:1
[ 0.423123] [USB3][hisi_usb_otg_event]event: 1
[ 0.423137] [USB3][hisi_dwc3_probe]-
[ 0.423140] [USB3][event_work]+
[ 0.423142] [USB3][handle_event][handle_event] type: 1
[ 0.423188] [USB3][hisi_dwc3_wake_unlock]usb otg wake unlock
[ 0.423198] [USB3][handle_event]hisi usb status: DEVICE → OFF
[ 0.423205] [USB3][event_work]-
[ 0.428352] hi3660_thermal fff30000.tsensor: failed to register thermal sensor0: -19
[ 0.428385] hi3660_thermal fff30000.tsensor: failed to register thermal sensor1: -19
[ 0.428402] hi3660_thermal fff30000.tsensor: failed to register thermal sensor2: -19
[ 0.428418] hi3660_thermal fff30000.tsensor: failed to register thermal sensor3: -19
[ 0.428459] hi3660_thermal fff30000.tsensor: failed to register thermal sensor5: -19
[ 0.528841] ufshcd-hi3660 ff3b0000.ufs: ufshcd_print_pwr_info:[RX, TX]: gear=[1, 1], lane[1, 1], pwr[SLOWAUTO_MODE, SLOWAUTO_MODE], rate = 0
[ 0.928580] ufshcd-hi3660 ff3b0000.ufs: ufshcd_print_pwr_info:[RX, TX]: gear=[3, 3], lane[1, 1], pwr[FAST MODE, FAST MODE], rate = 2
[ 0.953907] ufshcd-hi3660 ff3b0000.ufs: ufshcd_find_max_sup_active_icc_level: Regulator capability was not set, actvIccLevel=0
[ 1.385947] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:1
[ 1.391718] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:1
[ 1.397820] [E/GPIO_HUB] gpio_hub_switch_to_hub: switch to hub
[ 1.403654] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:2
[ 1.409402] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:2
[ 1.415497] [USB3][hisi_usb_otg_event]event: 2
[ 1.419954] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!+++++++++++
[ 1.420159] [USB3][event_work]+
[ 1.420161] [USB3][handle_event][handle_event] type: 2
[ 1.420164] [USB3][set_vbus_power]set port power 1
[ 1.422664] [USB3][hisi_dwc3_wake_lock]usb otg wake lock
[ 1.422668] [USB3][handle_event]hisi usb_status: OFF → HOST
[ 1.422670] [USB3][event_work]-
[ 1.454546] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!-----------
[ 1.672683] EXT4-fs (sdd10): couldn’t mount as ext3 due to feature incompatibilities
[ 1.752047] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!+++++++++++
[ 1.759541] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!-----------
[ 1.766973] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!+++++++++++
[ 1.774405] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!-----------
[ 1.781831] [E/hisi_pd] typec_unattached_power_entry:!!!+++++++++++
[ 1.788118] [E/hisi_pd] typec_unattached_power_entry:!!!-----------
[ 3.055721] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
[ 3.077109] Bluetooth: hci0: download firmware failed, retrying…
[ 3.215269] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
[ 3.224541] Bluetooth: hci0: download firmware failed, retrying…
[ 3.376361] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
[ 3.376376] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
[ 3.376377] Bluetooth: hci0: download firmware failed, retrying…
[ 3.508683] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
[ 3.535033] Bluetooth: hci0: download firmware failed, retrying…
[ 5.967365] VFS: brelse: Trying to free free buffer

Reference-Platform-Build-X11 2.2+linaro hikey960 ttyAMA6

hikey960 login:

hikey960 login:

I typed is root and I get the following console

root@hikey960:~#

Does this mean linux is installed ?
What should be my login ?

Now in order for me to do installations what commands can be used since yum and sudo apt do not work.

root@hikey960:~# perf stat
-sh: perf: not found
root@hikey960:~# apt-get install perf
-sh: apt-get: not found
root@hikey960:~# yum install perf
-sh: yum: not found
root@hikey960:~#

root@hikey960:~/sush# uname -mrs
Linux 4.14.0-linaro-hikey960 aarch64

root@hikey960:~/sush# uname -a
Linux hikey960 4.14.0-linaro-hikey960 #1 SMP PREEMPT Fri Apr 6 10:10:09 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux

Yes, you now have Linux running, congrats!

For now, only RPB snapshots are available, RPB (Reference Platform Build) is based on Yocto which is mostly configurable and customizable at buildtime. (https://github.com/96boards/meta-rpb). aptitude/apt is not included.

We do not provide Debian snapshots for Hikey960, however it is possible to get a generic arm64 Debian rootfs and make it works on Hikey960, however this requests some customization:

  1. Download Hikey960 RPB rootfs (you should already have it)

    wget http://snapshots.linaro.org/reference-platform/embedded/master/hikey960/latest/rpb/rpb-console-image-test-hikey960-20180430081127-604.rootfs.img.gz
    gunzip rpb-console-image-test-hikey960-20180430081127-604.rootfs.img.gz

  2. Download a generic arm64 debian rootfs (Linaro Releases)

    wget https://releases.linaro.org/debian/images/alip-arm64/latest/linaro-jessie-alip-20161214-98.tar.gz

  3. Create and mount your own rootfs image

    dd if=/dev/zero of=raw-debian.img bs=1 count=0 seek=2G
    mkfs.ext4 -b 4096 -F raw-debian.img
    mkdir tmp-debian
    sudo mount -o loop raw-debian.img tmp-debian

  4. Copy generic debian rootfs files to your rootfs

    tar -xzf linaro-jessie-alip-20161214-98.tar.gz
    sudo cp -a ./binary/* ./tmp-debian/

  5. Copy kernel, dtb modules and firmware from the Hikey960 RPB image to your rootfs

    simg2img rpb-console-image-hikey960-20180430081127-604.rootfs.img raw-rpb.img
    mkdir tmp-rpb
    sudo mount raw-rpb.img tmp-rpb
    cp -a tmp-rpb/boot tmp-debian
    cp -a tmp-rpb/lib/firmware tmp-debian/lib
    cp -a tmp-rpb/lib/modules tmp-debian/lib

  6. Unmount your rootfs an regenerate sparse image

    sudo umount tmp-debian
    img2simg raw-debian.img debian.img

  7. Flash the new debian rootfs

    fastboot flash system debian.img

You should now be able to boot on Debian and use apt…

Hello,
So steps 1 to 6 should be done on my Linux PC right? and when I do a fastboot, now debian image will be flash-booted onto the board. Is that how it works ?

Could you please elaborate step 3

All the steps are run from your Linux PC, yes. Once you generated your new rootfs (debian), you flash it to the board via fastboot.

This steps consist in creating your Image which will be flashed later, in order to manipulate content of the image, you need to mount it temporally.

this creates a 2G file:

dd if=/dev/zero of=raw-debian.img bs=1 count=0 seek=2G

this create a ext4 partition:

mkfs.ext4 -b 4096 -F raw-debian.img

This is just a temporary directory

mkdir tmp-debian

Mount the the image as a filesystem (so that you can browse it, copy files…)

sudo mount -o loop raw-debian.img tmp-debian

Oh okay I get it now and at step 5 I face the following issue
root@susmitha:/home/susmitha/loicdebian# simg2img rpb-console-image-hikey960-20180430081127-604.rootfs.img raw-rpb.img.gz
Cannot open input file rpb-console-image-hikey960-20180430081127-604.rootfs.img
root@susmitha:/home/susmitha/loicdebian#
Is it because of the file permissions ?

root@susmitha:/home/susmitha/loicdebian# ll
total 2669096
drwxr-xr-x 4 root root 4096 Apr 30 13:22 ./
drwxr-xr-x 110 susmitha susmitha 4096 Apr 30 12:38 …/
drwxr-xr-x 20 root root 4096 Dec 14 2016 binary/
-rw-r–r-- 1 root root 617323997 Feb 26 20:24 linaro-jessie-alip-20161214-98.tar.gz
-rw-r–r-- 1 root root 2147483648 Apr 30 13:03 raw-debian.img
-rw-r–r-- 1 root root 0 Apr 30 13:22 raw-rpb.img
-rw-r–r-- 1 root root 0 Apr 30 13:22 raw-rpb.img.gz
-rw-r–r-- 1 root root 509863302 Apr 30 04:54 rpb-console-image-test-hikey960-20180430081127-604.rootfs.img.gz
drwxr-xr-x 21 root root 4096 Apr 30 13:02 tmp-debian/

Or I think I have to untar the file and then do the step 5 command.Am I correct ?
I did try to unzip it and see yet I get this error

root@susmitha:/home/susmitha/loicdebian# ll
total 4002188
drwxr-xr-x 4 root root 4096 Apr 30 13:30 ./
drwxr-xr-x 110 susmitha susmitha 4096 Apr 30 12:38 …/
drwxr-xr-x 20 root root 4096 Dec 14 2016 binary/
-rw-r–r-- 1 root root 617323997 Feb 26 20:24 linaro-jessie-alip-20161214-98.tar.gz
-rw-r–r-- 1 root root 2147483648 Apr 30 13:03 raw-debian.img
-rw-r–r-- 1 root root 0 Apr 30 13:22 raw-rpb.img
-rw-r–r-- 1 root root 0 Apr 30 13:39 raw-rpb.img.gz
-rwxrwxrwx 1 root root 1874948352 Apr 30 04:54 rpb-console-image-test-hikey960-20180430081127-604.rootfs.img*
drwxr-xr-x 21 root root 4096 Apr 30 13:02 tmp-debian/
root@susmitha:/home/susmitha/loicdebian# simg2img rpb-console-image-hikey960-20180430081127-604.rootfs.img raw-rpb.img.gz
Cannot open input file rpb-console-image-hikey960-20180430081127-604.rootfs.img
root@susmitha:/home/susmitha/loicdebian# chmod +x rpb-console-image-test-hikey960-20180430081127-604.rootfs.img
root@susmitha:/home/susmitha/loicdebian# simg2img rpb-console-image-hikey960-20180430081127-604.rootfs.img raw-rpb.img.gz
Cannot open input file rpb-console-image-hikey960-20180430081127-604.rootfs.img
root@susmitha:/home/susmitha/loicdebian#

Yes unzip is included in step 1.

I did try those steps but I get the "Cannot open input file "

root@susmitha:/home/susmitha/debianloic# simg2img rpb-console-image-hikey960-20180430081127-604.rootfs.img raw-rpb.img
Cannot open input file rpb-console-image-hikey960-20180430081127-604.rootfs.img
root@susmitha:/home/susmitha/debianloic# mkdir tmp-rpb
root@susmitha:/home/susmitha/debianloic# sudo mount raw-rpb.img tmp-rpb
mount: /home/susmitha/debianloic/raw-rpb.img is not a block device (maybe try `-o loop’?)

Hello,
Is there a way that I can run my codes in my host Linux pc onto the hikey960 board? For example,
If i have a code which just prints hello world in my host pc, can I run that in the hikey 960 board and get the results onto my linux pc?

This is a different subject here… You need to cross-compile it for arm64/Android and push it to the targer (hikey960).

Could you please help me with step 5 since I do not understand the error.
The raw-rpb image seems to have some problem as well rpb-console-image-test-hikey960-20180430081127-604.rootfs.img* does not open.

Hence stuck at that same point

I figured out step 5 and 6. For step 7 should I keep the switches of the board in fastboot mode ?

I figured out step 5 and 6. For step 7 should I keep the switches of the board in fastboot mode ?

For the step 1, I have used this image https://snapshots.linaro.org/reference-platform/embedded/master/hikey960/latest/rpb-wayland/rpb-console-image-hikey960-20180504111435-608.rootfs.img.gz
And for some reason step 5 worked when I used this image
The test images always give me an error as to “Error opening input file”

root@susmitha:/home/susmitha/may4loic# fastboot flash system debian.img
target reported max download size of 471859200 bytes
sending sparse ‘system’ (412951 KB)…
OKAY [ 13.630s]
writing ‘system’…
OKAY [ 3.445s]
sending sparse ‘system’ (431355 KB)…
OKAY [ 14.143s]
writing ‘system’…
OKAY [ 3.194s]
sending sparse ‘system’ (452224 KB)…
OKAY [ 14.859s]
writing ‘system’…
OKAY [ 2.906s]
sending sparse ‘system’ (288809 KB)…
OKAY [ 9.228s]
writing ‘system’…
OKAY [ 1.958s]
finished. total time: 63.363s

This is what I get in my linux pc after all the steps. Now in order to login to the board, Do I have to use the HDMI cable and login, or can I login via serial console as suggested in linux installation ?

When I open the Serial console in normal boot operation I get the following error
root@susmitha:/dev# ls |grep ttyU
ttyUSB0
root@susmitha:/dev# picocom /dev/ttyUSB0 -b 115200
picocom v1.7

port is : /dev/ttyUSB0
flowcontrol : none
baudrate is : 115200
parity is : none
databits are : 8
escape is : C-a
local echo is : no
noinit is : no
noreset is : no
nolock is : no
send_cmd is : sz -vv
receive_cmd is : rz -vv
imap is :
omap is :
emap is : crcrlf,delbs,

Terminal ready
[ 54.491781] binder: 1945:1945 transaction failed 29189, size 0-0
[ 55.498128] binder: 1945:1945 transaction failed 29189, size 0-0
[ 56.504552] binder: 1945:1945 transaction failed 29189, size 0-0
[ 57.510908] binder: 1945:1945 transaction failed 29189, size 0-0
[ 58.517272] binder: 1945:1945 transaction failed 29189, size 0-0
[ 59.312801] init: starting service ‘console’…
[ 59.318007] init: property_set(“ro.boottime.console”, “59266264574”) failed: property already set
[ 59.327420] init: setpgid failed for console: Operation not permitted
[ 59.334611] init: cannot execve(’/system/bin/sh’): No such file or directory
[ 59.342748] init: Service ‘console’ (pid 1990) exited with status 127
[ 59.349208] init: Sending signal 9 to service ‘console’ (pid 1990) process group…
[ 59.356998] init: kill(1990, 9) failed: No such process
[ 59.523717] binder: 1945:1945 transaction failed 29189, size 0-0
[ 60.530101] binder: 1945:1945 transaction failed 29189, size 0-0
[ 61.536456] binder: 1945:1945 transaction failed 29189, size 0-0
[ 62.542880] binder: 1945:1945 transaction failed 29189, size 0-0
[ 63.549212] binder: 1945:1945 transaction failed 29189, size 0-0
[ 64.317877] init: starting service ‘console’…
[ 64.323031] init: property_set(“ro.boottime.console”, “64271325511”) failed: property already set
[ 64.332136] init: setpgid failed for console: Operation not permitted
[ 64.339327] init: cannot execve(’/system/bin/sh’): No such file or directory
[ 64.347466] init: Service ‘console’ (pid 1991) exited with status 127
[ 64.353925] init: Sending signal 9 to service ‘console’ (pid 1991) process group…
[ 64.361703] init: kill(1991, 9) failed: No such process
[ 64.555625] binder: 1945:1945 transaction failed 29189, size 0-0
[ 65.562008] binder: 1945:1945 transaction failed 29189, size 0-0
[ 66.568363] binder: 1945:1945 transaction failed 29189, size 0-0
[ 67.574696] binder: 1945:1945 transaction failed 29189, size 0-0
[ 68.581122] binder: 1945:1945 transaction failed 29189, size 0-0
[ 69.322935] init: starting service ‘console’…
[ 69.328100] init: property_set(“ro.boottime.console”, “69276394260”) failed: property already set
[ 69.337517] init: setpgid failed for console: Operation not permitted
[ 69.344753] init: cannot execve(’/system/bin/sh’): No such file or directory
[ 69.352852] init: Service ‘console’ (pid 1992) exited with status 127
[ 69.359309] init: Sending signal 9 to service ‘console’ (pid 1992) process group…
[ 69.367101] init: kill(1992, 9) failed: No such process
[ 69.587541] binder: 1945:1945 transaction failed 29189, size 0-0
[ 70.593918] binder: 1945:1945 transaction failed 29189, size 0-0
[ 71.600364] binder: 1945:1945 transaction failed 29189, size 0-0
[ 72.606702] binder: 1945:1945 transaction failed 29189, size 0-0
[ 73.613031] binder: 1945:1945 transaction failed 29189, size 0-0
[ 74.328010] init: starting service ‘console’…
[ 74.333170] init: property_set(“ro.boottime.console”, “74281460405”) failed: property already set
[ 74.342208] init: setpgid failed for console: Operation not permitted
[ 74.349197] init: cannot execve(’/system/bin/sh’): No such file or directory
[ 74.357448] init: Service ‘console’ (pid 1993) exited with status 127
[ 74.363906] init: Sending signal 9 to service ‘console’ (pid 1993) process group…
[ 74.371685] init: kill(1993, 9) failed: No such process
[ 74.619456] binder: 1945:1945 transaction failed 29189, size 0-0
[ 75.625821] binder: 1945:1945 transaction failed 29189, size 0-0
[ 76.632181] binder: 1945:1945 transaction failed 29189, size 0-0
[ 77.638605] binder: 1945:1945 transaction failed 29189, size 0-0
[ 78.644938] binder: 1945:1945 transaction failed 29189, size 0-0
[ 79.333070] init: starting service ‘console’…
[ 79.338231] init: property_set(“ro.boottime.console”, “79286516654”) failed: property already set
[ 79.347337] init: setpgid failed for console: Operation not permitted
[ 79.354512] init: cannot execve(’/system/bin/sh’): No such file or directory
[ 79.364536] init: Service ‘console’ (pid 1994) exited with status 127
[ 79.371013] init: Sending signal 9 to service ‘console’ (pid 1994) process group…
[ 79.378906] init: kill(1994, 9) failed: No such process
[ 79.651321] binder: 1945:1945 transaction failed 29189, size 0-0
[ 80.657708] binder: 1945:1945 transaction failed 29189, size 0-0
[ 81.664058] binder: 1945:1945 transaction failed 29189, size 0-0
[ 82.670422] binder: 1945:1945 transaction failed 29189, size 0-0
[ 83.676909] binder: 1945:1945 transaction failed 29189, size 0-0
[ 84.338205] init: starting service ‘console’…
and so on…