先週に引き続き、
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 ([email protected]) (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#
Ubuntu(ubuntu-9.0.5.Release.jffs2)の書き込み
前回設定したNFSサーバー上に、
まずuImageから準備しましょう。uImageファイルはtftpからのブートに用いたものと同じもの
$ sudo cp /var/lib/tftpboot/uImage.sheeva.040309 /extra/sheevaplug/rootfsv1.0/
次にルートファイルシステムです。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
NANDからのブート
ここまででNAND領域にカーネル
uBootのアップデート
SheevaPlugのNANDに格納されたuBootは、
U-Boot 1.1.4 (Apr 9 2009 - 12:23:12) Marvell version: 3.4.16
アップデートのために、
$ unzip SheevaPlug_U-Boot.zip $ cd SheevaPlug_U-Boot/U-Boot\ -\ Image/ $ sudo cp u-boot-rd88f6281Sheevaplug_400db_nand.bin /var/lib/tftpboot/
NFS Rootから起動するように設定したSheevaPlug
Marvell>> bubt u-boot-rd88f6281Sheevaplug_400db_nand.bin
uBootがアップデートされると、
NANDからの起動
Ubuntuのインストールが完了し、
Marvell>> setenv bootcmd 'nand read.e 0x800000 0x100000 0x400000; bootm 0x800000' Marvell>> setenv bootargs 'console=ttyS0,115200 mtdparts=nand_mtd:0x100000@0x000000(u-boot),0x400000@0x100000(uImage),0x1f800000@0x500000(rootfs)rw root=/dev/mtdblock2' Marvell>> saveenv
あとは、
インストール後の初期設定
ここまでで
ここからは、
時計合わせ・タイムゾーンの設定
設定の最初に、
時計合わせのための設定は、
Marvell>> date 0501134309 Date: 2009-05-01 (Friday) Time: 13:43:00 Marvell>> saveenc
dateコマンドのフォーマットは、
この状態でSheevaPlugをブートし、
# apt-get install ntp # ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== *europium.canoni 193.79.237.14 2 u 560 1024 377 254.328 4.202 4.745
これによりntpdが起動時に実行され、
# dpkg-reconfigure tzdata Current default timezone: 'Asia/Tokyo' Local time is now: Sat May 9 01:27:34 JST 2009. Universal Time is now: Fri May 8 16:27:34 UTC 2009.
メニューが表示されますので、
rootパスワードの変更
SheevaPlugのデフォルトファイルシステムのrootパスワードは、
# passwd
初期ユーザーの作成
デフォルトではrootユーザーしか存在しないので、
# adduser test Adding user `test' ... Adding new group `test' (1000) ... Adding new user `test' (1000) with group `test' ... Creating home directory `/home/test' ... Copying files from `/etc/skel' ... Enter new UNIX password: (ユーザーのパスワードを入力) Retype new UNIX password: (ユーザーのパスワードを再入力) passwd: password updated successfully Changing the user information for test Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []:
また、
resolv.confの変更
SeehvaPlugのデフォルトでは、
IPアドレスの変更
SheevaPlugは、
auto eth0
iface eth0 inet dhcp
たとえば以下のように設定します。この設定は、
auto eth0
iface eth0 inet static
address 192.168.254.20
netmask 255.255.255.0
broadcast 192.168.254.255
gateway 192.168.254.1
ホスト名と/etc/hostsの変更
デフォルトでは、
また、
ロケールの生成
SheevaPlug用のルートファイルシステムには、
sudo /bin/sh -c 'echo 'LANG="ja_JP.UTF-8"' > /etc/default/locale' sudo locale-gen "ja_JP.UTF-8"