ubifs image file confusion!

Nancy nancydreaming at gmail.com
Sat May 10 03:31:38 EDT 2008


On 5/10/08, Nancy <nancydreaming at gmail.com> wrote:
> Hi Artem,
>       ubifs.img (generated by mkfs.ubifs) do contained unmapped LEBs.
>       #ubiupdatevol /dev/ubi0_0 ubifs.img   also write the unmapped
> LEBs to Nand flash.
>       Oh, There should have the same problem like I use nandwrite to
> write UBI image to Nand. But the practice tells everything is OK.
> Maybe during my test, do not touch the unmapped LEBs. But....weird,
> should be have the same problem.
>
Sorry, I do not dig deeply, write_leb() skip write the unmapped LEBs to Nand.

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.

In our situation:
      After Nand flash is burned, product test begin. During those
test, all volumes are READONLY. Then final check goes to Volume
content CRC check. I need a
volume read tool to read the whole volume content and generate CRC.
Then have a comparition with the original volume image CRC.  This tool
is quite similar to ubidumpvol.
      If the ubifs.img(generated by mkfs.ubifs) contains ONLY mapped
LEBs, UBIFS volume and VFAT volume can share the same volume read
code.

      en..
      VFAT give me a hint, the file system reserved space are all
0x00. Like you allocate a space: reserved=malloc( 3LEBsize );  Though
you do not use it now, but you can init it memset(reserved, 0x00,
3LEBsize);  And if like that, the file system reserved space will
become mapped.
      Would you mind do this?

-- 
Best wishes,
Nancy



More information about the linux-mtd mailing list