All of lore.kernel.org
 help / color / mirror / Atom feed
From: Narinder Kumar <narinder@kritikalsolutions.com>
To: Andrew Victor <andrew@sanpeople.com>, linux-mtd@lists.infradead.org
Subject: Re: mkfs.jffs2
Date: Thu, 24 Feb 2005 13:41:15 +0530	[thread overview]
Message-ID: <421D8C23.2000200@kritikalsolutions.com> (raw)
In-Reply-To: <1108999278.16852.46.camel@fuzzie.sanpeople.com>

Andrew Victor wrote:

>hi,
>
>  
>
>>       First of all thanx for the reply . I am using AT45DB642 NAND 
>>Flash and it seems to have erase block of 0x420 i,e 1056 bytes. and when 
>>i have created my MTD partitions i have specified the partition sizes to 
>>be multiple of these eraseblock sizes in 
>>drivers/at91/mtd/at91_dataflash.c , My 3 partitions are 4*1024*1056  (4 
>>GB) , 3*1024*1056 (3 GB) and 1*1024*1056 (1 GB)
>>    
>>
>
>Atmel AT45DB642 is DataFlash (not NAND).
>mkfs.jffs2 is currently broken for DataFlash.
>
>This is how I once fixed it.  I don't know if the current mkfs.jffs2
>code is different.....
>
>In mkfs.jffs2.c in function main().  Comment out the code:
>
>//     /* If it's less than 4096, assume they meant KiB */
>//     if (erase_block_size && erase_block_size < 0x1000)
>//         erase_block_size *= 1024;
>//     /* If it's less than 8KiB, they're not allowed */
>//     if (erase_block_size < 0x2000) {
>//         fprintf(stderr, "Increasing erase size to 8KiB minimum\n");
>//         erase_block_size = 0x2000;
>//     }
>
>Then run mkfs.jffs2 with the parameters "-e 2112 -n -l"
>
>The 2112 is because JFFS2 merges multiple 528-byte or 1056-byte physical
>blocks into larger virtual blocks.
>The 2112 is for a 4Mb dataflash device, and that value will probably
>differ for differently sized dataflash devices.
>
>You should see the message:
>  JFFS2 write-buffering enabled (2112)
>when you mount the JFFS2 partition.  The size of brackets is the virtual
>blocks size.  You should also be using the code from the MTD/JFFS2 CVS.
>
>
>Regards,
>  Andrew Victor
>  SAN People (Pty) Ltd.
>
>
>
>
>
>  
>
I tried out the solution that you mentioned but it doesn't seems to work 
for me. I am using ATMEL AT45DB642 which is an 8MB Dataflash. Can anyone 
tell me what the erase size of this DataFlash. Currently i am trying out 
with 1056 ( i,e 0x420 in hex) . If anyone has success in making a jffs2 
partition on this dataflash and thereby reading/writing on it, please 
help me out. I tried out with different erasesizes but it doesn't seems 
to work.

                Can anyone tell me what are the parameters to be 
specified in drivers/at91/mtd/at91_dataflash.c where one can specify 
what static partitions are to be created in the data flash. I am 
currenlt giving
static struct mtd_partition static_partitions[] =
{
        {
                name:           "bootloader",
                offset:         0,
                size:           1 * 1024 * 1056,        // 1 MB
                mask_flags:     MTD_WRITEABLE           // read-only
        },
        {
                name:           "kernel",
                offset:         MTDPART_OFS_NXTBLK,
                size:           1 * 1024 * 1056,        // 1 MB
        },
        {
                name:           "ramdisk",
                offset:         MTDPART_OFS_NXTBLK,
                size:           3 * 1024 * 1056,        // 3 MB
        },
        {
                name:           "Application",
                offset:         MTDPART_OFS_NXTBLK,
                size:           MTDPART_SIZ_FULL,
        }
};

         Am i write on these parameters ?

Regards,
 Narinder
 KSPL, Delhi

  reply	other threads:[~2005-02-24  8:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-21 13:28 mkfs.jffs2 Narinder Kumar
2005-02-21 13:58 ` mkfs.jffs2 Artem B. Bityuckiy
2005-02-21 14:18   ` mkfs.jffs2 Narinder Kumar
2005-02-21 15:21     ` mkfs.jffs2 Andrew Victor
2005-02-24  8:11       ` Narinder Kumar [this message]
2005-02-24 13:20         ` mkfs.jffs2 Artem B. Bityuckiy
2005-02-24 13:41           ` mkfs.jffs2 Narinder Kumar
2005-02-21 14:05 ` mkfs.jffs2 Artem B. Bityuckiy
2005-02-21 14:25   ` mkfs.jffs2 Narinder Kumar
2005-02-21 14:35     ` mkfs.jffs2 Artem B. Bityuckiy
2005-02-22  5:03       ` mkfs.jffs2 Narinder Kumar
  -- strict thread matches above, loose matches on Subject: below --
2005-06-07  9:32 mk.jffs2 Munira Ahmed
2005-06-07 11:10 ` mkfs.jffs2 Jarkko Lavinen
2004-08-13 12:02 mkfs.jffs2 Stefan Stürke
2004-08-13 12:31 ` mkfs.jffs2 David Woodhouse
2004-08-13 14:45   ` mkfs.jffs2 Stefan Stürke
2004-08-13 14:54     ` mkfs.jffs2 David Woodhouse
2002-09-05 12:35 mkfs.jffs2 Kenneth Johansson
2001-08-22 21:00 mkfs.jffs2 Ashok M Padmanaban
2001-08-22 15:44 ` mkfs.jffs2 Russ Dill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=421D8C23.2000200@kritikalsolutions.com \
    --to=narinder@kritikalsolutions.com \
    --cc=andrew@sanpeople.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.