SDカードから起動するu-bootも入れたので、Fedoraをインストールします。
SheevaPlug用のFedora 10イメージもありますが、今回はFedora 11をインストールしてみようと思います。
rootイメージは、Fedoraからダウンロードします。
続いて、SDカードのパーティションを切り直してフォーマットします。FAT32のパーティションがあると思いますので、その場合は’d'ですべて削除しておきます。
# fdisk /dev/mmcblk0
The number of cylinders for this disk is set to 124864.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-124864, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-124864, default 124864): 92095
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (92096-124864, default 92096):
Using default value 92096
Last cylinder, +cylinders or +size{K,M,G} (92096-124864, default 124864):
Using default value 124864
Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 82
Changed system type of partition 2 to 82 (Linux swap / Solaris)
Command (m for help): p
Disk /dev/mmcblk0: 4091 MB, 4091543552 bytes
4 heads, 16 sectors/track, 124864 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 1 92095 2947032 83 Linux
/dev/mmcblk0p2 92096 124864 1048608 82 Linux swap / Solaris
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
この設定のパーティションサイズは以下の通りです。
- / : 残りすべて
- swap : 1G
続いてフォーマットします。
# mkfs.ext3 /dev/mmcblk0p1 # mkswap /dev/mmcblk0p2
rootイメージを予めSheevaPlugにscpしておき、そのイメージを展開します。
# mkdir /mnt/sdcard
# mount /dev/mmcblk0p1 /mnt/sdcard
# cd /mnt/sdcard
# tar jxvf ~/rootfs-f11.tar.bz2
:
# mv rootfs-f11/* .
# rm -rf rootfs-f11
# cp -p ~/sheeva-2.6.30.5-uImage .
# ln -s sheeva-2.6.30.5-uImage uImage
uImageをコピーしておきます
# vi etc/fstab
fatabの/dev/rootfsをコメントアウトして、以下の行を追加します
rootfs / rootfs rw 0 0
/dev/mmcblk0p2 swap swap defaults 0 0
これで準備は終了したので、u-bootの設定をします。
「のら犬にさえなれない」さんのブログにSDカードとNANDのマルチブートの設定が書かれていましたので、それを参考に設定します。
Marvell>> setenv bootargs_nand 'rootfstype=jffs2 console=ttyS0,115200 mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1' Marvell>> setenv bootcmd_nand 'setenv bootargs $(bootargs_nand); nand read.e 0x800000 0x100000 0x400000; bootm 0x800000' Marvell>> setenv bootargs_sd 'console=ttyS0,115200 mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mmcblk0p1 rootfstype=ext3 rootdelay=3' Marvell>> setenv bootcmd_sd 'setenv bootargs $(bootargs_sd); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x800000' Marvell>> set bootcmd 'run bootcmd_sd; run bootcmd_nand' Marvell>> saveenv
これで、SDカードが入っていればSDカードから起動し、SDカードが入っていない場合は、NANDから起動します。
起動したらrootでログインし、初期設定を行います。
デフォルトパスワードは、’marvell’になっています。