Hi all,
I already worked for quite a while with the Hikey960 board and mainly ran OP-TEE on it.
Today, I changed the OP-TEE core code in a way that led to a kernel panic during the OP-TEE boot process.
The problem was that I was not able to reflash a correct OP-TEE image on the board. Even after reflashing the hikey firmware (https://github.com/96boards-hikey/tools-images-hikey960 the board always booted the faulty OP-TEE image.
My guess was that the old OP-TEE image was not properly overwritten during the flash process so I tried to use āfastboot eraseā on the cache, userdata and system partitions of the board before flashing the hikey firmware.
This was probably not the best idea because now every time I try to run OP-TEE I am stuck at the second level bootloader.
I can still successfully flash the hikey firmware and also during the OP-TEE flash process everything seems fine.
Does anyone have an idea what I might have broken by using āfastboot eraseā and how I can fix it?
Best regards,
Manu
Flashing Hikey Fimware Log
./recovery-flash.sh
Config name: config
Port name: /dev/ttyUSB1
0: Image: ./sec_usb_xloader.img Downalod Address: 0x20000
1: Image: ./sec_uce_boot.img Downalod Address: 0x6a908000
2: Image: ./sec_fastboot.img Downalod Address: 0x1ac00000
Serial port open successfully!
Start downloading ./sec_usb_xloader.img@0x20000ā¦
file total size 99584
downlaod address 0x20000
Finish downloading
Start downloading ./sec_uce_boot.img@0x6a908000ā¦
file total size 23680
downlaod address 0x6a908000
Finish downloading
Start downloading ./sec_fastboot.img@0x1ac00000ā¦
file total size 3430400
downlaod address 0x1ac00000
Finish downloading
< waiting for device >
target reported max download size of 471859200 bytes
sending āptableā (196 KB)ā¦
OKAY [ 0.018s]
writing āptableāā¦
OKAY [ 0.039s]
finished. total time: 0.057s
target reported max download size of 471859200 bytes
sending āxloaderā (151 KB)ā¦
OKAY [ 0.015s]
writing āxloaderāā¦
OKAY [ 0.214s]
finished. total time: 0.229s
target reported max download size of 471859200 bytes
sending āfastbootā (3346 KB)ā¦
OKAY [ 0.183s]
writing āfastbootāā¦
OKAY [ 0.036s]
finished. total time: 0.219s
target reported max download size of 471859200 bytes
sending ānvmeā (128 KB)ā¦
OKAY [ 0.014s]
writing ānvmeāā¦
OKAY [ 0.032s]
finished. total time: 0.046s
target reported max download size of 471859200 bytes
sending āfw_lpm3ā (212 KB)ā¦
OKAY [ 0.018s]
writing āfw_lpm3āā¦
OKAY [ 0.014s]
finished. total time: 0.032s
target reported max download size of 471859200 bytes
sending ātrustfirmwareā (145 KB)ā¦
OKAY [ 0.015s]
writing ātrustfirmwareāā¦
OKAY [ 0.014s]
finished. total time: 0.029s
Flashing OP-TEE Log
fastboot flash ptable /home/optee_test/build/ā¦/l-loader/prm_ptable.img
target reported max download size of 471859200 bytes
sending āptableā (24 KB)ā¦
OKAY [ 0.008s]
writing āptableāā¦
OKAY [ 0.029s]
finished. total time: 0.037s
fastboot flash xloader /home/optee_test/build/ā¦/tools-images-hikey960/sec_xloader.img
target reported max download size of 471859200 bytes
sending āxloaderā (151 KB)ā¦
OKAY [ 0.015s]
writing āxloaderāā¦
OKAY [ 0.238s]
finished. total time: 0.253s
fastboot flash fastboot /home/optee_test/build/ā¦/l-loader/l-loader.bin
target reported max download size of 471859200 bytes
sending āfastbootā (1152 KB)ā¦
OKAY [ 0.067s]
writing āfastbootāā¦
OKAY [ 0.025s]
finished. total time: 0.093s
fastboot flash fip /home/optee_test/build/ā¦/arm-trusted-firmware/build/hikey960/release/fip.bin
target reported max download size of 471859200 bytes
sending āfipā (1500 KB)ā¦
OKAY [ 0.086s]
writing āfipāā¦
OKAY [ 0.032s]
finished. total time: 0.118s
fastboot flash nvme /home/optee_test/build/ā¦/tools-images-hikey960/nvme.img
target reported max download size of 471859200 bytes
sending ānvmeā (128 KB)ā¦
OKAY [ 0.014s]
writing ānvmeāā¦
OKAY [ 0.052s]
finished. total time: 0.065s
fastboot flash boot /home/optee_test/build/ā¦/out/boot-fat.uefi.img
target reported max download size of 471859200 bytes
sending ābootā (65536 KB)ā¦
OKAY [ 3.433s]
writing ābootāā¦
OKAY [ 0.480s]
finished. total time: 3.913s
Boot process OP-TEE Log
xloader chipid is: 0x36600110, start at 485ms.
Build Date: Sep 19 2017, 15:34:09
[clock_init] ++
hikey960 [hikey960_clk_init]
hi3660 [clk_setup]
[clock_init] ā
storage type is UFS
ufs retry: 6 count v_tx:0 v_rx:0
ufs set v_tx:0 v_rx:0
Hikey960[5301] no need avs_init.
ddr ft:0xf20332a3,mode:1 target:4
UceLdOk
ch 0 gt_errfail, STATUS:0x00000060
ch 0 gdst_errfail, STATUS:0x00000040
ch 1 gt_errfail, STATUS:0x00000060
ch 1 gdst_errfail, STATUS:0x00000040
ch 2 gt_errfail, STATUS:0x00000060
ch 2 gdst_errfail, STATUS:0x00000040
ch 3 gt_errfail, STATUS:0x00000060
ch 3 gdst_errfail, STATUS:0x00000040
timeout
timeout
timeout
timeout
density: 0x0c0c0c0c,0x00000000,0x0c0c0c0c,0x00000000,0x0c0c0c0c,0x00000000,0x0c0c0c0c,0x00000000
ddr info 0x00000306
400M
685M
1067M
C0R,V0x0000002c e:66
C1R,V0x0000002d e:66
C2R,V0x0000002c e:66
C3R,V0x0000002d e:66
C0R,V0x0000002d e:66
C1R,V0x0000002e e:66
C2R,V0x0000002d e:66
C3R,V0x0000002e e:66
C0R,V0x0000002e e:66
C1R,V0x0000002f e:66
C2R,V0x0000002e e:66
C3R,V0x0000002f e:65
C0R,V0x0000002f e:65
C1R,V0x00000030 e:65
C2R,V0x0000002f e:65
C3R,V0x00000030 e:65
1244M
1866M
C0R,V0x00000016 e:66
C0R,V0x00000017 e:66
C2R,V0x00000017 e:66
C3R,V0x00000017 e:66
iomcu_subsys_init
boot_c0 PROFILE 4
NOTICE: Booting Trusted Firmware
NOTICE: BL1: v1.4(release):v1.4-666-g1504715
NOTICE: BL1: Built : 23:44:05, Feb 18 2018
ERROR: Failed to load BL2 firmware.