OpenWrt Forum Archive

Topic: MR3020 - I cant debrick it via Serial Console ...

The content of this topic has been archived on 8 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

MR3020 v1.8

I tried restore the oryginal firmware - under works properly OpenWRT - via SSH

http://wiki.openwrt.org/toh/tp-link/tl- … l.firmware

# opkg update && opkg install unzip
# cd /tmp
# wget http://www.tp-link.com/Resources/softwa … 120320.zip
# unzip TL-MR3020*.zip
# mtd -r write mr3020*up*.bin firmware

after rebooting - I have  brick

I read the tutorial from : http://ediy.com.my/index.php/blog/item/ … s-n-router but I cant put command via serial Console - my logs from console :

(...)
U-Boot 1.1.4 (Mar 26 2013 - 16:03:16)

AP121 (ar9330) U-boot

DRAM:  32 MB
led turning on for 1s...
id read 0x100000ff
flash size 4194304, sector count = 64
Flash:  4 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag7240_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
: cfg1 0x5 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
ag7240_phy_setup
eth0 up
: cfg1 0xf cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
athrs26_reg_init_lan
ATHRS26: resetting s26
ATHRS26: s26 reset done
ag7240_phy_setup
eth1 up
eth0, eth1
Autobooting in 1 seconds
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... OK

Starting kernel ...

Booting AR9330(Hornet)...
Linux version 2.6.31--LSDK-9.2.0.312 (root@localhost.localdomain) (gcc version 4.3.3 (GCC) ) #199 Tue Mar 20 11:38:41 CST 2012
flash_size passed from bootloader = 4
CPU revision is: 00019374 (MIPS 24Kc)
Determined physical RAM map:
memory: 02000000 @ 00000000 (usable)
User-defined physical RAM map:
memory: 02000000 @ 00000000 (usable)
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtdparts=ar7240-nor0:128k(u-boot),1024k(kernel),2816M
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
Memory: 29876k/32768k available (1884k kernel code, 2892k reserved, 521k data, 116k init, 0k highmem)
Hierarchical RCU implementation.
NR_IRQS:128
plat_time_init: plat time init done
Calibrating delay loop... 266.24 BogoMIPS (lpj=532480)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
===== ar7240_platform_init: 0


Whoops! This kernel is for product mr3020 v1.0!

bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
AR7240 GPIOC major 0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
NTFS driver 2.1.29 [Flags: R/O].
msgmni has been set to 58
alg: No test for lzma (lzma-generic)
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
ttyS0: detected caps 00000000 should be 00000100
serial8250.0: ttyS0 at MMIO 0xb8020000 (irq = 19) is a 16550A
console [ttyS0] enabled
PPP generic driver version 2.4.2
NET: Registered protocol family 24
cmdlinepart partition parsing not available
set partition boot
set partition kernel
set partition rootfs
set partition config
set partition art
set partition �
Searching for RedBoot partition table
5 RedBoot partitions found on MTD device ar7240-nor0
Creating 5 MTD partitions on "ar7240-nor0":
0x000000000000-0x000000020000 : "boot"
0x000000020000-0x000000120000 : "kernel"
0x000000120000-0x0000003e0000 : "rootfs"
0x0000003e0000-0x0000003f0000 : "config"
0x0000003f0000-0x000000400000 : "art"
->Oops: flash id 0x10215 .
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Port Status 1c000004
ar7240-ehci ar7240-ehci.0: ATH EHCI
ar7240-ehci ar7240-ehci.0: new USB bus registered, assigned bus number 1
ehci_reset Intialize USB CONTROLLER in host mode: 3
ehci_reset Port Status 1c000000
ar7240-ehci ar7240-ehci.0: irq 3, io mem 0x1b000000
ehci_reset Intialize USB CONTROLLER in host mode: 3
ehci_reset Port Status 1c000000
ar7240-ehci ar7240-ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
TCP cubic registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
ar7240wdt_init: Registering WDT success
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 116k freed
init started:  BusyBox v1.01 (2012.01.16-03:21+0000) multi-call binary
This Board use 2.6.31
xt_time: kernel timezone is -0000
nf_conntrack version 0.5.0 (512 buckets, 5120 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
insmod: cannot open module `/lib/modules/2.6.31/kernel/iptable_raw.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/flashid.ko': No such file or directory
PPPoL2TP kernel driver, V1.0
PPTP driver version 0.8.3
insmod: cannot open module `/lib/modules/2.6.31/kernel/harmony.ko': No such file or directory
restoring factory default...
unlzma/peek_old_byte: position 13735973 out of range
SQUASHFS error: crypto_decompress_update returned -66063, data probably corrupt
SQUASHFS error: squashfs_read_data failed to read block 0x1f32e9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9
SQUASHFS error: Unable to read data cache entry [1f32e9]
SQUASHFS error: Unable to read page, block 1f32e9, size aaf9

(none) mips #199 Tue Mar 20 11:38:41 CST 2012 (none)
(none) login:

(...)

unfornatelly I cant type ;(

What I could to do ?

With Regards
Pawel

(Last edited by ch0mik on 18 Jan 2014, 14:12)

Whoops! This kernel is for product mr3020 v1.0!

I guess you flashed the wrong firmware, as you have a v1.8.

unfornatelly I cant type ;(

Check your handshake settings. If it's on 'hardware handshake', turn it off.

unfornatelly I cant type ;(

Check your handshake settings. If it's on 'hardware handshake', turn it off.

its better wink

I found that the user pass are :
(...)
lsoltero wrote:
using the webshell i discovered a user called ap71 which has no password which allows me to login.  So... i am in.  I don't have access to root and can't write anything to the device (even /tmp) but can look around.
(...)

how to erase the rootfs or update rootfs from image file ? I cant set the TFTP enviroment ...

$ setenv ipaddr 192.168.1.1
setenv: not found
$ help

Built-in commands:
-------------------
        . : break cd continue eval exec exit export help login newgrp
        read readonly set shift times trap umask wait

with Regards
Pawel, SQ7MRU

(Last edited by ch0mik on 18 Jan 2014, 14:38)

ok, i Typed 'tpl' under boot and i have now hornet bash
next I use the tutorial from : http://wiki.openwrt.org/toh/tp-link/tl- … tp.experts

U-Boot 1.1.4 (Mar 26 2013 - 16:03:16)

AP121 (ar9330) U-boot

DRAM:  32 MB
led turning on for 1s...
id read 0x100000ff
flash size 4194304, sector count = 64
Flash:  4 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag7240_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
: cfg1 0x5 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
ag7240_phy_setup 
eth0 up
: cfg1 0xf cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
athrs26_reg_init_lan
ATHRS26: resetting s26
ATHRS26: s26 reset done
ag7240_phy_setup 
eth1 up
eth0, eth1
Autobooting in 1 seconds
hornet> 
hornet> setenv ipaddr 192.168.1.1
hornet> setenv serverip 192.168.1.2
hornet> tftpboot 0x80000000 openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin
dup 1 speed 1000
Using eth1 device
TFTP from server 192.168.1.2; our IP address is 192.168.1.1
Filename 'openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin'.
Load address: 0x80000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ######################################################
done
Bytes transferred = 3932160 (3c0000 hex)
hornet> erase 0x9f020000 +0x3c0000

First 0x2 last 0x3d sector size 0x10000
  61
Erased 60 sectors
hornet> cp.b 0x80000000 0x9f020000 0x3c0000
Copy to Flash... write addr: 9f020000
done
hornet> bootm 9f020000
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... OK

Starting kernel ...

[    0.000000] Linux version 3.3.8 (blogic@Debian-60-squeeze-64-minimal) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) 3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9330 rev 1
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=TL-MR3020 console=ttyATH0,115200 rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 29000k/32768k available (2211k kernel code, 3768k reserved, 418k data, 212k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.090000] gpiochip_add: registered GPIOs 0 to 29 on device: ath79
[    0.100000] MIPS: machine is TP-LINK TL-MR3020
[    0.350000] bio: create slab <bio-0> at 0
[    0.360000] Switching to clocksource MIPS
[    0.360000] NET: Registered protocol family 2
[    0.370000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.370000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.370000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.380000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.390000] TCP reno registered
[    0.390000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.400000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.400000] NET: Registered protocol family 1
[    0.430000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.430000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.440000] msgmni has been set to 56
[    0.440000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[    0.450000] io scheduler noop registered
[    0.450000] io scheduler deadline registered (default)
[    0.460000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.470000] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11) is a AR933X UART
[    0.480000] console [ttyATH0] enabled, bootconsole disabled
[    0.480000] console [ttyATH0] enabled, bootconsole disabled
[    0.490000] m25p80 spi0.0: found s25sl032a, expected m25p80
[    0.500000] m25p80 spi0.0: s25sl032a (4096 Kbytes)
[    0.500000] 5 tp-link partitions found on MTD device spi0.0
[    0.510000] Creating 5 MTD partitions on "spi0.0":
[    0.510000] 0x000000000000-0x000000020000 : "u-boot"
[    0.520000] 0x000000020000-0x000000109c70 : "kernel"
[    0.520000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.540000] 0x000000109c70-0x0000003f0000 : "rootfs"
[    0.540000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.550000] mtd: partition "rootfs" set to be root filesystem
[    0.560000] mtd: partition "rootfs_data" created automatically, ofs=2E0000, len=110000 
[    0.570000] 0x0000002e0000-0x0000003f0000 : "rootfs_data"
[    0.570000] 0x0000003f0000-0x000000400000 : "art"
[    0.580000] 0x000000020000-0x0000003f0000 : "firmware"
[    0.600000] ag71xx_mdio: probed
[    0.610000] eth0: Atheros AG71xx at 0xb9000000, irq 4
[    1.160000] ag71xx ag71xx.0: eth0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
[    1.170000] TCP cubic registered
[    1.170000] NET: Registered protocol family 17
[    1.180000] Bridge firewalling registered
[    1.180000] 8021q: 802.1Q VLAN Support v1.8
[    1.190000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    1.200000] Freeing unused kernel memory: 212k freed
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
[    6.160000] eth0: link up (100Mbps/Full duplex)
- regular preinit -
jffs2 not ready yet; using ramdisk
- init -
[    6.550000] eth0: link down
[    8.190000] Compat-drivers backport release: compat-drivers-2012-09-04-2-gddac993
[    8.190000] Backport based on wireless-testing.git master-2012-09-07
[    8.200000] compat.git: wireless-testing.git
[    8.230000] cfg80211: Calling CRDA to update world regulatory domain
[    8.240000] cfg80211: World regulatory domain updated:
[    8.240000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    8.250000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    8.260000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    8.270000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    8.270000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    8.280000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    8.620000] usbcore: registered new interface driver usbfs
[    8.630000] usbcore: registered new interface driver hub
[    8.640000] usbcore: registered new device driver usb
[    9.190000] ieee80211 phy0: Atheros AR9330 Rev:1 mem=0xb8100000, irq=2
[    9.200000] cfg80211: Calling CRDA for country: US
[    9.200000] cfg80211: Regulatory domain changed to country: US
[    9.210000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    9.220000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[    9.220000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[    9.230000] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    9.240000] cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    9.250000] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    9.260000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[    9.320000] PPP generic driver version 2.4.2
[    9.570000] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.790000] NET: Registered protocol family 24
[    9.810000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    9.810000] ehci-platform ehci-platform: Generic Platform EHCI Controller
[    9.820000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    9.860000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    9.880000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    9.880000] hub 1-0:1.0: USB hub found
[    9.880000] hub 1-0:1.0: 1 port detected
[    9.910000] nf_conntrack version 0.5.0 (456 buckets, 1824 max)
[   10.140000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver

Please press Enter to activate this console. 


BusyBox v1.19.4 (2013-03-14 11:28:31 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 ATTITUDE ADJUSTMENT (12.09, r36088)
 -----------------------------------------------------
  * 1/4 oz Vodka      Pour all ingredients into mixing
  * 1/4 oz Gin        tin with ice, strain into glass.
  * 1/4 oz Amaretto
  * 1/4 oz Triple sec
  * 1/4 oz Peach schnapps
  * 1/4 oz Sour mix
  * 1 splash Cranberry juice
 -----------------------------------------------------
root@OpenWrt:/#

ThX !!!

BTW :
which image are best for mr3020 v1.8 ?
i want to use them for rtl-sdr, the classic rom openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin make the hangs the rtl_tcp after few seconds ... but the dump1090 works fine ...

I use dump1090 and rtl-sdr from this localization : http://log.nihon-ryouri.asia/tpl703n/tr … /packages/

With Regards
Pawel, SQ7MRU

(Last edited by ch0mik on 18 Jan 2014, 15:34)

The discussion might have continued from here.