先週に引き続き,
Ubuntuファイルシステムのインストール
SheevaPlugでUbuntuを利用するには,
- 注1
- 筆者の購入した初回ロットはNANDの中身が空で,
自力でUbuntuをインストールする必要がありました。しかし, これは通常の製品としてはあまりにも微妙な気がしますので, もしかすると今後入手できるSheevaPlugには, デフォルトでUbuntuが導入されているかもしれません。このため, この記事を見てSheevaPlugを入手された場合, わざわざこうした手順を踏まずにUbuntuを利用できる可能性があります。
NFS Rootでの起動
前回の手順でNFS Root環境をセットアップし,
Marvell>> boot
Using egiga0 device
TFTP from server 192.168.254.20; our IP address is 192.168.254.21
Filename 'uImage.sheeva.040309'.
Load address: 0x2000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
###############
done
Bytes transferred = 2070316 (1f972c hex)
## Booting image at 02000000 ...
Image Name: Linux-2.6.22.18
Created: 2009-04-04 1:49:44 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2070252 Bytes = 2 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK
Starting kernel ...
Uncompressing Linux.................................................................................................................................. done, booting the kernel.
Linux version 2.6.22.18 (root@localhost.localdomain) (gcc version 4.2.0 20070413 (prerelease)) #1 Fri Apr 3 18:49:38 PDT 2009
CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053177
Machine: Feroceon-KW
Using UBoot passing parameters structure
Memory policy: ECC disabled, Data cache writeback
(snip)
NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 7 at 0x000e0000
Bad eraseblock 19 at 0x00260000
Bad eraseblock 94 at 0x00bc0000
Bad eraseblock 235 at 0x01d60000
Bad eraseblock 291 at 0x02460000
Bad eraseblock 317 at 0x027a0000
Bad eraseblock 323 at 0x02860000
Bad eraseblock 431 at 0x035e0000
Bad eraseblock 992 at 0x07c00000
Bad eraseblock 1798 at 0x0e0c0000
mtd: bad character after partition (r)
3 cmdlinepart partitions found on MTD device nand_mtd
Using command line partition definition
Creating 3 MTD partitions on "nand_mtd":
0x00000000-0x00100000 : "u-boot"
0x00100000-0x00500000 : "uImage"
0x00500000-0x1fd00000 : "rootfs"
ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
USB Universal Host Controller Interface driver v3.0
usb 1-1: new high speed USB device using ehci_marvell and address 2
usb 1-1: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
Linux telephony interface: v1.00
Marvell Telephony Driver:
mvBoardVoiceAssembleModeGet: TDM not supported(boardId=0x9)
assembly=-1,irq=-1
mp_check_config: Error, invalid voice assembley mode
(snip)
Advanced Linux Sound Architecture Driver Version 1.0.14 (Thu May 31 09:03:25 2007 UTC).
mvCLAudioCodecRegGet: Error while reading register!
mvCLAudioCodecInit: Error - Invalid Cirrus Logic chip/rev ID!
Error - Cannot initialize audio decoder.at address =0xff<6>ALSA device list:
#0: Marvell mv88fx_snd ALSA driver
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
eth0: link down
eth0: started
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
device=eth0, addr=192.168.254.21, mask=255.255.255.0, gw=255.255.255.255,
host=DB88FXX81, domain=, nis-domain=(none),
bootserver=192.168.254.20, rootserver=192.168.254.20, rootpath=
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
Looking up port of RPC 100003/2 on 192.168.254.20
eth0: link up, full duplex, speed 1 Gbps
scsi 0:0:0:0: Direct-Access Generic USB SD Reader 1.00 PQ: 0 ANSI: 0 CCS
sd 0:0:0:0: [sda] 15659008 512-byte hardware sectors (8017 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] 15659008 512-byte hardware sectors (8017 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1 sda2
sd 0:0:0:0: [sda] Attached SCSI removable disk
sd 0:0:0:0: Attached scsi generic sg0 type 0
Looking up port of RPC 100005/1 on 192.168.254.20
VFS: Mounted root (nfs filesystem).
Freeing init memory: 124K
init started: BusyBox v1.7.0 (2008-02-26 19:25:17 IST)
starting pid 297, tty '': '/etc/init.d/rcS'
starting pid 299, tty '': '/bin/sh'
-sh-3.2#
- 注2
- この例にあげたSheevaPlugのUSBポートに8GBのUSBメモリが装着されています。これにより/dev/
sdaとして8GBのデバイスが認識されていますが, 標準状態ではこのようなデバイスは存在しないことに注意してください。
Ubuntu (ubuntu-9. 0.5. Release. jffs2) の書き込み
前回設定したNFSサーバー上に,
まずuImageから準備しましょう。uImageファイルはtftpからのブートに用いたものと同じもの
$ sudo cp /var/lib/tftpboot/uImage.sheeva.040309 /extra/sheevaplug/rootfsv1.0/
- 注3
- さらに暗黙の前提として,
前回の操作でNFS Root用のディレクトリとして 「/extra/ sheevaplug/ rootfsv1. 0」 が作成され, NFS Root環境のルートファイルシステムがこのディレクトリを参照していることを仮定しています。
次にルートファイルシステムです。SheevaPlug Software & Design Informationにある
$ unzip SheevaPlug_Filesystem.zip $ cd SheevaPlug_Filesystem/ $ sudo cp ubuntu-9.0.5.Release.jffs2 /extra/sheevaplug/rootfsv1.0/
母艦側でここまでの操作が完了したら,
まず,
# ls /uImage.sheeva.040309 && echo OK # ls /ubuntu-9.0.5.Release.jffs2 && echo OK
ファイルの存在が確認できたら,
# cat /proc/mtd dev: size erasesize name mtd0: 00100000 00020000 "u-boot" mtd1: 00400000 00020000 "uImage" mtd2: 1f800000 00020000 "rootfs"
確認が済んだら,
- uImageの書き込み
# cd / # /usr/
sbin/ flash_ eraseall -j /dev/ mtd1 # /usr/ sbin/ nandwrite -p /dev/ mtd1 /uImage. sheeva. 040309 - ルートファイルシステムの書き込み
# /usr/
sbin/ flash_ eraseall -j /dev/ mtd2 # /usr/ sbin/ nandwrite /dev/ mtd2 /ubuntu-9. 0.5. Release. jffs2
さらに,
# mkdir /mnt1 # mount -t jffs2 /dev/mtdblock2 /mnt1
問題なくマウントできることを確認したら,
# umount /mnt1 # reboot