Help unbricking mtd gone wrong

After trying to flash working firmware from another similar device to this device (mt7620a) using mtd I got an mtd "Failed to erase block" error. I read up before restarting the device and a post suggested the dd compand to restore the fw. Durning the dd my jtage console started outputing strange characters. Now, via jtag, during the boot i get the U-Boot menu and can't interrupt it with any input and then get gibberish text. Am i SOL?

Bootlog:

U-Boot 1.1.3 (Apr  4 2020 - 13:57:00)

Board: Ralink APSoC DRAM:  64 MB
mtest end addr: 83f29f88
relocate_code Pointer at: 83f8c000
enable ephy clock...done. rf reg 29 = 5
SSC disabled.
spi device id: ef 40 17 0 0 (40170000)
find flash: s25fl064k
*** Warning - bad CRC, using default environment

============================================
Ralink UBoot Version: 5.0.0.0
--------------------------------------------
ASIC 7620_MP (Port5<->Phy)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Build Date:Apr  4 2020  Time:13:57:00
============================================

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   9: Load Boot Loader code then write to Flash via TFTP.
   h: Load Image then write to Flash via TFTP.

3: System Boot system code via Flash.
## Booting image at bc050000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.171
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1563970 Bytes =  1.5 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 64

Starting kernel ...

[    0.000000] Linux version 4.14.171 (builder@buildhost) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r10947-65030d81f3)) #0 Thu Feb 27 21:05:12 2020
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is WRTNODE
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] random: get_random_bytes called from 0x8047f740 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00040009
[    0.000000] Readback ErrCtl register=00040009
[    0.000000] Memory: 58824K/65536K available (3915K kernel code, 180K rwdata, 500K rodata, 1220K init, 215K bss, 6712K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000010] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.007597] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.073547] pid_max: default: 32768 minimum: 301
[    0.078245] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.084635] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.095907] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.105458] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.111429] pinctrl core: initialized pinctrl subsystem
[    0.117733] NET: Registered protocol family 16
[    0.143552] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.149007] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.155292] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.160713] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[    0.166991] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.172413] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.178667] rt2880_gpio 10000688.gpio: registering 1 gpios
[    0.184000] rt2880_gpio 10000688.gpio: registering 1 irq handlers
[    0.195234] clocksource: Switched to clocksource systick
[    0.201408] NET: Registered protocol family 2
[    0.206590] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.213312] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.219543] TCP: Hash tables configured (established 1024 bind 1024)
[    0.225825] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.231454] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.237851] NET: Registered protocol family 1
[    0.244719] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    0.251386] Crashlog allocated RAM at address 0x3f00000
[    0.258181] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.270145] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.275796] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.295702] io scheduler noop registered
[    0.299448] io scheduler deadline registered (default)
[    0.305364] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.314196] console [ttyS0] disabled
[    0.317710] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
▒
▒▒?▒xx▒▒x▒~▒▒▒▒▒▒▒f▒▒▒▒▒f▒▒▒▒~▒̆▒▒▒▒▒f▒`▒怘▒▒faaaa?▒xx▒▒x▒~▒▒▒▒▒▒▒f▒▒▒▒▒f▒▒▒▒~▒̆▒▒▒▒▒f▒`▒怘▒▒faaaa?▒x▒▒▒▒Ϙ~▒
▒▒▒▒`▒▒▒▒▒▒f▒▒▒f▒f▒▒▒f▒▒▒~▒
▒f▒▒▒f▒▒▒f▒▒f
Ξ▒
▒▒?▒x▒▒▒▒Ϙ~▒
▒▒▒▒`▒▒▒▒▒▒f▒▒▒f▒f▒▒▒f▒▒▒~▒
▒f▒▒▒f▒▒▒f▒▒f
▒▒faaaa?▒x`▒Ϙ~9▒▒▒f▒▒▒▒▒f▒▒
▒▒▒▒▒f▒▒▒▒▒f▒▒̞▒`▒f▒▒83▒faaaa?▒x▒
▒xn▒▒▒fa{▒
▒▒▒▒
▒▒▒▒▒f▒▒
▒▒▒▒x▒▒x▒▒̘▒▒
▒▒▒▒▒▒▒▒▒f▒▒f▒▒▒f▒▒3▒faaaa▒?▒x▒▒x▒▒f▒~▒
▒f▒▒f▒▒f▒
▒f▒▒▒f▒▒f▒▒▒▒
▒f▒▒▒f▒▒f▒▒▒▒
x▒▒f▒▒`▒▒▒▒▒3▒
▒fÆ~▒▒▒f▒▒▒▒f▒▒
▒▒83▒faaaa▒?▒▒▒Ϙ▒x▒?▒̀▒▒f▒f▒▒f̆▒~▒▒▒3▒
▒f▒▒▒f▒▒f▒▒▒▒̞▒▒▒▒f▒▒
▒▒83▒faaaa?̘▒▒▒▒▒~▒
[    0.305364] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.314196] console [ttyS0] disabled
[    0.317710] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103

Did you notice this...right before the gibberish?

I think the baud rate changed.

lleachii right on ... I tried a few different baud rates and sure enough it changed to 57600. Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.