ubifs image file confusion!

Nancy nancydreaming at gmail.com
Tue May 13 08:41:10 EDT 2008


On Tue, May 13, 2008 at 5:44 PM, Artem Bityutskiy
<dedekind at infradead.org> wrote:
> On Sat, 2008-05-10 at 12:20 +0800, Nancy wrote:
> >        ubifs.img (generated by mkfs.ubifs) do contained unmapped LEBs.
>
> This statement does not make sense. Mapped/unmapped is UBI notion, not
> UBIFS.
   Cause I was writing ubi-util, sure I show this issue at UBI standpoint.
   OK, what mkfs.ubifs for? generate image file used by ubiupdatevol.
It should contain the necessary data. What is necessary data? at least
the data should be writen down on the Nand flash. On the standpoint of
UBI, those data should be mapped.  It does not make sense to contain
data(LEBs which contents are all 0xFF). ubiupdatevol have to play a
trick to avoid writing those 0xFF to Nand.
   As I fool understand which I have plase after that mail:

On Sat, 2008-05-10 at 15:31 +0800, Nancy wrote:
> I think UBIFS will reserved some logic block number for interal use.
> To keep a simple logic to build tool like ubiupdatevol
> ubifs.img(generated by mkfs.ubifs) should contains those reserved
> unused LEBs and fill them with data 0xFF.


> >        #ubiupdatevol /dev/ubi0_0 ubifs.img   also write the unmapped
> > LEBs to Nand flash.
> It does not write them, but it creates them if the image size is less
> then amount of space on the volume. What else do you expect?
   I do not mean that part of 0xFF.  I mean the unmapped part in the image file.


> > Example 2 shows
> >        ubiupdatevol: error!: specify UBI device name and image file
> > name as first 2 par
> > ameters (use -h for help)
> >        but
> >        #ubiupdatevol /dev/ubi0_0 ubifs.img -t
> >        instead, even the function do not need an input image file
>
> Fixed, thanks for report.

Thanks!

pls:
      1. ubinize tool do not check whether vol_id or vol_name's
uniqueness which may cause unexpected error.

      2. ubinize tool's volume size check do not aligned to LEB size.
I can't use an image file which taken up of its all volume space.
eg. LEB size =258048  , .cfg defined vol size = 100MiB ,
vfat.img(407LEBs)     fail
it say something like the image file size exceed the volume size. I'm
home now, can't plase the original error message here. sorry.



-- 
Best wishes,
Nancy



More information about the linux-mtd mailing list