家には3台のFonルーターLa Foneraがあるので
そのうち一台にDD-WRTインストールしました。

インストールにあたってこの辺りを参考にしました。
・La FoneraのDD-WRT化
・La Fonera (firmware 0.7.1 r1)にSSHでアクセスする

以下は詳細な手順です。

【まずはSSHの有効化】
1. (Windowsの人は)SSHクライアントであるPuttyをインストールしておきます。
http://www.chiark.greenend.org.uk/~sgtatham/putty/
http://hp.vector.co.jp/authors/VA024651/#PuTTYkj_top (日本語版)

2. 次のHTMLファイルをfirst.htmlというファイル名で作っておきます。
<html>
<head></head>
<body>
<center>
<form method=”post” action=”http://169.254.255.1/cgi-bin/webif/connection.sh” enctype=”multipart/form-data”>
<input name=”username” value=”$(/usr/sbin/iptables -I INPUT 1 -p tcp –dport 22 -j ACCEPT)” size=”68″ />
<input type=”submit” name=”submit” value=”Submit” />
</form>
</center>
</body>
</html>

3. 次のHTMLファイルをsecond.htmlというファイル名で作っておきます。
<html>
<head></head>
<body>
<center>
<form method=”post” action=”http://169.254.255.1/cgi-bin/webif/connection.sh” enctype=”multipart/form-data”>
<input name=”username” value=”$(/etc/init.d/dropbear)” size=”68″ ><input type=”submit” name=”submit” value=”Submit” />
</form>
</center>
</body>
</html>

4. 自分のPCのLANインタフェースを次のように設定しておきます。
Subnet mask: 255.255.255.0
Gateway: 169.254.255.1
DNS: 169.254.255.1

WindowsXPの人は、TCP/IPのプロパティで、詳細設定→IPアドレス→追加で「IP:169.254.255.2、ネットマスク:255.255.255.0」にすればいいはずです。

5. La FoneraとPCをLANケーブルで接続します。

6. ブラウザで先ほどのfirst.htmlを開いてSubmitをクリックします。もし要求されたらユーザ名とパスワードを入力します。(設定前のデフォルトのユーザ名とパスワードは両方adminです。)

7. ブラウザで先ほどのsecond.htmlを開いてSubmitをクリックします。もし要求されたら同様にユーザ名とパスワードを入力します。

8. Puttyを起動してホスト名に169.254.255.1を指定してLa Foneraにrootでログインします。rootのパスワードのデフォルト値はadminです。

9. La Fonera上で以下のコマンドを実行します。
mv /etc/init.d/dropbear /etc/init.d/S50dropbear

10. 以下のようにviを起動します。
vi /etc/firewall.user

11. viが起動されたら、以下の行のコメントを外します。
# iptables -t nat -A prerouting_rule -i $WAN -p tcp –dport 22 -j ACCEPT
# iptables -A input_rule -i $WAN -p tcp –dport 22 -j ACCEPT

12. ファイルを書き込み保存してviを抜けます。

13. 以下のようにviを起動します。
vi /bin/thinclient

14. viが起動されたら、以下の行をコメントにします。(自動アップデートされないようにする)
. /tmp/.thinclient.sh

そして以下の行を代わりに加えます。

cp /tmp/.thinclient.sh /tmp/thinclient-$(date ‘+%Y%m%d-%H%M’)

15. ファイルを書き込み保存してviを抜けます。

【RedBootにアクセス】
1. RedBoot Config領域の書き換えを可能にしたvmlinuxをダウンロード
wget http://coppercore.net/~kevin/fon/openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma

2. vmlinux.bin.l7領域に書き込み
mtd -e vmlinux.bin.l7 write openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma vmlinux.bin.l7

3. La Foneraを再起動
reboot

4. RedBootのTELNET設定済ファイルをダウンロード
wget http://coppercore.net/~kevin/fon/out.hex

5. RedBoot config領域に書き込み
mtd -e “RedBoot config” write out.hex “RedBoot config”

6. La Foneraの電源を切る

7. PCのネットワークの設定を下記のように設定

IP : 192.168. 1.x
NETMASK : 255.255.255.0
xは1~253の間

8. La FoneraとPCをLANケーブル or ハブ経由で接続

9. La Foneraの電源を入れる

10. 数秒後に192.168.1.254のポート9000にtelnet
telnet 192.168.1.254 9000

【DD-WRTのインストール】

1. DD-WRTの最新版をダウンロード
http://www.dd-wrt.com/dd-wrtv2/down.php?path=downloads%2Fbeta+releases%2Ffonera+builds/
現状の最新は「2007 - 0201」

2. TFTPサーバーを立てる
今回は Poor TFTP Server for WIN32 を使いました。

3. RedBootとTFTPサーバーのIPアドレス設定
ip_address -l [local ip address] -h [remote server address]
例) ip_address -l 192.168.0.2/24 -h 192.168.0.3

4. インストール実行
こんな感じで順番にコマンドを実行する。

RedBoot>fis init

RedBoot>y

RedBoot>load -r -v -b 0×80041000 root.fs

RedBoot>fis create -b 0×80041000 -f 0xA8030000 -l 0×002C0000 -e 0×00000000 rootfs

RedBoot>load -r -v -b 0×80041000 vmlinux.bin.l7

RedBoot>fis create -r 0×80041000 -e 0×80041000 vmlinux.bin.l7

RedBoot>fis create -f 0xA83D0000 -l 0×00010000 -n nvram

RedBoot>reset

<注意>
コマンドによってはかなり時間がかかりますが、処理実行中に何度もEnterキーを押さないこと。
押すとコンソールが落ちます。これで一度失敗しました。。。

以上でインストールは終了です。
再起動の後WLANのLEDは点灯しませんが、電波はちゃんとに出ていました。

DD-WRTの初期値
 URL : http://192.168.1.1
 ID : root
 PASS : admin
 SID : dd-wrt

家ではアクセスポイントとして使用しているので
後日、設定等を書きます。