Originally Posted by
Vampik
Разобрать роутер, подключить USB-TTL адаптер и снять лог удачной (с .chk) и неудачной (с .trx) загрузки.
Удачная загрузка (chk):
Code:
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2012.12.23 17:42:55 =~=~=~=~=~=~=~=~=~=~=~=
Found a Samsung NAND flash with 2048B pages or 128KB blocks; total size 128MB
Decompressing...done
CFE for WNR3500Lv2 version: v1.0.9
Build Date: Fri May 6 11:54:17 CST 2011
Init Arena
Init Devs.
Boot partition size = 262144(0x40000)
NFLASH Boot partition size = 524288(0x80000)
et0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 5.60.136
CPU type 0x19749: 480MHz
Tot mem: 131072 KBytes
Device eth0: hwaddr 84-1B-5E-30-FC-38, ipaddr 192.168.1.1, mask 255.255.255.0
gateway not set, nameserver not set
Checking crc...done.
Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
Loading: ...... 3219548 bytes read
Entry at 0x80001000
Closing network.
Starting program at 0x80001000
Linux version 2.6.22.19 (root@localhost) (gcc version 4.5.4 (GCC) ) #1 Fri Jul 6 01:33:09 MSK 2012
CPU revision is: 00019749
Found a Samsung NAND flash with 2048B pages or 128KB blocks; total size 128MB
Determined physical RAM map:
memory: 08000000 @ 00000000 (usable)
Built 1 zonelists. Total pages: 32512
Kernel command line: root=/dev/mtdblock2 noinitrd init=/sbin/init console=ttyS0,115200
Primary instruction cache 32kB, physically tagged, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, linesize 32 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 512 (order: -1, 2048 bytes)
CPU: BCM5357 rev 2 at 480 MHz
Using 240.000 MHz high precision timer.
console [ttyS0] enabled
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 126592k/131072k available (2495k kernel code, 4412k reserved, 530k data, 120k init, 0k highmem)
SLUB: Genslabs=6, HWalign=32, Order=0-1, MinObjects=4, CPUs=1, Nodes=1
Mount-cache hash table entries: 512
NET: Registered protocol family 16
PCI: no core
PCI: Fixing up bus 0
Time: MIPS clocksource has been installed.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
squashfs: version 3.4 (2008/08/26) Phillip Lougher
squashfs: LZMA suppport for slax.org by jro
io scheduler noop registered (default)
HDLC line discipline: version $Revision: 4.8 $, maxframe=4096
N_HDLC line discipline registered.
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing enabled
serial8250: ttyS0 at MMIO 0xb8000300 (irq = 8) is a 16550A
loop: module loaded
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
MPPE/MPPC encryption/compression module registered
pflash: found no supported devices
Found a 0MB ST compatible serial flash
sflash: found no supported devices
nflash: squashfs filesystem found at block 6377
Boot partition size = 524288(0x80000)
Creating 6 MTD partitions on "nflash":
0x00000000-0x00080000 : "boot"
0x00500000-0x02000000 : "linux"
0x0063a4c4-0x02000000 : "rootfs"
0x00080000-0x00200000 : "nvram"
0x00240000-0x00500000 : "flashfs"
0x00200000-0x00240000 : "board_data"
GACT probability NOT on
Mirror/redirect action on
u32 classifier
Performance counters on
input device check on
Actions configured
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
BCM fast NAT: INIT
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 10
ip6_tables: (C) 2000-2006 Netfilter Core Team
IPv6 over IPv4 tunneling driver
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>
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 120k freed
Algorithmics/MIPS FPU Emulator v1.5
emf: module license 'Proprietary' taints kernel.
eth0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 5.60.127.5
eth1: Broadcom BCM4329 802.11 Wireless Controller 5.60.127.5
vlan1: dev_set_promiscuity(master, 1)
device eth0 entered promiscuous mode
device vlan1 entered promiscuous mode
device eth1 entered promiscuous mode
br0: port 2(eth1) entering forwarding state
br0: port 1(vlan1) entering forwarding state
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci_hcd 0000:00:04.1: EHCI Host Controller
ehci_hcd 0000:00:04.1: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:04.1: irq 5, io mem 0x18004000
ehci_hcd 0000:00:04.1: USB 0.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: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci_hcd 0000:00:04.0: OHCI Host Controller
ohci_hcd 0000:00:04.0: new USB bus registered, assigned bus number 2
ohci_hcd 0000:00:04.0: irq 5, io mem 0x18009000
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usbcore: registered new interface driver usblp
SCSI subsystem initialized
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
NTFS driver 2.1.30 [Flags: R/O MODULE].
vlan2: dev_set_allmulti(master, 1)
Неудачная загрузка (trx):
Code:
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2012.12.23 17:47:21 =~=~=~=~=~=~=~=~=~=~=~=
Found a Samsung NAND flash with 2048B pages or 128KB blocks; total size 128MB
Decompressing...done
CFE for WNR3500Lv2 version: v1.0.9
Build Date: Fri May 6 11:54:17 CST 2011
Init Arena
Init Devs.
Boot partition size = 262144(0x40000)
NFLASH Boot partition size = 524288(0x80000)
et0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 5.60.136
CPU type 0x19749: 480MHz
Tot mem: 131072 KBytes
Device eth0: hwaddr 84-1B-5E-30-FC-38, ipaddr 192.168.1.1, mask 255.255.255.0
gateway not set, nameserver not set
Checking crc...Boot program checksum is invalid
Device eth0 has been deactivated.
Device eth0: hwaddr 84-1B-5E-30-FC-38, ipaddr 192.168.1.1, mask 255.255.255.0
gateway not set, nameserver not set
Start TFTP server
Reading ::
Как видно, загрузчик проверяет CRC прошивки, признает ее некорректной и уходит в режим прошивки через TFTP.
В добавок к предыдущему, trx через tftp не прошивается, по окончании передачи прошивки со стороны tftp-клиента получаем в консоли роутера следующее:
Reading :: Done. 5967872 bytes read
Reading ::
Т.е. приняв прошивку, он не прошивает ее, а продолжает ожидать прошивку от tftp-клиента.
А если передать ему с tftp-клиента chk:
Reading :: Done. 5984314 bytes read
Programming...done. 5984314 bytes written
После чего роутер уходит в перезагрузку и загружается.