JFFS2 error messages

Arno Steffen arno.steffen at googlemail.com
Tue Mar 9 02:48:29 EST 2010


2010/3/9 Vimal Singh <vimal.newwork at gmail.com>:
> On Mon, Mar 8, 2010 at 9:53 PM, Arno Steffen
> <arno.steffen at googlemail.com> wrote:
>> 2010/3/8 Vimal Singh <vimal.newwork at gmail.com>:
>>> On Mon, Mar 8, 2010 at 6:02 AM, Arno Steffen
>>> <arno.steffen at googlemail.com> wrote:
>>>> 2010/1/29 Ricard Wanderlof <ricard.wanderlof at axis.com>:
>>>> ...
>>>>> The 'Empty flash at ... ends at ...' usually indicates some sort of mismatch
>>>>> between the sector or block size of the flash and the erasesize used when
>>>>> making the image. It could be harmless, or could indicate a more serious
>>>>> configuration problem.
>>>> ...
>>>>> /Ricard
>>>>> --
>>>>> Ricard Wolf Wanderlöf                           ricardw(at)axis.com
>>>>> Axis Communications AB, Lund, Sweden            www.axis.com
>>>>> Phone +46 46 272 2016                           Fax +46 46 13 61 30
>>>>
>>>> I also suffered from this empty flash at ... message.
>>>> So I checked with cat /proc/mtd the erasesize (which is 20000) and how
>>>> I generated the jffs2 (with mkfs.jffs2 -lqnp -e 128).
>>>>
>>>> Imho this both match (128k). But somewhat has to cause this message.
>>>> What else could I do to prevent such messages and how to get rid of it?
>>>>
>>>
>>> May be you should try providing "-s,--pagesize=SIZE" option too in
>>> 'mkfs.jffs2' command.
>>> If you do not give this, default (4K) will be consider. Which I do not
>>> think is ture in your case.
>>>
>>>
>>> --
>>> Regards,
>>> Vimal Singh
>>>
>>
>> Thanks, but I am a bit puzzled. In datasheet of flash MT29F1G there
>> are several sizes:
>> "– Page size
>> • x8: 2112 bytes (2048 + 64 bytes)
>> • x16: 1056 words (1024 + 32 words)"
>
> Both are same things, e.i. 2112 bytes.
>
>> "Each page consists of 2112 bytes. The pages are further divided into
>> a 2048-byte data
>> storage region with a separate 64-byte area. The 64-byte area s
>> typically used for error
>> management functions."
>>
>> As the pagesize is to be set in kByte I guess 2kByte would be the
>> right setting? The extra bytes for error management is to be omitted?
>
> Yes, that is correct. The pagesize should be set to 2kByte.
>
> --
> Regards,
> Vimal Singh
>

With this command
mkfs.jffs2 -lqnp -s 2 -e 128 -r /opt/rootfs ...
the output grows and grows - mkfs will not stop. Even with -s 4 (which
should be default) the same.
Using -s 2048 gives a reasonable size.

mkfs.jffs2: Usage: mkfs.jffs2 [OPTIONS]
Make a JFFS2 file system image from an existing directory tree

Options:
  -p, --pad[=SIZE]        Pad output to SIZE bytes with 0xFF. If SIZE is
                          not specified, the output is padded to the end of
                          the final erase block
  -r, -d, --root=DIR      Build file system from directory DIR (default: cwd)
  -s, --pagesize=SIZE     Use page size (max data node size) SIZE
(default: 4KiB)
  -e, --eraseblock=SIZE   Use erase block size SIZE (default: 64KiB)
  -c, --cleanmarker=SIZE  Size of cleanmarker (default 12)

As "-s 4096" gives same result as without "-s" I assume the size is in byte ?!
Just to be sure - I have to use 2048 instead of 2112 ?

Is there some kind of test to get out what really happened?



More information about the linux-mtd mailing list