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 errors with Linux 3.3.0

Other Parts Discussed in Thread: OMAP-L138

Hi,

I am using Linux kernel 3.3.0 with OMAP-L138.

I am also building a jffs2 rootfs using arago OE. The flash on our board is SPI1 NOR flash with an eraseblock size of 64 KB. I have generated jffs2 image using that eraseblock size.

When I program the flash with the jffs2 image and try to mount that partition, I get the following errors. The version of mtd-utils in OE is 1.5.0 which seems to be latest tagged version in the GIT tree.

Can somebody have a look and let me know if there is a known fix to this? Please let me know if I can provide more information.

Thanks,
-raja.


Old JFFS2 bitmask found at 0x00865600
You cannot use older JFFS2 filesystems with newer kernels

Old JFFS2 bitmask found at 0x0086f600
You cannot use older JFFS2 filesystems with newer kernels
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00870004: 0x0019 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00870010: 0xe000 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00870014: 0xc380 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0087001c: 0x0029 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00870020: 0x0008 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00870024: 0x3324 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0087002c: 0x0100 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00870034: 0x15a0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00870038: 0x1714 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0087003c: 0x1a3c instead
Further such events for this erase block will not be printed

  • Hi Raja,

    Thanks for your post.

    If you cannot mount your JFFS2 filesystem and you see message like,

    "jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0087003c: 0x1a3c instead"

    The above refers to that, the data on your flash device is not a valid JFFS2 filesystem. In my understanding, there is no single solution to this problem, but we shall provide you some  suggestion to fix this.

    There could be lot of possibilities as below for the cause:

    1. Your flash driver would be severely buggy/corrupted,, so that it reads trash instead of valid data
    2. You would have flashed some trash instead of a valid JFFS2 image.
    3. You wouldn't have managed to flash JFFS2 image correctly so that, it ended up with garbage on your flash, but the original image would be perfectly fine.
    4. If you missed to erase your flash before flashing it.

    On top of above possibilities, you should also ensure for the additional requirements as follows:

    Your kernel needs to be enabled with JFFS2 support enabled.
    For details on how to enable kernel JFFS2 support, please refer the JFFS2 kernel configuration page below:

    http://processors.wiki.ti.com/index.php/JFFS2_kernel_configuration


    You should also check for the appropriate version of the MTD Utilities for the target board to be used in writing the file system image to Flash

    Could you please provide us the steps you have followed to write the JFFS2 image to NOR Flash which actually uses the MTD utilities to erase and copy the file system image into the Flash?

    One more suggestion like, you can determine the MTD device for the filesystem partition of your flash device by the following command:

    target$ cat /proc/mtd

    Could you please provide us the dump of the output for the above command

    After you determine the filesystem partition of your flash device, you can erase the filesystem partition as below:

    target$ flash_eraseall -j /dev/mtdx

    Then copy the JFFS2 filesystem image to NOR flash by,

    target$ flashcp <image dir>/rootfs.jffs2 /dev/mtdx

    and finally, mount the Flash file system partition using the device node as follows:

    target$ mount -t jffs2 /dev/mtdx /mnt/flash

    For MTD-utils compilation, please refer the below wiki for source and dependancises

    http://processors.wiki.ti.com/index.php/MTD_Utilities

    Thanks & regards,

    Sivaraj K

    ---------------------------------------------------------------------------------
    Please click the
    Verify Answer button on this post if it answers your question.
    ---------------------------------------------------------------------------------
     
  • Thank you for the reply Sivaraj.

    It turns out that the errors were in the padding area. So, things are good after choosing the proper padding

    Cheers,

    -raja.

  • Hi Raja,

    Glad to hear that, things are working.

    Thanks for your update.

    ---------------------------------------------------------------------------------
    Please click the
    Verify Answer button on this post if it answers your question.
    ---------------------------------------------------------------------------------
    Regards,
    Sivaraj K