How can we deploy latest image with UEFI on hikey960?

upon highlighting *CE Reference Platform (HiKey960 rpb) press e, what output is there?

This is the output:

/----------------------------------------------------------------------------
|setparams ‘CE Reference Platform (HiKey960 rpb)’ |
| |
| linux /boot/Image console=tty0 console=ttyAMA6,115200n8 root=/dev/sdd10|
| rootwait rw quiet efi=noruntime |
| devicetree /boot/hi3660-hikey960.dtb

that seems fine to me, can you re flash both the boot.img and rpb.img again.
if the issue persists I’ll try it on my hk960 later today

@ric96
Same error again after reflashing.

Thanks for all the help till now, and if you could check on your end and confirm, that would be great.
Thanks again.
Waiting for your update.

yup, i’m getting the same error on build 79

error: file `/boot/Image' not found.
error: file `/boot/hi3660-hikey960.dtb' not found.

Press any key to continue...

However Build 76 seems to be working fine
https://builds.96boards.org/snapshots/reference-platform/openembedded/morty/hikey960/rpb/76/
some issue with build 79

1 Like

@ric96 Thank you for the quick update and solution. Works fine for me now.

@ric96 On a related note, can i find the source repo on which these builds are running?
https://builds.96boards.org/snapshots/reference-platform/openembedded/morty/hikey960/rpb/76/
Like a git repo from where I can download the source?

you can go through this

I fixed that issue by creating a symbolic link in include/uapi to asm-generic:

ln -rs include/uapi/asm-generic include/uapi/asm

Ric96,

Thanks for all your posts. I was able to follow your instructions and installed UEFI on hikey960. Specifically I used the release version and build 25, http://builds.96boards.org/snapshots/reference-platform/components/uefi-staging/25/hikey960/release/

Then I followed your instructions here to flash boot and console image from build 76. However I got the following output on console screen and it seems stuck there forever. Do you have any ideas?

EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services and installing virtual address map...

I also tried build 78 and 79 which gives “not found” errors.

Would appreciate any pointers!

Please try more recent builds from
http://snapshots.linaro.org/reference-platform/embedded/morty/hikey960/

Just tried snapshot 100 (8/8). It hangs with one liner:

Booting `CE Reference Platform (HiKey960 rpb)'

What is your last known working setup?

I’m looking over my steps and cannot really find anything that is suspcious. Maybe I should debug version of UEFI?

Thanks!

Also, when linux starts up, is the serial console baud rate still at 115200 as the UEFI?

yes

I haven’t tried oe builds in a while, maybe @leo-yan can help…

So I switched to UEFI debug build. It pretty much hangs at the same location, but with 2 extra output lines. Maybe that gives someone a clue? Would really appreciate.

  Booting `CE Reference Platform (HiKey960 rpb)'

  Loading driver at 0x000B789E000 EntryPoint=0x000B8712440
  Loading driver at 0x000B789E000 EntryPoint=0x000B8712440

The recommended version for sec_xloader.img is 23, latter uefi-staging versions are reported as bad.

Thanks for the pointer, Loic. Unfortunately the results are same for build 23, at least in my case.

However, I did discover something interesting. After the step “sudo ./hikey_idt -c config -p /dev/ttyUSB1”, if I don’t press “f” to enter fastboot mode, it seems to go through normal boot up sequence and I got a bunch of what appears to be kernel messages (see some of them below). However, I still don’t get to console mode. Any more ideas?

[ 484.218635] [E/GPIO_HUB] gpio_hub_switch_to_hub: switch to hub
[ 484.775777] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!++++++++
[ 484.785466] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!--------
[ 484.952205] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!++++++++
[ 484.961807] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!--------
[ 484.971363] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!++++++++
[ 484.980903] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!--------
[ 484.990404] [E/hisi_pd] typec_unattached_power_entry:!!!+++++++++++
[ 484.998752] [E/hisi_pd] typec_unattached_power_entry:!!!-----------
[ 485.029662] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!++++++++
[ 485.039172] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!--------
[ 485.048659] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!++++++++
[ 485.058115] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!--------
[ 485.067548] [E/hisi_pd] typec_unattached_power_entry:!!!+++++++++++
[ 485.075837] [E/hisi_pd] typec_unattached_power_entry:!!!-----------
[ 485.671450] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!++++++++
[ 485.680911] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!--------
[ 485.690334] [E/GPIO_HUB] gpio_hub_switch_to_typec: switch to typec
[ 485.698625] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!++++++++
[ 485.708169] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!--------
[ 485.862750] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=2,+++
[ 485.870715] [E/hisi_pd] pd_dpm_vbus_notifier_call: pd_dpm_vbus_notifier_call+
[ 486.115214] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!++++++++
[ 486.124802] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!--------
[ 486.134405] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=7,+++
[

I think Loic has tried the booting images in the folder: http://snapshots.linaro.org/reference-platform/embedded/morty/hikey960/latest/rpb/bootloader/.

At my side, I tried two versions booting images:
http://builds.96boards.org/snapshots/reference-platform/components/uefi-staging/25/hikey960/release/
http://builds.96boards.org/snapshots/reference-platform/components/uefi-staging/23/hikey960/release/
Both cannot boot up successfully :frowning:

As another alternative solution, you can use all images in the 25 folder except the bad sec_xloader.img, you could rollback to use sec_xloader.img in 23 folder.

Thanks to everybody’s help, I was able to get it working with both console version and desktop version. I needed to run some browser benchmarks and thus really needed desktop version.

Here are some recap of the whole process so that others can duplicate exactly.

  • Download UEFI build from latest snapshot 100 (not UEFI stagging build which is 1 month older), http://snapshots.linaro.org/reference-platform/embedded/morty/hikey960/100/rpb/bootloader/

  • Follow previous instruction to install UEFI, Install UEFI on HiKey960 from Binaries [Instructions].

  • Note you don’t need to git clone image tools. All files are already present in the bootloader/ folder downloaded in the previous step

  • Download latest boot-.img and rpb-console-.rootfs.img.gz or rpb-desktop*.img.gz files. Unzip the rootfs images.

  • http://snapshots.linaro.org/reference-platform/embedded/morty/hikey960/100/rpb/

  • Use “sudo fastboot flash boot|system …” to flash them respectively. Reboot and it should be good to go.

  • On desktop version, you need to create the following file before executing “startx”

  • /usr/share/X11/xorg.conf.d/42-fbdev.conf

    Section “Device”
    Identifier “hikey960-fbdev”
    Driver “fbdev”
    Option “fbdev” “/dev/fb0”
    EndSection

  • twm is not present, but you can use x-window-manager (/etc/X11/xinit/xinitrc)

  • You can auto start X window by changing to “ExecStart=/usr/bin/startx” in /etc/systemd/system/display-manager.service

Hope that helps anyone who wants to try.

6 Likes

@juliansun Thanks for sharing , nice summary.