skip erase blocks when creating fs image from jffs2 partition?

Shmulik Ladkani shmulik.ladkani at gmail.com
Fri Jul 13 02:40:36 EDT 2012


Hi,

On Thu, 12 Jul 2012 20:02:01 +0000 Noah Romer <Noah.Romer at watchguard.com> wrote:
> Based on my reading of the docs, and some initial experimentation, it
> seems as though it's possible to create a usable raw image of a jffs2
> partition in which you skip both bad blocks and empty/erase blocks.

I guess you meant "extract" instead of "create".

> Is that understanding correct? Particularly with regards to whether or
> not the resulting image would be usable.

Yes, it is generally correct.

Pay attention to:
- The destination MTD should have same eraseblock size and page size.
- The destination partition has enough usable blocks to contain your
  extracted jffs2 image.
- The destination partition has to be erased, with the jffs2
  cleanmarkers written to the OOB (-j option of flash_erase).
  Meaning, you'll program only the inband data extracted from the source
  partition.
- When programming the extracted image to the destination mtd,
  do NOT program empty pages (entire page is 0xFF).
  See
   http://www.linux-mtd.infradead.org/faq/ubifs.html#L_why_ubiformat
   http://www.linux-mtd.infradead.org/doc/ubi.html#L_flasher_algo

Regards,
Shmulik



More information about the linux-mtd mailing list