follow me

小さいルータ、ちびファイ3(MZK-DP150N)をOpenWRT化してみる

Planex ちびファイ3(MZK-DP150N)の紹介。
じゃなくて、OpenWRTの話です。
日本では、最近盛り上がりの欠けるOpenWRTですが、15.05rc1も出てこれから再度盛り上がってほしいと思う今日この頃。
ちょうど小さいOpenWRT機が欲しかったのもあったので、パッチ書いてみました。
書いてみたのであって、日本国内で動かしたではない筈です。
コンセントに直接させて有線LANが1個と、11n最大150Mbpsな無線でこのサイズは魅力的です。
USB電源ではなく、ACコンセントに直接させるタイプはあまりないので魅力的です。
しかも有線がついている。


本当に小さいです。
手にすっぽり入ってしまいます。
これだけでもカバンに入れておくルータとしては便利です。
しかもお手頃価格なんですよね。
 

恒例の開封式を実施しました。
少し後悔しています。
蓋とじれないんです。
シリアルをつなげたい人は、ケースを壊して開けてください。
接着(熱で溶かして着けてる?)なので、ケースを壊す形になってしまいます。


アンテナが伸びてます。
このタイプのアンテナはなかなかお目にかかりません。
このサイズで収めている訳ですから、確かに、うーん、こうなりますか。


基板自体は2枚構造。
サイズ的に1枚に収めるのはきついでしょう。
かなり頑張ってる感があります。


見えにくいとは思いますが、解りますでしょうか?
Ralinkチップです。RT5350Fが採用されています。
OpenWRTでは、Ralinkチップの対応デバイスはそれなりにあるので、ドライバに困る事はありません。


シリアルは、写真右上側の3ピンになります。
上からGND、TX、RXです。
ピッチが狭いので、GNDは別途取った方がやりやすいかもしれません。
テスト用ワイヤーが2本刺すのがギリギリでした。


これは少し怖い。
ショートさせてしまいそうです。



今回作成したパッチです。
trunk(r45743)を元に作成しています。
openwrt_r45743_add_mzk-dp150n.patch

ファーム本体もアップしておきます。
デフォルトでは、ちびファイ3純正ファームとは異なり、有線、無線ともにLANでWANの無い設定となります。
無線が使える状態となったなら、LANから有線を外し、WANインタフェースを作成する事で、純正ファーム同等の設定となります。
このファームウェアは、日本国内で使用される事を意図したものではありません。使用は自己責任でお願い致します。
何故2個ともアップしているかは察して下さい。
openwrt-ramips-rt305x-mzk-dp150n-initramfs-uImage.bin
openwrt-ramips-rt305x-mzk-dp150n-squashfs-sysupgrade.bin

MD5はこちら。
22412122be4d78eebb8f0a0621e4d1b7 *openwrt-ramips-rt305x-mzk-dp150n-initramfs-uImage.bin
f5857b0b8d9ec7c364b1581505efe0fc *openwrt-ramips-rt305x-mzk-dp150n-squashfs-sysupgrade.bin


OpenWRT化された起動ログ。
U-Boot 1.1.3 (May  8 2013 - 21:16:08)

Board: Ralink APSoC DRAM:  32 MB
relocate_code Pointer at: 81fb4000
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 42 
spi device id: 1c 30 16 1c 30 (30161c30)
find flash: EN25Q32B
raspi_read: from:30000 len:1000 
.raspi_read: from:30000 len:1000 
.============================================ 
Ralink UBoot Version: 4.0.1.0
-------------------------------------------- 
ASIC 5350_MP (Port5<->None)
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  8 2013  Time:21:16:08
============================================ 
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. 
 4  3  2  1  0 
   
3: System Boot system code via Flash.
## Booting image at bc050000 ...
raspi_read: from:50000 len:40 
.   Image Name:   MIPS OpenWrt Linux-3.18.14
   Created:      2015-05-22  12:27:16 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1083970 Bytes =  1 MB
   Load Address: 80000000
   Entry Point:  80000000
raspi_read: from:50040 len:108a42 
.................   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.18.14 (dev@mt7620) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r45743) ) #19 Fri May 22 21:26:13 JST 2015
[    0.000000] SoC Type: Ralink RT5350 id:1 rev:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001964c (MIPS 24KEc)
[    0.000000] MIPS: machine is Planex MZK-DP150N
[    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] Initmem setup 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] Writing ErrCtl register=00003620
[    0.000000] Readback ErrCtl register=00003620
[    0.000000] Memory: 29080K/32768K available (2399K kernel code, 117K rwdata, 480K rodata, 132K init, 181K bss, 3688K reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 360MHz
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.010000] Calibrating delay loop... 239.61 BogoMIPS (lpj=1198080)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.090000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.100000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110000] pinctrl core: initialized pinctrl subsystem
[    0.120000] NET: Registered protocol family 16
[    0.170000] rt2880_gpio 10000600.gpio: registering 22 gpios
[    0.180000] rt2880_gpio 10000600.gpio: registering 22 irq handlers
[    0.190000] rt2880_gpio 10000660.gpio: registering 6 gpios
[    0.200000] rt2880_gpio 10000660.gpio: registering 6 irq handlers
[    0.210000] Switched to clocksource systick
[    0.220000] NET: Registered protocol family 2
[    0.230000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.240000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.250000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.270000] TCP: reno registered
[    0.270000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.280000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.300000] NET: Registered protocol family 1
[    0.310000] rt-timer 10000100.timer: maximum frequency is 7324Hz
[    0.320000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.350000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.360000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.380000] msgmni has been set to 56
[    0.420000] io scheduler noop registered
[    0.430000] io scheduler deadline registered (default)
[    0.440000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[147]
[    0.450000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[161]
[    0.470000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.480000] console [ttyS0] disabled
[    0.490000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a 16550A
[    0.510000] console [ttyS0] enabled
[    0.510000] console [ttyS0] enabled
[    0.520000] bootconsole [early0] disabled
[    0.520000] bootconsole [early0] disabled
[    0.550000] m25p80 spi32766.0: found en25q32b, expected s25fl064k
[    0.560000] m25p80 spi32766.0: en25q32b (4096 Kbytes)
[    0.570000] 4 ofpart partitions found on MTD device spi32766.0
[    0.580000] Creating 4 MTD partitions on "spi32766.0":
[    0.590000] 0x000000000000-0x000000030000 : "uboot"
[    0.610000] 0x000000030000-0x000000040000 : "uboot-env"
[    0.620000] 0x000000040000-0x000000050000 : "factory"
[    0.630000] 0x000000050000-0x000000400000 : "firmware"
[    0.680000] 2 uimage-fw partitions found on MTD device firmware
[    0.700000] 0x000000050000-0x000000158a82 : "kernel"
[    0.710000] 0x000000158a82-0x000000400000 : "rootfs"
[    0.720000] mtd: device 5 (rootfs) set to be root filesystem
[    0.730000] 1 squashfs-split partitions found on MTD device rootfs
[    0.740000] 0x000000370000-0x000000400000 : "rootfs_data"
[    0.770000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
[    0.780000] rt2880_wdt 10000120.watchdog: Initialized
[    0.800000] TCP: cubic registered
[    0.800000] NET: Registered protocol family 17
[    0.810000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    0.840000] 8021q: 802.1Q VLAN Support v1.8
[    0.870000] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    0.890000] Freeing unused kernel memory: 132K (802ef000 - 80310000)
[    4.030000] init: Console is alive
[    4.030000] init: - watchdog -
[    7.840000] init: - preinit -
[    8.830000] rt305x-esw 10110000.esw: link changed 0x00
[    9.210000] random: procd urandom read with 10 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
[   11.280000] rt305x-esw 10110000.esw: link changed 0x10
[   12.760000] jffs2: notice: (288) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 1 of xref (0 dead, 0 orphan) found.
[   12.760000] mount_root: switching to jffs2 overlay
[   12.760000] procd: - early -
[   12.760000] procd: - watchdog -
[   13.970000] procd: - ubus -
[   14.990000] procd: - init -
Please press Enter to activate this console.
[   16.580000] NET: Registered protocol family 10
[   16.600000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   16.630000] Loading modules backported from Linux version master-2015-03-09-0-g141f155
[   16.650000] Backport generated by backports.git backports-20150129-0-gdd4a670
[   16.670000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   16.690000] nf_conntrack version 0.5.0 (456 buckets, 1824 max)
[   16.690000] xt_time: kernel timezone is -0000
[   16.690000] cfg80211: Calling CRDA to update world regulatory domain
[   16.690000] cfg80211: World regulatory domain updated:
[   16.690000] cfg80211:  DFS Master region: unset
[   16.690000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   16.690000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   16.690000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   16.690000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   16.690000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   16.690000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   16.690000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   16.690000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   16.690000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   17.120000] PPP generic driver version 2.4.2
[   17.130000] NET: Registered protocol family 24
[   17.210000] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5350, rev 0500 detected
[   17.220000] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5350 detected
[   21.930000] rt305x-esw 10110000.esw: link changed 0x00
[   24.400000] rt305x-esw 10110000.esw: link changed 0x10
[   28.840000] device eth0.1 entered promiscuous mode
[   28.850000] device eth0 entered promiscuous mode
[   28.870000] br-lan: port 1(eth0.1) entered forwarding state
[   28.880000] br-lan: port 1(eth0.1) entered forwarding state
[   30.880000] br-lan: port 1(eth0.1) entered forwarding state
[  101.740000] random: nonblocking pool is initialized



BusyBox v1.23.2 (2015-05-22 07:06:50 JST) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 CHAOS CALMER (Bleeding Edge, r45743)
 -----------------------------------------------------
  * 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:/# 

[追記]
ちなみに、書換えるコツは、Web管理画面からinitramfs-uImageで書き換えておいて、次回起動時にssh経由でsysupgradeコマンド使ってsquashfs-sysupgradeで強制書換えすると、あれ?
偶然、ファイル指定間違えて気が付いただけなんですがね。
小さいルータ、ちびファイ3(MZK-DP150N)をOpenWRT化してみる | 0 件のコメント | アカウント登録
サイト管理者はコメントに関する責任を負いません。