ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
6.04k stars 1.93k forks source link

u-boot reboots unexpectly on MGV2000 (S905l3b) #838

Closed zxy-git closed 1 year ago

zxy-git commented 1 year ago

Standard chat template, no routine, no chat. 标准聊天模板,无套路不聊天。

Device Information | 设备信息

Armbian Version | 系统版本

Describe the bug | 问题描述 The TV box is MGV2000 with S905l3-b and 1G RAM. I've written the image Armbian_23.02.0_amlogic_s905l2_jammy_6.0.13_server_2022.12.16.img into a flash drive and tried to get the box boot from it. The dtb used was meson-gxl-s905l3b-m302a.dtb and uboot was u-boot-s905x-s912.bin. At some point during the execution of that uboot, the device unexpectly restarted without any useful output. The full serial output was:


U-Boot 2015.01-gfe88088535-dirty (Oct 20 2020 - 13:44:59)

DRAM:  1 GiB
Relocation Offset is: 36eef000
gpio: pin GPIODV_25 (gpio 44) value is 1
register usb cfg[0][1] = 0000000037f614f0
[CANVAS]canvas init
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: clk_level = 7
vpu: set clk: 666667000Hz, readback: 666660000Hz(0x300)
vpp: vpp_init
MMC:   aml_priv->desc_buf = 0x0000000033edfac0
aml_priv->desc_buf = 0x0000000033ee1de0
SDIO Port B: 0, SDIO Port C: 1
emmc/sd response timeout, cmd8, status=0x3ff2800
emmc/sd response timeout, cmd55, status=0x3ff2800
[mmc_init] mmc init success
dtb magic 08088b1f
      Amlogic multi-dtb tool
      GZIP format, decompress...
      Multi dtb detected
      2layers board, board id use 7
      Multi dtb tool version: v2 .
      Support 10 dtbs.
        aml_dt soc: gxlx2 platform: p291 variant: 1g
        dtb 0 soc: gxl   plat: p211   vari: 1g
        dtb 1 soc: gxl   plat: p215   vari: 1g
        dtb 2 soc: gxlx   plat: p261   vari: 1g
        dtb 3 soc: gxlx   plat: p261   vari: 2g
        dtb 4 soc: gxlx   plat: p265   vari: 1g
        dtb 5 soc: gxlx   plat: p265   vari: 2g
        dtb 6 soc: gxlx2   plat: p291   vari: 1g
        dtb 7 soc: gxlx2   plat: p291   vari: 2g
        dtb 8 soc: gxlx2   plat: p295   vari: 1g
        dtb 9 soc: gxlx2   plat: p295   vari: 2g
      Find match dtb: 6
start dts,buffer=0000000033ee4610,dt_addr=0000000033ee4610
      Amlogic multi-dtb tool
      Single dtb detected
parts: 13
00:      logo   0000000002000000 1
01:  recovery   0000000002000000 1
02:       rsv   0000000000800000 1
03:       tee   0000000000800000 1
04:     crypt   0000000002000000 1
05:      misc   0000000002000000 1
06: instaboot   0000000020000000 1
07:      boot   0000000002000000 1
08:    system   0000000040000000 1
09:     cache   0000000021000000 2
10:    params   0000000004000000 2
11: bootfiles   0000000020000000 2
12:      data   ffffffffffffffff 4
eMMC/TSD partition table have been checked OK!
check pattern success
mmc env offset: 0x28400000
In:    serial
Out:   serial
Err:   serial
board id is : 3
hpd_state=0
cvbs performance type = 7, table = 1
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
_verify_dtb_checksum()-924: calc 330c8948, store 330c8948
dtb_read()-1050: total 1, valid 1
      Amlogic multi-dtb tool
      GZIP format, decompress...
      Multi dtb detected
      2layers board, board id use 7
      Multi dtb tool version: v2 .
      Support 10 dtbs.
        aml_dt soc: gxlx2 platform: p291 variant: 1g
        dtb 0 soc: gxl   plat: p211   vari: 1g
        dtb 1 soc: gxl   plat: p215   vari: 1g
        dtb 2 soc: gxlx   plat: p261   vari: 1g
        dtb 3 soc: gxlx   plat: p261   vari: 2g
        dtb 4 soc: gxlx   plat: p265   vari: 1g
        dtb 5 soc: gxlx   plat: p265   vari: 2g
        dtb 6 soc: gxlx2   plat: p291   vari: 1g
        dtb 7 soc: gxlx2   plat: p291   vari: 2g
        dtb 8 soc: gxlx2   plat: p295   vari: 1g
        dtb 9 soc: gxlx2   plat: p295   vari: 2g
      Find match dtb: 6
wipe_data=successful
wipe_cache=successful
bmp pixel: 16
[OSD]load fb addr from dts
[OSD]fb_addr for logo: 0x3dc00000
[OSD]load fb addr from dts
[OSD]fb_addr for logo: 0x3dc00000
[CANVAS]addr=0x3dc00000 width=2560, height=1440
upgrade_step=2
do_resetkey start
resetkey time_out = 30d40
gpio key(GPIOAO_2) is key up
do_resetkey end
resetkey - resetkey time_value

Usage:
resetkey
amlkey_init() enter!
[EFUSE_MSG]keynum is 4
[BL31]: tee size: 0
rebootmode=cold_boot
Hit any key to stop autoboot:  0
card out
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
emmc/sd response timeout, cmd1, status=0x1ff2800
(Re)start USB...
USB0:   USB3.0 XHCI init start
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... init_part() 278: PART_TYPE_DOS
1 Storage Device(s) found
reading s905_autoscript
1654 bytes read in 53 ms (30.3 KiB/s)
## Executing script at 01020000
start amlogic old u-boot
## Error: "bootfromsd" not defined
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
emmc/sd response timeout, cmd1, status=0x1ff2800
** Bad device mmc 0 **
reading boot_android
** Unable to read file boot_android **
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
emmc/sd response timeout, cmd1, status=0x1ff2800
** Bad device mmc 0 **
reading u-boot.ext
709768 bytes read in 501 ms (1.4 MiB/s)
## Starting application at 0x01000000 ...
ÿGXLX2:BL1:3cfee7:42a5ae;FEAT:ADFD318C:0;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 94186

BL2 Built : 14:48:45, Sep 26 2018.
gxl g6d68897 - yao.zhang@droid07

Board ID = 3, adc=226
set vcck to 1070 mv
set vddee to 1070 mv
CPU clk: 1200MHz
DDR3
DDR3 chl: Rank0+1 @ 792MHz - FAIL
DDR3 chl: Rank0 @ 792MHz
bist_test rank: 0 21 00 42 34 15 53 1f 00 3e 38 18 59 26 02 4a 34 13 55 21 00 42 38 15 5c 625   - PASS

Rank0: 1024MB(auto)-2T-11
AddrBus test pass!
-s
Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x013c0000, size: 0x00007600
Load bl301 from eMMC, src: 0x00018200, des: 0x01380000, size: 0x00002200
Load bl31 from eMMC, src: 0x0001c200, des: 0x10100000, size: 0x00019600
Load bl33 from eMMC, src: 0x00038200, des: 0x01000000, size: 0x00047200
NOTICE:  BL3-1: v1.0(debug):361f8a7
NOTICE:  BL3-1: Built : 16:43:26, Dec 19 2018
NOTICE:  BL31: GXL normal boot!
NOTICE:  BL31: BL33 decompress pass
[Image: gxl_v1.1.3103-9234004 2018-12-27 10:43:23 yao.zhang@droid07]
efuse init ops = c5
efuse init hdcp = c, cf9=7
x2_hp_e = 0
bl30: check_permit, count is 1
bl30: check_permit: ok!
chipid: 0 0 3 c c 0 32 b4 90 a0 0 c5 not ES chip
[0.585565 Inits done]
INFO:    BL3-1: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL3-1: Preparing for EL3 exit to normal world
INFO:    BL3-1: Next image address = 0x1000000
INFO:    BL3-1: Next image spsr = 0x3c9

/*****   At this point, the device unexpectly rebooted and repeated this process   ******/

U-Boot 2015.01-gfe88088535-dirty (Oct 20 2020 - 13:44:59)

DRAM:  1 GiB
Relocation Offset is: 36eef000
gpio: pin GPIODV_25 (gpio 44) value is 1
register usb cfg[0][1] = 0000000037f614f0
[CANVAS]canvas init
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: clk_level = 7
vpu: set clk: 666667000Hz, readback: 666660000Hz(0x300)
vpp: vpp_init
MMC:   aml_priv->desc_buf = 0x0000000033edfac0
aml_priv->desc_buf = 0x0000000033ee1de0
SDIO Port B: 0, SDIO Port C: 1
emmc/sd response timeout, cmd8, status=0x3ff2800
emmc/sd response timeout, cmd55, status=0x3ff2800
[mmc_init] mmc init success

..............

I've also tried some other uboot, such as u-boot-p212.bin, u-boot-s905.bin, they either ended up with the same result or wouldn't boot at all.

board images: IMG_20221218_142256

IMG_20221218_142249

ophub commented 1 year ago

未知设备,先使用5.15内核的固件测试,找出可以启动的dtb。

使用6.0会因为u-boot不适配导致无法启动。

zxy-git commented 1 year ago

试了一下5.15内核可以启动了,meson-gxl-s905l3b-m302a.dtb和meson-gxl-s905l2-x7-5g.dtb都能启动,但是有线好像都不能用,插到路由器上灯不亮,不知道是否需要额外配置来启用有线。这个设备应该和M302a比较像,我刷了M302a的安卓系统能正常使用。

ophub commented 1 year ago

这一下可以确定了u-boot-s905x-s912.bin这个不适合无法启动,你再试一试别的,在usb启动后,到/boot下复制为u-boot.ext并重启

https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/armbian-files/common-files/etc/model_database.conf

除了这里的,meson-g12a-u200.dtb也可以试一下

找到有线网络可以正常工作的dtb

janko888 commented 1 year ago

但是有线好像都不能用

能启动的5.15,刷的固件底包是安卓4.x?

zxy-git commented 1 year ago

但是有线好像都不能用

能启动的5.15,刷的固件底包是安卓4.x?

是的,4.4.2,内核是3.14.29,dtb和uboot还得试一下,这个盒子ttl阉割了不好弄

janko888 commented 1 year ago

你找一个安卓9的包,刷了后再用你之前的正常启动的版本装AMRBIAN,大概可以正常认网卡了。

zxy-git commented 1 year ago

你找一个安卓9的包,刷了后再用你之前的正常启动的版本装AMRBIAN,大概可以正常认网卡了。

刷了个9.0的包,虽然开机进不了系统只能进rec,但是启动armbian网卡能用了,dtb用的是meson-gxl-s905l3b-m302a.dtb。感谢各位大佬! 不过我试了几个u-boot仍然不行,还是老问题,不是突然重启就是卡住。安卓自带的u-boot倒是能引导,网卡也能用。

补充:armbian-install能正常安装到emmc并启动。