第4章 使用方法

この章ではArmadilloの基本的な使用方法の説明を行います。

4.1. シリアル通信ソフトウェアの設定

シリアル通信ソフトウェアを起動し、シリアルの通信設定を、表 4.1. 「シリアル通信設定」のように設定してください。

[警告]

Armadillo-240では、RS232Cレベル変換アダプターを経由させる必要があります。

表 4.1. シリアル通信設定

項目設定
転送レート115,200bps
データ長8bit
ストップビット1bit
パリティなし
フロー制御なし

4.2. 起動

JP1、JP2をオープンに設定して電源を接続すると、Armadillo-9が起動します。正常に起動した場合、次のようなログが出力されます。

Uncompressing kernel.............................................................................
..............done.
Uncompressing ramdisk...........................................................................................
..................................................................................................
....done.
Doing console=ttyAM0,115200
Doing mtdparts=armadillo9-nor:0x10000(bootloader)ro,0x200000(kernel),0x5e0000(userland),-(config)
Linux version 2.6.12.3-a9-10 (build@debian) (gcc version 3.4.4 20050314 (prerelease) (Debian 3.4.3-13)) #1 Fri Sep 14 22:00:29 JST 2007
CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T)
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Machine: Armadillo-9
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists
Kernel command line: console=ttyAM0,115200 mtdparts=armadillo9-nor:0x10000(bootloader)ro,0x200000(kernel),0x5e0000(userland),-(config)
PID hash table entries: 512 (order: 9, 8192 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 32MB 32MB = 64MB total
Memory: 55536KB available (2369K code, 575K data, 104K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd
Freeing initrd memory: 6144K
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
NetWinder Floating Point Emulator V0.97 (double precision)
devfs: 2004-01-31 Richard Gooch () rgooch@atnf.csiro.au
devfs: boot_options: 0x0
Console: switching to colour frame buffer device 80x30
fb0: EP93xx frame buffer at 640x480x16
ttyAM0 at MMIO 0x808c0000 (irq = 52) is a EP93XX
ttyAM1 at MMIO 0x808d0000 (irq = 54) is a EP93XX
ttyAM2 at MMIO 0x808e0000 (irq = 55) is a EP93XX
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
loop: loaded (max 8 devices)
i2c /dev entries driver
i2c-armadillo9: i2c Armadillo-9 driver, (C) 2004-2005 Atmark Techno, Inc.
i2c-at24cxx: i2c at24cxx eeprom driver, (C) 2003-2005 Atmark Techno, Inc.
i2c-s3531a: Device Type [S-353x0A]
i2c-s3531a: i2c S-3531A/S-353X0A driver, (C) 2001-2005 Atmark Techno, Inc.
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
No card in slot: PFDR=000000ff
armadillo9-nor: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
armadillo9-nor: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
4 cmdlinepart partitions found on MTD device armadillo9-nor
parse_mtd_partitions:4
Creating 4 MTD partitions on "armadillo9-nor":
0x00000000-0x00010000 : "bootloader"
0x00010000-0x00210000 : "kernel"
0x00210000-0x007f0000 : "userland"
0x007f0000-0x00800000 : "config"
ep93xxusb ep93xxusb.0: EP93xx OHCI
ep93xxusb ep93xxusb.0: new USB bus registered, assigned bus number 1
ep93xxusb ep93xxusb.0: irq 56, io base 0xff020000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
usbcore: registered new driver audio
drivers/usb/class/audio.c: v1.0.0:USB Audio Class driver
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.01:USB HID core driver
usbcore: registered new driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for Generic
usbcore: registered new driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core v2.0
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
ip_tables: (C) 2000-2002 Netfilter core team
NET: Registered protocol family 1
NET: Registered protocol family 17
RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 6144KiB [1 disk] into ram disk... done.
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 104K
init started: BusyBox v1.00 (2007.09.14-13:02+0000) multi-call binary
Starting fsck for root filesystem.
fsck 1.25 (20-Sep-2001)
ext2fs_check_if_mount: No such file or directory while determining whether /dev/ram0 is mounted.
/dev/ram0: clean, 666/1024 files, 4245/6144 blocks
Checking root filesystem: done
Remounting root rw: done
Mounting proc: done
Mounting usbfs: done
Cleaning up system: done
Running local start scripts.
Changing file permissions: done
Configure /home/ftp: done
Starting syslogd: done
Starting klogd: done
Starting basic firewall: done
Loading /etc/config: done
Configuring network interfaces: done
Starting thttpd: done
Starting inetd: done
Setting hostname: done
atmark-dist v1.11.0 (AtmarkTechno/Armadillo-9)
Linux 2.6.12.3-a9-10 [armv4tl arch]
a9-0 login:

図 4.1. 起動ログ


デフォルトのユーザーランドでは、ログインプロンプトはシリアルインターフェースttyAM0(CON1)に加え、VGAにも表示されます。[3]

4.3. コンソールログイン時のユーザ名とパスワード

ログインユーザは、次の2種類が用意されています。

表 4.2. コンソールログイン時のユーザ名とパスワード

ユーザ名パスワード権限
rootrootrootユーザ
guest(なし)一般ユーザ

4.4. ディレクトリ構成

ディレクトリ構成は次のようになっています。

表 4.3. ディレクトリ構成の一覧

ディレクトリ名説 明
/binアプリケーション用
/devデバイスノード用
/etcシステム設定用
 /etc/networkネットワーク設定用
/lib共有ライブラリ用
/mntマウントポイント用
/procプロセス情報用
/rootroot ホームディレクトリ
/sbinシステム管理コマンド用
/usrユーザ共有情報用
/homeユーザホームディレクトリ
 /home/ftp/pubftp データ送受信用
/tmpテンポラリ保存用
/var変更データ用

4.5. 終了

電源を切断することでArmadilloを終了させます。

ただしIDEドライブやコンパクトフラッシュがマウントされている場合は、電源切断前にアンマウントするか、haltコマンドを実行してシステムを停止させてから電源を切断してください。これを行わない場合は、IDEドライブやコンパクトフラッシュのデータが破損する恐れがあります。

4.6. ネットワーク設定

Armadilloの「/etc/config/interfaces」ファイルを編集することで、ネットワークの設定を変更することができます。Armadillo-230はネットワークインターフェイスを2つ搭載しているため、通常のeth0に加えeth1も存在します。USBのインターフェイスを持つArmadilloでUSB対応LANアダプターを使用する場合も同じです。eth1側を設定する場合、以降eth0の個所をeth1に読み替えてください。また詳しいinterfacesの書き方については、interfacesのマニュアルを参照してください。

4.6.1. 固定IPアドレスで使用する場合

固定IPアドレスを指定する場合の設定例を次に示します。

表 4.4. ネットワーク設定例

項目設定値
IPアドレス192.168.10.10
ネットマスク255.255.255.0
ブロードキャストアドレス192.168.10.255
デフォルトゲートウェイ192.168.10.1

# /etc/config/interfaces - configuration file for ifup(8), ifdown(8)auto lo eth0
auto lo eth0
 
iface lo inet loopback
 
iface eth0 inet static
    address 192.168.10.10
    netmask 255.255.255.0
    network 192.168.10.0
    broadcast 192.168.10.255
    gateway 192.168.10.1

図 4.2. ネットワーク設定例(固定IPアドレス時)


ゲートウェイを使用しない場合、gatewayに0.0.0.0を指定してください。

gateway 0.0.0.0

図 4.3. ネットワーク設定例(ゲートウェイの無効化)


4.6.2. DNSサーバの設定

DNSサーバを設定する場合、/etc/config/resolv.confを変更します。

nameserver 192.168.10.1

図 4.4. DNSサーバの設定


変更は即座に適用されます。

4.6.3. DHCPを使用する場合

DHCPを利用してIPアドレスを取得する場合の設定例を次に示します。

# /etc/config/interfaces - configuration file for ifup(8), ifdown(8)

auto lo eth0
 
iface lo inet loopback
 
iface eth0 inet dhcp
        

図 4.5. ネットワーク設定例(DHCP使用時)


4.6.4. ネットワーク接続の開始と終了

ネットワーク接続を開始するにはifupを、ネットワーク接続を終了するにはifdownというコマンドを使用します。コマンドには開始または終了させたいインターフェイスを指定してください。

[armadillo /]# ifup eth0

図 4.6. ネットワーク接続の開始


[armadillo /]# ifdown eth0

図 4.7. ネットワーク接続の終了


4.6.5. ネットワーク設定をフラッシュメモリに保存する

ネットワーク設定に必要なファイルは、/etc/config/ディレクトリにあります。このディレクトリにあるファイルをフラッシュメモリに保存するには、flatfsdというコマンドを使います。オプション「-s」を指定し、Armadillo上でflatfsdを実行してください。

[armadillo /etc/config]# flatfsd -s

これで書き換えたネットワーク設定がフラッシュメモリに書き込まれ、次回以降の起動時に反映されます。

4.7. telnetログイン

次のユーザ名/パスワードでtelnetログインが可能です。rootでのログインは行えません。root権限が必要な作業を行う場合、guestでログイン後に「su」コマンドでroot権限を取得してください。

表 4.5. telnetログイン時のユーザ名とパスワード

ユーザ名パスワード
guestなし

Armadillo-220/230/240のRecoverイメージ(出荷状態)の起動直後の状態では、telnetログインをすることができません。telnetログインをするには、/etc/inetd.confを編集し、以下のコマンドを実行してください。

telnet  stream  tcp   nowait   root    /usr/sbin/telnetd      telnetd -l /bin/login

図 4.8. /etc/inetdファイル編集例


[armadillo ~]# iptables --append INPUT --proto tcp --dport telnet --jump ACCEPT

図 4.9. ファイアウォールの設定コマンド入力例


[armadillo ~]# inetd

図 4.10. スーパーサーバ起動コマンド


4.8. ファイル転送

ftpによるファイル転送が可能です。次のユーザ/パスワードでログインしてください。ホームディレクトリは「/home/ftp」です。「/home/ftp/pub」ディレクトリに移動することでデータの書き込みが可能になります。

表 4.6. ftpのユーザ名とパスワード

ユーザ名パスワード
ftpなし

Armadillo-220/230/240のRecoverイメージ(出荷状態)の起動直後の状態では、ftpによるファイル転送をすることができません。ftpによるファイル転送をするには、 図 4.10. 「スーパーサーバ起動コマンド」 を実行してください。

4.9. Webサーバ

thttpdという小さなHTTPサーバが起動しており、Webブラウザを使ってArmadilloにアクセスすることができます。データディレクトリは「/home/www-data」です。URLは「http://(Armadillo-240のIPアドレス)/」になります。(例http://192.168.10.10/)

4.10. sshログイン

次のユーザ名/パスワードでsshログインが可能です。rootでのログインは行えません。root権限が必要な作業を行う場合、guestでログイン後に「su」コマンドでroot権限を取得してください。

表 4.7. sshログイン時のユーザ名とパスワード

ユーザ名パスワード
guestなし



[3] VGA側からログインを行うには、USBキーボードを接続する必要があります。VGAをLinuxカーネルブートログが出力される標準コンソールに設定する方法は、 第6章を参照してください。