号称最小的路由器:联想 R2100

当时买这玩意纯属好奇。售价不到 ¥40 ,方案是 RT5350 。

P1130313

这回也是正儿八经的销售包装,内含说明书、电源和路由器。

P1130304

上半部分是路由器本尊,下半部分只是一个 USB 接口的电源而已。

P1130305

电源特写,5V 550mA ,体积做得有点大了,为航嘉代工。

P1130308

电源铭牌。

P1130309

路由器底部。这个体积号称最小也许不无道理。

需要说明的是这货的 USB 口比较短,从其它设备上取电有时候需要一截 USB 延长线。

P1130310

路由器正面。一个 RESET 孔,一个双色的 LED 。

P1130311

RJ-45 接口。

P1130327

底部有几个卡扣,卡得很死,基本上需要破坏一点外观才能开壳。

P1130316

从正面可以看到联想精神病人思路广采用了奇怪的钢丝天线,一长一短两根呈约 30° 角。这种体积的路由器本应该采用贴片陶瓷天线,效果应该比这种奇怪的玩意好不少。

P1130342

网线变压器用的是直插式的,如果采用贴片的体积也许可以做得更小,同时也会少一道手工焊接的工序。

网口带有屏蔽,但是没有完全覆盖住,可能只是为了方便固定。特殊的设计很好地控制了它的高度。

P1130334

由于 RT5350 是 1T1R 的,所以两个天线连接在一起。

P1130322

背面。USB 插头本身很长,但是外壳没有设计好。不如做个 MicroUSB ,直接拿手机的电源供电。

P1130344

工作时的样子。

P1130333

撕掉标签,发现是常见的 EtronTech EM63A165TS-6G ,166MHz 4M×4Bank×16bit 的 SDR SDRAM 。

P1130345

侧面。

P1130330

上下连接的部分是 1.0mm 间距的排针。图中大块的黑色塑料是 2.54mm(100mil) 的排针座,以示对比。

P1130326

旁边三个依次是 TTL UART 的两个脚和 GND 。TXD 跟 RXD 的顺序记不大清,每次用都要试一下。

P1130323

猪脚不出意外的是 Ralink 的 RT5350F 。

P1130325

闪存是 Eon 的 EN25Q32B ,4MBytes 。

P1130341

20.000MHz 的晶体。

P1130359

掰开来看里面的东西。顺便焊上 TTL UART 引线。可以看到 USB 接口附近印有硬件版本号 V1.3 。

P1130360

网线变压器是手工焊接的,助焊剂没有清洗。

P1130675

RJ-45 插座卡住网线水晶头的特写。

P1130364

排针和 RT5350 中间是一路 DC-DC ,带有贴片功率电感。

P1130365

另外一路 DC-DC ,同样带有贴片功率电感。

P1130367

可以选择趁机换个闪存。但是这台机器实在没啥必要,又没 USB 又没交换机,当个基本的路由器使就可以了。

P1130355

焊上 TTL UART 连接线。

P1130670

掰开也是可以用的,RT5350F 的发热非常大,不开无线和 AR9130 差不多,开了无线之后就烫得摸不上手了。

P1130676

如果不打算要外壳的话,可以把钢丝天线卸下来,利用板子背面(有 RAM 的那一面)上的接地点焊接 SMA 跳线。

P1130358

在外壳上钻些孔以便散热。

P1130368

装回去以后的样子。

P1130370

完工。

P1130357

开始折腾。

OpenWRT 是支持 RT5350 的。自己写了个 DTS :

/dts-v1/;

/include/ "rt5350.dtsi"

/ {
	compatible = "R2100", "ralink,rt5350-soc";
	model = "Lenovo R2100";

	memory@0 {
		reg = ;
	};

	palmbus@10000000 {
		sysc@0 {
			ralink,pinmux = "i2c", "spi", "uartlite", "jtag", "mdio", "sdram", "rgmii";
			ralink,uartmux = "gpio";
			ralink,wdtmux = ;
		};

		gpio0: gpio@600 {
			status = "okay";
		};

		spi@b00 {
			status = "okay";
			m25p80@0 {
				#address-cells = ;
				#size-cells = ;
				compatible = "en25q32b";
				reg = ;
				linux,modalias = "m25p80", "en25q32b";
				spi-max-frequency = ;

				partition@0 {
					label = "u-boot";
					reg = ;
					read-only;
				};

				partition@30000 {
					label = "u-boot-env";
					reg = ;
					read-only;
				};

				factory: partition@40000 {
					label = "factory";
					reg = ;
					read-only;
				};

				partition@50000 {
					label = "firmware";
					reg = ;
				};
			};
		};
	};

	ethernet@10100000 {
		status = "okay";
	};

	esw@10110000 {
		status = "okay";
		ralink,portmap = ;
	};

	wmac@10180000 {
		status = "okay";
	};

	gpio-leds {
		compatible = "gpio-leds";
		power {
			label = "r2100:green:power";
			gpios = <&gpio0 9 1>;
		};
	};

	gpio-keys-polled {
		compatible = "gpio-keys-polled";
		#address-cells = ;
		#size-cells = ;
		poll-interval = ;
		reset {
			label = "reset";
			gpios = <&gpio0 7 1>;
			linux,code = ;
		};
	};

};

WLAN LED (橙色)是 rt2800pci-phy0::radio 。需要注意的是它是反相的,Linux 下将其 brightness 设为 0 后实际亮起,设为 255 后实际熄灭。这设计估计是为了配合 APSoC SDK 的固件,让路由器无线启动以后灭掉橙色灯。

在 OpenWRT 的 target/linux/ramips/base-files/etc/uci-defaults/01_leds 中可以这样写:

        r2100)
                ucidef_set_led_default "wlan" "WLAN LED (amber)" "rt2800pci-phy0::radio" "0"
                set_wifi_led "rt2800pci-phy0::radio"
                ;;

另外看看 stock firmware 的启动输出,会发现其只认 16MB 内存。
APSoC SDK v3.6.0.0 的 u-boot 还未支持 EN25Q32B ,如果刷入大于 4MB 的镜像会导致 u-boot 被盖掉,机器变砖,这点要特别注意。

自带的 u-boot / APSoC SDK v3.6.0.0 的 u-boot

接上 UART 看 stock firmware 启动输出(在这里发现断电后需要拔掉 UART 再上电,否则 POR 会出问题):

U-Boot 1.1.3 (Sep 27 2012 - 17:34:48)

Board: Ralink APSoC DRAM:  32 MB
relocate_code Pointer at: 81fb4000
spi_wait_nsec: 42 
spi device id: 1c 30 16 1c 30 (30161c30)
raspi_read: from:30000 len:1000 
.*** Warning - bad CRC, using default environment

============================================ 
Ralink UBoot Version: 3.6.0.0
-------------------------------------------- 
ASIC 5350_MP (Port5None)
DRAM_CONF_FROM: Boot-Strapping 
DRAM_TYPE: SDRAM 
DRAM_SIZE: 256 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 32 MBytes
Flash component: SPI Flash
Date:Sep 27 2012  Time:17:34:48
============================================ 
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384 

 ##### The CPU freq = 360 MHZ #### 
 estimate memory size =32 Mbytes

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. 
 0 

3: System Boot system code via Flash.
## Booting image at bc050000 ...
raspi_read: from:50000 len:40 
.   Image Name:   Linux Kernel Image
   Created:      2012-10-22  17:18:49 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    2003276 Bytes =  1.9 MB
   Load Address: 80000000
   Entry Point:  80323000
raspi_read: from:50040 len:1e914c 
...............................   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80323000) ...
## Giving linux memsize in MB, 32

Starting kernel ...

LINUX started...

 THIS IS ASIC
Linux version 2.6.21 (root@slx32) (gcc version 3.4.2) #4 Mon Oct 22 09:18:44 AKDT 2012

 The CPU frequency set to 360 MHz
CPU revision is: 0001964c
Determined physical RAM map:
 memory: 01000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Built 1 zonelists.  Total pages: 4064
Kernel command line: console=ttyS1,57600n8 root=/dev/ram0
Primary instruction cache 32kB, physically tagged, 4-way, linesize 32 bytes.
Primary data cache 16kB, 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
cause = c0808010, status = 11000000
PID hash table entries: 64 (order: 6, 256 bytes)
calculating r4koff... 0015f900(1440000)
CPU frequency 360.00 MHz
Using 180.000 MHz high precision timer.
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 11872k/16384k available (2870k kernel code, 4512k reserved, 337k data, 1060k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
NET: Registered protocol family 2
Time: MIPS clocksource has been installed.
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
detected lzma initramfs
detected lzma initramfs
initramfs: LZMA lc=3,lp=0,pb=2,dictSize=1048576,origSize=4431360
LZMA initramfs by Ming-Ching Tiew <mctiew@yahoo.com>....................................................................deice id : 1c 30 16 1c 30 (30161c30)
Warning: un-recognized chip ID, please update SPI driver!
EN25Q64(1c 30171c30) (8192 Kbytes)
mtd .name = raspi, .size = 0x00800000 (8M) .erasesize = 0x00010000 (64K) .numeraseregions = 0
Creating 5 MTD partitions on "raspi":
0x00000000-0x00800000 : "ALL"
0x00000000-0x00030000 : "Bootloader"
0x00030000-0x00040000 : "Config"
0x00040000-0x00050000 : "Factory"
0x00050000-0x01000000 : "Kernel"
mtd: partition "Kernel" extends beyond the end of device "raspi" -- size truncated to 0x7b0000
squashfs: version 3.2-r2 (2007/01/15) Phillip Lougher
squashfs: LZMA suppport for slax.org by jro
io scheduler noop registered (default)
Ralink gpio driver initialized
HDLC line discipline: version $Revision: 1.1.1.1 $, maxframe=4096
N_HDLC line discipline registered.
Serial: 8250/16550 driver $Revision: 1.8 $ 2 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0xb0000500 (irq = 37) is a 16550A
serial8250: ttyS1 at I/O 0xb0000c00 (irq = 12) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
loop: loaded (max 8 devices)
rdm_major = 253
Ralink APSoC Ethernet Driver Initilization. v2.1  256 rx/tx descriptors allocated, mtu = 1500!
MAC_ADRH -- : 0x0000d43a
MAC_ADRL -- : 0x65004131
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
PPPoL2TP kernel driver, V0.17
PPTP driver version 0.8.1

=== pAd = c0019000, size = 620408 ===

All bugs added by David S. Miller <davem@redhat.com>
Freeing unused kernel memory: 1060k freed
init started: BusyBox v1.12.1 (2012-10-22 05:32Algorithmics/MIPS FPU Emulator v1.5
:24 AKDT)
starting pid 13, tty '': '/etc_ro/rcS'
mount: mounting devpts: called with bogus options
none on /sys failed: No such device
mount: mounting none on /proc/bus/usb failed: No such file or directory
Not Need To Set Init
Wan For Normal
internet.sh
starting pid 35, tty '/dev/ttyS1': '/bin/sh'

BusyBox v1.12.1 (2012-10-22 05:32:24 AKDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

# ========ralink_gpio: sending a SIGUSR1 to process 16
ralink_gpio: sending a SIGUSR1 to process 27
==========================
Staus Network Setup
==================================
Password for 'admin' changed
/sbin/internet.sh: line 314: rmmod: not found
/sbin/internet.sh: line 315: rmmod: not found
/sbin/internet.sh: line 316: rmmod: not found
/sb
phy_tx_ring = 0x00863000, tx_ring = 0xa0863000

phy_rx_ring0 = 0x00864000, rx_ring0 = 0xa0864000
MAC_ADRH -- : 0x0000d43a
MAC_ADRL -- : 0x65004131
in/internet.sh: RT305x_ESW: Link Status Changed
line 317: rmmod: not found
/sbin/internet.sh: line 320: insmod: not found
/sbin/internet.sh: line 321: insmod: not found
/sbin/internet.sh: line 322: insmod: not found

##### disable 1st wireless interface #####
/sbin/internet.sh: line 329: rmmod: not found
/sbin/internet.sh: line 330: rmmod: not found
/sbin/internet.sh: line 331: rmmod: not found
/sbin/internet.sh: line 333: rmmod: not found
/sbin/internet.sh: line 334: rmmod: not found
/sbin/internet.sh: line 335: rmmod: not found
/sbin/internet.sh: line 355: insmod: not found
/sbin/internet.sh: line 355: insmod: not found
/sbin/internet.sh: line 355: insmod: not found
/sbin/vpn-passthru.sh: line 20: rmmod: not found
/sbin/vpn-passthru.sh: line 20: rmmod: not found
/sbin/vpn-passthru.sh: line 20: rmmod: not found
/sbin/vpn-passthru.sh: line 20: rmmod: not found
RX DESC a088c000  size = 2048
/dev/null 2>&1
iptables -F -t filter 1>/dev/null 2>&1
iptables -D FORWARD -j macipport_filter 1>/dev/null 2>&1
iptables -F macipport_filter 1>/dev/null 2>&1
iptables -D FORWARD -j web_filter  1>/dev/null 2>&1
iptables -F web_filter  1>/dev/null 2>&1
iptables -D FORWARD -j malicious_filter 1>/dev/null 2>&1
iptables -F malicious_filter  1>/dev/null 2>&1
iptables -D INPUT -j malicious_input_filter 1>/dev/null 2>&1
iptables -F malicious_input_filter  1>/dev/null 2>&1
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -t filter -N web_filter 1>/dev/null 2>&1
iptables -t filter -N macipport_filter 1>/dev/null 2>&1
iptables -t filter -N malicious_filter 1>/dev/null 2>&1
iptables -t filter -N synflood_filter 1>/dev/null 2>&1
iptables -t filter -N malicious_input_filter 1>/dev/null 2>&1
iptables -t filter -N synflood_input_filter 1>/dev/null 2>&1
iptables -t filter -A FORWARD -j web_filter 1>/dev/null 2>&1
iptables -t filter -A FORWARD -j macipport_filter 1>/dev/null 2>&1
iptables -t filter -A FORWARD -j malicious_filter 1>/dev/null 2>&1
iptables -t filter -A malicious_filter -p tcp --syn -j synflood_filter 1>/dev/null 2>&1
iptables -t filter -A INPUT -j malicious_input_filter 1>/dev/null 2>&1
iptables -t filter -A malicious_input_filter -p tcp --syn -j synflood_input_filter 1>/dev/null 2>&1
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu 1>/dev/null 2>&1
iptables -A malicious_input_filter -i eth2.2 -p tcp --dport 80 -j DROP
/bin/super_dmz -f
sh: /bin/super_dmz: not found
iptables -t nat -D PREROUTING -j port_forward 1>/dev/null 2>&1
iptables -t nat -F port_forward  1>/dev/null 2>&1; iptables -t nat -X port_forward  1>/dev/null 2>&1
iptables -t nat -D PREROUTING -j DMZ 1>/dev/null 2>&1
iptables -t nat -F DMZ 1>/dev/null 2>&1; iptables -t nat -X DMZ  1>/dev/null 2>&1
iptables -t nat -N port_forward 1>/dev/null 2>&1; iptables -t nat -I PREROUTING 1 -j port_forward 1>/dev/null 2>&1
iptables -t nat -N DMZ 1>/dev/null 2>&1; iptables -t nat -I PREROUTING 2 -j DMZ 1>/dev/null 2>&1
ntp.sh
ddns.sh
sh: ddns.sh: not found
kill -9 `cat /var/run/wscd.pid.ra0`
cat: can't open '/var/run/wscd.pid.ra0': No such file or directory
kill: you need to specify whom to kill
iwpriv ra0 set WscConfMode=0 1>/dev/null 2>&1
route delete 239.255.255.250 1>/dev/null 2>&1
killall -q klogd
killall -q syslogd
syslogd -C8 1>/dev/null 2>&1
klogd 1>/dev/null 2>&1
killall -q zebra
killall -q ripd
webs: Listening for HTTP requests at address 192.168.11.1

下面就是编译 OpenWRT 并刷入了。推荐用最新的 trunk ,老一点的有个交换机初始化方面的 bug ,会让以太网无法使用。

原版固件(啥功能没有,非常坑,居然还有 1.9MB ,感觉有猫腻) / OpenWRT + LuCI + QoS + UPnP / OpenWRT 8MB 闪存全功能版

刷入并启动 OpenWRT :

U-Boot 1.1.3 (May 29 2013 - 19:54:50)

Board: Ralink APSoC DRAM:  32 MB
relocate_code Pointer at: 81fb4000
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 42 
spi device id: ef 40 17 0 0 (40170000)
find flash: W25Q64BV
raspi_read: from:30000 len:1000 
.raspi_read: from:30000 len:1000 
.============================================ 
Ralink UBoot Version: 3.6.0.0
-------------------------------------------- 
ASIC 5350_MP (Port5None)
DRAM_CONF_FROM: Boot-Strapping 
DRAM_TYPE: SDRAM 
DRAM_SIZE: 256 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 32 MBytes
Flash component: SPI Flash
Date:May 29 2013  Time:19:54:50
============================================ 
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384 

 ##### The CPU freq = 360 MHZ #### 
 estimate memory size =32 Mbytes

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. 

You choosed 2

 0 
raspi_read: from:40028 len:6 
.

2: System Load Linux Kernel then write to Flash via TFTP. 
 Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N)
 Please Input new ones /or Ctrl-C to discard
        Input device IP (192.168.1.1) ==:192.168.1.1
        Input server IP (192.168.1.100) ==:192.168.1.100
        Input Linux Kernel filename () ==:r2100.bin

 netboot_common, argc= 3 

 NetTxPacket = 0x81FE5F00 

 KSEG1ADDR(NetTxPacket) = 0xA1FE5F00 

 NetLoop,call eth_halt ! 

 NetLoop,call eth_init ! 
Trying Eth0 (10/100-M)

 Waitting for RX_DMA_BUSY status Start... done

 Header Payload scatter function is Disable !! 

 ETH_STATE_ACTIVE!! 
Using Eth0 (10/100-M) device
TFTP from server 192.168.1.100; our IP address is 192.168.1.1
Filename 'r2100.bin'.

 TIMEOUT_COUNT=10,Load address: 0x80100000
Loading: Got ARP REPLY, set server/gtwy eth addr (00:e0:4c:53:44:58)
Got it
#################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #####Got ARP REQUEST, return our IP
############################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ################
done
Bytes transferred = 3407876 (340004 hex)
NetBootFileXferSize= 00340004
raspi_erase_write: offs:50000, count:340004
raspi_erase: offs:50000 len:340000
....................................................
raspi_write: to:50000 len:340000 
....................................................
raspi_read: from:50000 len:10000 
.raspi_read: from:60000 len:10000 
.raspi_read: from:70000 len:10000 
.raspi_read: from:80000 len:10000 
.raspi_read: from:90000 len:10000 
.raspi_read: from:a0000 len:10000 
.raspi_read: from:b0000 len:10000 
.raspi_read: from:c0000 len:10000 
.raspi_read: from:d0000 len:10000 
.raspi_read: from:e0000 len:10000 
.raspi_read: from:f0000 len:10000 
.raspi_read: from:100000 len:10000 
.raspi_read: from:110000 len:10000 
.raspi_read: from:120000 len:10000 
.raspi_read: from:130000 len:10000 
.raspi_read: from:140000 len:10000 
.raspi_read: from:150000 len:10000 
.raspi_read: from:160000 len:10000 
.raspi_read: from:170000 len:10000 
.raspi_read: from:180000 len:10000 
.raspi_read: from:190000 len:10000 
.raspi_read: from:1a0000 len:10000 
.raspi_read: from:1b0000 len:10000 
.raspi_read: from:1c0000 len:10000 
.raspi_read: from:1d0000 len:10000 
.raspi_read: from:1e0000 len:10000 
.raspi_read: from:1f0000 len:10000 
.raspi_read: from:200000 len:10000 
.raspi_read: from:210000 len:10000 
.raspi_read: from:220000 len:10000 
.raspi_read: from:230000 len:10000 
.raspi_read: from:240000 len:10000 
.raspi_read: from:250000 len:10000 
.raspi_read: from:260000 len:10000 
.raspi_read: from:270000 len:10000 
.raspi_read: from:280000 len:10000 
.raspi_read: from:290000 len:10000 
.raspi_read: from:2a0000 len:10000 
.raspi_read: from:2b0000 len:10000 
.raspi_read: from:2c0000 len:10000 
.raspi_read: from:2d0000 len:10000 
.raspi_read: from:2e0000 len:10000 
.raspi_read: from:2f0000 len:10000 
.raspi_read: from:300000 len:10000 
.raspi_read: from:310000 len:10000 
.raspi_read: from:320000 len:10000 
.raspi_read: from:330000 len:10000 
.raspi_read: from:340000 len:10000 
.raspi_read: from:350000 len:10000 
.raspi_read: from:360000 len:10000 
.raspi_read: from:370000 len:10000 
.raspi_read: from:380000 len:10000 
.raspi_read: from:390000 len:10000 
.raspi_erase: offs:390000 len:10000
.
raspi_write: to:390000 len:10000 
.
raspi_read: from:390000 len:10000 
.Done!
## Booting image at bc050000 ...
raspi_read: from:50000 len:40 
.   Image Name:   MIPS OpenWrt Linux-3.8.13
   Created:      2013-06-04   6:13:26 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    897820 Bytes = 876.8 kB
   Load Address: 80000000
   Entry Point:  80000000
raspi_read: from:50040 len:db31c 
..............   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.8.13 (dword@dword-as4741g) (gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2012.12 r36825) ) #16 Tue Jun 4 14:13:15 CST 2013
[    0.000000] SoC Type: Ralink RT5350 id:1 rev:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] MIPS: machine is Lenovo R2100
[    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 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, 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] __ex_table already sorted, skipping sort
[    0.000000] Writing ErrCtl register=00010a00
[    0.000000] Readback ErrCtl register=00010a00
[    0.000000] Memory: 29620k/32768k available (1974k kernel code, 3148k reserved, 434k 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:128
[    0.000000] CPU Clock: 360MHz
[    0.000000] Calibrating delay loop... 239.61 BogoMIPS (lpj=1198080)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 512
[    0.080000] NET: Registered protocol family 16
[    0.120000] bio: create slab  at 0
[    0.130000] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.140000] Switching to clocksource MIPS
[    0.150000] NET: Registered protocol family 2
[    0.160000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.180000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.190000] TCP: Hash tables configured (established 512 bind 512)
[    0.200000] TCP: reno registered
[    0.210000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.220000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.230000] NET: Registered protocol family 1
[    0.240000] rt-timer 10000100.timer: maximum frequncy is 7324Hz
[    0.290000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.300000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.320000] msgmni has been set to 57
[    0.330000] io scheduler noop registered
[    0.340000] io scheduler deadline registered (default)
[    0.350000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.370000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    0.380000] console [ttyS0] enabled, bootconsole disabled
[    0.380000] console [ttyS0] enabled, bootconsole disabled
[    0.410000] m25p80 spi0.0: found s25fl064k, expected en25q32b
[    0.430000] m25p80 spi0.0: s25fl064k (8192 Kbytes)
[    0.440000] 4 ofpart partitions found on MTD device spi0.0
[    0.450000] Creating 4 MTD partitions on "spi0.0":
[    0.460000] 0x000000000000-0x000000030000 : "u-boot"
[    0.470000] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.480000] 0x000000040000-0x000000050000 : "factory"
[    0.500000] 0x000000050000-0x000000800000 : "firmware"
[    0.510000] found squashfs behind kernel
[    0.520000] Creating 2 MTD partitions on "spi0.0":
[    0.530000] 0x000000050000-0x00000012b35c : "kernel"
[    0.540000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.570000] 0x00000012b35c-0x000000800000 : "rootfs"
[    0.580000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.610000] mtd: partition "rootfs" set to be root filesystem
[    0.620000] mtd: partition "rootfs_data" created automatically, ofs=390000, len=470000 
[    0.640000] 0x000000390000-0x000000800000 : "rootfs_data"
[    0.650000] rt305x-esw 10110000.esw: link changed 0x10
[    0.670000] eth0: done loading
[    0.680000] TCP: cubic registered
[    0.680000] NET: Registered protocol family 17
[    0.690000] 8021q: 802.1Q VLAN Support v1.8
[    0.720000] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    0.740000] Freeing unused kernel memory: 212k freed
[    5.440000] input: gpio-keys-polled.2 as /devices/gpio-keys-polled.2/input/input0
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
jffs2 not ready yet; using ramdisk
- init -

Please press Enter to activate this console. [   13.180000] compat-drivers backport release: compat-drivers-2013-03-28-5
[   13.190000] Backport based on wireless-testing.git master-2013-04-16
[   13.200000] compat.git: wireless-testing.git
[   13.590000] cfg80211: Calling CRDA to update world regulatory domain
[   13.600000] cfg80211: World regulatory domain updated:
[   13.610000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   13.630000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   13.650000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   13.660000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   13.680000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   13.690000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   14.430000] NET: Registered protocol family 10
[   15.610000] rt2800_wmac 10180000.wmac: failed to load eeprom property
[   15.620000] phy0 -> rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'soc_wmac.eeprom'.
[   15.930000] phy0 -> rt2x00_set_rt: Info - RT chipset 5350, rev 0500 detected
[   15.940000] phy0 -> rt2x00_set_rf: Info - RF chipset 5350 detected
[   16.130000] PPP generic driver version 2.4.2
[   16.190000] tun: Universal TUN/TAP device driver, 1.6
[   16.200000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[   16.240000] PPP MPPE Compression module registered
[   16.370000] l2tp_core: L2TP core driver, V2.0
[   16.410000] l2tp_netlink: L2TP netlink interface
[   16.470000] gre: GRE over IPv4 demultiplexor driver
[   16.500000] ip_gre: GRE over IPv4 tunneling driver
[   16.690000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   16.930000] xt_time: kernel timezone is -0000
[   17.100000] NET: Registered protocol family 24
[   17.250000] nf_conntrack version 0.5.0 (466 buckets, 1864 max)
[   17.850000] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[   17.890000] PPTP driver version 0.8.5
[   19.460000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   20.270000] u32 classifier
[   20.280000]     Performance counters on
[   20.290000]     input device check on
[   20.290000]     Actions configured
[   20.430000] Mirror/redirect action on
[   28.280000] device eth0 entered promiscuous mode
[   28.300000] br-lan: port 1(eth0) entered forwarding state
[   28.310000] br-lan: port 1(eth0) entered forwarding state
[   29.980000] ralink-wdt: timeout value 60 must be 0 < timeout <= 35, using 30
[   30.310000] br-lan: port 1(eth0) entered forwarding state
[   42.690000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   42.700000] jffs2_build_filesystem(): unlocking the mtd device... done.
[   42.720000] jffs2_build_filesystem(): erasing all blocks after the end marker... done.
[   63.080000] jffs2: notice: (1152) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orpha.

BusyBox v1.19.4 (2013-06-04 13:57:47 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
 -----------------------------------------------------
 BARRIER BREAKER (Bleeding Edge, r36828)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------
root@OpenWrt:/#

信号方面,这台机器的天线性能着实一般,能有 2dBi 就不错了,实际的发射功率估计也就 16dBm 。rt2800 驱动虽然支持 Mutli-SSID 可以同时开出几个 AP ,但是却不支持 AP+STA 的模式,这是 OpenWRT 在 Ralink 的 SoC 上的通病了。最后附上一些性能测试数据:

OpenSSL v1.0.1e Benchmark(@360MHz) :

OpenWRT
Rev.
Bogo
MIPS
MD5 SHA-1 SHA-256 SHA-512 DES 3DES AES-128 AES-192 AES-256 RSA
Sign
RSA
Verify
DSA
Sign
DSA
Verify
r36759 239.61 21360360 11969150 5565390 2088120 3368890 1224560 4700900 4005330 3561600 4.3 146.8 14.8 12.3
r37631 479.23 23421030 12239570 5612540 2342080 3366910 1220550 5220950 4046850 3553280 4.4 153.5 15.3 12.6

无线 Netperf :11b 5.01Mbps ,11g 21.38Mbps ,11n HT20 1T1R 20.90Mbps ,11n HT40 1T1R 21.32Mbps ,可见无线速率被其内部的某些总线限制到了 20Mbps 左右,11n 几乎徒有其名。

《号称最小的路由器:联想 R2100》上的46个想法

  1. R2100不刷固件不能用,没有NAT,也没有AP接入模式,版主是否可以给个版本,并告知如何固件升级。谢谢

    1. 给的那个固件里面绝对是有 NAT 的,默认配置成桥接( AP 模式)。需要路由模式的话,在接口里面新建一个 WAN ,把 eth0 从 LAN 网桥里面删除再加到 WAN 里。

          1. 看来只有做ttl了,ps,这个opnwrt用原厂固件无法刷,我先刷a5s固件再刷这个倒是刷上了,但是就砖头了,tftp也失败

          2. 另外能不能提供下ttl的定义省的我自己测试了,你就说下从螺丝口到排线的ttl线序,谢谢

  2. 你好,ttl进去了,uboot没被破坏,就是如何输入命令呢?自检完了就停在那里了

    [ 7.570000] Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(31,5)

    1. 不知道怎么终端系统启动,默认自己进入了3,看起来openwrt已经刷上了,但是不完整,奇怪了

      1. 上电以后马上按下 2 ,然后稍等就会开始 TFTP 刷机的进程。
        没修改过硬件的机器不要刷 8MB 的版本。另外我不知道后续版本的硬件有没有缩水。

  3. 能否指点下:
    我怎么使用RT5350的串口1,即uart-full那个。官方代码配置后不能使用,openwrt有吗?还是说肯定要自己写驱动?
    很感谢!

  4. 劳驾请博主编译个2m的open-wrt固件吧,要装debian和交叉编译环境实在麻烦,原厂固件web升级问题主要是头文件识别码校验,用winhex把00000040开头这行改为5D 00就可以升级了。

      1. 能否编译个base基础版本?什么功能插件都不要有线网卡能通就行了,方便大家telnet或ssh进去用命令行判断下flash容量,再选择是刷4m固件还是拆机换flash片子。这机器保有量挺大的但是没桥接模式实在伤不起啊。谢谢了

          1. 試了OpenWRT + LuCI + QoS + UPnP
            我把00000040 改成 5D00 再用WEB 上傳的
            好像刷不上, 是因為大於2MB 嗎?
            我不會TTL 和 又不會LINUX

            可否幫忙编译只有WEBUI 的版本?會大於2MB 嗎?

  5. 請問一下,如果插上網線
    沒有顯示 綠燈閃爍
    只有綠燈常亮,電腦可以識別,但是一直無法連線是有什麼原因

  6. 你好,我这边买了一个带3G功能的无线路由器,用的RT5350F,厂家告诉我支持openwrt,但是他们没有提供固件,所以我自己从openwrt网站上下载了几个chaos_calmer版本3050的固件刷机,虽然能启动起来,但是以太网都不能用,rt305x-esw这块报警,有错。后来刷了你的固件,以太网就能够用了。
    我这边想自己编译一个openwrt固件,把3G模块驱动起来。想请教一下,用什么版本的openwrt比较合适?具体的配置有什么要注意的?可需要对源码修改?
    万分感谢!

      1. 路由器的flash是4M的,自己编译的固件,编译出来的是8M的。从openwrt.org下载的固件,能用的是dir 620 d1的版本,启用了VLAN,两个以太网口,eth2.0和eth2.1,一个分配到LAN,一个分配到WAN。但是启动以后以太网口有问题,从调试串口监测到rt305x esw报警。
        我看你的固件没有启动VLAN,以太网也是正常的,可能编译的配置还有差别。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据