全过程参考来自tuoniao,来自http://www.buynetge.net/read.php?tid=2223。
此时按小写tpl进入uboot,我的情况是按tp就进入了。
ar7240> printenv
显示
bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),2752k(rootfs),896k(uImage),64k(NVRAM),64k(ART)
bootcmd=bootm 0x9f020000
bootdelay=1
baudrate=115200
ethaddr=0×00:0xaa:0xbb:0xcc:0xdd:0xee
ipaddr=192.168.1.123
serverip=192.168.1.100
stdin=serial
stdout=serial
stderr=serial
ethact=eth0
Environment size: 359/65532 bytes
接着
ar7240> setenv ipaddr 192.168.1.2
ar7240> setenv serverip 192.168.1.100 备注:这个是台机或本子的固定IP(255.255.255.0,192.168.1.1)
ar7240> printenv
显示
bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),2752k(rootfs),896k(uImage),64k(NVRAM),64k(ART)
bootcmd=bootm 0x9f020000
bootdelay=1
baudrate=115200
ethaddr=0×00:0xaa:0xbb:0xcc:0xdd:0xee
stdin=serial
stdout=serial
stderr=serial
ethact=eth0
ipaddr=192.168.1.2
serverip=192.168.1.100
Environment size: 357/65532 bytes
接着:
ar7240> tftpboot 0×80000000 741.bin 备注:在这个命令之前要把741的固件放到tftp32的文件夹中,并打开tftp32!
显示
eth0 link down
dup 1 speed 1000
Using eth1 device
TFTP from server 192.168.1.100; our IP address is 192.168.1.2
Filename ’7.bin’.
Load address: 0×80000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
######################################################
done
Bytes transferred = 3932160 (3c0000 hex)
看到这个就说明固件已经传入路由的内存中了。
接着
ar7240> erase 0x9f020000 +0x3c0000 备注:+号前有空格
8M flash 是: 刷uboot:
tftp 0×80000000 uboot.bin
erase 0x9f020000 +0x7c0000 erase 0x9f000000 +0×20000
cp.b 0×80000000 0x9f020000 0x7c0000 cp.b 0×80000000 0x9f000000 0×20000
显示
First 0×2 last 0x3d sector size 0×10000
61
Erased 60 sectors
ar7240> cp.b 0×80000000 0x9f020000 0x3c0000备注:两个地址前有空格
显示
Copy to Flash… write addr: 9f020000
Done
到这拯救基本就结束了。
接着输入命令启动路由
ar7240> bootm 0x9f020000
显示
## Booting image at 9f020000 …
Uncompressing Kernel Image … OK
Starting kernel …
Booting AR7240(Python)…
Linux version 2.6.15–LSDK-7.3.0.300 gcc version 3.4.4 #18 Wed Feb 10 10:33:56 CST 2010
flash_size passed from bootloader = 4
CPU revision is: 00019374
Determined physical RAM map:
memory: 02000000 @ 00000000 (usable)
User-defined physical RAM map:
memory: 02000000 @ 00000000 (usable)
Built 1 zonelists
Kernel command line: console=ttyS0,115200 root=/dev/mtdblock2 rootfstype=squashfs init=/sbin/init mtdparts=ar7100-nor0:128k(u-boot),1024k(kernel),2816k(rootfs),64k(config),64k(art) mem=32M
Primary instruction cache 64kB, 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).
Cache parity protection disabled
PID hash table entries: 256 (order: 8, 4096 bytes)
Using 200.000 MHz high precision timer.
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 30548k/32768k available (1368k kernel code, 2204k reserved, 292k data, 128k init, 0k highmem)
Mount-cache hash table entries: 512
Checking for ‘wait’ instruction… available.
NET: Registered protocol family 16
Reset button pressed.
Returning IRQ 48
AR7240 GPIOC major 0
squashfs: version 3.3 (2007/10/31) Phillip Lougher
squashfs: LZMA suppport for slax.org by jro
Initializing Cryptographic API
io scheduler noop registered
io scheduler deadline registered
Serial: 8250/16550 driver $Revision: #1 $ 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0×0 (irq = 19) is a 16550A
RAMDISK driver initialized: 1 RAM disks of 8192K size 1024 blocksize
PPP generic driver version 2.4.2
NET: Registered protocol family 24
cmdlinepart partition parsing not available
Searching for RedBoot partition table
5 RedBoot partitions found on MTD device ar7240-nor0
Creating 5 MTD partitions on “ar7240-nor0″:
0×00000000-0×00020000 : “boot”
0×00020000-0×00120000 : “kernel”
0×00120000-0x003e0000 : “rootfs”
0x003e0000-0x003f0000 : “config”
0x003f0000-0×00400000 : “art”
->Oops: flash id 0xef4016 .
NET: Registered protocol family 2
IP route cache hash table entries: 512 (order: -1, 2048 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear
All bugs added by David S. Miller
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 128k freed
init started: BusyBox v1.01 (2009.12.10-12:12+0000) multi-call binary
Algorithmics/MIPS FPU Emulator v1.5
ip_conntrack version 2.4 (256 buckets, 5120 max) – 244 bytes per conntrack
insmod: cannot open module `/lib/modules/2.6.15/kernel/flashid.ko’: No such file or directory
insmod: cannot open module `/lib/modules/2.6.15/kernel/harmony.ko’: No such file or directory
Now flash open!
Now flash open!
Now flash open!
Now flash open!
Now flash open!
Erase from 0X3E0000 to 0X3EBFB0:.
Program from 0X3E0000 to 0X3EBFB0:
write successfully
Now flash open!
Erase from 0X3E0000 to 0X3EBFB0:.
Program from 0X3E0000 to 0X3EBFB0:
write successfully
(none) mips #18 Wed Feb 10 10:33:56 CST 2010 (none)
(none) login: sys_mode=0 mac:8106c000 ag7240_macs[0]:00000000 ag7240_macs[1]:8106c000
2
sys_mode=0 mac:81c08000 ag7240_macs[0]:81c08000 ag7240_macs[1]:8106c000
1
sys_mode 0 PHY4 auto-negotiation enable
Attention: PHY4 Class A setting in debug 5 register which is not described in DS
phy_setup ethUnit:0 phyUnit:4
Port 4, Neg Success
ATHRS26: resetting s26
ATHRS26: s26 reset done
sys_mode 0 PHY0 auto-negotiation enable
Attention: PHY 0 Class A setting in debug 5 register which is not described in DS
sys_mode 0 PHY1 auto-negotiation enable
Attention: PHY 1 Class A setting in debug 5 register which is not described in DS
sys_mode 0 PHY2 auto-negotiation enable
Attention: PHY 2 Class A setting in debug 5 register which is not described in DS
sys_mode 0 PHY3 auto-negotiation enable
Attention: PHY 3 Class A setting in debug 5 register which is not described in DS
phy_setup ethUnit:1 phyUnit:0
phy_setup ethUnit:1 phyUnit:1
phy_setup ethUnit:1 phyUnit:2
phy_setup ethUnit:1 phyUnit:3
Port 0, Neg Success
Port 1, Neg Success
Port 2, Neg Success
Port 3, Neg Success
device eth0 entered promiscuous mode
phy_setup ethUnit:1 phyUnit:0
phy_setup ethUnit:1 phyUnit:1
phy_setup ethUnit:1 phyUnit:2
phy_setup ethUnit:1 phyUnit:3
Port 0, Neg Success
Port 1, Neg Success
Port 2, Neg Success
Port 3, Neg Success
++++ phy_up is 1, fdx is 1, speed is 1
AG7240: enet unit:1 phy:2 is up…Mii 100Mbps full duplex
AG7240: enet unit 1 phy 2 mode 0x4c04
br0: port 1(eth0) entering learning state
br0: topology change detected, propagating
br0: port 1(eth0) entering forwarding state
ath_hal: module license ‘Proprietary’ taints kernel.
ath_hal: 0.9.17.1 (AR5416, DEBUG, REGOPS_FUNC, WRITE_EEPROM, 11D)
wlan: 0.8.4.2 (Atheros/multi-bss)
ath_rate_atheros: Copyright (c) 2001-2005 Atheros Communications, Inc, All Rights Reserved
ath_dev: Copyright (c) 2001-2007 Atheros Communications, Inc, All Rights Reserved
ath_pci: 0.9.4.5 (Atheros/multi-bss)
wifi0: Atheros 9285: mem=0×10000000, irq=48 hw_base=0xb0000000
wlan_me: Version 0.1
Copyright (c) 2008 Atheros Communications, Inc. All Rights Reserved
wlan: mac acl policy registered
TP_Flags:6****
ap_start_405:Test by Songwei!
The selected channel is 1
Country ie is CN
Country ie is CN
maxrate = 150000
Country ie is CN
br0: port 1(eth0) entering disabled state
phy_setup ethUnit:1 phyUnit:0
phy_setup ethUnit:1 phyUnit:1
phy_setup ethUnit:1 phyUnit:2
phy_setup ethUnit:1 phyUnit:3
Port 0, Neg Success
Port 1, Neg Success
Port 2, Neg Success
Port 3, Neg Success
device ath0 entered promiscuous mode
br0: port 2(ath0) entering learning state
br0: topology change detected, propagating
br0: port 2(ath0) entering forwarding state
br0: port 2(ath0) entering disabled state
Country ie is CN
br0: port 2(ath0) entering learning state
br0: topology change detected, propagating
br0: port 2(ath0) entering forwarding state
++++ phy_up is 1, fdx is 1, speed is 1
AG7240: enet unit:1 phy:2 is up…Mii 100Mbps full duplex
AG7240: enet unit 1 phy 2 mode 0x4c04
br0: port 1(eth0) entering learning state
br0: topology change detected, propagating
br0: port 1(eth0) entering forwarding state
br0: port 2(ath0) entering disabled state
TP_Flags:6****
TP_Flags:0****
Country ie is CN
br0: port 2(ath0) entering learning state
br0: topology change detected, propagating
br0: port 2(ath0) entering forwarding state
+++ GE0 RX DMA ENABLE
这时路由就活过来了
|