[Shr-User] UBI success story
martin.jansa at gmail.com
Mon Jan 4 14:52:10 CET 2010
On Mon, Jan 04, 2010 at 02:37:14PM +0100, Christoph Mair wrote:
> Quote from http://www.linux-mtd.infradead.org/doc/ubi.html#L_subpage:
> "Indeed, let's consider a NAND flash with 128KiB eraseblocks and 2048-byte
> pages. If it does not have sub-pages, UBI puts the the VID header at physical
> offset 2048, so LEB size becomes 124KiB (128KiB minus one NAND page which
> stores the EC header and minus another NAND page which stores the VID header."
> Therefore the params should be:
> MKUBIFS_ARGS = "-m 2048 -e 126976 -c 2047"
Yeah, I notided the same yesterday in failing mount command (it said
that superblock is wrong because of having wrong leb size, so updated
it locally too).
> With these parameters, I successfully wrote a ubifs image to a ubi volume:
> flash_eraseall /dev/mtd6
> ubiattach /dev/ubi_ctrl -m6 -O 2048
> ubimkvol /dev/ubi0 -m -Nrootfs
> ubiupdatevol /dev/ubi0_0 test.ubifs
> mount -t ubifs ubi0_0 /mnt/
> The first step (flash_eraseall) is optional and only needed if ubiattach fails.
I it "worked" for me too with just
nandwrite /dev/mtd6 shr-full-eglibc-ipk--20100103-om-gta02.rootfs.ubi
but first attempt it worked with only IO errors about few unreadable
PEBs. After reboot mount always failed after about a minute with
"Segmentation fault" and once with kernel panic - with 220.127.116.11.
> IMHO the ubinize params should be
> UBINIZE_ARGS = "-m 2048 -p 128KiB -s 2048"
I also had -O 2048 there..
> but until now I did not get this to work. I can write the image (sometimes it
> needs a few tries) but mount does not work.
As said above for me it worked just once after nandwrite. :/
uin:136542059 jid:Martin.Jansa at gmail.com
Jansa Martin sip:jamasip at voip.wengo.fr
More information about the community