This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

jffs2, empty flash at ....



After adding a file to a jffs2 filesystem I get message like this:

"Empty flash at 0x001011e0 ends at 0x00101800"

What is the problem?

Are there a setting that is wrong or missed? I generated the jffs with

"mkfs.jffs2 -lqnp -e 128 -r /opt/rootfs/opt -o /share/fs_opt.jffs2"

I do use a Micron MT9F1G16ABC, so it is organized that way

– Page size • x16: 1056 words (1024 + 32 words)
– Block size: 64 pages (128K + 4K bytes)

The partitions are build like this, always mith multiples of 64*2048 (which is 128k)

static struct mtd_partition omap3evm_nand_partitions[] = {

    {

        .name           = "X-Loader",

        .offset         = 0,

        .size           = 2*(64*2048),

        .mask_flags     = MTD_WRITEABLE /* force read-only */

                                        /*

                                         * Rom code checks for x-loader

                                         * in the first four blocks.

                                         * In case NAND block 0 is bad

                                         * this feature can be useful.

                                         */

    },

    {

        .name           = "U-Boot",

        .offset         = MTDPART_OFS_APPEND,

        .size           =  4*(64*2048),         /*256 + 256 KB*/

//        .mask_flags     = MTD_WRITEABLE /* force read-only */

    },

  ....

 

 

  • Try to remove -p option from mkfs.jffs2. Then add -p option to nandwrite. Not sure it will work...

  • This message is generated if a block of data is partially written. It is generally not a sign of any problem.

    Regards, Sudhakar

  • Thanks for answer:

    @: I will try this. Usually I use uboot to flash the system. Are there also option to compile in or to set?

    @Sudhakar: I know that is might not be a problem. But this messages while mounting are annoying.

    Anyhow I don't understand what is going on: An empty flash has 0xff in its cells. If I write or modify a file it is normal that the file is not as long as a  complete block. And than I would expect that the rest of the block keeps it 0xff. So isn't that the default behaviour?

  • I did some tests. 

    Did mkfs without -p. Than flashed with -p. Same "empty flash" message after adding  a file in system. If I flase without -p I get a message "Input file is not page aligned
    Data was only partially written due to error".

    Other way around I created with -p. The jffs2 fs becomes a bit bigger due to padding. I guess it is just necessary to do the padding once. Either in creating or flashing.

    I did in uboot a hexdump on the page which should contain the empty flash. The strange this - it is completly the same! Also the OOB are the same. The difference is the next block. It is empty before adding a file and filled after the fileoperation.

    So it seem it is not added gapless and that causes the message?

    Can I call a command which does some fileoperation to let disappear this message?

  • I think I've found your problem... The -e option you use in mkfs.jffs2.

    Please add "KiB" at the end or specify it in bytes. I think that -e 128 means 128 BYTES! In fact I use -e 0x20000. Please try it or "-e 128KiB" (case sensitive), but I am not sure about its syntax. Just go for 0x20000 to be sure.

    P.S: I'm not sure if you mkfs.jffs2 version matches mine. I've checked the source code of mine and this case is handled correctly. If you specify -e 128, it should mean 128 KB. But I am not sure that this is handled correctly in every version... So, just in case, use 0x20000.

     

  • Unfortunatly this is not the solution.

    The mkfs.jffs decides for a number smaller than xx to be used the parameter in kilobyte. To be sure I checked it with -e 128, -e 0x2000, -e 128KiB. All created filesystem files are identical (MD5Sum, length).

     

  • DId you ever find a solution?  I am experiencing the same problem.

  • No, I did not found a solution for that. I did have some hope, that TI's Linux team knows the ansers, but nothing happened.

  • I ended up using flash_eraseall mtd utility on my target system.