Yup, I want to do this too.
For the record, the original image is provided on the CD in SheevaPlug_Filesystem.zip (I think, there's certainly an ubuntu jffs2 in there which would seem right).
My problem is that after an update I am no longer able to log in. I've tried every root password I can think of, no luck. I altered the boot arguments to go to single user mode, no luck getting in. I added init=/bin/bash to the kernel arguments and got a shell, remounted / as rw but password manipulation failed. I then removed the root password hash from /etc/shadow and rebooted. Still wouldn't let me in.
So, first question, can anyone think of anything I haven't tried to get into the system?
Next I tried following the tftp/nfs booting. I have a tftp server running fine on my laptop and managed to get the system to boot the kernel image that way. But then NFS mount failed with a permission error. After more testing and fixing I managed to get the nfs system exported properly and can now mount the rootfs fine on other systems. I followed the guide from the documentation on CD and did all this -
SheevaPlug U-Boot Settings
On the SheevaPlug reference board follow the steps below to boot from NFS.
Marvell>> set ipaddr 10.81.xxx.yyy
Marvell>> set serverip 10.81.xxx.zzz
Marvell>> set rootpath /home/Ubuntu-SheevaPlug
Marvell>> set image_name uImage.sheeva.20090225
Marvell>> set console 'console=ttyS0,115200
mtdparts=nand_flash:0x400000@0x10000
0(uImage)ro,0x1f800000@0x500000(rootfs)rw'
Marvell>> set bootargs_root 'root=/dev/nfs rw'
Marvell>> set bootargs_end ‘:::DB88FXX81:eth0:none’
Marvell>> set bootcmd 'tftpboot 0x2000000 $(image_name);setenv bootargs
$(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath)
ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000'
Marvell>> saveenv
Changing the ip addresses and NFS paths as necessary, and skipping the saveenv as I didn't want to screw up the uboot environment if I got them wrong. But after the kernel boots the plug fails with:
Looking up port of RPC 100003/2 on 192.168.1.101
eth0: link up, full duplex, speed 1 Gbps
Looking up port of RPC 100005/1 on 192.168.1.101
Root-NFS: Server returned error -13 while mounting /home/dave/sheeva/netboot/rootfsv1.0
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00 1024 mtdblock0 (driver?)
1f01 2048 mtdblock1 (driver?)
1f02 521216 mtdblock2 (driver?)
b300 16052224 mmcblk0 driver: mmcblk
b301 14996646 mmcblk0p1
b302 1052257 mmcblk0p2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
Help? Anyone?
Is there something I'm missing?
Is there a way to flash the jffs2 file directly using uboot, rather than this cumbersome tftp/nfs boot to linux followed by a flash?
I've used other uboot ARM devices (I was one of the suckers that bought an openmoko freerunner), and whilst flasdhing a hundred or so MB over serial may take a while (15+ min) I would find it preferable to having to use an OS to update the NAND. Anyone tried this? I know you can use bubt to update the kernel.
Thanks for any/all help. I love my little ARM devices and I'm hoping the plug will replace one of my aging NSLU2's pretty soon. But for that I need to get (back) to an OS that works.
Here is the procedure I use to reflash the jffs2 image via tfpt/nfs:
#----- Configure the Linux Boot machine for the SheevaPlug -----
# My Linix boot box is a Ubuntu machine so
# your firewall, tftp and nfs server restart my be different
# My Linux box is at address 192,168,1,91
# My SheevaPlug is at 192.168.1.103
# Make sure your firewall will allow access by your SheevaPlug
# Either open access from your SheevaPlug IP address or open
# the following ports: 32771, 111, 2049, 69
ufw allow from 192.168.1.103
# Set up your /etc/exports file for NFS
echo "/home/rootfsv1.0 *(rw,sync,no_root_squash)" >> /etc/exports
echo "/tftpboot *(rw,sync,no_root_squash)" >> /etc/exports
exportfs -ra
# Restart your nfs server
/etc/init.d/nfs-kernel-server restart;
exportfs
#----- Copy (or wget) the required files from your source to the Linux Box -----
# First the tftp boot file
mkdir /tfptboot
copy "C:\Devel\SheevaPlug\SheevaPlug_LSP1\Image\uImage.sheeva.040309" to /tftpboot
copy "C:\Devel\SheevaPlug\SheevaPlug_Host_SWsupportPackageLinuxHost\LinuxHost\Linux Host Filesystem - rootfs.tar.bz2" to "/home"
cd /home
tar -xvf "/home/Linux Host Filesystem - rootfs.tar.bz2"
copy "C:\Devel\SheevaPlug\SheevaPlug_FileSystem\SheevaPlug_FileSystem\ubuntu-9.0.5.Release.jffs2" to "/home/rootfsv1.0"
###### IF YOU ARE GOING TO FLASH THE uIMAGE, too #####
cp /tftpboot/uImage.sheeva.040309 /home/rootfsv1.0/uImage.sheeva.040309
#####################################################
#----- SheevaPlug U-Boot settings for NFS booting -----
# Boot the plug and interrupt auto-boot sequence
#Marvell>>
set ipaddr '192.168.1.103'
set serverip '192.168.1.91'
set rootpath '/home/rootfsv1.0'
set image_name 'uImage.sheeva.040309'
set bootargs_root 'root=/dev/nfs rw'
set bootargs_end ':::DB88FXX81:eth0:none'
set console 'console=ttyS0,115200 mtdparts=nand_flash:0x100000@0x000000(u-boot),0x400000@0x100000(uImage),0x1f800000@0x500000(rootfs)rw'
set bootcmd 'tftpboot 0x2000000 $(image_name);setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000'
saveenv
reset
#... After successful reboot, make sure all is well ....
cat /proc/mtd
# you should see THREE mtd partitions
# Make sure you have the tools
find / -name flash_eraseall
find / -name nandwrite
#----- Flash the new partition(s) -----
###### OPTIONAL, The uImage #######
flash_eraseall -j /dev/mtd1
nandwrite -p /dev/mtd1 /uImage.sheeva.040309
###################################
#----- rootfs ---------
flash_eraseall -j /dev/mtd2
nandwrite -p /dev/mtd2 /ubuntu-9.0.5.Release.jffs2
mkdir /temp-mount
mount -t jffs2 /dev/mtdblock2 /temp-mount
# Make sure it looks good. "df" should be ~30% full
# If it is 3% you have a bad jffs2 image
ls /temp-mount
df
umount /temp-mount
rm /temp-mount
reboot
#----- Return the U_Boot settings to boot from NAND
# Interrupt the autoboot sequence
# Marvell>>
setenv bootargs 'console=ttyS0,115200 mtdparts=nand_flash:0x400000@0x100000(uImage)ro,0x1fc00000@0x500000(rootfs)ro root=/dev/mtdblock2'
setenv bootcmd 'nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
saveenv
reset