はじめに

以下の条件を満たすARMの評価用ボードが欲しい。

(1) CPUがARM(クロックが200MHz以上)
(2) 64MB以上のRAM
(3) ネットワークインターフェース(できれば2つ以上)
(4) USBホストがついている(できれば2つ以上)
(5) シリアルコンソールが使える(ハンダ付けなしで使えればなおよし)
(6) マウント穴がある
(7) MiniPCIがついている

秋月電子で買うと高いし、ハードオフのジャンクコーナーで1,000円未満で投売りされているルーターで何とかならないかなと調べてみると、あるものですね、PlanexのBRC-W14VGがこれらの条件をすべて満たすようです。
ちなみにBRC-14VGも同じ基板を使っていて、(7)以外の条件を満たします。

ということで、暇を見つけてはハードオフに通って、ようやくBRC-14VGのほうを見つけました。

こいつをハックしてみたいと思います。

シリアルコンソール

それでは、まずはシリアルコンソールから。

BRC-14VG/BRC-W14VGのシリアルコンソールは基板上のJ4です。
このシリアルコンソールとの接続は、TTL-232R-3V3を使います。

J4のピンアサインは、○ついているほうから

VCC ○
TXD
RXD
GND

ですので、これに、TTL-232R-3V3を以下のように繋ぎます。

J4 TTL-232R-3V3
VCC ○ 接続しない
TXD RXD(黄)
RXD TXD(橙)
GND GND(黒)

TTL-232R-3V3には6端子のハウジングがついているのですが、1端子のハウジングを6つ買ってきて交換して使いました。

シリアルポートの設定は、

ボーレート 115200
データ 8bit
パリティ none
ストップビット 1bit
フロー制御 none

つまり「115200/8/N/1/N」で接続できます。
このあたりは、この世代ぐらいのルータで一般的な設定ですね。

起動時のコンソール出力

起動時のコンソール出力はこんな感じです。
OpenRGっていう組み込み向けLinuxを使っているみたいです。

起動時のコンソール出力
Uncompressing Linux......................................... done, booting the kernel.
Press ESC to enter BOOT MENU mode.
RGLoader 2.6.14
Booting an active image in 3 seconds
Uncompressing Linux................................................................................................................................................................................................................................................................................... done, booting the kernel.
Linux version 2.4.21openrg-rmk1 #4 2006年 9月 20日 水曜日 19:55:50 JST
CPU: XScale-IXP4xx/IXC11xx revision 1
Machine: Intel IXP425 Bamboo
Memory range 0x3fff000-0x4000000 is excluded because of PCI DMA bug
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=ttyS1,115200 root=/dev/ram0 rw nohalt
Using IXP425 Timer 0 as timer source
Calibrating delay loop... 266.24 BogoMIPS
Memory: 64MB = 64MB total
Memory: 55904KB available (1417K code, 7414K data, 52K init)
XScale Cache/TLB Locking Copyright(c) 2001 MontaVista Software, Inc.
Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
PCI: bus0: Fast back to back transfers disabled
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd

Random: 0xa842b820
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xff000003 (irq = 15) is a XScale UART
ttyS01 at 0xff001003 (irq = 13) is a XScale UART
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
loop: loaded (max 8 devices)
SCSI subsystem driver Revision: 1.00
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb.c: registered new driver usblp
printer.c: v0.13: USB Printer Device Class driver
ov511.c: Error: /proc/video/ does not exist
usb.c: registered new driver ov511
ov511.c: v1.65 : ov511 USB Camera Driver
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
USB Mass Storage support registered.
Linux video capture interface: v1.00
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 740K
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 52K
Mounting cramfs image at 'cramfs'
insmod: add-symbol-file PATH/kos_lib.o 0xc4910060 -s .data 0xc49149b8 -s .bss 0xc4914b50
insmod: add-symbol-file PATH/ixp425_flash_mod.o 0xc4917060 -s .dcfi_cmdset_0001: Erase suspend on write enabled
ata 0xc49173b8 -s .bss 0xc4917444
Using buffer write method
Using predefined MTD partitions.
Creating 1 MTD partitions on "ixp425 Flash":
0x00000000-0x01000000 : "openrg"
Press ESC to enter BOOT MENU mode.
insmod: add-symbol-file PATH/csr.o 0xc593b060 -s .data 0xc595ded4 -s .bss 0xc5967710
Module init.
insmod: add-symbol-file PATH/ixp425_csr_init_mod.o 0xc59c9060 -s .data 0xc59c9468 -s .bss 0xc59c9480
Intel CSR QMGR & NPE(s) init done.
insmod: add-symbol-file PATH/ixp425_eth_mod.o 0xc59cb060 -s .datInitializing ixp425_eth driver 0.0.8
a 0xc59cce78 -s .bss 0xc59ccef0
Found PHY 0 at 1
PHY 0 MAC address is:   04:04:04:04:04:04
PHY 1 MAC address is:   06:06:06:06:06:06
insmod: add-symbol-file PATH/igmp_proxy_mod.o 0xc59cf060 -s .data 0xc59d0488 -s .bss 0xc59d0504
insmod: add-symbol-file PATH/log_chardev.o 0xc59d2060 -s .data 0xc59d2ad0 -s .bss 0xc59d2bf0
failed ipc connect Network is unreachable
failed ipc connect Network is unreachable
insmod: add-symbol-file PATH/rg_bridge.o 0xc59d5060 -s .data 0xc59d9424 -s .bss 0xc59d9450
insmod: add-symbol-file PATH/tcp_mss.o 0xc59dc060 -s .data 0xc59dc310 -s .bss 0xc59dc32c
insmod: add-symbol-file PATH/jfw.o 0xc59de060 -s .data 0xc59f44e8 -s .bss 0xc59f5ea8
insmod: add-symbol-file PATH/rg_dhcp_pktfil.o 0xc5a04060 -s .data 0xc5a049f0 -s .bss 0xc5a04ae0
insmod: add-symbol-file PATH/rg_auth1x_pktfil.o 0xc5a06060 -s .data 0xc5a071c0 -s .bss 0xc5a07200
insmod: add-symbol-file PATH/btn.o 0xc5a09060 -s .data 0xc5a09540 -s .bss 0xc5a095d8
insmod: add-symbol-file PATH/rg_ipv4.o 0xc5a0b060 -s .data 0xc5aIPV4 device driver registered
0b220 -s .bss 0xc5a0b25e
insmod: add-symbol-file PATH/krgldr_module.o 0xc5a0d060 -s .data 0xc5a0d240 -s .bss 0xc5a0d268
insmod: add-symbol-file PATH/kleds_mod.o 0xc5a0f060 -s .data 0xc5a0f7e8 -s .bss 0xc5a0f844
insmod: add-symbol-file PATH/at93cxx_mod.o 0xc5a11060 -s .data 0xc5a116dc -s .bss 0xc5a116dc
insmod: add-symbol-file PATH/adm6996_mod.o 0xc5a13060 -s .data 0Initializing switch in normal mode
xc5a131e0 -s .bss 0xc5a1338f
insmod: add-symbol-file PATH/nb_rt.o 0xc5a15060 -s .data 0xc5a15480 -s .bss 0xc5a154d4
insmod: add-symbol-file PATH/pppoe_relay.o 0xc5a17060 -s .data 0xc5a19b78 -s .bss 0xc5a19d80
insmod: add-symbol-file PATH/ppp.o 0xc5a2e060 -s .data 0xc5a38d98 -s .bss 0xc5a39258
insmod: add-symbol-file PATH/usb-uhci.o 0xc5a3b060 -s .data 0xc5a400cc -s .bss 0xc5a405a8
usb-uhci.c: $Revision: 1.3.12.1 $ time 19:51:36 Sep 20 2006
usb-uhci.c: High bandwidth mode enabled
usb-uhci.c: USB UHCI at I/O 0xffffffe0, IRQ 7
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
usb-uhci.c: USB UHCI at I/O 0xffffffc0, IRQ 7
usb-uhci.c: Detected 2 ports
failed ipc connect Network is unreachable
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
insmod: add-symbol-file PATH/ehci-hcd.o 0xc5a8a060 -s .data 0xc5a8eaf8 -s .bss 0xc5a8eb94
ehci_hcd 00:14.2: VIA Technologies, Inc. USB 2.0
ehci_hcd 00:14.2: irq 7, pci mem c5a90f00
usb.c: new USB bus registered, assigned bus number 3
PCI: 00:14.2 PCI cache line size set incorrectly (0 bytes) by BIOS/FW.
PCI: 00:14.2 PCI cache line size corrected to 32.
ehci_hcd 00:14.2: USB 2.0 enabled, EHCI 0.95, driver 2003-Dec-29/2.4
failed ipc connect Network is unreachable
hub.c: USB hub found
hub.c: 4 ports detected
failed ipc connect Connection refused
PHY 1 MAC address is:   00:90:cc:c4:eb:8c
PHY 1 MAC address is:   00:90:cc:c4:eb:8c
ixp1: Entering promiscuous mode
device ixp1 entered promiscuous mode
PHY 0 MAC address is:   00:90:cc:c4:eb:8d
PHY 0 MAC address is:   00:90:cc:c4:eb:8d
ixp0: Entering promiscuous mode
device ixp0 entered promiscuous mode
Username:

変わったところでは、OmniVision ov511(USBカメラコントローラ)のドライバをロードしているあたりでしょうか?

OmniVision ov511関連のコンソール出力
ov511.c: Error: /proc/video/ does not exist
usb.c: registered new driver ov511
ov511.c: v1.65 : ov511 USB Camera Driver

そういえば、BRC-14VG/BRC-W14VGは専用のUSBカメラを接続できたんでしたね。

なお、Usernameにroot、Passwordに空白とか入れてみたのですが、ログインできませんでした。無念…。

ブートローダー

ちなみに、

Linux version 2.4.21openrg-rmk1 #4 2006年 9月 20日 水曜日 19:55:50 JST

が表示される前までがブートローダーのお仕事みたいです。

Press ESC to enter BOOT MENU mode.

と表示されている間にESCキーを押すと、ブートメニューに入れます。

OpenRG boot>

というプロンプトが出るので、

OpenRG boot> help

とやると、利用可能なコマンド一覧が表示されます。

ブートローダー上での「help」の実行結果
OpenRG boot> help
ps:     Print main-task tasks
rg_conf_print:  rg_conf_print <root> - Print OpenRG configuration
        starting from <root> - use / for the whole configuration
rg_conf_set:    rg_conf_set <path> <value> - Set rg_conf path to a value
rg_conf_set_obscure:    rg_conf_set_obscure <path> <value> - Set rg_conf path to an obscured value
rg_conf_del:    rg_conf_del <path> - Del subtree path from rg_conf
reconf: reconf <flash_delay 1(=NOW) to 4> - Reconfigure the
        system according to the current rg_conf
entity_close:   entity_close <entity ptr> - Close an entity
host:   host <name> - Resolve host by name
flash_commit:   Save configuration to flash
restore_default:        restore_defaults [-d] - Restore default configuration
        (use -d to avoid rebooting after)
reboot: Reboot the system
log_lev_on:     log_lev_on <severity> - redirect rg_error output from severity
        equal or higher to <sevrerity> to the current cli
log_lev_off:    Stop rg_error redirection to the current cli
cat:    Print file contents on console
shell:  Spawn busybox shell in foreground
flash_layout:   Prints the flash layout and content
flash_erase:    flash_erase [-d] <section> - erases a given section in the flash
flash_dump:     flash_dump [-s <section> | -r <address>] [-l <length>] [-1|2|4] - dumps the flash content
bset:   Configure bootloader
ifconfig:       Configure network interface
ping:   Test network connectivity
boot:   boot -g {-s <section> | -r <address>} - Boot the system (-g boot with kgdb)
load:   load -u <url> {-s <section> | -r <address>} - Load and burn image
help:   Print this menu
vlan_add:       Add VLAN interface
etask_list_dump:        Dump back trace of all etasks
Returned 0

フラッシュメモリのレイアウトを表示する「flash_layout」というコマンドがあるようなので、実行してみます

ブートローダー上での「flash_layout」の実行結果
OpenRG boot> flash_layout
Flash layout:

Section 00 Type BOOT       Range 0x00000000-0x00100000 MaxSize 0x00100000
        No more information.

Section 01 Type IMAGE      Range 0x00100000-0x00F80000 MaxSize 0x00E7FF6C
        Size 0x00773EE0 Name 'Downloaded at: Wed Jan  1 00:01:00 2003'
        Checksum 0x3D8F18F5 Counter 0x00000020 Start Offset 0x00000000

Section 02 Type FLASH_SECT_BOOTCONF Range 0x00F80000-0x00FA0000 MaxSize 0x0001FF6C
        Size 0x00000304 Name 'rg_conf'
        Checksum 0x000188A8 Counter 0x0000001F Start Offset 0x00000000

Section 03 Type FLASH_SECT_CONF Range 0x00FA0000-0x00FC0000 MaxSize 0x0001FF6C
        Size 0x0000229A Name 'rg_conf'
        Checksum 0x00118747 Counter 0x00002A91 Start Offset 0x00000000

Section 04 Type FLASH_SECT_CONF Range 0x00FC0000-0x00FE0000 MaxSize 0x0001FF6C
        Size 0x00002320 Name 'rg_conf'
        Checksum 0x0011D62B Counter 0x00002A93 Start Offset 0x00000000

Section 05 Type FACTORY    Range 0x00FE0000-0x01000000 MaxSize 0x0001FF6C
        Size 0x000000D9 Name 'Image downloaded from: tftp://192.168.3.110/rg_factory'
        Checksum 0x00004AB6 Counter 0x0000001E Start Offset 0x00000000

Total 6 sections found.
Returned 0

これを見る限り、Flash ROMのレイアウトは、

Section 00 1MB ブートローダー(OpenRG BOOT)
Section 01 14.5MB OSイメージ(Open RG)
Section 02 128KB ブートローダー(OpenRG BOOT)の設定
Section 03 128KB 設定値(Open RG)
Section 04 128KB 設定値(Open RG)
Section 05 128KB 工場設定値

って感じでしょうか?

ブートローダーをDAS U-BOOTとかに書き換えて、OSをUSBポートに接続したUSBメモリ等から起動できると面白いかもしれませんね。

とりあえず、今日はここまで。


あなたの探し物は見つかりましたか?
まさにこれだ
参考になった
ちょっと違う
これじゃない

何かメッセージがあればお願いします

このメッセージを非公開にする

ご注意

・頂いたメッセージは管理者のチェックの後、公開されます。
・メッセージの公開を希望されない場合には、「このメッセージを非公開にする」にチェックを入れてください。
・管理者が不適切と判断したメッセージは公開しませんので、予めご了承ください。


まだ評価がありません

表示できるメッセージはありません。