mkfs.jffs2
Narinder Kumar
narinder at kritikalsolutions.com
Thu Feb 24 03:11:15 EST 2005
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
More information about the linux-mtd
mailing list