|
このページは「24環境」の情報です 第13回 CAT709 カーネルダウンロード mini TIPS †海老原祐太郎
2003/6/19
Linux環境で、CAT790にカーネル(zImage)やルートファイルシステムイメージ(rootfs.img)を 備 準 †Linux上での通信ソフトは kermit を使用します。 Debian(Woody)ホストの場合は以下のコマンドでインストールします。 # apt-get install ckermit lrzsz # sx --help sx version 0.12.21rc Usage: sx [options] file ... or: sx [options] -{c|i} COMMAND 以下略 ちなみに、シリアルポートのデバイス (私の場合は /dev/ttyUSB0) への $ ls -l /dev/ttyUSB0 crw-rw---- 1 root dialout 188, 0 6月 20 04:30 /dev/ttyUSB0 こういう表記の場合は、dialout グループのメンバーならばRW権限がありますので、 root:x:0: daemon:x:1: bin:x:2: sys:x:3: adm:x:4:ebihara tty:x:5: disk:x:6: lp:x:7:lp mail:x:8: news:x:9: uucp:x:10: proxy:x:13: kmem:x:15: dialout:x:20:ebihara ← dialout グループに属するユーザーを,で区切って列挙する いったんログアウトしてログインしなおすと dialout グループに属しているはずです。 $ groups ← groupsコマンド実行 kaihatsu adm dialout 初期化ファイル †kermit は 個人のホームディレクトリの .kermrc 初期化ファイルを参照します。 set line /dev/ttyUSB0 ←(シリアルポートです /dev/ttyS0 等) set speed 115200 set carrier-watch off set protocol xmodem ← 実際の通信はシェルから外部コマンド sx を呼び出すのでこれは使わない set transmit prompt 0 define sx !sx \%1 >\v(line) <\v(line) define zImage ,- ← zImage マクロ output k,- input 10 C,- if failure goto end,- sx "zImage",- :end,- connect define rootfs ,- output r,- input 10 C,- if failure goto end,- sx "roofs.img",- :end,- connect kermitの使い方 †kermit を起動し、以下の手順で使用します。 $ cd /CAT709-KERNEL-DIR/arch/sh/boot $ kermit ← kermit起動 C-Kermit 7.0.196, 1 Jan 2000, for Linux Copyright (C) 1985, 2000, Trustees of Columbia University in the City of New York. Type ? or HELP for help. C-Kermit>c ← c とタイプするとシリアルラインにコネクトします。 Connecting to /dev/ttyUSB0, speed 115200. The escape character is Ctrl-\ (ASCII 28, FS) ←抜けるには CTRL+\ C とタイプする Type the escape character followed by C to get back, ←と書いてある or followed by ? to see other options. ---------------------------------------------------- > ← CAT709との通信画面 > > > > ← CTRL+\ C とタイプしたので抜けた (Back at boss) ---------------------------------------------------- C-Kermit> C-Kermit>zImage ← zImage マクロ実行 ← 数秒待つ kernel download mode. send 'zImage' file via xmodemdownload_and_write(start=80020000,len=000e0000) buffer=8cS ending zImage, 6126 blocks: Give your local XMODEM receive command now. Xmodem sectors/kbytes sent: 276/34k 転送が最後まで終了するとFLASHメモリーへの書き込みが開始されます。 |