Hi ilmich , thank you for your effort.
I've tried the new build but it stops at the same point (to be precise, the serial logs stops suddendly a little earlier):
DDR Version V1.11 20200910_dbg
In
ID:0xFFF
300MHz
LPDDR3
Bus Width=32 Col=10 Bank=8 Row=15 CS=2 Die Bus-W536MB
mach:14
OUT
Boot1 Release Time: Sep 29 2018 16:04:10, version: 2.53
ChipType = 0xc, 372
mmc2:cmd19,100
SdmmcInit=2 0
BootCapSize=2000
UserCapSize=7456MB
FwPartOffset=2000 , 2000
mmc0:cmd5,20
SdmmcInit=0 0
BootCapSize=0
UserCapSize=30448MB
FwPartOffset=2000 , 0
StorageInit ok = 137920
SecureMode = 0
SecureInit ret = 0, SecureMode = 0
GPT 0x632d7e08 signature is wrong
LOADER Check OK! 0x60200000, 242504
TOS Check OK! 0x68400000, 281900
Enter Trust OS
INF TEE-CORE:init_primary_helper:319: Initializing (1.0.1-55-gb92dac5-dev #2 Mon Nov 7 02:48:16INF TEE-CORE:init_teecore:79: te
Display More
In these day, following your suggestion, I've extracted the trustos.img form the android official fw and try to replace, but I've got similar results:
DDR Version V1.11 20200910_dbg
In
ID:0xFFF
300MHz
LPDDR3
Bus Width=32 Col=10 Bank=8 Row=15 CS=2 Die Bus-WOUT
Boot1 Release Time: Sep 29 2018 16:04:10, version: 2.53
ChipType = 0xc, 371
mmc2:cmd19,100
SdmmcInit=2 0
BootCapSize=2000
UserCapSize=7456MB
FwPartOffset=2000 , 2000
mmc0:cmd5,20
SdmmcInit=0 0
BootCapSize=0
UserCapSize=30448MB
FwPartOffset=2000 , 0
StorageInit ok = 162741
SecureMode = 0
SecureInit ret = 0, SecureMode = 0
GPT 0x632d7e08 signature is wrong
LOADER Check OK! 0x60200000, 267755
TOS Check OK! 0x68400000, 300602
Enter Trust OS
INF TEE-CORE:init_primary_helper:319: Initializing (1.0.1-55-gb92dac5-dev #2 Mon Nov 7 02:48:16 UTC 2016 arm)
INF TEE-CORE:init_primary_helper:320: Release version: 1.6
INF TEE-CORE:init_teecore:79: teecore inits done
Display More
So I tried a step forward and replaced also the uboot.img taken from the original FW.
In this way the boot process was longer and then stopped because of course the the other partitions that uboot was expecting were missing:
DDR Version V1.11 20200910_dbg
In
ID:0xFFF
300MHz
LPDDR3
Bus Width=32 Col=10 Bank=8 Row=15 CS=2 Die Bus-Width=32 Size=1536MB
mach:14
OUT
Boot1 Release Time: Sep 29 2018 16:04:10, version: 2.53
ChipType = 0xc, 371
mmc2:cmd19,100
SdmmcInit=2 0
BootCapSize=2000
UserCapSize=7456MB
FwPartOffset=2000 , 2000
mmc0:cmd5,20
SdmmcInit=0 0
BootCapSize=0
UserCapSize=30448MB
FwPartOffset=2000 , 0
StorageInit ok = 126810
SecureMode = 0
SecureInit ret = 0, SecureMode = 0
GPT 0x632d7e08 signature is wrong
LOADER Check OK! 0x60000000, 219102
TOS Check OK! 0x68400000, 251870
Enter Trust OS
INF TEE-CORE:init_primary_helper:319: Initializing (1.0.1-55-gb92dac5-dev #2 Mon Nov 7 02:48:16 UTC 2016 arm)
INF TEE-CORE:init_primary_helper:320: Release version: 1.6
INF TEE-CORE:init_teecore:79: teecore inits done
U-Boot 2014.10-RK322X-06 (Jul 21 2021 - 09:01:38)
CPU: rk322x
cpu version = 3
CPU's clock information:
arm pll = 600000000HZ
periph pll = 600000000HZ
ddr pll = 600000000HZ
codec pll = 500000000HZ
Board: Rockchip platform Board
Uboot as second level loader
DRAM: Found dram banks: 1
Adding bank:0000000060000000(0000000060000000)
Reserve memory for trust os.
dram reserve bank: base = 0x68400000, size = 0x00100000
128 MiB
GIC CPU mask = 0x00000001
rk dma pl330 version: 1.4
remotectl v0.1
pwm freq=0x11e1a3
pwm_freq_nstime=0x355
SdmmcInit = 0 0
SDCard Update.
storage init OK!
Using default environment
GetParam
W: Invalid Parameter's tag (0x00000000)!
Invalid parameter
Failed to init blob!
No pmic detect.
SecureBootEn = 0, SecureBootLock = 0
#Boot ver: 0000-00-00#0.00
empty serial no.
normal boot.
no fuel gauge found
no fuel gauge found
read logo on state from dts [0]
no fuel gauge found
'recovery' does not seem to be a partition nor an address
Unable to boot:recovery
try to start backup
'backup' does not seem to be a partition nor an address
Unable to boot:backup
try to start rockusb
Display More
Just for test I've tried to use the original trustos with only the uboot.img coming from andorid FW and the boot was similar:
DDR Version V1.11 20200910_dbg
In
ID:0xFFF
300MHz
LPDDR3
Bus Width=32 Col=10 Bank=8 Row=15 CS=2 Die Bus-W4
OUT
Boot1 Release Time: Sep 29 2018 16:04:10, version: 2.53
ChipType = 0xc, 370
mmc2:cmd19,100
SdmmcInit=2 0
BootCapSize=2000
UserCapSize=7456MB
FwPartOffset=2000 , 2000
mmc0:cmd5,20
SdmmcInit=0 0
BootCapSize=0
UserCapSize=30448MB
FwPartOffset=2000 , 0
StorageInit ok = 112455
SecureMode = 0
SecureInit ret = 0, SecureMode = 0
GPT 0x632d7e08 signature is wrong
LOADER Check OK! 0x60000000, 205243
TOS Check OK! 0x68400000, 272282
Enter Trust OS
INF [0x0] TEE-CORE:init_primary_helper:377: Initializing (1.1.0-333-gc9d95d1 #2 2018å¹´ 08æ 17æ¥ ææäº 03:32:22 UTC arm)
INF [0x0] TEE-CORE:init_primary_helper:378: Release version: 2.0
INF [0x0] TEE-CORE:init_primary_helper:379: Next entry point address: 0x60000000
INF [0x0] TEE-CORE:init_teecore:83: teecore inits done
U-Boot 2014.10-RK322X-06 (Jul 21 2021 - 09:01:38)
CPU: rk322x
cpu version = 3
CPU's clock information:
arm pll = 600000000HZ
periph pll = 600000000HZ
ddr pll = 600000000HZ
codec pll = 500000000HZ
Board: Rockchip platform Board
Uboot as second level loader
DRAM: Found dram banks: 1
Adding bank:0000000060000000(0000000060000000)
Reserve memory for trust os.
dram reserve bank: base = 0x68400000, size = 0x00e00000
128 MiB
GIC CPU mask = 0x00000001
rk dma pl330 version: 1.4
remotectl v0.1
pwm freq=0x11e1a3
pwm_freq_nstime=0x355
SdmmcInit = 0 0
SDCard Update.
storage init OK!
Using default environment
GetParam
W: Invalid Parameter's tag (0x00000000)!
Invalid parameter
Failed to init blob!
No pmic detect.
SecureBootEn = 0, SecureBootLock = 0
#Boot ver: 0000-00-00#0.00
empty serial no.
Writing env to storage...
done
normal boot.
no fuel gauge found
no fuel gauge found
read logo on state from dts [0]
no fuel gauge found
'recovery' does not seem to be a partition nor an address
Unable to boot:recovery
try to start backup
'backup' does not seem to be a partition nor an address
Unable to boot:backup
try to start rockusb
Display More
At this point I'm wondering if the culprit is uboot more than trustos. (unfortunately I'm not expert about uboot either).
I've noticed that the start offset in Librelec is 0x60200000 while in legacy fw is 0x60000000. I don't know the reason of this difference but anyway, even if I edit the start address to use 0x60000000 nothing changes.
As latest test, I remembered that multitool was booting on my box, so I checked how the images was built.
I see the trustos verison was the same as your repository, while they used a precompiled u-boot-dtb.bin file to create uboot.img.
Using that file I had some results.
It was a little tricky because this uboot switches the uart to 115200 bps, so in the first run it seemed the terminal was stopping at the same point; than I noticed that the led of the serial interface was still blinking so I changed from 1500000 to 115200 to see the rest. This is the result (the garbage at the beginning is the usual message of the early boot still @1500000bps):
¦}¦¦¦P¦u¦¦*;¦?¦?L(¦.¦¦¦¦,¦)¦¦¦¦?¦¦¦¦(v,:¦¦¦¦??¦¦,¦¦¦.y
U-Boot 2022.04-armbian (Mar 05 2023 - 18:36:47 +0000)
Model: Generic Rockchip rk322x TV Box board
DRAM: 1.5 GiB
Core: 98 devices, 19 uclasses, devicetree: separate
MMC: dwmmc@30000000: 1, dwmmc@30020000: 0
Loading Environment from EXT4...
** Unable to use mmc 0:auto for loading the env **
In: serial@11030000
Out: serial@11030000
Err: serial@11030000
Model: Generic Rockchip rk322x TV Box board
Net: eth0: ethernet@30200000
starting USB...
Bus usb@30040000: USB DWC2
Bus usb@30080000: USB EHCI 1.00
Bus usb@300c0000: USB EHCI 1.00
Bus usb@30100000: USB EHCI 1.00
scanning bus usb@30040000 for devices... 1 USB Device(s) found
scanning bus usb@30080000 for devices... 1 USB Device(s) found
scanning bus usb@300c0000 for devices... 1 USB Device(s) found
scanning bus usb@30100000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
1: LibreELEC
Retrieving file: /KERNEL
append: boot=UUID=0812-1808 disk=UUID=036a95d5-9a04-438c-92cc-fcad1ff2ba39 quiet console=uart8250,mmio32,0x11030000 console=tty0
Retrieving file: /rk322x-box.dtb
Kernel image @ 0x62000000 [ 0x000000 - 0x5f0ac8 ]
## Flattened Device Tree blob at 61f00000
Booting using the fdt blob at 0x61f00000
EHCI failed to shut down host controller.
EHCI failed to shut down host controller.
Using Device Tree in place at 61f00000, end 61f0d0b4
Starting kernel ...
[ 0.943589] rk_gmac-dwmac 30200000.ethernet: Can not read property: tx_delay.
[ 0.951628] rk_gmac-dwmac 30200000.ethernet: set tx_delay to 0x30
[ 0.958467] rk_gmac-dwmac 30200000.ethernet: Can not read property: rx_delay.
[ 0.966474] rk_gmac-dwmac 30200000.ethernet: set rx_delay to 0x10
[ 1.051857] thermal_sys: Failed to bind 'cpu-thermal' with 'cpufreq-cpu0': -22
[ 1.116576] inno-hdmi-phy 12030000.hdmi-phy: error -ENXIO: IRQ index 0 not found
Display More
At this point the system hangs and after a while it reboots.
I hope this can provide some inspiration for further ideas on how to proceed.
In the menawhile I've seen that in the Armbian forum somebody was able to boot Armbian on h20 box (https://forum.armbian.com/topic/12656-cs…&comment=175478)
I will ask some info and try to reproduce his/her steps to check after that the difference with Librelec.
Thank you again for your effort.