#すべて自己責任の上でお願いします。壊しても、動かなくても泣かないこと。
日経Linuxでfonera2.0ネタが取り上げられてたのでやってみました。
まず分解。
いつものようにご丁寧にシリアル通信が出来るpinがついてます。
Ethernetコネクタ側
————–
・ Vcc (3.3V)
・ Tx
・ Rx
・ GND
————–
Atherosチップ側
とりあえずさくっと秋月 USB-Serial変換(TTL)を使ってコネクタ作製
後の手順は前書いたLaFonera Linux化計画とほとんど同じ。
openwrtのページからopenwrt-atheros-vmlinux.lzma,openwrt-atheros-root.squashfsをダウンロードしてtftpサーバーを用意しておきます。
以下操作ログ(黒字の部分が入力です。アドレスなどは適宜置き換えてください。)
Ethernet eth0: MAC address 00:xx:xx:xx:xx:xx
IP: 0.0.0.0/255.255.255.0, Gateway: 0.0.0.0
Default server: 0.0.0.0
—省略—
== Executing boot script in 1.000 seconds – enter ^C to abort
== Executing boot script in 1.000 seconds – enter ^C to abort
^C
RedBoot> ip_address -l 192.168.1.2/24 -h 192.168.1.10
IP: 192.168.1.2/255.255.255.0, Gateway: 0.0.0.0
Default server: 192.168.1.10
RedBoot> fis init
About to initialize [format] FLASH image system – continue (y/n)? y
*** Initialize FLASH Image System
… Erase from 0xa87e0000-0xa87f0000: .
… Program from 0×80ff0000-0×81000000 at 0xa87e0000:
RedBoot> load -r -b %{FREEMEMLO} openwrt-atheros-vmlinux.lzma
Using default protocol (TFTP)
Raw file loaded 0×80040400-0×801003ff, assumed entry at 0×80040400
RedBoot> fis create -e 0×80041000 -r 0×80041000 vmlinux.bin.17
… Erase from 0xa8030000-0xa80f0000: …………
… Program from 0×80040400-0×80100400 at 0xa8030000: …………
… Erase from 0xa87e0000-0xa87f0000: .
… Program from 0×80ff0000-0×81000000 at 0xa87e0000: .
RedBoot> fis free
0xA80F0000 .. 0xA87E0000
RedBoot> load -r -b %{FREEMEMLO} openwrt-atheros-root.squashfs
Using default protocol (TFTP)
Raw file loaded 0×80040400-0×801e03ff, assumed entry at 0×80040400
RedBoot> fis create -l 0×006f0000 rootfs
… Erase from 0xa80f0000-0xa87e0000: ……………………………………
……………………………………………………………
… Program from 0×80040400-0×801e0400 at 0xa80f0000: ……………………..
… Erase from 0xa87e0000-0xa87f0000: .
… Program from 0×80ff0000-0×81000000 at 0xa87e0000: .
RedBoot> fconfig boot_script_data
boot_script_data:
.. fis load -b 0×80100000 loader
.. go 0×80100000
Enter script, terminate with empty line
>>fis load -l vmlinux.bin.17
>> exec
>>
Update RedBoot non-volatile configuration – continue (y/n)? y
… Erase from 0xa87e0000-0xa87f0000: .
… Program from 0×80ff0000-0×81000000 at 0xa87e0000: .
RedBoot> reset
—省略—
BusyBox v1.11.2 (2009-05-28 20:21:24 UTC) built-in shell (ash)
Enter ‘help’ for a list of built-in commands.
_______ ________ __
| |.—–.—–.—–.| | | |.—-.| |_
| – || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
KAMIKAZE (8.09.1, r16278) —————————-
* 10 oz Vodka Shake well with ice and strain
* 10 oz Triple sec mixture into 10 shot glasses.
* 10 oz lime juice Salute!
————————————————–
—省略—
root@OpenWrt:/# passwd
Changing password for root
New password:
Retype password:
Password for root changed by root
root@OpenWrt:/# uci set system.@system[0].hostname=hoge
root@OpenWrt:/# uci set system.@system[0].timezone=JST-9
root@OpenWrt:/# uci commit system
root@OpenWrt:/# uci set network.lan.proto=static
root@OpenWrt:/# uci set network.lan.ipaddr=192.168.1.2
root@OpenWrt:/# uci set network.lan.netmask=255.255.255.0
root@OpenWrt:/# uci set network.lan.gateway=192.168.1.1
root@OpenWrt:/# uci set network.lan.dns=192.168.1.1
root@OpenWrt:/# uci commit network
root@OpenWrt:/# reboot
基本設定はここまで。ここまでは前回とほとんど変わりません。
ただ、せっかくUSBポートがあるので、「emobile使いたいよね。」と思い日経Linuxでwillcomを動かしていた例をまねて動かしてみましたが、駄目だったのでこことかを参考にしながら動かしてみました。
#操作ログ。
#パッケージ管理システムupdate.
opkg update
#kmod-usb-serial kmod-usb-uhciをインストール
opkg kmod-usb-serial kmod-usb-uhci
#設定ファイル書き込み
vi /etc/modules.d/60-usb-serial
usbserial vendor=0×12d1 product=0×1003 maxSize=4096
#再起動
reboot
#D02HWドライバをインストール。
opkg install huaweiaktbbo
#起動時に接続するように設定ファイル作製
vi /etc/init.d/huaweiAktBbo
#!/bin/sh /etc/rc.common
START=70
start() {
huaweiAktBbo
ifup ppp0
}
#ファイルに実行権限を与え、onにする。
chmod +x /etc/init.d/huaweiAktBbo
/etc/init.d/huaweiAktBbo enable
#3g制御用のパッケージインストール
opkg install comgt
#インターフェイスの設定
vi /etc/network
#以下を追記
config interface ppp0
option ifname ppp0
option proto 3g
option device /dev/usb/tts/0
option apn emb.ne.jp
option pincode 9999 #初期値
#再起動
reboot
3 responses so far ↓
1 kuma // 10月 21, 2009 at 23:22:45
以下の通り、D02HWが認識されていないようなのですが、原因とか分かりませんでしょうか?
root@fon2:~# huaweiAktBbo
Hladam HUAWEI E220 a prepnem na modem – bbo 06
huaweiAktBbo: /home/andy/openwrt/atheros/build_dir/mips/huaweiaktbbo/huaweiAktBbo.c: 113: main: Assertion `dev’ failed.
Aborted
2 kuma // 10月 23, 2009 at 23:59:54
自己解決しました。失礼しました。
(ハブを認識していなかったようで、kmod-usb2を入れたらとりあえず認識しました。)
3 emb // 10月 26, 2009 at 19:51:54
D31HWはやっぱ無理なんですかね~
プロダクトIDは変更しましたが。。。。
root@fon22:/# huaweiAktBbo
Hladam HUAWEI E220 a prepnem na modem – bbo 06
huaweiAktBbo: /home/andy/openwrt/atheros/build_dir/mips/huaweiaktbbo/huaweiAktBbo.c: 113: main: Assertion `dev’ failed.
Aborted
root@fon22:/
Leave a Comment