981213 / mtk_uartboot

GNU Affero General Public License v3.0
114 stars 24 forks source link

Failed to boot rom with 7981A #10

Closed WenisOK closed 1 month ago

WenisOK commented 1 month ago
mtk_uartboot - 0.1.1
Using serial port: COM3
Handshake...
hw code: 0x7981
hw sub code: 0x8a00
hw ver: 0xca00
sw ver: 0x1
Baud rate set to 460800
sending payload to 0x201000...
thread 'main' panicked at src\bootrom.rs:106:13:
send_da cmd status: 7442
stack backtrace:
   0:     0x7ff7d8b5b3d2 - <unknown>
   1:     0x7ff7d8b6ca2d - <unknown>
   2:     0x7ff7d8b595d1 - <unknown>
   3:     0x7ff7d8b5b1fa - <unknown>
   4:     0x7ff7d8b5cbf9 - <unknown>
   5:     0x7ff7d8b5c8b5 - <unknown>
   6:     0x7ff7d8b5d124 - <unknown>
   7:     0x7ff7d8b5cff9 - <unknown>
   8:     0x7ff7d8b5ba79 - <unknown>
   9:     0x7ff7d8b5ccc2 - <unknown>
  10:     0x7ff7d8b85e07 - <unknown>
  11:     0x7ff7d8a18bbc - <unknown>
  12:     0x7ff7d8a129c8 - <unknown>
  13:     0x7ff7d8a1e386 - <unknown>
  14:     0x7ff7d8a1dc9c - <unknown>
  15:     0x7ff7d8b54e72 - <unknown>
romanovj commented 1 month ago

Are you using bl2-mt7981-bga-ddr4-ram.bin?

Also you can explicitly add load address

./mtk_uartboot -s /dev/ttyUSB0 -p bl2.bin -f fip.bin--aarch64 -l $((0x201000))

WenisOK commented 1 month ago

Now, I'm using bl2-mt7981-bga-ddr4-ram.bin

mtk_uartboot - 0.1.1
Using serial port: COM3
Handshake...
hw code: 0x7981
hw sub code: 0x8a00
hw ver: 0xca00
sw ver: 0x1
Baud rate set to 460800
sending payload to 0x201000...
Checksum: 0x6f0e
Setting baudrate back to 115200
Jumping to 0x201000 in aarch64...
Waiting for BL2. Message below:
==================================
NOTICE:  BL2: v2.10.0   (release):v2.10.0-mtk
NOTICE:  BL2: Built : 13:17:08, Mar  1 2024
NOTICE:  WDT: Cold boot
NOTICE:  WDT: disabled
NOTICE:  EMI: Using DDR4 settings
NOTICE:  EMI: Detected DRAM size: 0MB
==================================
Timeout waiting for specified message.
romanovj commented 1 month ago

@WenisOK Detected DRAM size: 0MB you should use DDR3 https://github.com/981213/tf-a-mtk/releases/download/v2.10.0-mtk/bl2-mt7981-bga-ddr3-ram.bin

Also you should post executed command, not just output.

WenisOK commented 1 month ago

You are my god!!! it's right. my router has a new life.

WenisOK commented 1 month ago

Oh, yes, I almost told you my executed the command ./mtk_uartboot -s COM3 -p bl2.bin -f fip.bin --aarch64 -l $((0x201000))