トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS   ログイン

ゼミのお話/Linux組み込みボードへのDebianインストール の変更点

#contents
----
*準備 [#t82c15cc]
**物品確認 [#u6d4e189]
-CF:
#ref(DSC_0211.jpg,zoom,320x160)
**注意1 [#qeb1b1a5]
-赤LED点滅時には,決して,電源を切らないように
**注意2 [#xc8f9acf]
-Debianインストール後は,以下のコマンドで終了すること
--shutdown -h now

*ファイルシステムの初期化 [#c458c261]
-CF上にext2ファイルシステムを作成してDebianをコピーできる状態にします.Debianを導入するだけで350MBぐらいの容量が必要となります.
**手順 [#r841e961]
-CFをLinux組み込みボードに挿入
#ref(1279186275-picsay.jpg,zoom,320x160)
-Linuxボード電源投入
-rootでログイン
-パーティション作成 (◎の行でキー入力が必要)
--◎[armadillo ~]# fdisk /dev/hda
---◎Command (m for help): d
---Selected partition 1
---◎Command (m for help): n
---Command action
---e   extended
---p   primary partition (1-4)
---◎p
---◎Partition number (1-4): 1
---◎First cylinder (1-1946, default 1): 1
---◎Last cylinder or +size or +sizeM or +sizeK (1-1946, default 1946): 1946
---◎Command (m for help): w
---The partition table has been altered!
---Calling ioctl() to re-read partition table.
---Syncing disks.
--ファイルシステムの作成
---◎[armadillo ~]# mke2fs -O -filetype /dev/hda1

*Debainのインストール [#n2d4d616]
-Debianの分割されたアーカイブファイルをArmadilloにftp転送してCFにコピーします.
**CFと転送ファイル用のramfsをマウント [#r671b875]
-[armadillo ~]# mount /dev/hda1 /mnt
-[armadillo ~]# mount -t ramfs none /home/ftp/pub
-[armadillo ~]# chmod 777 /home/ftp/pub

**ftpでアーカイブファイルを転送 [#y90d8e1d]
-[armadillo ~]# cd /mnt
-[armadillo ~]# export http_proxy="http://proxy.muroran-it.ac.jp:8080"
-[armadillo ~]# wget http://download.atmark-techno.com/armadillo-300/images/linux-a300-1.07.bin.gz
-[armadillo ~]# wget http://download.atmark-techno.com/armadillo-300/debian/debian-etch-a300-1.tgz
-[armadillo ~]# wget http://download.atmark-techno.com/armadillo-300/debian/debian-etch-a300-2.tgz
-[armadillo ~]# wget http://download.atmark-techno.com/armadillo-300/debian/debian-etch-a300-3.tgz
-[armadillo ~]# wget http://download.atmark-techno.com/armadillo-300/debian/debian-etch-a300-4.tgz
-[armadillo ~]# wget http://download.atmark-techno.com/armadillo-300/debian/debian-etch-a300-5.tgz

**CFにアーカイブファイルを展開 [#e6608846]
-[armadillo ~]# tar zxvf /mnt/debian-etch-a300-1.tgz -C /mnt
--debian-etch-a300-1からdebian-etch-a300-5まで繰り返し行う
-[armadillo ~]# rm -f /mnt/debian-etch-a300-?.tgz
-[armadillo ~]# mv /mnt/linux-a300-1.07.bin.gz /mnt/boot/Image.gz
-[armadillo ~]# sync

*起動設定 [#q17db4a6]
-CFにインストールしたDebianを起動するように設定
**Hermit起動モード設定 [#j80d5a56]
-Linuxボードの電源を切る
-CFを抜く
-ジャンパピンの設定(工場出荷の初期状態でも可能)
--JP1:2-3
--JP2:1-2
#ref(1279191132-picsay.jpg,zoom,320x160)
-Linuxボードの電源投入する
-起動パラメータでルートファイルシステムをCFに指定する
--hermit> clearenv
--hermit> setenv console-ttyAM0,115200 root=/dev/hda1 noinitrd
-Linuxボードの電源を切る
-CFを挿入する
-Linuxボードの電源投入する
-起動確認

*ネットワーク設定 [#y7c2d0f1]
**コンピュータ名の設定 [#oe87dfee]
-vi /etc/hostname
--コンピュータの名前を入れる
---armadillo300
---armadillo.csse.muroran-it.ac.jp

**有線LANの設定(有線LAN:eth0) [#lb613697]
***IP設定(DHCP) [#o01bacc6]
-vi /etc/network/interfaces
--auto lo eth0
--iface lo inet loopback
--iface eth0 inet dhcp

***IP設定(固定IP) [#d88762a5]
-vi /etc/network/interfaces
--auto lo eth0
--iface lo inet loopback
--iface eth0 inet static
---adress ***.***.***.***
---netmask ***.***.***.***
---network ***.***.***.***
---broadcast ***.***.***.***
---gateway ***.***.***.***
***DNS設定 [#x86f1b9d]
-vi /etc/resolv.conf
--search local-network
--nameserver ***.***.***.***
***プロキシ設定 [#j2a28213]
-学内で使用する場合は必須
--vi /root/.bashrc
---export http_proxy="http://proxy.muroran-it.ac.jp:8080"

** ネットワーク設定確認 [#mf7a5187]
-ネットワークの再起動
--/etc/init.d/networking restart
-ログアウト・ログイン(プロキシを更新)
-設定確認
--ifconfig -a
--eth0などの項目を見て,IPアドレスが割り振られていることを確認

**無線LANの設定 [#w80df5d8]
***aptによる設定ツールのインストール [#k0d9547a]
-Debianで使用可能なソフトウェアパッケージ(ソフトウェアをダウンロード・インストール等行う管理システム)であるaptを用いて無線LANの設定ツールをインストールする.
***aptの設定 [#v32aa43e]
-aptで用いるソフトウェアパッケージリストの更新
--vi /etc/apt/sources.list
---以下を追加
---deb http://ftp.riken.jp/Linux/debian/debian-archive etch main contrib non-free
---deb http://ftp.riken.jp/Linux/debian/debian-non-US etch/non-US main contrib non-free
---編集終了([ESC]-:q)
--リストのアップデート
---apt-get update
***無線LAN設定ツールのインストール [#ya8a5078]
-apt-get install wireless-tools madwifi-tools
--

***無線LANの設定(手動) [#zaead0bf]
-wlanconfig ath0 destroy
-wlanconfig ath0 create wlandev wifi0 wlanmode ***
--***:通信モード.以下のモードが指定可能