淘宝看到一款FIR300M路由器,当时只要19.9元。图便宜就买了。

Hardware

Architecture:MIPS

Vendor:MediaTek (Ralink)

Bootloader:U-Boot 1.1.3

System-On-Chip:Ralink MT7620N ver:2 eco:3

CPUMIPS 24KEc V5.0

CPU Speed580 MHz

Flash:4 MB MXIC 25L320

RAM:32 MB EM63A165TS SDRAM

Wireless:SoC

Ethernet:1

Factory Bootlog

U-Boot 1.1.3 (Apr  9 2014 - 16:26:19)

Board: Ralink APSoC DRAM:  32 MB
relocate_code Pointer at: 81fb4000
enable ephy clock...done. rf reg 29 = 5
SSC disabled.
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 42
spi device id: c2 20 16 c2 20 (2016c220)
find flash: MX25L3205D
raspi_read: from:30000 len:1000
*** Warning - bad CRC, using default environment ============================================
Ralink UBoot Version: 4.1.1.0
--------------------------------------------
ASIC 7620_MP (Port5<->None)
DRAM component: 256 Mbits SDR
DRAM bus: 16 bit
Total memory: 32 MBytes
Flash component: 4 MBytes NOR Flash
Date:Apr 9 2014 Time:16:26:19
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768 ##### The CPU freq = 600 MHZ ####
estimate memory size =32 Mbytes
raspi_read: from:3f0000 len:14
raspi_read: from:3e0000 len:14 =================================================
nvram_org MAGIC:0x48534c46, nvram_bak MAGIC:0x48534c46
nvram_org LEN:0x1bc0, nvram_bak LEN:0x1bc0
nvram_org crc_ver_init:0x201d2, nvram_bak crc_ver_init:0x201d2
Check nvram validation:
nvram org Header Magic Number --> OK
nvram bak Header Magic Number --> OK nvram_org: OK nvram_bak: OK 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.
7: Load Boot Loader code then write to Flash via Serial.
9: Load Boot Loader code then write to Flash via TFTP.
4 3 2 1 0 3: System Boot system code via Flash.
## Booting image at bc050000 ...
raspi_read: from:50000 len:40
Image Name: FIR300M
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 3586140 Bytes = 3.4 MB
Load Address: 80000000
Entry Point: 8000c310
raspi_read: from:50040 len:36b85c
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 8000c310) ...
## Giving linux memsize in MB, 32 Starting kernel ... LINUX started... THIS IS ASIC
Linux version 2.6.36+ (lihaiyang@Server-SW-X03) (gcc version 3.4.2) #14 Fri Apr 18 16:26:28 CST 2014 The CPU feqenuce set to 600 MHz MIPS CPU sleep mode enabled.
PCIE: bypass PCIe DLL.
PCIE: Elastic buffer control: Addr:0x68 -> 0xB4
disable all power about PCIe
PCIE: PLL power down for MT7620N
CPU revision is: 00019650 (MIPS 24Kc)
Determined physical RAM map:
memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
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=ttyS1,57600n8 root=/dev/ram0 console=ttyS0
PID hash table entries: 128 (order: -3, 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, PIPT, no aliases, linesize 32 bytes
Writing ErrCtl register=0003e000
Readback ErrCtl register=0003e000
Memory: 26368k/32768k available (2793k kernel code, 6400k reserved, 628k data, 2444k init, 0k highmem)
NR_IRQS:128
MTK/Ralink System Tick Counter init... cd:80345d28, m:214748, s:32
console [ttyS1] enabled
Calibrating delay loop... 399.36 BogoMIPS (lpj=798720)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
SCSI subsystem initialized
Switching to clocksource Ralink external timer
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
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
fuse init (API version 7.15)
msgmni has been set to 51
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered (default)
HDLC line discipline maxframe=4096
N_HDLC line discipline registered.
Ralink gpio driver initialized
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x10000500 (irq = 37) is a 16550A
serial8250: ttyS1 at MMIO 0x10000c00 (irq = 12) is a 16550A
brd: module loaded
deice id : c2 20 16 c2 20 (2016c220)
MX25L3205D(c2 2016c220) (4096 Kbytes)
mtd .name = raspi, .size = 0x00400000 (0M) .erasesize = 0x00000004 (0K) .numeraseregions = 65536
Creating 7 MTD partitions on "raspi":
0x000000000000-0x000000400000 : "ALL"
0x000000000000-0x000000030000 : "Bootloader"
0x000000030000-0x000000040000 : "Config"
0x000000040000-0x000000050000 : "Factory"
0x000000050000-0x0000003e0000 : "Kernel"
0x0000003e0000-0x0000003f0000 : "nvbackup"
0x0000003f0000-0x000000400000 : "nvram"
rdm_major = 253
SMACCR1 -- : 0x000034bd
SMACCR0 -- : 0xf97bfd14
Ralink APSoC Ethernet Driver Initilization. v3.0 256 rx/tx descriptors allocated, mtu = 1500!
SMACCR1 -- : 0x000034bd
SMACCR0 -- : 0xf97bfd14
PROC INIT OK!
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
PPTP driver version 0.8.5
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (412 buckets, 1648 max)
nf_conntrack_rtsp v0.6.21 loading
matchsize=264
xt_time: kernel timezone is -0000
IPVS: Registered protocols ()
IPVS: Connection hash table configured (size=4096, memory=32Kbytes)
IPVS: ipvs loaded.
GRE over IPv4 demultiplexor driver
gre: can't add protocol
nf_nat_rtsp v0.6.21 loading
ip_tables: (C) 2000-2006 Netfilter Core Team, Type=Restricted Cone
ipt_CLUSTERIP: ClusterIP Version 0.8 loaded successfully
arp_tables: (C) 2002 David S. Miller
TCP cubic registered
NET: Registered protocol family 10
NET: Registered protocol family 17
Bridge firewalling registered
Ebtables v2.0 registered
L2TP core driver, V2.0
PPPoL2TP kernel driver, V2.0
802.1Q VLAN Support v1.8 Ben Greear <[email protected]>
All bugs added by David S. Miller <[email protected]>
Freeing unused kernel memory: 2444k freed
Algorithmics/MIPS FPU Emulator v1.5
devpts: called with bogus options
(sysinit:320)=> done
(convert_wdk_values:350)=> done
(gen_ralink_config:146)=> Make a new configuration again for wireless.
rt2860v2_ap: module license 'unspecified' taints kernel.
Disabling lock debugging due to kernel taint === pAd = c05c2000, size = 809040 === <-- RTMPAllocTxRxRingMemory, Status=0
<-- RTMPAllocAdapterBlock, Status=0
AP Driver version-2.7.1.6
(main_loop:634)=> rc main: enter START state
(main_loop:638)=> Enter setupWizard wlan(do_system:191)=> ebtables -t filter -F
(gen_ralink_config:146)=> Make a new configuration again for wireless.
(wl_itf_rax_wdsx_down:70)=> enter.
(ifconfig:44)=> apcli0 0 (null) (null)
apcli0: No such device
(_eval:357)=> brctl
brctl: iface apcli0: No such device
(ifconfig:44)=> ra0 0 (null) (null)
(ifconfig:44)=> ra1 0 (null) (null)
ra1: No such device
(ifconfig:44)=> ra2 0 (null) (null)
ra2: No such device
(ifconfig:44)=> ra3 0 (null) (null)
ra3: No such device
(do_system:191)=> brctl delif br0 ra0 1>/dev/null 2>&1
(do_system:191)=> brctl delif br0 ra1 1>/dev/null 2>&1
(do_system:191)=> brctl delif br0 ra2 1>/dev/null 2>&1
(do_system:191)=> brctl delif br0 ra3 1>/dev/null 2>&1
(ifconfig:44)=> wds0 0 (null) (null)
wds0: No such device
(ifconfig:44)=> wds1 0 (null) (null)
wds1: No such device
(ifconfig:44)=> wds2 0 (null) (null)
wds2: No such device
(ifconfig:44)=> wds3 0 (null) (null)
wds3: No such device
(do_system:191)=> brctl delif br0 wds0 1>/dev/null 2>&1
(do_system:191)=> brctl delif br0 wds1 1>/dev/null 2>&1
(dRtmpOSNetDevDetach(): RtmpOSNetDeviceDetach(), dev->name=ra0!
o_system:191)=> brctl delif br0 wds2 1>/dev/null 2>&1
(do_system:191)=> brctl delif br0 wds3 1>/dev/null 2>&1
(do_system:191)=> rmmod rt2860v2_ap
(wl_itf_rax_wdsx_up:152)=> enter.
(wl_itf_rax_wdsx_up:171)=> AP mode ... === pAd = c0af8000, size = 809040 === <-- RTMPAllocTxRxRingMemory, Status=0
<-- RTMPAllocAdapterBlock, Status=0
AP Driver version-2.7.1.6
(ifconfRX DESC a0a6b000 size = 2048
ig:44)=> ra0 4163 (null) (null)
APSDCapable[0]=0
APSDCapable[1]=0
APSDCapable[2]=0
APSDCapable[3]=0
APSDCapable[4]=0
APSDCapable[5]=0
APSDCapable[6]=0
APSDCapable[7]=0
APSDCapable[8]=0
APSDCapable[9]=0
APSDCapable[10]=0
APSDCapable[11]=0
APSDCapable[12]=0
APSDCapable[13]=0
APSDCapable[14]=0
APSDCapable[15]=0
default ApCliAPSDCapable[0]=0
Key1Str is Invalid key length(0) or Type(0)
Key2Str is Invalid key length(0) or Type(0)
Key3Str is Invalid key length(0) or Type(0)
Key4Str is Invalid key length(0) or Type(0)
1. Phy Mode = 9
2. Phy Mode = 9
E2PROM: D0 target power=0xff20
E2PROM: 40 MW Power Delta= 0
3. Phy Mode = 9
AntCfgInit: primary/secondary ant 0/1
Initialize RF Central Registers for E2 !!!
Initialize RF Central Registers for E3 !!!
Initialize RF Channel Registers for E2 !!!
Initialize RF Channel Registers for E3 !!!
Initialize RF DCCal Registers for E2 !!!
Initialize RF DCCal Registers for E3 !!!
D1 = 3, D2 = 13, CalCode = 23 !!!
RT6352_Temperature_Init : BBPR49 = 0x3
RT6352_Temperature_Init : TemperatureRef25C = 0xfffffff9
Current Temperature from BBP_R49=0xfffffff6
TX BW Filter Calibration !!!
RX BW Filter Calibration !!!
LOFT Calibration Done!
IQCalibration Start!
IQCalibration Done! CH = 0, (gain= 2, phase=3e)
IQCalibration Start!
IQCalibration Done! CH = 1, (gain= 3, phase=3e)
TX IQ Calibration Done!
RTMPSetPhyMode: channel is out of range, use first channel=0
MCS Set = ff ff 00 00 01
SYNC - BBP R4 to 20MHz.l
Main bssid = 34:bd:f9:7b:fd:10
<==== rt28xx_init, Status=0
0x1300 = 00064380
(_eval:357)=> brctl
brctl: bridge br0: No such device
(wl_itf_rax_wdsx_up:192)=> bssid_num = 1
(wl_restart_8021X_daemon:258)=> enter.
(do_system:191)=> killall rt2860apd
killall: rt2860apd: no process killed
(copy_nvram_org2bak:146)=> nvr magic=0x48534c46, len=7104
(copy_nvram_org2bak:153)=> copy org to bak.
(ifconfig:44)=> lo 4163 127.0.0.1 255.0.0.0
(_eval:357)=> ifconfRaeth v3.0 (igTasklet
,SkbRecycle)
(ifconfi
phy_tx_ring = 0x013e2000, tx_ring = 0xa13e2000 phy_rx_ring0 = 0x013e3000, rx_ring0 = 0xa13e3000
SMACCR1 -- : 0x000034bd
SMACCR0 -- : 0xf97bfd14
RAETH reg kill_sig_workq, return 0
g:CDMA_CSG_CFG = 81000000
44GDMA1_FWD_CFG = 20710000
)===============================================>WAN status is 0
> eth2 4163 (null) (null)
(ifconfig:44)=> ra0 4163 (null) (null)
(_eval:357)=> vconfig
(_eval:357)=> vconfig
(ifconfig:44)=> eth2.1 4163 (null) (null)
(_eval:357)=> ifconfig
(idevice eth2 entered promiscuous mode
fconfig:44)=> eth2.2 4163 (null) (null)
(_eval:357)=> brctl
(_eval:357)=> brctl
(_eval:357)=> brctl
brctl: ioctl 0x89f0 failed: Invalid argument
(_eval:357)=> brctl
switch reg write offset=2004, value=ff0003
switch reg write offset=2104, value=ff0003
switch reg write offset=2204, value=ff0003
switch reg write offset=2304, value=ff0003
switch reg write offset=2404, value=ff0003
switch reg write offset=2504, value=ff0003
switch reg write offset=2010, value=810000c0
switch reg write offset=2110, value=810000c0
switch reg write offset=2210, value=810000c0
switch reg write offset=2310, value=810000c0
switch reg write offset=2410, value=810000c0
switch reg write offset=2510, value=810000c0
switch reg write offset=2610, value=81000000
switch reg write offset=2710, value=81000000
switch reg write offset=2604, value=20ff0003
switch reg write offset=2704, value=20ff0003
switch reg write offset=2610, value=81000000
switch reg write offset=2014, value=10001
switch reg write offset=2114, value=10001
switch reg write offset=2214, value=10001
switch reg write offset=2314, value=10001
switch reg write offset=2414, value=10002
switch reg write offset=2514, value=10001
REG_ESW_WT_MAC_ATC is 0x7ff0002
done.
(_eval:357device eth2.1 entered promiscuous mode
)=> brctl
(_eval:357)=> brctl
device ra0 entered promiscuous mode
system: iwpriv ra0 set IgmpSnEnable=1
(copy_nvram_org2bak:146)=> nvr magic=0x48534c46, len=7104
(copy_nvram_org2bak:153)=> copy org to bak.
(do_system:191)=> ebtables -t filter -F
(gen_ralink_config:146)=> Make a new configuration again for wireless.
(wl_itf_rax_wdsx_down:70)=> enter.
(ifconfig:44)=> apcli0 0 (null) (null)
(_eval:357)=> brctl
brctl: bridge br0: Invalid argument
(ifconfig:44)=> ra0 0 (null) (null)
(ifconfig:44)=> ra1 0 (null) (null)
ra1: No such device
(ifconfig:44)=> ra2 0 (null) (null)
ra2device ra0 left promiscuous mode
: br0: port 2(ra0) entering disabled state
No such device
(ifconfig:44)=> ra3 0 (null) (null)
ra3: No such device
(do_system:191)=> brctl delif br0 ra0 1>/dev/null 2>&1
(do_system:191)=> brctl delif br0 ra1 1>/dev/null 2>&1
(do_system:191)=> brctl delif br0 ra2 1>/dev/null 2>&1
(do_system:191)=> brctl delif br0 ra3 1>/dev/null 2>&1
(ifconfig:44)=> wds0 0 (null) (null)
(ifconfig:44)=> wds1 0 (null) (null)
(ifconfig:44)=> wds2 0 (null) (null)
(ifconfig:44)=> wds3 0 (null) (null)
(do_system:191)=> brctl delif br0 wds0 1>/dev/null 2>&1
(do_system:191)=> brctl delif br0 wds1 1>/dev/null 2>&1
(do_system:191)=> brctl delif br0 wds2 1>/dev/null 2>&1
(do_system:191)=> brctl delif br0 wds3 1>/dev/null 2>&1
(do_system:191)=> rmmod rt2860v2_ap
RtmpOSNetDevDetach(): RtmpOSNetDeviceDetach(), dev->name=ra0!
(wl_itf_rax_wdsx_up:152)=> enter.
(wl_itf_rax_wdsx_up:171)=> AP mode ... === pAd = c103d000, size = 809040 === <-- RTMPAllocTxRxRingMemory, Status=0
<-- RTMPAllocAdapterBlock, Status=0
AP Driver version-2.7.1.6
(ifconfRX DESC a0b50000 size = 2048
ig:44)=> ra0 4163 (null) (null)
APSDCapable[0]=0
APSDCapable[1]=0
APSDCapable[2]=0
APSDCapable[3]=0
APSDCapable[4]=0
APSDCapable[5]=0
APSDCapable[6]=0
APSDCapable[7]=0
APSDCapable[8]=0
APSDCapable[9]=0
APSDCapable[10]=0
APSDCapable[11]=0
APSDCapable[12]=0
APSDCapable[13]=0
APSDCapable[14]=0
APSDCapable[15]=0
default ApCliAPSDCapable[0]=0
Key1Str is Invalid key length(0) or Type(0)
Key2Str is Invalid key length(0) or Type(0)
Key3Str is Invalid key length(0) or Type(0)
Key4Str is Invalid key length(0) or Type(0)
1. Phy Mode = 9
2. Phy Mode = 9
E2PROM: D0 target power=0xff20
E2PROM: 40 MW Power Delta= 0
3. Phy Mode = 9
AntCfgInit: primary/secondary ant 0/1
Initialize RF Central Registers for E2 !!!
Initialize RF Central Registers for E3 !!!
Initialize RF Channel Registers for E2 !!!
Initialize RF Channel Registers for E3 !!!
Initialize RF DCCal Registers for E2 !!!
Initialize RF DCCal Registers for E3 !!!
D1 = 1, D2 = 12, CalCode = 26 !!!
RT6352_Temperature_Init : BBPR49 = 0x1
RT6352_Temperature_Init : TemperatureRef25C = 0xfffffff7
Current Temperature from BBP_R49=0xfffffff6
TX BW Filter Calibration !!!
RX BW Filter Calibration !!!
LOFT Calibration Done!
IQCalibration Start!
IQCalibration Done! CH = 0, (gain= 0, phase= 0)
IQCalibration Start!
IQCalibration Done! CH = 1, (gain= 3, phase=3e)
TX IQ Calibration Done!
RTMPSetPhyMode: channel is out of range, use first channel=0
MCS Set = ff ff 00 00 01
SYNC - BBP R4 to 20MHz.l
Main bssid = 34:bd:f9:7b:fd:10
<==== rt28xx_init, Status=0
0x1300 = 00064380
(_eval:357)=> brctl
device ra0 entered promiscuous mode
(wl_itf_rax_wdsx_up:192)=> bssid_num = 1
(wl_restart_8021X_daemon:258)=> enter.
(do_system:191)=> killall rt2860apd
killall: rt2860apd: no process killed
(copy_nvram_org2bak:146)=> nvr magic=0x48534c46, len=7104
(copy_nvram_org2bak:153)=> copy org to bak.
## [br0: port 2(ra0) entering learning state
rcbr0: port 2(ra0) entering learning state
] br0: port 1(eth2.1) entering learning state
sebr0: port 1(eth2.1) entering learning state
t lan_if as 192.168.1.1/255.255.255.0
(ifconfig:44)=> br0 4163 192.168.1.1 255.255.255.0
(ifconfig:44)=> br0 4163 192.168.1.1 255.255.255.0
killall: dnsmasq: no process killed
stop dns done
br0: port 2(ra0) entering forwarding state
br0: port 1(eth2.1) entering forwarding state
start dns done
(_eval:357)=> /sbin/klogd
(_eval:357)=> udhcpd
(start_httpd:911)=> done
(reap:274)=> Reaped 303
(start_wan:1297)=> wan_proto=dhcp, wan_ifname=eth2.2
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>macaddr_buf=34:BD:F9:7B:FD:15
(_eval:357)=> ifconfig
(reap:274)=> Reaped 302
(_eval_udhcpc:432)=> udhcpc
(ifconfig:44)=> eth2.2 4163 0.0.0.0 (null)
eth2.2: No such process
[wan_down:2096] set wan_ipaddr to empty
webs: Listening for HTTP requests at address 192.168.1.1
[DEBUG][cwmp_init_141] Enter
(reap:274)=> Reaped 301
(start_wan:1590)=> ######## started dhcp client daemon.
stop dns done
(copy_nvram_org2bak:146)=> nvr magic=0x48534c46, len=7104
(copy_nvram_org2bak:153)=> copy org to bak.
(start_wan:1640)=>
(do_system:191)=> ap_mgrd&
(_eval:357)=> /sbin/wpspbc
MP AUTOMATION daemon (ver 1.0)
(do_system:191)=> iwpriv ra0 set WscConfMode=0 1>/dev/null 2>&1
(do_system:191)=> route delete 239.255.255.250 1>/dev/null 2>&1
Password for 'admin' changed
(_eval:357)=> lld2d ***** g_wl_interface = ra0 ****** (do_system:191)=> route del -net 239.0.0.0 netmask 255.0.0.0 br0
(reap:274)=> Reaped 335
route: ioctl 0x890c failed: No such process
(do_system:191)=> route add -net 239.0.0.0 netmask 255.0.0.0 br0
(iptables_init:1020)=> External IP =
(do_system:191)=> iptables -t nat -N MINIUPNPD
(do_system:191)=> iptables -t nat -A PREROUTING -i eth2.2 -j MINIUPNPD
(do_system:191)=> iptables -t filter -N MINIUPNPD
(do_system:191)=> iptables -t filter -A FORWARD -i eth2.2 ! -o eth2.2 -j MINIUPNPD
(iptables_init:1040)=> done
(do_system:191)=> killall -q miniupnpd
(start_upnp:1121)=> done
(rcl_static_route:148)=> enter.
(rcl_services_arp:284)=> enter.
(do_system:191)=> killall crond
killall: crond: no process killed
#start_crond!
(do_system:191)=> /usr/sbin/crond &
Jan 1 00:00:16 crond[557]: crond (busybox 1.12.1) started, log level 8 killall: dnsmasq: no process killed
stop dns done
(copy_nvram_org2bak:146)=> nvr magic=0x48534c46, len=7104
(copy_nvram_org2bak:153)=> copy org to bak.
start dns done
(start_services:1882)=> done
NTPSync = 1
(rcl_time:100)=> enter rcl_time.
(rcl_services_ntpc:88)=> enter.
(_eval:357)=> /sbin/pc
(stop_ntpc:37)=> done
(_eval:357)=> ntpclient
(start_ntpc:80)=> done
(main_loop:697)=> rc main: enter TIMER state
(main_loop:702)=> rc main: enter IDLE state
hostname1 = clock.fmt.he.net
hostname2 = clock.nyc.he.net
start clock.fmt.he.net
clock.fmt.he.net: Unknown host
start clock.nyc.he.net
clock.nyc.he.net: Unknown host
start dns done dnsmasq: failed to create listening socket: Address already in use
(reap:274)=> Reaped 555
(reap:274)=> Reaped 568
(reap:274)=> Reaped 564
stop dns done
start dns done
(rcl_firewall:2685)=> enter.
(rcl_firewall:2689)=> wanif=eth2.2,wanip=,lanif=br0,lanip=192.168.1.1,lanmask=24
(do_system:191)=> iptables -F -t filter 1>/dev/null 2>&1
(do_system:191)=> iptables -F -t nat 1>/dev/null 2>&1
(do_system:191)=> iptables -F -t mangle 1>/dev/null 2>&1
(do_system:191)=> killall schelper
killall: schelper: no process killed
(do_system:191)=> iptables -t filter -N wan_icmp_input 1>/dev/null 2>&1
(do_system:191)=> iptables -t filter -A INPUT -j wan_icmp_input 1>/dev/null 2>&1
(do_system:191)=> iptables -t filter -N lan_icmp_input 1>/dev/null 2>&1
(do_system:191)=> iptables -t filter -A FORWARD -j lan_icmp_input 1>/dev/null 2>&1
(do_system:191)=> iptables -t filter -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu 1>/dev/null 2>&1
(do_system:191)=> iptables -t filter -N spi_forward 1>/dev/null 2>&1
(do_system:191)=> iptables -t filter -A FORWARD -j spi_forward 1>/dev/null 2>&1
(do_system:191)=> iptables -t filter -N spi_input 1>/dev/null 2>&1
(do_system:191)=> iptables -t filter -A INPUT -j spi_input 1>/dev/null 2>&1
(do_system:191)=> iptables -t nat -F MINIUPNPD
(do_system:191)=> iptables -t nat -D PREROUTING -i eth2.2 -j MINIUPNPD
iptables: No chain/target/match by that name.
(do_system:191)=> iptables -t nat -X MINIUPNPD
(do_system:191)=> iptables -t filter -F MINIUPNPD
(do_system:191)=> iptables -t filter -D FORWARD -i eth2.2 ! -o eth2.2 -j MINIUPNPD
iptables: No chain/target/match by that name.
(do_system:191)=> iptables -t filter -X MINIUPNPD
(iptables_removeall:1069)=> done
(wan_down:2158)=> done
(deconfig:83)=> done
Jan 1 00:01:01 crond[557]: time disparity of -479 minutes detected try again
start clock.fmt.he.net
clock.fmt.he.net: Unknown host
start clock.nyc.he.net
clock.nyc.he.net: Unknown host
Rcv Wcid(1) AddBAReq
Start Seq = 00000000
try again
start clock.fmt.he.net
clock.fmt.he.net: Unknown host
start clock.nyc.he.net
clock.nyc.he.net: Unknown host
(copy_nvram_org2bak:146)=> nvr magic=0x48534c46, len=7108
(copy_nvram_org2bak:153)=> copy org to bak.
Web user Login:User:admin Mac:54:e4:3a:4b:33:10
login wizard.
(copy_nvram_org2bak:146)=> nvr magic=0x48534c46, len=7108
(copy_nvram_org2bak:153)=> copy org to bak.
(copy_nvram_org2bak:146)=> nvr magic=0x48534c46, len=7108
(copy_nvram_org2bak:153)=> copy org to bak.
try again
start clock.fmt.he.net
clock.fmt.he.net: Unknown host
start clock.nyc.he.net
clock.nyc.he.net: Unknown host phicomm.routerlogin login:
phicomm.routerlogin login: admin
Password:
Jan 1 00:04:10 login[1563]: root login on 'console' BusyBox v1.12.1 (2014-04-11 13:39:13 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands. # cat /pr# cat /proc/mt# cat /proc/mt
cat: can't open '/proc/mt': No such file or directory
# cat /pr# cat /proc/m# cat /proc/m
/proc/meminfo /proc/modules /proc/mt7620/
/proc/misc /proc/mounts /proc/mtd
# cat /proc/mtry again
start clock.fmt.he.net
clock.fmt.he.net: Unknown host
start clock.nyc.he.net
clock.nyc.he.net: Unknown host
td
dev: size erasesize name
mtd0: 00400000 00010000 "ALL"
mtd1: 00030000 00010000 "Bootloader"
mtd2: 00010000 00010000 "Config"
mtd3: 00010000 00010000 "Factory"
mtd4: 00390000 00010000 "Kernel"
mtd5: 00010000 00010000 "nvbackup"
mtd6: 00010000 00010000 "nvram"

OpenWrt Bootlog

编译一个wrtnode的固件放进去跑:

U-Boot 1.1.3 (Apr  9 2014 - 16:26:19)

Board: Ralink APSoC DRAM:  32 MB
relocate_code Pointer at: 81fb4000
enable ephy clock...done. rf reg 29 = 5
SSC disabled.
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 42
spi device id: c2 20 16 c2 20 (2016c220)
find flash: MX25L3205D
raspi_read: from:30000 len:1000
raspi_read: from:30000 len:1000
============================================
Ralink UBoot Version: 4.1.1.0
--------------------------------------------
ASIC 7620_MP (Port5<->None)
DRAM component: 256 Mbits SDR
DRAM bus: 16 bit
Total memory: 32 MBytes
Flash component: 4 MBytes NOR Flash
Date:Apr 9 2014 Time:16:26:19
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768 ##### The CPU freq = 600 MHZ ####
estimate memory size =32 Mbytes
raspi_read: from:3f0000 len:14
raspi_read: from:3e0000 len:14 =================================================
nvram_org MAGIC:0x20031985, nvram_bak MAGIC:0x20031985
nvram_org LEN:0xc, nvram_bak LEN:0xc
nvram_org crc_ver_init:0xe41eb0b1, nvram_bak crc_ver_init:0xe41eb0b1
Check nvram validation:
nvram org Header Magic Number --> Failed
nvram bak Header Magic Number --> Failed nvram_org: Broken nvram_bak: Broken
Restoredefault~~ 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.
7: Load Boot Loader code then write to Flash via Serial.
9: Load Boot Loader code then write to Flash via TFTP.
4
You choosed 1 0
raspi_read: from:40028 len:6 1: System Load Linux to SDRAM via TFTP.
Please Input new ones /or Ctrl-C to discard
Input device IP (10.10.10.123) ==:10.10.10.123
Input server IP (10.10.10.3) ==:10.10.10.3
Input Linux Kernel filename (vmlinux-wrtnode.uImage) ==:vmlinux-wrtnode.uImage netboot_common, argc= 3 NetTxPacket = 0x81FE5940 KSEG1ADDR(NetTxPacket) = 0xA1FE5940 NetLoop,call eth_halt ! NetLoop,call eth_init !
Trying Eth0 (10/100-M) Waitting for RX_DMA_BUSY status Start... done ETH_STATE_ACTIVE!!
TFTP from server 10.10.10.3; our IP address is 10.10.10.123
Filename 'vmlinux-wrtnode.uImage'. TIMEOUT_COUNT=10,Load address: 0x80a00000
Loading: *Got ARP REPLY, set server/gtwy eth addr (80:fa:5b:00:89:43)
Got it
#################################################################
#################################################################
#################################################################
###########
done
Bytes transferred = 1052580 (100fa4 hex)
NetBootFileXferSize= 00100fa4
Automatic boot of image at addr 0x80A00000 ...
## Booting image at 80a00000 ...
Image Name: MIPS OpenWrt Linux-3.14.18
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1052516 Bytes = 1 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, 32 Starting kernel ... [ 0.000000] Linux version 3.14.18 (sam@sam-CW65S) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r42537) ) #6 Sun Sep 21 15:12:23 CST 2014
[ 0.000000] Board has SDRAM
[ 0.000000] Analog PMU set to hw control
[ 0.000000] Digital PMU set to hw control
[ 0.000000] SoC Type: Ralink MT7620N 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: 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, PIPT, no aliases, linesize 32 bytes
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
[ 0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[ 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=000215dc
[ 0.000000] Readback ErrCtl register=000215dc
[ 0.000000] Memory: 29220K/32768K available (2290K kernel code, 123K rwdata, 456K rodata, 128K init, 180K bss, 3548K reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:256
[ 0.000000] CPU Clock: 600MHz
[ 0.000000] systick: running - mult: 214748, shift: 32
[ 0.000000] genirq: Flags mismatch irq 7. 00014600 (timer) vs. 00014600 (systick)
[ 0.010000] Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
[ 0.050000] pid_max: default: 32768 minimum: 301
[ 0.050000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.060000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.060000] pinctrl core: initialized pinctrl subsystem
[ 0.070000] NET: Registered protocol family 16
[ 0.080000] bio: create slab <bio-0> at 0
[ 0.090000] rt2880_gpio 10000600.gpio: registering 24 gpios
[ 0.090000] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[ 0.100000] rt2880_gpio 10000660.gpio: registering 32 gpios
[ 0.100000] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[ 0.110000] rt2880_gpio 10000688.gpio: registering 1 gpios
[ 0.110000] rt2880_gpio 10000688.gpio: registering 1 irq handlers
[ 0.120000] Switched to clocksource systick
[ 0.120000] NET: Registered protocol family 2
[ 0.140000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.140000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.170000] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.170000] TCP: reno registered
[ 0.170000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.200000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.200000] NET: Registered protocol family 1
[ 0.220000] rt-timer 10000100.timer: maximum frequency is 2441Hz
[ 0.230000] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.270000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.270000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.300000] msgmni has been set to 57
[ 0.310000] io scheduler noop registered
[ 0.320000] io scheduler deadline registered (default)
[ 0.330000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.350000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a 16550A
[ 0.370000] console [ttyS0] enabled
[ 0.370000] console [ttyS0] enabled
[ 0.370000] bootconsole [early0] disabled
[ 0.370000] bootconsole [early0] disabled
[ 0.400000] m25p80 spi32766.0: found mx25l3205d, expected mx25l12805d
[ 0.420000] m25p80 spi32766.0: mx25l3205d (4096 Kbytes)
[ 0.420000] 4 ofpart partitions found on MTD device spi32766.0
[ 0.440000] Creating 4 MTD partitions on "spi32766.0":
[ 0.440000] 0x000000000000-0x000000030000 : "u-boot"
[ 0.460000] 0x000000030000-0x000000040000 : "u-boot-env"
[ 0.470000] 0x000000040000-0x000000050000 : "factory"
[ 0.490000] 0x000000050000-0x000001000000 : "firmware"
[ 0.490000] mtd: partition "firmware" extends beyond the end of device "spi32766.0" -- size truncated to 0x3b0000
[ 0.520000] 0x000000150f02-0x000000400000 : "rootfs"
[ 0.520000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 0.560000] mtd: device 4 (rootfs) set to be root filesystem
[ 0.560000] mtd: partition "rootfs_data" created automatically, ofs=0x370000, len=0x90000
[ 0.590000] 0x000000370000-0x000000400000 : "rootfs_data"
[ 0.590000] ralink_soc_eth 10100000.ethernet: Enabling TSO
[ 0.610000] (unregistered net_device): port 3 link up (100Mbps/Full duplex)
[ 0.630000] ralink_soc_eth 10100000.ethernet: loaded mt7530 driver
[ 0.630000] eth0: done loading
[ 0.650000] rt3xxx-usbphy usbphy.3: loaded
[ 0.650000] rt2880_wdt 10000120.watchdog: Initialized
[ 0.670000] TCP: cubic registered
[ 0.670000] NET: Registered protocol family 17
[ 0.690000] 8021q: 802.1Q VLAN Support v1.8
[ 0.710000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[ 0.730000] Freeing unused kernel memory: 128K (802d0000 - 802f0000)
procd: Console is alive
procd: - watchdog -
[ 5.330000] usbcore: registered new interface driver usbfs
[ 5.360000] usbcore: registered new interface driver hub
[ 5.360000] usbcore: registered new device driver usb
[ 5.380000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 5.400000] ehci-platform: EHCI generic platform driver
[ 5.800000] rt3xxx-usbphy usbphy.3: remote usb device wakeup disabled
[ 5.820000] rt3xxx-usbphy usbphy.3: UTMI 16bit 30MHz
[ 5.830000] ehci-platform 101c0000.ehci: EHCI Host Controller
[ 5.840000] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[ 5.860000] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[ 5.890000] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[ 5.910000] hub 1-0:1.0: USB hub found
[ 5.910000] hub 1-0:1.0: 1 port detected
[ 5.930000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 5.930000] ohci-platform: OHCI generic platform driver
[ 5.950000] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
[ 5.970000] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[ 5.970000] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[ 6.060000] hub 2-0:1.0: USB hub found
[ 6.060000] hub 2-0:1.0: 1 port detected
procd: - preinit -
[ 6.520000] random: mktemp urandom read with 67 bits of entropy available
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 ready
jffs2 is ready
[ 9.840000] jffs2: notice: (281) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 9 of xref (0 dead, 2 orphan) found.
switching to overlay
procd: - early -
procd: - watchdog -
procd: - ubus -
procd: - init -
Please press Enter to activate this console.
[ 11.930000] NET: Registered protocol family 10
[ 11.950000] nf_conntrack version 0.5.0 (458 buckets, 1832 max)
[ 11.970000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 11.990000] Loading modules backported from Linux version master-2014-05-22-0-gf2032ea
[ 12.010000] Backport generated by backports.git backports-20140320-37-g5c33da0
[ 12.030000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 12.090000] xt_time: kernel timezone is -0000
[ 12.140000] cfg80211: Calling CRDA to update world regulatory domain
[ 12.150000] cfg80211: World regulatory domain updated:
[ 12.170000] cfg80211: DFS Master region: unset
[ 12.170000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 12.190000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 12.210000] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 12.230000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 12.230000] cfg80211: (5170000 KHz - 5250000 KHz @ 160000 KHz), (N/A, 2000 mBm), (N/A)
[ 12.260000] cfg80211: (5250000 KHz - 5330000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 12.270000] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 12.290000] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 12.310000] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[ 12.400000] PPP generic driver version 2.4.2
[ 12.420000] NET: Registered protocol family 24
[ 12.460000] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0500 detected
[ 12.480000] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 7620 detected BusyBox v1.22.1 (2014-09-20 12:55:52 CST) 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, r42537)
-----------------------------------------------------
* 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:/# [ 20.430000] random: nonblocking pool is initialized
procd: - init complete -
[ 20.880000] device eth0.1 entered promiscuous mode
[ 20.900000] device eth0 entered promiscuous mode
[ 20.930000] br-lan: port 1(eth0.1) entered forwarding state
[ 20.940000] br-lan: port 1(eth0.1) entered forwarding state
[ 22.940000] br-lan: port 1(eth0.1) entered forwarding state root@OpenWrt:/# cat /prroot@OpenWrt:/# cat /proc/neroot@OpenWrt:/# cat /proc/net/devroot@OpenWrt:/# cat /proc/net/dev
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
eth0.1: 7583 42 0 0 0 0 0 32 2650 17 0 0 0 0 0 0
lo: 3360 50 0 0 0 0 0 0 3360 50 0 0 0 0 0 0
wlan0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
eth0: 15404 79 0 31 0 0 0 0 6275 35 0 0 0 0 0 0
br-lan: 7583 42 0 0 0 0 0 0 2604 16 0 0 0 0 0 0
eth0.2: 0 0 0 0 0 0 0 0 1764 10 0 0 0 0 0 0
root@OpenWrt:/# ifcoroot@OpenWrt:/# ifconfig
br-lan Link encap:Ethernet HWaddr 34:BD:F9:7B:FD:10
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::36bd:f9ff:fe7b:fd10/64 Scope:Link
inet6 addr: fd0d:95de:768e::1/60 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:71 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:10058 (9.8 KiB) TX bytes:2748 (2.6 KiB) eth0 Link encap:Ethernet HWaddr 34:BD:F9:7B:FD:10
inet6 addr: fe80::36bd:f9ff:fe7b:fd10/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:108 errors:0 dropped:31 overruns:0 frame:0
TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18401 (17.9 KiB) TX bytes:6761 (6.6 KiB)
Interrupt:5 eth0.1 Link encap:Ethernet HWaddr 34:BD:F9:7B:FD:10
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:71 errors:0 dropped:0 overruns:0 frame:0
TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:10058 (9.8 KiB) TX bytes:2794 (2.7 KiB) eth0.2 Link encap:Ethernet HWaddr 34:BD:F9:7B:FD:11
inet6 addr: fe80::36bd:f9ff:fe7b:fd11/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:2106 (2.0 KiB) 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:50 errors:0 dropped:0 overruns:0 frame:0
TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3360 (3.2 KiB) TX bytes:3360 (3.2 KiB) root@OpenWrt:/# ifcoroot@OpenWrt:/# ifconfig
br-lan Link encap:Ethernet HWaddr 34:BD:F9:7B:FD:10
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::36bd:f9ff:fe7b:fd10/64 Scope:Link
inet6 addr: fd0d:95de:768e::1/60 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4937 errors:0 dropped:0 overruns:0 frame:0
TX packets:2735 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:457191 (446.4 KiB) TX bytes:982458 (959.4 KiB) eth0 Link encap:Ethernet HWaddr 34:BD:F9:7B:FD:10
inet6 addr: fe80::36bd:f9ff:fe7b:fd10/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4991 errors:0 dropped:31 overruns:0 frame:0
TX packets:2839 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:554632 (541.6 KiB) TX bytes:1018151 (994.2 KiB)
Interrupt:5 eth0.1 Link encap:Ethernet HWaddr 34:BD:F9:7B:FD:10
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4954 errors:0 dropped:0 overruns:0 frame:0
TX packets:2724 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:458395 (447.6 KiB) TX bytes:981352 (958.3 KiB) eth0.2 Link encap:Ethernet HWaddr 34:BD:F9:7B:FD:11
inet6 addr: fe80::36bd:f9ff:fe7b:fd11/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:34938 (34.1 KiB) 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:2442 errors:0 dropped:0 overruns:0 frame:0
TX packets:2442 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:167661 (163.7 KiB) TX bytes:167661 (163.7 KiB) wlan0 Link encap:Ethernet HWaddr 34:BD:F9:7B:FD:10
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) root@OpenWrt:/# cat /etroot@OpenWrt:/# cat /etc/winconroot@OpenWrt:/# cat /etc/config/neroot@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 'fd0d:95de:768e::/48' config interface 'lan'
option ifname 'eth0.1'
option force_link '1'
option macaddr '34:bd:f9:7b:fd:10'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60' config interface 'wan'
option ifname 'eth0.2'
option force_link '1'
option macaddr '34:bd:f9:7b:fd:11'
option proto 'dhcp' config interface 'wan6'
option ifname '@wan'
option proto 'dhcpv6' config switch
option name 'switch0'
option reset '1'
option enable_vlan '1' config switch_vlan
option device 'switch0'
option vlan '1'
option ports '1 2 3 4 6t' config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0 6t'

遇到的问题

uboot跑完之后,停在Starting kernel...

此时可以在kernel里把setup_early_printk()提前,用early_printk来调试。

prom_soc_init()函数会读取硬件信息,其中

	cfg0 = __raw_readl(sysc + SYSC_REG_SYSTEM_CONFIG0);
dram_type = (cfg0 >> SYSCFG0_DRAM_TYPE_SHIFT) & SYSCFG0_DRAM_TYPE_MASK;
early_printk("cfg0 0x%x, dram_type %d\n", cfg0, dram_type);

这里加了一句early_printk打印,发现dram_type值为3:

cfg0 0x132, dram_type 3

在代码中:

// mt7620.h
#define SYSCFG0_DRAM_TYPE_SDRAM 0
#define SYSCFG0_DRAM_TYPE_DDR1 1
#define SYSCFG0_DRAM_TYPE_DDR2 2 // mt7620.c
static __init void
mt7620_dram_init(struct ralink_soc_info *soc_info)
{
switch (dram_type) {
case SYSCFG0_DRAM_TYPE_SDRAM:
pr_info("Board has SDRAM\n");
soc_info->mem_size_min = MT7620_SDRAM_SIZE_MIN;
soc_info->mem_size_max = MT7620_SDRAM_SIZE_MAX;
break; case SYSCFG0_DRAM_TYPE_DDR1:
pr_info("Board has DDR1\n");
soc_info->mem_size_min = MT7620_DDR1_SIZE_MIN;
soc_info->mem_size_max = MT7620_DDR1_SIZE_MAX;
break; case SYSCFG0_DRAM_TYPE_DDR2:
pr_info("Board has DDR2\n");
soc_info->mem_size_min = MT7620_DDR2_SIZE_MIN;
soc_info->mem_size_max = MT7620_DDR2_SIZE_MAX;
break; default:
BUG();
}
}

dram_type=3, 就会走到BUG(). 所以在这里加上case 3。另外,在mt7620_get_dram_rate()取sdram频率的时候,也要加上3这个条件。

mt7620数据手册中只描述了0,1,2的值,也难怪内核代码里会这样写。不知道这里为什么会读出3来。

FIR300M刷openwrt-LMLPHP

05-16 10:10