sumtool doesn't add an EBS to the last erase block

Andrey Yurovsky andrey at cozybit.com
Fri Nov 30 13:37:44 EST 2007


Hello.  I have some unexpected behavior with sumtool in that it
doesn't summarize the last erase block in my image.  I have a source
directory containing two files:

$ du test/*
232     test/file0
1140    test/file1

I then make a (uncompressed) JFFS2, with 128KiB erase block size:

$ mkfs.jffs2 -n -l -e 128KiB -p -x zlib -x rtime -d test/ -o  testfs.jffs2

Finally, I create an image with erase block summaries:

$ sumtool -n -l -e 128KiB -i testfs.jffs2 -o testfs-sum.jffs2

If I run "jffs2dump -c" on the resulting image, I see that the last
inode is at 0x00169264 while the last summary inode is at a lower
offset, 0x0015e83c, which doesn't make sense to me.  Since that last
inode is in the next erase block compared to the last summary,
shouldn't there be another summary for the final erase block?

As I understand it, sumtool should add a summary to the end of each
erase block in the image, and it seems to do this but the last erase
block is not done.  Is this a bug, or am I misunderstanding how
sumtool and EBS are supposed to work?  Thanks,

  -Andrey



More information about the linux-mtd mailing list