NAND flashing on C5


I’m still unable to mount the ubifs root filesystem from nand after flashing on my C5 board.

Here are the steps that I went through to do the flashing:

1. Narcissus ubifs image
Downloaded the narcissus ubifs image for beagleboard validation gnome image.
Selected “Beagleboard validation GNOME image” under Platform specific packages.

Narcissus didn’t give me a .ubi image, but just the ubifs (beagle-validation-image-beagleboard.ubifs).

So I had run a ubinize with the following command:
ubinize -o beagle-validation.ubi -m 2048 -p 128KiB -s 512 ubinize.cfg

The following is my ubinize.cfg:


I copied the .ubi, x-loader and U-boot to the /boot of the SDCard’s ext3 partition.

2. Splitting of .ubi

As the UBI is too big to fit in RAM, I’m splitting it as follows:

dd if=beagle-validation.ubi of=beagle-validation-1.ubi bs=4k count=$((256 * 200))
dd if=beagle-validation.ubi of=beagle-validation-2.ubi bs=4k skip=$((256 * 200))

3. Flashing using U-boot

The following is my uEnv.txt

writemlo=fatload mmc 0 82000000 MLO;nandecc hw;nand erase.part x-loader;nand write 82000000 0 ${filesize}
writeuboot=fatload mmc 0 82000000 u-boot.bin;nandecc sw;nand erase 80000 160000;nand write 82000000 80000 160000
writeuimage=ext2load mmc 0:2 82000000 /boot/uImage;nandecc sw;nand erase 280000 400000;nand write 82000000 280000 400000
writeub1=ext2load mmc 0:2 82000000 /boot/beagle-validation-1.ubi;nandecc sw;nand erase.part fs;nand write.e 82000000 0x680000 ${filesize}
writeub2=ext2load mmc 0:2 82000000 /boot/beagle-validation-2.ubi;nandecc sw;nand write.e 82000000 0xce80000 ${filesize}
writeenv=setenv nandrootfstype ubifs;setenv nandroot ‘ubi0:beagleboard-rootfs ubi.mtd=4’;setenv uenvcmd run nandboot;saveenv
uenvcmd=mtdparts default;run writemlo;run writeuboot;run writeuimage;run writeub1;run writeub2;run writeenv;echo Remove SD card and reboot

On boot power up, MLO, u-boot, the u-boot env , uImage, and the .ubi get flashed to the default nand partitions.

4. remove the card and reset,
MLO, U-boot and uImage load from nand and execute fine, however the kernel panics when trying to mount the root filesystem:

[ 7.137542] SmartReflex Class3 initialized
[ 7.148345] clock: disabling unused clocks to save power
[ 7.155151] registered taskstats version 1
[ 7.160797] fbcvt: 640x480@60: CVT Name - .307M3-R
[ 7.179168] Console: switching to colour frame buffer device 80x30
[ 7.194366] regulator_init_complete: VAUX3: incomplete constraints, leaving on
[ 7.202636] regulator_init_complete: VDAC: incomplete constraints, leaving on
[ 7.211547] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 7.218353] omap_vout omap_vout: Buffer Size = 3686400
[ 7.225097] omap_vout omap_vout: : registered and initialized video device 0
[ 7.234222] UBIFS error (pid 1): ubifs_read_node: bad node type (0 but expected 6)
[ 7.242279] UBIFS error (pid 1): ubifs_read_node: bad node at LEB 0:0, LEB mapping status 1
[ 7.251434] List of all partitions:
[ 7.255157] 1f00 512 mtdblock0 (driver?)
[ 7.260528] 1f01 1920 mtdblock1 (driver?)
[ 7.265869] 1f02 128 mtdblock2 (driver?)
[ 7.271240] 1f03 4096 mtdblock3 (driver?)
[ 7.276611] 1f04 517632 mtdblock4 (driver?)
[ 7.281951] No filesystem could mount root, tried: ubifs
[ 7.287658] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Any feedback is appreciated! thanks,