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
5.8k stars 1.86k forks source link

X96Max _Plus_5 EMMC installed wrong .dtb #1927

Closed RomanKozyrev closed 9 months ago

RomanKozyrev commented 9 months ago

Device Information | 设备信息

With armbian-install i choosed wrong dtb and got brick. UART logs: `SM1:BL:511f6b:81ca2f;FEAT:A0F83180:20282000;POC:F;RCY:0;EMMC:0;READ:0;0.0;CHK:0; bl2_stage_init 0x01 bl2_stage_init 0x81 hw id: 0x0000 - pwm id 0x01 bl2_stage_init 0xc1 bl2_stage_init 0x02

L0:00000000 L1:00000703 L2:00008067 L3:15000020 S1:00000000 B2:20282000 B1:a0f83180

TE: 109350

BL2 Built : 15:21:48, Aug 28 2019. g12a g1bf2b53 - luan.yuan@droid15-sz

Board ID = 1 Set cpu clk to 24M Set clk81 to 24M Use GP1_pll as DSU clk. DSU clk: 1200 Mhz CPU clk: 1200 MHz Set clk81 to 166.6M eMMC boot @ 0 sw8 s DDR driver_vesion: LPDDR4_PHY_V_0_1_18 build time: Aug 28 2019 15:21:45 board id: 1 Load FIP HDR from eMMC, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part : 0 fw parse done Load ddrfw from eMMC, src: 0x00060200, des: 0xfffd0000, size: 0x0000c000, part: 0 Load ddrfw from eMMC, src: 0x00038200, des: 0xfffd0000, size: 0x00004000, part: 0 PIEI prepare done fastboot data load 00000000 emmc switch 1 ok ddr saved addr:00016000 Load ddr parameter from eMMC, src: 0x02c00000, des: 0xfffd0000, size: 0x00001000 , part: 0 00000000 emmc switch 0 ok fastboot data verify verify result: 265 Cfg max: 5, cur: 1. Board id: 255. Force loop cfg DDR3 probe ddr clk to 672MHz Load ddrfw from eMMC, src: 0x0002c200, des: 0xfffd0000, size: 0x0000c000, part: 0

dmc_version 0001 Check phy result INFO : End of initialization INFO : ERROR : Training has failed! 1D training failed Cfg max: 5, cur: 2. Board id: 255. Force loop cfg DDR3 probe ddr clk to 576MHz Load ddrfw from eMMC, src: 0x0002c200, des: 0xfffd0000, size: 0x0000c000, part: 0

dmc_version 0001 Check phy result INFO : End of initialization INFO : ERROR : Training has failed! 1D training failed Cfg max: 5, cur: 3. Board id: 255. Force loop cfg DDR3 probe ddr clk to 672MHz Load ddrfw from eMMC, src: 0x0002c200, des: 0xfffd0000, size: 0x0000c000, part: 0

dmc_version 0001 Check phy result INFO : End of initialization INFO : End of read enable training INFO : End of fine write leveling INFO : End of read dq deskew training INFO : End of MPR read delay center optimization INFO : End of Write leveling coarse delay INFO : End of write delay center optimization INFO : End of read delay center optimization INFO : End of max read latency training INFO : Training has run successfully! 1D training succeed aml_ddr_fw_vesion: LPDDR4_PHY_V_0_1_15 build time: Jun 18 2019 20:29:43 auto size-- 65535DDR cs0 size: 1024MB DDR cs1 size: 0MB DMC_DDR_CTRL: 0000002bDDR size: 1024MB cs0 DataBus test pass cs0 AddrBus test pass

100bdlr_step_size ps== 391 result report boot times 0Enable ddr reg access 00000000 emmc switch 3 ok BL2: rpmb counter: 0x00016060 00000000 emmc switch 0 ok Load FIP HDR from eMMC, src: 0x00010200, des: 0x01700000, size: 0x00004000, part : 0 Load BL3X from eMMC, src: 0x00078200, des: 0x01768000, size: 0x000c8000, part: 0 bl2z: ptr: 05129330, size: 00001e40 0.0;M3 CHK:0;cm4_sp_mode 0 MVN_1=0x00000000 MVN_2=0x00000000 [Image: g12a_v1.1.3390-6ac5299 2019-09-26 14:09:46 luan.yuan@droid15-sz] OPS=0x10 ring efuse init 2b 0c 10 00 01 18 13 00 00 13 37 38 38 41 32 50 [0.017319 Inits done] secure task start! high task start! low task start! run into bl31 NOTICE: BL31: v1.3(release):4fc40b1 NOTICE: BL31: Built : 15:57:33, May 22 2019 NOTICE: BL31: G12A normal boot! NOTICE: BL31: BL33 decompress pass ERROR: Error initializing runtime service opteed_fast

U-Boot 2015.01 (Jul 01 2020 - 06:44:03)

DRAM: 1 GiB Relocation Offset is: 36e5c000 spi_post_bind(spifc): req_seq = 0 register usb cfg[0][1] = 0000000037f3ed70 NAND: get_sys_clk_rate_mtd() 290, clock setting 200! NAND device id: 0 ff ff ff ff ff No NAND device found!!! nand init failed: -6 get_sys_clk_rate_mtd() 290, clock setting 200! NAND device id: 0 ff ff ff ff ff No NAND device found!!! nand init failed: -6 MMC: aml_priv->desc_buf = 0x0000000033e4ca70 aml_priv->desc_buf = 0x0000000033e4edb0 SDIO Port B: 0, SDIO Port C: 1 co-phase 0x2, tx-dly 0, clock 400000 co-phase 0x2, tx-dly 0, clock 400000 co-phase 0x2, tx-dly 0, clock 400000 emmc/sd response timeout, cmd8, status=0x1ff2800 emmc/sd response timeout, cmd55, status=0x1ff2800 co-phase 0x2, tx-dly 0, clock 400000 co-phase 0x2, tx-dly 0, clock 40000000 aml_sd_retry_refix[983]:delay = 0x0,gadjust =0x132000 [mmc_startup] mmc refix success init_part() 282: PART_TYPE_DOS [mmc_init] mmc init success Amlogic multi-dtb tool GZIP format, decompress... Multi dtb detected Multi dtb tool version: v2 . Support 4 dtbs. aml_dt soc: sm1 platform: s905x3 variant: u218 dtb 0 soc: g12a plat: u212 vari: 2g dtb 1 soc: g12a plat: u212 vari: 4g dtb 2 soc: sm1 plat: ac213 vari: 2g dtb 3 soc: sm1 plat: ac213 vari: 4g Not match any dtb. start dts,buffer=0000000033e51620,dt_addr=0000000033ed1630 check_valid_dts: FDT_ERR_BADMAGIC get_partition_from_dts() 91: ret -9 get_partition_from_dts() 94: ret -9 get_ptbl_from_dtb()-272: get partition table from dts faild mmc_device_init()-1251: get partition table from dtb failed init_part() 282: PART_TYPE_DOS eMMC/TSD partition table have been checked OK! crc32_s:0x1577dad == storage crc_pattern:0x1577dad!!! crc32_s:0xee152b83 == storage crc_pattern:0xee152b83!!! crc32_s:0x79f50f07 == storage crc_pattern:0x79f50f07!!! mmc env offset: 0x7400000 In: serial Out: serial Err: serial reboot_mode=cold_boot [store]To run cmd[emmc dtb_read 0x1000000 0x40000] _verify_dtb_checksum()-3406: calc caaa3825, store caaa3825 _verify_dtb_checksum()-3406: calc caaa3825, store caaa3825 dtb_read()-3623: total valid 2 update_old_dtb()-3604: do nothing Amlogic multi-dtb tool GZIP format, decompress... Multi dtb detected Multi dtb tool version: v2 . Support 4 dtbs. aml_dt soc: sm1 platform: s905x3 variant: u218 dtb 0 soc: g12a plat: u212 vari: 2g dtb 1 soc: g12a plat: u212 vari: 4g dtb 2 soc: sm1 plat: ac213 vari: 2g dtb 3 soc: sm1 plat: ac213 vari: 4g Not match any dtb. [store]Err:do_store_dtb_ops,L371:Fail in fdt check header board_late_init(): [store dtb read $dtb_mem_addr] fail load dtb to 1000000 [store]To run cmd[emmc dtb_read 1000000 0x40000] dtb_read_shortcut()-3464: short cut in... Amlogic multi-dtb tool GZIP format, decompress... Multi dtb detected Multi dtb tool version: v2 . Support 4 dtbs. aml_dt soc: sm1 platform: s905x3 variant: u218 dtb 0 soc: g12a plat: u212 vari: 2g dtb 1 soc: g12a plat: u212 vari: 4g dtb 2 soc: sm1 plat: ac213 vari: 2g dtb 3 soc: sm1 plat: ac213 vari: 4g Not match any dtb. [store]Err:do_store_dtb_ops,L371:Fail in fdt check header board_late_init(): store dtb read 1000000 fail [KM]Error:f[keymanage_dts_parse]L307:not a fdt at 0x0000000001000000 vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters vpu: clk_level = 7 vpu: vpu_power_on vpu: set clk: 666667000Hz, readback: 666666667Hz(0x100) vpu: vpu_module_init_config vpp: vpp_init vpp: vpp osd2 matrix rgb2yuv.............. hdr_func 4, hdr_process_select 0x1 cvbs: cpuid:0x2b Net: Phy 0 not found`

When i try to boot from SD card i get this log:

SM1:BL:511f6b:81ca2f;FEAT:A0F83180:20282000;POC:F;RCY:0;EMMC:0;READ:0;0.0;CHK:0; bl2_stage_init 0x01 bl2_stage_init 0x81 hw id:�

I cannot send uart commands via putty. Testpoint also does not work. testpoint

ophub commented 9 months ago

First, modify the dtb configuration in the uEnv.txt file on the USB drive. Then, reboot the system and test which configuration is suitable. Once you have determined the appropriate configuration, write it back. You can refer to the combination of configuration information in the model.

RomanKozyrev commented 9 months ago

My box started with meson-sm1-x96-max-plus-100m.dtb by default.Then i installed armbian on emmc with wrong dtb and in doesnt boot from emmc. If i try to but from sd(with meson-sm1-x96-max-plus-100m.dtb in uEnv.txt)i cannot boot eatherand i get this dhort log from uart SM1:BL:511f6b:81ca2f;FEAT:A0F83180:20282000;POC:F;RCY:0;EMMC:0;READ:0;0.0;CHK:0; bl2_stage_init 0x01 bl2_stage_init 0x81 hw id:�

ophub commented 9 months ago

You can first restore the Android system and then proceed with testing Armbian from the USB drive.

https://github.com/ophub/amlogic-s9xxx-armbian/tree/main/documents

look at: 12.3

RomanKozyrev commented 9 months ago

Finding correct short pins solved my problem! Thank you. x96max_plus2_s905x3-short-circuit-points

Shavell commented 9 months ago

@RomanKozyrev this is for what ?

RomanKozyrev commented 9 months ago

@RomanKozyrev this is for what ?

What do you mean?