Create, Flash and Mount UBIFS Images

Artem Bityutskiy dedekind at infradead.org
Fri Apr 3 10:41:18 EDT 2009


On Fri, 2009-04-03 at 12:57 +0200, Manuel Sahm wrote:
> Hello,
>  
> concerning the autoresize flag:
>  
> As far as I understand:
> If a partition is 40 MiB, I have to set the vol_size < Partition size,
> and set the autoresize flag to use the whole Partition size of 40 MiB.
> right ?

Yes.

> Is it correct that the resize depends on the value -c of the mkfs.ubifs
> program ?

The autoresize is UBI thing. -c is UBIFS thing. Yes, -c defines
maximum UBIFS size in LEBs. Make it larger, e.g. -c 511 if you
are concerned.

> --> (40MiB / 129024)+1 = c     --> c=326
> With c=326 the autoresize feature should make the ubifs use the whole
> partitoon sizue of 40 MiB - right ?

Not exactly. But kind of. You should distinguish between UBI and
UBIFS - they are different thing. UBIFS does not know anuthing about
MTD partition, it knows only about UBI space, which is less than
partition space.

But just use -c511, it is safe. UBIFS overhead increases considerably
when this -c value goes over a power-of-2 boundary. So there is not 
that much difference between -c 326 and -c 512.

> concerning the kernel command parameter:
> Is it possible to define the ubi device number trough the kernel
> command line argument, like it is possible through the ubiattach program
> ?
> Example: ubi.mtd=4 is actually attached to /dev/ubi1 and /dev/ubi1_0.
> I want to have /dev/ubi4 and /dev/ubi4_0
> 
> possible ?

Hmm, not really. We did not think about this. May be you may add
this feature - should not be too difficult.
 
-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list