setting PAD parameter with JFFS2 and NAND -- what is correct thing to do ?

Grant Erickson gerickson at nuovations.com
Wed Dec 3 11:44:05 EST 2008


On 12/2/08 9:23 AM, Philip Rakity wrote:
> I am trying to understand what value to set the pad parameter to when making a
> JFFS2 image (including using sumtool) for NAND flash.
> 
> The NAND flash has 2KiB sectors, 256KiB erase size, and is 2GB.
> 
> I use flase_eraseall -j when erasing the flash and the flash HAS bad blocks.
> 
> The image size is less than the 2GB size of the flash.
> 
> I have tried both specifying pad (rounded up) to the erase block size and
> omitting pad.  When I write to the NAND there are recovered CRC errors from
> time to time as well as the other "errors" indicated in the FAQ.
> 
> If could set pad to the SIZE of the NAND flash, but because of bad blocks I am
> not sure this is correct...
> 
> Guidance Please.
> 
> Philip

Philip:

You should set the padding to the page size. For the two systems I have, the
mkfs.jffs2 commands used to build the root file systems are as follows:

    mkfs.jffs2 --big-endian \
    --no-cleanmarkers \
    --pad 512 \
    --pagesize 512 \
    --eraseblock 16384 \
    -d /tmp/fs/stripped/root \
    -D root.devtable \
    -o root.jffs2

and:

    mkfs.jffs2 --big-endian \
    --no-cleanmarkers \
    --pad 2048 \
    --pagesize 2048 \
    --eraseblock 131072 \
    -d /tmp/fs/stripped/root \
    -D root.devtable \
    -o root.jffs2

Regards,

Grant





More information about the linux-mtd mailing list