Користувальницькькі налаштування

Налаштування сайту


tl-wa901nd

Це стара версія документу!


Восстановление нерабочей прошивки TP-Link TL-WA901ND

sudo apt-get install minicom lrzsz

Запускаем minicom. Видим:

Welcome to minicom 2.6.1

OPTIONS: I18n 
Compiled on Feb 11 2012, 18:12:55.
Port /dev/ttyS0

Press CTRL-A Z for help on special keys

После включения устройства появляется следующее:

U-Boot 1.1.4 (Jul 15 2010 - 12:16:03)                                          
                                                                               
AP81 (ar7100) U-boot                                                           
DRAM:                                                                          
sri                                                                            
32 MB                                                                          
id read 0x100000ff                                                             
flash size 4MB, sector count = 64                                              
Flash:  4 MB                                                                   
Using default environment                                                      
                                                                               
In:    serial                                                                  
Out:   serial                                                                  
Err:   serial                                                                  
Net:   ag7100_enet_initialize...                                               
No valid address in Flash. Using fixed address                                 
bsingle_phy = 0                                                                
eth0: 00:03:7f:09:0b:ad                                                        
eth0 up                                                                        
eth0                                                                           
Autobooting in 1 seconds

Вводим команду

tpl

Появляется приглашение командной строки:

ar7100>                                                
ar7100> loady                                                             
## Ready for binary (ymodem) download to 0x81000000 at 115200 bps...

Нажимаем CTRL+A Z и переходим в пункт загрузки файла ( FIXME )

Выбираем файл для загрузки FIXME и протокол отправки (ymodem)

После этого видим

Cm - CRC mode, 30722(SOH)/0(STX)/0(CAN) packets, 5 retries
## Total Size      = 0x003c0000 = 3932160 Bytes
ar7100> 

Далее задаём команды записи загруженной в устройство прошивки в нужную область памяти:

ar7100> erase 0xbf020000 +0x3c0000

First 0x2 last 0x3d sector size 0x10000
  61
Erased 60 sectors
ar7100> cp.b 0x81000000 0xbf020000 0x3c0000
Copy to Flash... write addr: bf020000
done
ar7100>

Перезагружаем устройство:

ar7100> reset

Resetting...

U-Boot 1.1.4 (Jul 15 2010 - 12:16:03)

AP81 (ar7100) U-boot
DRAM:  
sri
32 MB
id read 0x100000ff
flash size 4MB, sector count = 64
Flash:  4 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
No valid address in Flash. Using fixed address
bsingle_phy = 0
eth0: 00:03:7f:09:0b:ad
eth0 up
eth0
Autobooting in 1 seconds## Booting image at bf020000 ...
   Uncompressing Kernel Image ... OK

Starting kernel ...



OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Looking for OpenWrt image... found at 0xbf022000
Decompressing kernel... done!
Starting kernel at 80060000...

[    0.000000] Linux version 3.10.58 (openwrt@gb-13) (gcc version 4.8.3 (OpenWr4
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9132 rev 2
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:100.000MHz, Ref:5.00z
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x01ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x01ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32s
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pa8
[    0.000000] Kernel command line:  board=TL-WA901ND-v2 console=ttyS0,115200 rd
[    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] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 28588k/32768k available (2374k kernel code, 4180k reserv)
[    0.000000] SLUB: 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.100000] MIPS: machine is TP-LINK TL-WA901ND v2
[    0.330000] bio: create slab <bio-0> at 0
[    0.340000] Switching to clocksource MIPS
[    0.350000] NET: Registered protocol family 2
[    0.350000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.350000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.360000] TCP: Hash tables configured (established 512 bind 512)
[    0.360000] TCP: reno registered
[    0.370000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.370000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.380000] NET: Registered protocol family 1
[    0.400000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.410000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORI.
[    0.420000] msgmni has been set to 55
[    0.420000] io scheduler noop registered
[    0.430000] io scheduler deadline registered (default)
[    0.430000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.470000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    0.470000] console [ttyS0] enabled, bootconsole disabled
[    0.470000] console [ttyS0] enabled, bootconsole disabled
[    0.490000] ath79-spi ath79-spi: master is unqueued, this is deprecated
[    0.490000] m25p80 spi0.0: found en25f32, expected m25p80
[    0.500000] m25p80 spi0.0: en25f32 (4096 Kbytes)
[    0.510000] 5 tp-link partitions found on MTD device spi0.0
[    0.510000] Creating 5 MTD partitions on "spi0.0":
[    0.520000] 0x000000000000-0x000000020000 : "u-boot"
[    0.520000] 0x000000020000-0x000000130e00 : "kernel"
[    0.530000] mtd: partition "kernel" must either start or end on erase block y
[    0.540000] 0x000000130e00-0x0000003f0000 : "rootfs"
[    0.550000] mtd: partition "rootfs" must either start or end on erase block y
[    0.560000] mtd: device 2 (rootfs) set to be root filesystem
[    0.570000] 1 squashfs-split partitions found on MTD device rootfs
[    0.570000] 0x000000310000-0x0000003f0000 : "rootfs_data"
[    0.580000] 0x0000003f0000-0x000000400000 : "art"
[    0.590000] 0x000000020000-0x0000003f0000 : "firmware"
[    0.600000] libphy: ag71xx_mdio: probed
[    0.910000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:0c [uid=00008]
[    0.920000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[    0.920000] TCP: cubic registered
[    0.930000] NET: Registered protocol family 17
[    0.930000] Bridge firewalling registered
[    0.940000] 8021q: 802.1Q VLAN Support v1.8
[    0.950000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    0.960000] Freeing unused kernel memory: 272K (8034c000 - 80390000)
procd: Console is alive
procd: - watchdog -
[    4.120000] usbcore: registered new interface driver usbfs
[    4.130000] usbcore: registered new interface driver hub
[    4.140000] usbcore: registered new device driver usb
[    4.150000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.150000] ehci-platform: EHCI generic platform driver
[    4.160000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
procd: - preinit -
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
jffs2 is not ready - marker found
procd: - early -
procd: - watchdog -
procd: - ubus -
procd: - init -
Please press Enter to activate this console.
[   10.520000] NET: Registered protocol family 10
[   10.530000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   10.550000] Loading modules backported from Linux version master-2014-10-08-5
[   10.560000] Backport generated by backports.git backports-20140905-1-gde42785
[   10.570000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   10.580000] nf_conntrack version 0.5.0 (450 buckets, 1800 max)
[   10.630000] xt_time: kernel timezone is -0000
[   10.660000] cfg80211: Calling CRDA to update world regulatory domain
[   10.660000] cfg80211: World regulatory domain updated:
[   10.670000] cfg80211:  DFS Master region: unset
[   10.670000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_ga)
[   10.680000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 )
[   10.690000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 )
[   10.700000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 )
[   10.710000] cfg80211:   (5170000 KHz - 5250000 KHz @ 160000 KHz), (N/A, 2000)
[   10.710000] cfg80211:   (5250000 KHz - 5330000 KHz @ 160000 KHz), (N/A, 2000)
[   10.720000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000)
[   10.730000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 )
[   10.740000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0)
[   10.820000] PPP generic driver version 2.4.2
[   10.820000] NET: Registered protocol family 24
[   10.970000] ieee80211 phy0: Atheros AR9100 MAC/BB Rev:7 AR2133 RF Rev:a2 mem2
[   10.980000] cfg80211: Calling CRDA for country: US
[   11.000000] cfg80211: Regulatory domain changed to country: US
[   11.000000] cfg80211:  DFS Master region: FCC
[   11.010000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_ga)
[   11.020000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 )
[   11.020000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 1700 )
[   11.030000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2300 )
[   11.040000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 )
[   11.050000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4)
[   17.950000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   17.970000] jffs2_build_filesystem(): unlocking the mtd device... done.
[   17.970000] jffs2_build_filesystem(): erasing all blocks after the end markey
[   23.110000] device eth0 entered promiscuous mode
[   23.140000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
done.
[   25.260000] jffs2: notice: (862) jffs2_build_xattr_subsystem: complete build.
procd: - init complete -

Жмём на клавиатуре ENTER. Получаем консоль администратора:

BusyBox v1.22.1 (2014-10-26 01:54:05 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
 -----------------------------------------------------
 CHAOS CALMER (Bleeding Edge, r43061)
 -----------------------------------------------------
  * 1 1/2 oz Gin            Shake with a glassful
  * 1/4 oz Triple Sec       of broken ice and pour
  * 3/4 oz Lime Juice       unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -----------------------------------------------------
root@OpenWrt:/# 

root@OpenWrt:/#

[ 108.970000] eth0: link up (100Mbps/Full duplex) [ 108.970000] br-lan: port 1(eth0) entered forwarding state [ 108.980000] br-lan: port 1(eth0) entered forwarding state [ 108.980000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 108.990000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready [ 110.980000] br-lan: port 1(eth0) entered forwarding state

root@OpenWrt:/# passwd Changing password for root New password: Bad password: too weak Retype password: Password for root changed by root root@OpenWrt:/#

[ 352.970000] eth0: link down [ 352.970000] br-lan: port 1(eth0) entered disabled state [ 470.970000] eth0: link up (100Mbps/Full duplex) [ 470.970000] br-lan: port 1(eth0) entered forwarding state [ 470.980000] br-lan: port 1(eth0) entered forwarding state [ 472.980000] br-lan: port 1(eth0) entered forwarding state

root@OpenWrt:/# root@OpenWrt:/# ifconfig br-lan Link encap:Ethernet HWaddr F4:EC:38:B3:23:56

        inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
        inet6 addr: fe80::f6ec:38ff:feb3:2356/64 Scope:Link
        inet6 addr: fd69:a24c:834e::1/60 Scope:Global
        UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
        RX packets:178 errors:0 dropped:0 overruns:0 frame:0
        TX packets:153 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:0 
        RX bytes:20119 (19.6 KiB)  TX bytes:20112 (19.6 KiB)

eth0 Link encap:Ethernet HWaddr F4:EC:38:B3:23:56

        UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
        RX packets:197 errors:0 dropped:0 overruns:0 frame:0
        TX packets:144 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:1000 
        RX bytes:24141 (23.5 KiB)  TX bytes:18978 (18.5 KiB)
        Interrupt:4 

lo Link encap:Local Loopback

        inet addr:127.0.0.1  Mask:255.0.0.0
        inet6 addr: ::1/128 Scope:Host
        UP LOOPBACK RUNNING  MTU:65536  Metric:1
        RX packets:3888 errors:0 dropped:0 overruns:0 frame:0
        TX packets:3888 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:0 
        RX bytes:265056 (258.8 KiB)  TX bytes:265056 (258.8 KiB)

root@OpenWrt:/# ifconfig br-lan 192.168.1.111 root@OpenWrt:/# ifconfig br-lan Link encap:Ethernet HWaddr F4:EC:38:B3:23:56

        inet addr:192.168.1.111  Bcast:192.168.1.255  Mask:255.255.255.0
        inet6 addr: fe80::f6ec:38ff:feb3:2356/64 Scope:Link
        inet6 addr: fd69:a24c:834e::1/60 Scope:Global
        UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
        RX packets:178 errors:0 dropped:0 overruns:0 frame:0
        TX packets:153 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:0 
        RX bytes:20119 (19.6 KiB)  TX bytes:20112 (19.6 KiB)

eth0 Link encap:Ethernet HWaddr F4:EC:38:B3:23:56

        UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
        RX packets:198 errors:0 dropped:0 overruns:0 frame:0

search lan nameserver 195.138.80.56 nameserver 195.138.80.33 nameserver 127.0.0.1 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ root@OpenWrt:/# ping ya.ru PING ya.ru (93.158.134.3): 56 data bytes 64 bytes from 93.158.134.3: seq=0 ttl=55 time=32.451 ms

— ya.ru ping statistics — 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max = 32.451/32.451/32.451 ms

root@OpenWrt:/# opkg update Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/base/P. Updated list of available packages in /var/opkg-lists/chaos_calmer_base. Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci/P. Updated list of available packages in /var/opkg-lists/chaos_calmer_luci. Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/manage. Updated list of available packages in /var/opkg-lists/chaos_calmer_management. Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/packag. Updated list of available packages in /var/opkg-lists/chaos_calmer_packages. Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/routin. Updated list of available packages in /var/opkg-lists/chaos_calmer_routing. Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/teleph. Updated list of available packages in /var/opkg-lists/chaos_calmer_telephony. root@OpenWrt:/# opkg update Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/base/P. Updated list of available packages in /var/opkg-lists/chaos_calmer_base. Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci/P. Updated list of available packages in /var/opkg-lists/chaos_calmer_luci. Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/manage. Updated list of available packages in /var/opkg-lists/chaos_calmer_management. Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/packag. Updated list of available packages in /var/opkg-lists/chaos_calmer_packages. Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/routin. Updated list of available packages in /var/opkg-lists/chaos_calmer_routing. Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/teleph. Updated list of available packages in /var/opkg-lists/chaos_calmer_telephony. root@OpenWrt:/# opkg install luci Installing luci (git-14.294.77948-ecb0c2f-1) to root… Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci/l. Installing uhttpd (2014-08-25-dabd7dea6445aaa0e5b8d9add1872fa7393b3a85) to root. Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/base/u. Installing uhttpd-mod-ubus (2014-08-25-dabd7dea6445aaa0e5b8d9add1872fa7393b3a85. Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/base/u. Installing luci-mod-admin-full (git-14.294.77948-ecb0c2f-1) to root… Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci/l. Installing luci-base (git-14.294.77948-ecb0c2f-1) to root… Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci/l. Installing lua (5.1.5-1) to root… Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/base/l. Installing liblua (5.1.5-1) to root… Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/base/l. Installing libuci-lua (2014-04-11.1-1) to root… Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/base/l. Installing libubus-lua (2014-09-17-4c4f35cf2230d70b9ddd87638ca911e8a563f2f3) to. Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/base/l. Installing luci-theme-bootstrap (git-14.294.77948-ecb0c2f-1) to root… Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci/l. Installing luci-app-firewall (git-14.294.77948-ecb0c2f-1) to root… Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci/l. Installing luci-proto-ppp (git-14.294.77948-ecb0c2f-1) to root… Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci/l. Installing libiwinfo-lua (51) to root… Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/base/l. Installing luci-lib-nixio (git-14.294.77948-ecb0c2f-1) to root… Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci/l. Configuring liblua. Configuring libuci-lua. Configuring libubus-lua. Configuring libiwinfo-lua. Configuring luci-theme-bootstrap. Configuring luci-app-firewall. Configuring lua. Configuring luci-proto-ppp. Configuring luci-base. Configuring luci-mod-admin-full. Configuring uhttpd. ln: /etc/rc.d/S50uhttpd: No space left on device Configuring uhttpd-mod-ubus. Collected errors: * wfopen: /lib/upgrade/luci-add-conffiles.sh: No space left on device. * pkg_write_filelist: Failed to open usr/lib/opkg/info/luci-lib-nixio.list: . * opkg_install_pkg: Failed to extract data files for luci-lib-nixio. Package d! * opkg_install_cmd: Cannot install package luci. * opkg_conf_write_status_files: Can't open status file usr/lib/opkg/status: . root@OpenWrt:/#

  /etc/config/network
  /etc/config/wireless

root@OpenWrt:/# cat /etc/config/network

config interface 'loopback'

      option ifname 'lo'
      option proto 'static'
      option ipaddr '127.0.0.1'
      option netmask '255.0.0.0'

config globals 'globals'

      option ula_prefix 'fd69:a24c:834e::/48'

config interface 'lan'

      option ifname 'eth0'
      option force_link '1'
      option proto 'static'
      option ipaddr '192.168.1.111'
      option netmask '255.255.255.0'
      option ip6assign '60'
      option delegate '0'

/etc/init.d/uhttpd enable /etc/init.d/uhttpd start

tl-wa901nd.1414526079.txt.bz2 · В останнє змінено: 2014/10/28 21:54 by wombat