2008年01月一覧

全身筋肉痛

スノボの筋肉痛をこらえながら沼津1日目。 沼津のATMはなぜ1000円札しか出ないのか?2万下ろして全部千円…


    • CEさんが千円札しか補充しなかったから(ぁ — タッキー 2008-01-28 (月) 20:07:23
    • もしCEがやったとしたらMQCだなw — admin 2008-02-06 (水) 23:30:46


ハチ

8年ぶり?にスノボーしに行ってきました。もっとうまく滑れるようになりたい!!筋肉痛が痛いw。



La FoneraのDD-WRT化

1年くらい前にツクモで買ったLa Fonera(FON2100E)。 使わずに押入れに眠っていたので、高機能ルータに変身できるという噂のファームDD-WRTをインストールしてみた。 いる物

概略

    1. La FoneraにSSHでアクセスできるようにする
    2. RedBootを書きかえてtelnetアクセスできるようにする
    3. RedBoot上にてDD-WRTにファーム書き換え

La FoneraにSSHでアクセスできるようにする

PCのIPを以下に設定する。

IP:169.254.255.2
サブネットマスク:255.255.0.0

La FoneraとPCをランケーブル(クロス)で直結し、FONの電源を入れる。 ブラウザでhttp://169.254.255.1を開き、User:root、Password:adminでログイン。 Firmware Versionを確認する。

    • SSH化できるのはFirmware Versionが0.7.1 r1のみみたいです。
    • 私のはFirmware Version: 0.7.1 r2でしたので、底面のリセットボタンを30秒くらい押し、電源を入れなおしたところ0.7.1 r1にダウングレードできました。
    • ブラウザで、http://169.254.255.1 を開き、StatusにてFirmware Version: 0.7.1 r1に戻ってることを確認。

Connection type:がunknownになっている場合は、「Advanced」-「Mode」を「DHCP」などに変更する。 ブラウザでfirst.htmlを開きSubmitを押す。ID・パスワードはadmin/admin。Fonの画面が出るまで待つ。 ブラウザでsecond.htmlを開きsubmit。少々時間がかかります。

RedBootを書きかえてtelnetアクセスできるようにする

PCにてHFS.exeを起動、Virtual File Systemの所にダウンロードした、

openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma
out.hex

をD&Dで追加する。 Puttyを起動。

ホスト名:169.254.255.1
ポート:22
接続タイプ:SSH
ID/PASS:root/admin

でログイン。ログインできると、以下のような画面が出ます。

BusyBox v1.1.3 (2006.11.21-19:49+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

 _______  _______  _______
|   ____||       ||   _   |
|   ____||   -   ||  | |  |
|   |    |_______||__| |__|
|___|

 Fonera Firmware (Version 0.7.1 rev 1) -------------
  *
  * Based on OpenWrt - http://openwrt.org
  * Powered by FON - http://www.fon.com
 ---------------------------------------------------
root@OpenWrt:~#

続いて、以下のコマンドを実行。

root@OpenWrt:~# cd /tmp

root@OpenWrt:~# wget http://169.254.255.2/openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma
Connecting to 169.254.255.2[169.254.255.2]:80
openwrt-ar531x-2.4-v   0% |                                       |     0       --:-- ETAopenwrt-ar531x-2.4-v 100% |***************************************|   512 KB    00:00 ETA

root@OpenWrt:~# mtd -e vmlinux.bin.l7 write openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma vmlinu x.bin.l7
Unlocking vmlinux.bin.l7 ...
Erasing vmlinux.bin.l7 ...
Writing from openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma to vmlinux.bin.l7 ...  [ ][e][w][w][w][w][e][w][w][w][w][e][w][w][w][w][e][w][w][w][w][e][w][w][w][w][e][w][w][w][w][e][w][w][w][w][e][w][w][w][w]

root@OpenWrt:~# reboot

FONが起動したら、再度puttyにて以下のコマンドを実行。

root@OpenWrt:~# wget http://169.254.255.2/out.hex
Connecting to 169.254.255.2[169.254.255.2]:80
out.hex                0% |                                       |     0       --:-- ETAout.hex              100% |***************************************|  4096       00:00 ETA

root@OpenWrt:~# mtd -e "RedBoot config" write out.hex "RedBoot config"
Unlocking RedBoot config ...
Erasing RedBoot config ...
Writing from out.hex to RedBoot config ...  [ ][e][w]

root@OpenWrt:~# reboot

RedBoot上にてDD-WRTにファーム書き換え

PCのIPを以下に設定する。

IP:192.168.1.100
サブネットマスク:255.255.255.0

TFTPサーバを起動、ファームの入っているフォルダを指定。 Puttyを起動。

ホスト名:192.168.1.254
ポート:9000
接続タイプ:TELNET

でログイン。ctrl-cを押すとRedBootの画面が出てくる。出てこない場合はLa Foneraの電源OFF/ON。 ファーム書き換え。以下コマンドを実行。

RedBoot> ip_address -l 192.168.1.254/24 -h 192.168.1.100
IP: 192.168.1.254/255.255.255.0, Gateway: 0.0.0.0
Default server: 192.168.1.100

RedBoot> fis init

*** 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-0x802fefff, 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

fis createには5分?くらいかかりますので気長に待ちましょう。コマンドが終了すればプロンプト(RedBoot>)が帰ってきます。 書き換えに成功したら、ブラウザから、http://192.168.1.1/を開けば、dd-wrtのコントロールパネルが見えます。 一部の設定ページは、User:root、Passwd:adminにて入れます。

日本語にも対応しています。AdministrationのLanguageからJapaneseを選択してsaveすることにより、次回ログイン時から日本語化されます。 ちなみに、TELNETでも入れます。ログインPWはwebと同じ。

DD-WRT v24 std (c) 2007 NewMedia-NET GmbH
Release: 10/10/07 (SVN revision: 8151)

DD-WRT login: root
Password:
==========================================================

 ____  ___    __        ______ _____         ____  _  _
 | _ \| _ \   \ \      / /  _ \_   _| __   _|___ \| || |
 || | || ||____\ \ /\ / /| |_) || |   \ \ / / __) | || |_
 ||_| ||_||_____\ V  V / |  _ < | |    \ V / / __/|__   _|
 |___/|___/      \_/\_/  |_| \_\|_|     \_/ |_____|  |_|

                       DD-WRT v24
                   http://www.dd-wrt.com

==========================================================

BusyBox v1.4.2 (2007-10-10 03:33:15 CEST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ #

と言うことで、無事DD-WRT化できたわけだが、今のところ無線LAN機器使ってないので、また押入れに入ることになるのかな!?。PSPでも買っちまおうか・・・。



あけましてぽめれちょうございます

今年もよろしくお願いいたします


    • 月並みな返しだが — Aru 2008-01-06 (日) 00:25:43
    • ことよろ — Aru 2008-01-06 (日) 00:26:45
    • よろしくお願いします!! — admin 2008-01-14 (月) 14:50:21

スポンサーリンク