Mental note: if using UBI, better have UBI in your kernel

Alas, I tried to upgrade to – self-build – kernel 2.6.32.2 again, and bricked my SheevaPlug, again.
Fortunately, all info needed to boot from a working uImage off USB is available within uBoots environment variables:

Marvell>> usb start; fatload usb 0 0x00800000 uImage
(Re)start USB...
USB: scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
reading uImage
...
...
......................................................................................................................................................................................................................
...
2620504 bytes read
Marvell>> setenv bootargs $(bootargs_console) $(mtdpartitions) ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs ; bootm 0x00800000

This finally loaded the uImage (Sheeva’s version of good-old zImage) from the attached USB drive, provided the kernel command line with the (still working) in-flash root-fs and jumped to the kernel images as loaded into RAM. Cool stuff. Reason for this: UBI/UBIFS is not selected per default for the platform. Booting from an UBI device and an UBI-filesystem on it without the kernel even knowing how to spell UBI leads to the well-know panic() :-)

Linux version 2.6.32.2 (wusel@greebo) (gcc version 4.4.1 (Sourcery G++ Lite 2009q3-68) ) #2 PREEMPT Fri Dec 25 04:16:40 CET 2009

Cool stuff – short nights ;)