物好き者

物好き者が行ったことを載せています。

スポンサーサイト

上記の広告は1ヶ月以上更新のないブログに表示されています。
新しい記事を書く事で広告が消せます。

PageTop

LaFonera+へのDD-WRTインストール

LaFonera+へのアクセス方法 でシリアルコンソールで入出力が出来るようになったので、DD-WRTをインストールしてみました。

RedBootでフラッシュメモリの状態を確認すると、次のようになっています。
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0xA8000000 0×80040400 0×00030000 0xA8000000
loader 0xA8030000 0×80100000 0×00010000 0×80100000
image 0xA8040000 0×80040400 0×00230004 0×80040400
image2 0xA8660000 0xA8660000 0×00140000 0×80040400
FIS directory 0xA87E0000 0xA87E0000 0×0000F000 0×00000000
RedBoot config 0xA87EF000 0xA87EF000 0×00001000 0×00000000

LaFoneraの場合は次のようになっていますが、RedBoot/FIS directory/RedBoot configのFLASH addrは同じです。
Name FLASH addr Mem addr Length Entry point
RedBoot 0xA8000000 0xA8000000 0x00030000 0x00000000
rootfs 0xA8030000 0xA8030000 0x00700000 0x00000000
vmlinux.bin.l7 0xA8730000 0x80041000 0x000B0000 0x80041000
FIS directory 0xA87E0000 0xA87E0000 0x0000F000 0x00000000
RedBoot config 0xA87EF000 0xA87EF000 0x00001000 0x00000000

このため、LaFoneraのトラブルに関して2 の方法DD-WRTをインストールしました。

+Ethernet eth0: MAC address 00:18:84:a1:6c:64
IP: 192.168.1.1/255.255.255.0, Gateway: 0.0.0.0
Default server: 192.168.1.254

RedBoot(tm) bootstrap and debug environment [ROMRAM]
OpenWrt certified release, version 1.1 - built 22:32:28, May 7 2007

Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.

Board: FON 2201
RAM: 0x80000000-0x81000000, [0x80040290-0x80fe1000] available
FLASH: 0xa8000000 - 0xa87f0000, 128 blocks of 0x00010000 bytes each.
== Executing boot script in 2.000 seconds - enter ^C to abort
^C
RedBoot> ^C
RedBoot> fis init
About to initialize [format] FLASH image system - continue (y/n)? y
*** Initialize FLASH Image System
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> load -r -v -b 0x80041000 root.fs
Using default protocol (TFTP)
-
Raw file loaded 0x80041000-0x802effff, assumed entry at 0x80041000
RedBoot> fis create -b 0x80041000 -f 0xA8030000 -l 0x002C0000 -e 0x00000000 rootfs
... Erase from 0xa8030000-0xa82f0000: ............................................
... Program from 0x80041000-0x80301000 at 0xa8030000: ............................................
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> load -r -v -b 0x80041000 vmlinux.bin.l7
Using default protocol (TFTP)
-
Raw file loaded 0x80041000-0x80100fff, assumed entry at 0x80041000
RedBoot> fis create -r 0x80041000 -e 0x80041000 -l 0x000E0000 vmlinux.bin.l7
... Erase from 0xa82f0000-0xa83d0000: ..............
... Program from 0x80041000-0x80101000 at 0xa82f0000: ............
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> fis create -f 0xA83D0000 -l 0x00010000 -n nvram
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> reset

DD-WRTのシリアル速度が115200なので、RedBootのシリアル速度も変更しておきます。
+Ethernet eth0: MAC address 00:18:84:a1:6c:64
IP: 192.168.1.1/255.255.255.0, Gateway: 0.0.0.0
Default server: 192.168.1.254

RedBoot(tm) bootstrap and debug environment [ROMRAM]
OpenWrt certified release, version 1.1 - built 22:32:28, May 7 2007

Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.

Board: FON 2201
RAM: 0x80000000-0x81000000, [0x80040290-0x80fe1000] available
FLASH: 0xa8000000 - 0xa87f0000, 128 blocks of 0x00010000 bytes each.
== Executing boot script in 2.000 seconds - enter ^C to abort
^C
RedBoot> baudrate -b 115200
Baud rate will be changed to 115200 - update your settings

ターミナルソフトのシリアル速度を変更し、再度RedBootのシリアル速度を変更し、設定を保存します。
RedBoot> baudrate -b 115200
Baud rate will be changed to 115200 - update your settings
Baud rate changed to 115200 - continue (y/n)? y
Update RedBoot non-volatile configuration - continue (y/n)? y
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> reset

Ethernet eth0: MAC address 00:18:84:a1:6c:64
IP: 192.168.1.1/255.255.255.0, Gateway: 0.0.0.0
Default server: 192.168.1.254

RedBoot(tm) bootstrap and debug environment [ROMRAM]
OpenWrt certified release, version 1.1 - built 22:32:28, May 7 2007

Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.

Board: FON 2201
RAM: 0x80000000-0x81000000, [0x80040290-0x80fe1000] available
FLASH: 0xa8000000 - 0xa87f0000, 128 blocks of 0x00010000 bytes each.
== Executing boot script in 2.000 seconds - enter ^C to abort
RedBoot> fis load -b 0x80100000 loader
No image 'loader' found
RedBoot> go 0x80100000


この状態で停止してしまいます。このため、ファームウェアが起動しないように停止して、フラッシュの状態を確認します。

Ethernet eth0: MAC address 00:18:84:a1:6c:64
IP: 192.168.1.1/255.255.255.0, Gateway: 0.0.0.0
Default server: 192.168.1.254

RedBoot(tm) bootstrap and debug environment [ROMRAM]
OpenWrt certified release, version 1.1 - built 22:32:28, May 7 2007

Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.

Board: FON 2201
RAM: 0x80000000-0x81000000, [0x80040290-0x80fe1000] available
FLASH: 0xa8000000 - 0xa87f0000, 128 blocks of 0x00010000 bytes each.
== Executing boot script in 2.000 seconds - enter ^C to abort
^C
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0xA8000000 0xA8000000 0x00030000 0x00000000
rootfs 0xA8030000 0xA8030000 0x002C0000 0x00000000
vmlinux.bin.l7 0xA82F0000 0x80041000 0x000E0000 0x80041000
nvram 0xA83D0000 0xA83D0000 0x00010000 0x80041000
FIS directory 0xA87E0000 0xA87E0000 0x0000F000 0x00000000
RedBoot config 0xA87EF000 0xA87EF000 0x00001000 0x00000000
RedBoot>


LaFonera+ではloaderを読み込んで起動していますが、LaFoneraとDD-WRTではvmlinux.bin.l7を読み込んで起動しています。このため、loadコマンドでvmlinux.bin.l7を読み込み、goコマンドで実行することで、LaFonera+でもDD-WRTが起動しました。

RedBoot> fis load -l vmlinux.bin.l7
Image loaded from 0x80041000-0x802adff0
RedBoot> go
Linux version 2.6.23.8 (root@dd-wrt) (gcc version 4.1.2) #233 Fri Nov 23 10:38:47 CET 2007
CPU revision is: 00019064
Determined physical RAM map:
memory: 01000000 @ 00000000 (usable)
Built 1 zonelists in Zone order. Total pages: 4064
Kernel command line: console=ttyS0,115200 root=/dev/mtdblock1 rootfstype=squashfs noinitrd
Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 16kB, 4-way, linesize 16 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).
PID hash table entries: 64 (order: 6, 256 bytes)
Using 92.000 MHz high precision timer.
console [ttyS0] enabled
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 13284k/16384k available (2067k kernel code, 3100k reserved, 297k data, 116k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Radio config found at offset 0xf8(0x1f8)
Time: MIPS clocksource has been installed.
NET: Registered protocol family 2
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
gpio_proc: module loaded and /proc/gpio/ created
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
squashfs: version 3.0 (2006/03/15) Phillip Lougher
io scheduler noop registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0xb1100003 (irq = 37) is a 16550A
serial8250 serial8250.0: unable to register port at index 0 (IO3f8 MEM0 IRQ4): -28
serial8250 serial8250.0: unable to register port at index 1 (IO2f8 MEM0 IRQ3): -28
serial8250 serial8250.0: unable to register port at index 2 (IO3e8 MEM0 IRQ4): -28
serial8250 serial8250.0: unable to register port at index 3 (IO2e8 MEM0 IRQ3): -28
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
MPPE/MPPC encryption/compression module registered
NET: Registered protocol family 24
IMQ starting with 2 devices...
IMQ driver loaded successfully.
Hooking IMQ before NAT on PREROUTING.
Hooking IMQ after NAT on POSTROUTING.
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky
cmdlinepart partition parsing not available
Searching for RedBoot partition table in spiflash at offset 0x7d0000
Searching for RedBoot partition table in spiflash at offset 0x7e0000
9 RedBoot partitions found on MTD device spiflash
Creating 9 MTD partitions on "spiflash":
0x00000000-0x00030000 : "RedBoot"
0x00030000-0x003e0000 : "rootfs"
0x002f0000-0x003d0000 : "vmlinux.bin.l7"
0x003d0000-0x003e0000 : "nvram"
0x003e0000-0x007e0000 : "ddwrt"
0x007e0000-0x007f0000 : "FIS directory"
0x007ef000-0x007f0000 : "RedBoot config"
mtd: partition "RedBoot config" doesn't start on an erase block boundary -- force read-only
0x007f0000-0x00800000 : "board_config"
0x00000000-0x00800000 : "fullflash"
Software Watchdog Timer: 0.07 initialized. soft_noboot=0 soft_margin=60 sec (nowayout= 0)
u32 classifier
Actions configured
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
ctnetlink v0.93: registering with nfnetlink.
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
ip_tables: (C) 2000-2006 Netfilter Core Team
IPP2P v0.8.2 loading
ClusterIP Version 0.8 loaded successfully
TCP bic registered
TCP cubic registered
TCP westwood registered
TCP highspeed registered
TCP hybla registered
TCP htcp registered
TCP vegas registered
TCP scalable registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Bridge firewalling registered
Ebtables v2.0 registered
Welcome to PF_RING 3.2.1
(C) 2004-06 L.Deri
NET: Registered protocol family 27
PF_RING: bucket length 128 bytes
PF_RING: ring slots 4096
PF_RING: sample rate 1 [1=no sampling]
PF_RING: capture TX No [RX only]
PF_RING: transparent mode Yes
PF_RING initialized correctly.
PF_RING: registered /proc/net/pf_ring/
802.1Q VLAN Support v1.8 Ben Greear
All bugs added by David S. Miller
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 116k freed
eth%d: Found PHY MARVELL model 0x8 revision 0x7
eth0: Dropping NETIF_F_SG since no checksum feature.
eth0: Atheros AR231x: 00:18:84:a1:6c:64, irq 4
eth0: No link
ath_hal: 0.10.2.1 (AR5212, AR5312, RF2316, REGOPS_FUNC, TX_DESC_SWAP, XR)
wlan: 0.8.4.2 (0.9.2)
ath_dfs: Version 2.0.0
Copyright (c) 2005-2006 Atheros Communications, Inc. All Rights Reserved
wlan: mac acl policy registered
ath_ahb: 0.9.4.5 (0.9.2)
attaching devid = 86
System Type: Atheros AR2315
ath_pci: switching rfkill capability off
wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: H/W encryption support: WEP AES AES_CCM TKIP
wifi0: mac 11.0 phy 4.8 radio 7.0
wifi0: rf RF2316 Cobra
wifi0: Use hw queue 1 for WME_AC_BE traffic
wifi0: Use hw queue 0 for WME_AC_BK traffic
wifi0: Use hw queue 2 for WME_AC_VI traffic
wifi0: Use hw queue 3 for WME_AC_VO traffic
wifi0: Use hw queue 8 for CAB traffic
wifi0: Use hw queue 9 for beacons
wifi0: Atheros 2315 WiSoC: mem=0xb0000000, irq=3
Algorithmics/MIPS FPU Emulator v1.5
eth0: No link
eth0: No link
br0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
device eth0 entered promiscuous mode
set slottime to 9us
restart hardware
ath0
Interface doesn't accept private ioctl...
turbo (8BE0): Invalid argument
Interface doesn't accept private ioctl...
compression (8BE0): Invalid argument
Interface doesn't accept private ioctl...
ff (8BE0): Invalid argument
SET failed on device ath0 ; Invalid argument.
set slottime to 16us
set acktimeout to 35us
set ctstimeout to 35us
device ath0 entered promiscuous mode
SET failed on device ath0 ; Invalid argument.
eth0: No link
eth0: No link
eth0: No link
eth0: No link
nvram_commit(): end
br0: port 2(ath0) entering learning state
br0: port 1(eth0) entering learning state
br0: starting userspace STP failed, starting kernel STP
br0: topology change detected, propagating
br0: port 2(ath0) entering forwarding state
br0: topology change detected, propagating
br0: port 1(eth0) entering forwarding state
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
set slottime to 16us
SIOCGIFFLAGS: No such device
eth0: No link
eth0: No link
Bad argument `192.168.1.1/24'
No such device
Bad argument `192.168.1.1/24'
adding upstream device br0 entered promiscuous mode
interface br0
connect: Network is unreachable
connect: Network is unreachable
connect: Network is unreachable
gethostbyname: Network is unreachable
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
eth0: No link
eth0: No link
Bad argument `192.168.1.1/24'
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
eth0: No link
Bad argument `192.168.1.1/24'
eth0: No link
sh: /tmp/.rc_startup: not found
nvram was changed, needs commit, waiting 10 sec.
eth0: No link
eth0: No link
eth0: No link
eth0: No link
eth0: No link
eth0: No link
eth0: No link
nvram_commit(): end
DD-WRT v24 std (c) 2007 NewMedia-NET GmbH
Release: 11/23/07 (SVN revision: 8426)

DD-WRT login: DD-WRT v24 std (c) 2007 NewMedia-NET GmbH
Release: 11/23/07 (SVN revision: 8426)

DD-WRT login: DD-WRT v24 std (c) 2007 NewMedia-NET GmbH
Release: 11/23/07 (SVN revision: 8426)

DD-WRT login: eth0: No link

DD-WRT v24 std (c) 2007 NewMedia-NET GmbH
Release: 11/23/07 (SVN revision: 8426)

DD-WRT login: connect: Network is unreachable
connect: Network is unreachable
connect: Network is unreachable
gethostbyname: Network is unreachable
eth0: No link


ただ、このままでは毎回起動時にload・goコマンドの実行が必要です。RedBootの設定を変更することで、自動で起動できるようになると思いますので、変更方法を調べることにします。

スポンサーサイト

PageTop

コメント


管理者にだけ表示を許可する
 

承認待ちコメント

このコメントは管理者の承認待ちです

| | 2012年01月31日(Tue)07:11 [EDIT]


承認待ちコメント

このコメントは管理者の承認待ちです

| | 2012年02月01日(Wed)02:36 [EDIT]


承認待ちコメント

このコメントは管理者の承認待ちです

| | 2012年02月05日(Sun)07:34 [EDIT]


承認待ちコメント

このコメントは管理者の承認待ちです

| | 2012年03月01日(Thu)21:48 [EDIT]


承認待ちコメント

このコメントは管理者の承認待ちです

| | 2012年03月07日(Wed)19:30 [EDIT]


承認待ちコメント

このコメントは管理者の承認待ちです

| | 2012年03月15日(Thu)19:59 [EDIT]


承認待ちコメント

このコメントは管理者の承認待ちです

| | 2014年06月18日(Wed)17:58 [EDIT]


承認待ちコメント

このコメントは管理者の承認待ちです

| | 2014年06月24日(Tue)17:58 [EDIT]


承認待ちコメント

このコメントは管理者の承認待ちです

| | 2014年06月28日(Sat)17:44 [EDIT]


承認待ちコメント

このコメントは管理者の承認待ちです

| | 2014年07月16日(Wed)11:15 [EDIT]


承認待ちコメント

このコメントは管理者の承認待ちです

| | 2014年07月26日(Sat)08:39 [EDIT]


承認待ちコメント

このコメントは管理者の承認待ちです

| | 2014年08月10日(Sun)16:01 [EDIT]


承認待ちコメント

このコメントは管理者の承認待ちです

| | 2015年07月24日(Fri)13:39 [EDIT]


上記広告は1ヶ月以上更新のないブログに表示されています。新しい記事を書くことで広告を消せます。