mount time (was Re: Fwd: Hello -- NAND/NOR Flash design for GTA02)

Werner Almesberger werner at
Wed Jan 16 18:58:55 CET 2008

Andy Green wrote:
> It sounds like we should run sumtool on the device *after* the
> non-sumtool'd image has been written to the NAND with the badblocks on
> that device taken care of?

It's not so easy :-( sumtool doesn't seem to do in-place updates.
Instead, it treats the input as a stream of nodes, which it then
re-blocks in eraseblock sizes, adding summaries at the end of each

Since summaries are still only within an eraseblock, there are no
pointers crossing eraseblock boundaries, and we can still write the
file system image by just skipping bad blocks.

So, this means that "defragmentation" of a live image would be hard
to do with sumtool. It also means that we would have to set up the
file system before use. However, also in-kernel jffs2 does its
little summarizing, namely when it doesn't find summary data. If
there is space, it writes all this to the eraseblock, so it'll be
fast on the next mount.

- Werner

More information about the openmoko-kernel mailing list