Create, Flash and Mount UBIFS Images
Artem Bityutskiy
dedekind at infradead.org
Thu Apr 2 07:42:28 EDT 2009
Hi,
On Thu, 2009-04-02 at 13:36 +0200, Manuel Sahm wrote:
> Hello,
>
> Could anybody explain me how to build an ubi.img that I could flash
> inside my system ?
>
> NAND Flash: Micron 256 MByte
> Physical Eraseblock Size = 131072
> Logical Eraseblock Size = 129024
> Min I/O Size = 2048
> SubPage = 512
>
> The Partition /dev/mtd6 is 32MByte.
>
>
> I did the following steps:
> On my host I created the file through:
>
> mkfs.ubifs -d /exports/ -m 2048 -e 129024 -o ubifs.img -x "none" -c
> 2047
> ubinize -p 128KiB -m 2048 -s 512 -O 512 -o ubi.img ubi.ini
>
> with ubi.ini
> [TEST]
> mode=ubi
> image=ubifs.img
> vol_id=0
> vol_size=3MiB
> vol_type=dynamic
> vol_alignment=1
> vol_flags=autoresize
>
> Then I copy this creted ubi.img to my embedded system.
>
> On my embedded system I did:
> flash_eraseall /dev/mtd6
> ubiformat /dev/mtd6 -s 512 -f ubi.img
> ubiattach /dev/ubi_ctrl -m6 -d6 -O512
> mount -t ubifs ubi6_0 /mnt/ubi6
>
> Then at the mount command I got the error:
> validate_sb: bad superblock
>
> So what´s wrong ?
Could you please try to enable debugging, as it is asked here:
http://www.linux-mtd.infradead.org/doc/ubifs.html#L_how_send_bugreport
And I do not understand why you did not provide all UBIFS output.
The print is:
ubifs_err("bad superblock, error %d", err);
and you did not provide error code number.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd
mailing list