Hello everyone,
i'm trying to get a mainline kernel running on my Sunvell T95Z Plus but i'm struggling with a weird uboot error.
I'm using the following uboot commands (taken from s905_autoscript from https://yadi.sk/d/5_32km_EsCV2A/ArchLinux)
$this->bbcode_second_pass_code('', '
setenv kernel_loadaddr "0x11000000"
setenv initrd_loadaddr "0x13000000"
setenv condev "console=ttyS0,115200n8 console=tty0 no_console_suspend consoleblank=0"
setenv bootargs "root=LABEL=ROOTFS rootflags=data=writeback rw ${condev} fsck.repair=yes net.ifnames=0 mac=${mac}"
setenv boot_start "booti ${kernel_loadaddr} ${initrd_loadaddr} ${dtb_mem_addr}"
if fatload mmc 0 ${initrd_loadaddr} uInitrd; then if fatload mmc 0 ${kernel_loadaddr} Image; then if fatload mmc 0 ${dtb_mem_addr} dtb.img; then run boot_start; else store dtb read ${dtb_mem_addr}; run boot_start;fi;fi;fi;
')
The environment sets $this->bbcode_second_pass_code('', 'dtb_mem_addr=0x1000000')
The commands above work fine with the 3.14 kernel (see link above) but as soon as i replace the Image with the one from the ALARM i get the following error:
$this->bbcode_second_pass_code('', 'gxm_q201_v1#if fatload mmc 0 ${initrd_loadaddr} uInitrd.ml; then if fatload mmc 0 ${kernel_loadaddr} Image.ml; then if fatload mmc 0 ${dtb_mem_addr} dtb.img; then run boot_start; else store dtb read ${dtb_mem_addr}; run boot_start;fi;fi;fi;
card in
init_part() 278: PART_TYPE_DOS
[mmc_init] mmc init success
reading uInitrd.ml
6171783 bytes read in 346 ms (17 MiB/s)
reading Image.ml
26372608 bytes read in 1466 ms (17.2 MiB/s)
reading dtb.img
44315 bytes read in 7 ms (6 MiB/s)
[rsvmem] get fdtaddr NULL!
rsvmem - reserve memory
Usage:
rsvmem check - check reserved memory
rsvmem dump - dump reserved memory
rsvmem check failed
## Loading init Ramdisk from Legacy Image at 13000000 ...
Image Name: uInitrd
Image Type: AArch64 Linux RAMDisk Image (uncompressed)
Data Size: 6171719 Bytes = 5.9 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
load dtb from 0x1000000 ......
Amlogic multi-dtb tool
Cannot find legal dtb!
ERROR: Did not find a cmdline Flattened Device Tree
load dtb from 0x0 ......
Amlogic multi-dtb tool
Cannot find legal dtb!
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree')
The thing that i don't understand is how the dtb can be broken ("Cannot find legal dtb!") by just using a different kernel image? I've tried various things like other memory addresses, only loading kernel with dtb or appending the dtb to the kernel (like it was done in the past with sunxi devices) but everything fails due to the Amlogic multi-dtb tool. (The mainline kernel is bigger (~26MB) compared to the working one (~17MB)).
The dtb i'm using is either the built-in one or the gxm_q201_2g.dtb
one from here https://kszaq.libreelec.tv/s912/8.2/device_trees/100Mbit_Ethernet/
built-in:
$this->bbcode_second_pass_code('', 'store dtb read ${dtb_mem_addr}
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
dtb_read_shortcut()-976: short cut in...
Amlogic multi-dtb tool
Multi dtb detected
Multi dtb tool version: v2 .
Support 2 dtbs.
aml_dt soc: gxm platform: q201 variant: 2g
dtb 0 soc: gxm plat: q201 vari: 1g
dtb 1 soc: gxm plat: q201 vari: 2g
Find match dtb: 1
')
I've the feeling that i'm missing something here. Did anybody else had this error before or knows what causes it?
There are several Armbian images with a 4.18 kernel, too (https://yadi.sk/d/5_32km_EsCV2A/ARMBIAN/5.60/20180928) but when using any kernel from these the console stays empty after jumping from uboot to the kernel