* Re: mkfs.jffs2
2001-08-22 21:00 mkfs.jffs2 Ashok M Padmanaban
@ 2001-08-22 15:44 ` Russ Dill
0 siblings, 0 replies; 19+ messages in thread
From: Russ Dill @ 2001-08-22 15:44 UTC (permalink / raw)
To: Ashok M Padmanaban; +Cc: MTD for Linux, JFFS mailing list
On 22 Aug 2001 21:00:43 +0000, Ashok M Padmanaban wrote:
> Hi,
> The mkfs.jffs2 has some options, in which -e option specifies the
> erase block size, which by default is 64KiB.
> While making a jffs2 image of a directory (which has some files) of size
> 3848192 Bytes.
>
> ./mkfs.jffs2 -d directory -o jffs2_img -e 128KiB
>
> With default option for erase block size ( 64KiB), the jffs2 image size
> was : 1983612 Bytes. ( 1.89 MB)
> With -e 128KiB
> , the jffs2 image size was : 7687900 Bytes (7.33 MB)
> With -e 256KiB
> , the jffs2 image size was : 4289164 Bytes (4.09 MB)
>
> Why is that the jffs2 image size is varying with the erase block size.?
> If i have an erase size of 256KiB(on flash), is it necessary that i
> should build a jffs2 image with the -e 256KiB option.
try -e 0x20000 or -e 0x10000
^ permalink raw reply [flat|nested] 19+ messages in thread
* mkfs.jffs2
@ 2001-08-22 21:00 Ashok M Padmanaban
2001-08-22 15:44 ` mkfs.jffs2 Russ Dill
0 siblings, 1 reply; 19+ messages in thread
From: Ashok M Padmanaban @ 2001-08-22 21:00 UTC (permalink / raw)
To: MTD for Linux, JFFS mailing list
[-- Attachment #1: Type: text/plain, Size: 738 bytes --]
Hi,
The mkfs.jffs2 has some options, in which -e option specifies the
erase block size, which by default is 64KiB.
While making a jffs2 image of a directory (which has some files) of size
3848192 Bytes.
./mkfs.jffs2 -d directory -o jffs2_img -e 128KiB
With default option for erase block size ( 64KiB), the jffs2 image size
was : 1983612 Bytes. ( 1.89 MB)
With -e 128KiB
, the jffs2 image size was : 7687900 Bytes (7.33 MB)
With -e 256KiB
, the jffs2 image size was : 4289164 Bytes (4.09 MB)
Why is that the jffs2 image size is varying with the erase block size.?
If i have an erase size of 256KiB(on flash), is it necessary that i
should build a jffs2 image with the -e 256KiB option.
regards
ashok
[-- Attachment #2: Card for Ashok M Padmanaban --]
[-- Type: text/x-vcard, Size: 356 bytes --]
begin:vcard
n:.m.padmanabhan;ashok
tel;work:5281461/5281229 ext 3096
x-mozilla-html:FALSE
org:sasken communication technologies ltd;internt access solutions
version:2.1
email;internet:ashokmp@sasken.com
title:software engineer
adr;quoted-printable:;;3008,12 th B cross,=0D=0Aindranagar ;banglore;;;india
x-mozilla-cpt:;0
fn:ashok .m.padmanabhan
end:vcard
^ permalink raw reply [flat|nested] 19+ messages in thread
* mkfs.jffs2
@ 2002-09-05 12:35 Kenneth Johansson
0 siblings, 0 replies; 19+ messages in thread
From: Kenneth Johansson @ 2002-09-05 12:35 UTC (permalink / raw)
To: Mtd
How well is mkfs.jffs2 working when creating images ??
I did a quick test creating a big endian image from x86 and it worked so
far as reading the disk was ok but file permissions was wrong. A quick
look in the code indicate that this was at least intended to work.
--
Kenneth Johansson
Ericsson AB Tel: +46 8 404 71 83
Borgafjordsgatan 9 Fax: +46 8 404 72 72
164 80 Stockholm kenneth.johansson@etx.ericsson.se
^ permalink raw reply [flat|nested] 19+ messages in thread
* mkfs.jffs2
@ 2004-08-13 12:02 Stefan Stürke
2004-08-13 12:31 ` mkfs.jffs2 David Woodhouse
0 siblings, 1 reply; 19+ messages in thread
From: Stefan Stürke @ 2004-08-13 12:02 UTC (permalink / raw)
To: linux-mtd
Hi,
I want to create a jffs2 image which should be loaded to
different mtd-flash devices via software download.
My problem is, that I cannot be sure which erasesize the
target flash will have. Because two flash types with different
sector sizes (64k and 128k) have to be supported.
Is it possible to create a jffs2 image that can run on both flashes,
or do I have to create two diffenent images?
My current command for creating the filesystem is:
mkfs.jffs2 -b -e $erasesize -p -r $source -o fs.jffs2
Thanks in advance
Stefan
--
Stefan Stürke
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: mkfs.jffs2
2004-08-13 12:02 mkfs.jffs2 Stefan Stürke
@ 2004-08-13 12:31 ` David Woodhouse
2004-08-13 14:45 ` mkfs.jffs2 Stefan Stürke
0 siblings, 1 reply; 19+ messages in thread
From: David Woodhouse @ 2004-08-13 12:31 UTC (permalink / raw)
To: Stefan Stürke; +Cc: linux-mtd
On Fri, 2004-08-13 at 12:02 +0000, Stefan Stürke wrote:
> My problem is, that I cannot be sure which erasesize the
> target flash will have. Because two flash types with different
> sector sizes (64k and 128k) have to be supported.
>
> Is it possible to create a jffs2 image that can run on both flashes,
> or do I have to create two diffenent images?
You can use the smaller erasesize, as long as you don't include
cleanmarkers.
> My current command for creating the filesystem is:
>
> mkfs.jffs2 -b -e $erasesize -p -r $source -o fs.jffs2
Use:
-b -e 64KiB -p -n -r $source -o fs.jffs2
--
dwmw2
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: mkfs.jffs2
2004-08-13 12:31 ` mkfs.jffs2 David Woodhouse
@ 2004-08-13 14:45 ` Stefan Stürke
2004-08-13 14:54 ` mkfs.jffs2 David Woodhouse
0 siblings, 1 reply; 19+ messages in thread
From: Stefan Stürke @ 2004-08-13 14:45 UTC (permalink / raw)
To: linux-mtd
David Woodhouse <dwmw2 <at> infradead.org> writes:
>
> On Fri, 2004-08-13 at 12:02 +0000, Stefan Stürke wrote:
> > My problem is, that I cannot be sure which erasesize the
> > target flash will have. Because two flash types with different
> > sector sizes (64k and 128k) have to be supported.
> >
> > Is it possible to create a jffs2 image that can run on both flashes,
> > or do I have to create two diffenent images?
>
> You can use the smaller erasesize, as long as you don't include
> cleanmarkers.
>
> > My current command for creating the filesystem is:
> >
> > mkfs.jffs2 -b -e $erasesize -p -r $source -o fs.jffs2
>
> Use:
> -b -e 64KiB -p -n -r $source -o fs.jffs2
>
Ok, thank you, that looks much better.
When I load this filesystem to the flashdevice with the 128k sectors
I get now only one type of error messages:
jffs2_scan_empty(): Empty block at 0x0000fffc ends at 0x00010000 (with
0x1985e002)! Marking dirty
Is it save to ignore these errors?
Thanks again
Stefan
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: mkfs.jffs2
2004-08-13 14:45 ` mkfs.jffs2 Stefan Stürke
@ 2004-08-13 14:54 ` David Woodhouse
0 siblings, 0 replies; 19+ messages in thread
From: David Woodhouse @ 2004-08-13 14:54 UTC (permalink / raw)
To: Stefan Stürke; +Cc: linux-mtd
On Fri, 2004-08-13 at 14:45 +0000, Stefan Stürke wrote:
> jffs2_scan_empty(): Empty block at 0x0000fffc ends at 0x00010000 (with
> 0x1985e002)! Marking dirty
>
> Is it save to ignore these errors?
Yes. It's observing that there's padding between 0xfffc and 0x10000.
This is done because nodes aren't allowed to cross and eraseblock
boundary, and the image was created for 64KiB eraseblocks. It's harmless
though.
--
dwmw2
^ permalink raw reply [flat|nested] 19+ messages in thread
* mkfs.jffs2
@ 2005-02-21 13:28 Narinder Kumar
2005-02-21 13:58 ` mkfs.jffs2 Artem B. Bityuckiy
2005-02-21 14:05 ` mkfs.jffs2 Artem B. Bityuckiy
0 siblings, 2 replies; 19+ messages in thread
From: Narinder Kumar @ 2005-02-21 13:28 UTC (permalink / raw)
To: linux-mtd
Hi all,
This is my first mail to the group and is hoping for some
fruitful results from your mails. I am having problems in mounting my
MTD device using mkfs.jffs2 . Though i have read mails on the group
regarding mkfs.jffs2 but still i am not able to decipher my problem, so
hoping a helpful hand from your side. Here are the steps that i am
following:
eraseall -j /dev/mtd/1 ( -j as i need jffs2 file system
/dev/mtd/1 is 1 MB partition)
mkfs.jffs2 -e 0x420 -d /tmp/Application -o image ( created image of my
application which is to be put into MTD)
cp image /dev/mtd/1 ( copied the image into MTD)
mount -t jffs2 /dev/mtdblock/1 /mnt is giving errors
Node at 0x00000048 with length 0x000006d2 would run over the end of the
erase block
Perhaps the file system was created with the wrong erase size?
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000004c:
0x06d2 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000050:
0x39d7 instead
[...]
Further such events for this erase block will not be printed
Node at 0x0000071c with length 0x000003d7 would run over the end of the
erase block
Perhaps the file system was created with the wrong erase size?
JFFS2: Erase block at 0x00000420 is not formatted. It will be erased
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000840:
0xf42b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000844:
0x68c7 instead
[....]
Further such events for this erase block will not be printed
Node at 0x00000af4 with length 0x000005a6 would run over the end of the
erase block
Perhaps the file system was created with the wrong erase size?
JFFS2: Erase block at 0x00000840 is not formatted. It will be erased
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000c60:
0x6df1 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000c64:
0x1283 instead
[...]
Further such events for this erase block will not be printed
JFFS2: Erase block at 0x00000c60 is not formatted. It will be erased
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001080:
0x8c70 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001084:
0x8f13 instead
[...]
From the output atleast i am sure that i am providing the right
eraseblock to mkfs.jffs2 as Erase block is checking at an interval of
0x420 everytime. When all these messages stops , i entered into /mnt to
check if there is something in the mounted device and it does shows
everthing that i copied into it, so why is this error coming ?
"Node at 0x00000048 with length 0x000006d2 would run over the end of the
erase block" can this helps me out somehow where something is going
wrong ???
Narinder
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: mkfs.jffs2
2005-02-21 13:28 mkfs.jffs2 Narinder Kumar
@ 2005-02-21 13:58 ` Artem B. Bityuckiy
2005-02-21 14:18 ` mkfs.jffs2 Narinder Kumar
2005-02-21 14:05 ` mkfs.jffs2 Artem B. Bityuckiy
1 sibling, 1 reply; 19+ messages in thread
From: Artem B. Bityuckiy @ 2005-02-21 13:58 UTC (permalink / raw)
To: Narinder Kumar; +Cc: linux-mtd
On Mon, 2005-02-21 at 18:58 +0530, Narinder Kumar wrote:
> mkfs.jffs2 -e 0x420 -d /tmp/Application
0x420 is strange size. I believe it is wrong, try to look at your Flash
specification closer.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: mkfs.jffs2
2005-02-21 13:28 mkfs.jffs2 Narinder Kumar
2005-02-21 13:58 ` mkfs.jffs2 Artem B. Bityuckiy
@ 2005-02-21 14:05 ` Artem B. Bityuckiy
2005-02-21 14:25 ` mkfs.jffs2 Narinder Kumar
1 sibling, 1 reply; 19+ messages in thread
From: Artem B. Bityuckiy @ 2005-02-21 14:05 UTC (permalink / raw)
To: Narinder Kumar; +Cc: linux-mtd
On Mon, 2005-02-21 at 18:58 +0530, Narinder Kumar wrote:
> mkfs.jffs2 -e 0x420 -d /tmp/Application -o image
Please, post the `cat /proc/mtd/` output.
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: mkfs.jffs2
2005-02-21 13:58 ` mkfs.jffs2 Artem B. Bityuckiy
@ 2005-02-21 14:18 ` Narinder Kumar
2005-02-21 15:21 ` mkfs.jffs2 Andrew Victor
0 siblings, 1 reply; 19+ messages in thread
From: Narinder Kumar @ 2005-02-21 14:18 UTC (permalink / raw)
To: dedekind, linux-mtd
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)
Artem B. Bityuckiy wrote:
>On Mon, 2005-02-21 at 18:58 +0530, Narinder Kumar wrote:
>
>
>>mkfs.jffs2 -e 0x420 -d /tmp/Application
>>
>>
>
>0x420 is strange size. I believe it is wrong, try to look at your Flash
>specification closer.
>
>
>
>.
>
>
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: mkfs.jffs2
2005-02-21 14:05 ` mkfs.jffs2 Artem B. Bityuckiy
@ 2005-02-21 14:25 ` Narinder Kumar
2005-02-21 14:35 ` mkfs.jffs2 Artem B. Bityuckiy
0 siblings, 1 reply; 19+ messages in thread
From: Narinder Kumar @ 2005-02-21 14:25 UTC (permalink / raw)
To: dedekind, linux-mtd
Hi all,
When the kernel boots it shows the message:
Creating 3 MTD partitions on "Atmel AT45DB642":
0x00000000-0x00108000 : "/dev/mtd/0"
0x00108000-0x00420000 : "/dev/mtd/1"
0x00420000-0x00840000 : "/dev/mtd/2"
and cat /proc/mtd prints out
dev: size erasesize name
mtd0: 00108000 00000420 "/dev/mtd/0"
mtd1: 00318000 00000420 "/dev/mtd/1"
mtd2: 00420000 00000420 "/dev/mtd/2"
Artem B. Bityuckiy wrote:
>On Mon, 2005-02-21 at 18:58 +0530, Narinder Kumar wrote:
>
>
>>mkfs.jffs2 -e 0x420 -d /tmp/Application -o image
>>
>>
>
>Please, post the `cat /proc/mtd/` output.
>
>
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: mkfs.jffs2
2005-02-21 14:25 ` mkfs.jffs2 Narinder Kumar
@ 2005-02-21 14:35 ` Artem B. Bityuckiy
2005-02-22 5:03 ` mkfs.jffs2 Narinder Kumar
0 siblings, 1 reply; 19+ messages in thread
From: Artem B. Bityuckiy @ 2005-02-21 14:35 UTC (permalink / raw)
To: Narinder Kumar; +Cc: linux-mtd
Could you please look at JFFS2 output during mount - it should inform
what Virtual block size it gonna use. This should appear before error
messages.
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: mkfs.jffs2
2005-02-21 14:18 ` mkfs.jffs2 Narinder Kumar
@ 2005-02-21 15:21 ` Andrew Victor
2005-02-24 8:11 ` mkfs.jffs2 Narinder Kumar
0 siblings, 1 reply; 19+ messages in thread
From: Andrew Victor @ 2005-02-21 15:21 UTC (permalink / raw)
To: Narinder Kumar; +Cc: linux-mtd
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.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: mkfs.jffs2
2005-02-21 14:35 ` mkfs.jffs2 Artem B. Bityuckiy
@ 2005-02-22 5:03 ` Narinder Kumar
0 siblings, 0 replies; 19+ messages in thread
From: Narinder Kumar @ 2005-02-22 5:03 UTC (permalink / raw)
To: dedekind, linux-mtd
Artem B. Bityuckiy wrote:
>Could you please look at JFFS2 output during mount - it should inform
>what Virtual block size it gonna use. This should appear before error
>messages.
>
>
>
This is what is being shown when i mount the mtd block, can this help
out in someway ?
$mount -t jffs2 /dev/mtdblock/1 /tmp/mmm/
Node at 0x00000048 with length 0x000006d2 would run over the end of the
erase block
Perhaps the file system was created with the wrong erase size?
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000004c:
0x06d2 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000050:
0x39d7 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000054:
0x0002 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000058:
0x0002 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000005c:
0x81a4 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000060:
0x022f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000064:
0x13fb instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000068:
0xa791 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000006c:
0xa791 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000070:
0xa791 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000420:
0xad8f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000424:
0xcfd9 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000428:
0x4e0b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000042c:
0x2792 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000430:
0xfa51 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000434:
0xf7bd instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000438:
0xe348 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000043c:
0xb366 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000440:
0xe86b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000444:
0x10f2 instead
Further such events for this erase block will not be
printed
Node at 0x0000071c with length 0x000003d7 would run over the end of the
erase block
Perhaps the file system was created with the wrong erase
size?
JFFS2: Erase block at 0x00000420 is not formatted. It will be
erased
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000840:
0xf42b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000844:
0x68c7 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000848:
0x0184 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000084c:
0xfb02 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000850:
0x6d29 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000854:
0x5cbd instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000858:
0x23a3 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000085c:
0xe231 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000860:
0xb762 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000864:
0x3c62 instead
Further such events for this erase block will not be
printed
Node at 0x00000af4 with length 0x000005a6 would run over the end of the
erase block
Perhaps the file system was created with the wrong erase
size?
JFFS2: Erase block at 0x00000840 is not formatted. It will be
erased
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000c60:
0x6df1 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000c64:
0x1283 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000c68:
0x1cd8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000c6c:
0x86dd instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000c70:
0x8594 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000c74;
0xb3c8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000c78:
0x8922 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000c7c:
0x8d8c instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000c80:
0x01f8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000c84:
0x9726 instead
Further such events for this erase block will not be
printed
JFFS2: Erase block at 0x00000c60 is not formatted. It will be
erased
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001080:
0x8c70 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001084:
0x8f13 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001088:
0x01fc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000108c:
0xbf8e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001090:
0x7b72 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001094:
0x00c0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001098:
0x4ae2 instead
Node at 0x0000109c with length 0x0000055c would run over the end of the
erase block
Perhaps the file system was created with the wrong erase
size?
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000010a0:
0x055c instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000010a4:
0x4686 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000010a8:
0x0002 instead
Further such events for this erase block will not be
printed
JFFS2: Erase block at 0x00001080 is not formatted. It will be
erased
[............................................................]
Best Regards,
Narinder Kumar,
New Delhi, India.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: mkfs.jffs2
2005-02-21 15:21 ` mkfs.jffs2 Andrew Victor
@ 2005-02-24 8:11 ` Narinder Kumar
2005-02-24 13:20 ` mkfs.jffs2 Artem B. Bityuckiy
0 siblings, 1 reply; 19+ messages in thread
From: Narinder Kumar @ 2005-02-24 8:11 UTC (permalink / raw)
To: Andrew Victor, linux-mtd
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
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: mkfs.jffs2
2005-02-24 8:11 ` mkfs.jffs2 Narinder Kumar
@ 2005-02-24 13:20 ` Artem B. Bityuckiy
2005-02-24 13:41 ` mkfs.jffs2 Narinder Kumar
0 siblings, 1 reply; 19+ messages in thread
From: Artem B. Bityuckiy @ 2005-02-24 13:20 UTC (permalink / raw)
To: Narinder Kumar; +Cc: MTD List
Please, erase your flash then mount *empty* flash. Then type 'dmesg'. You
should find the information about the block size implied by JFFS2 there.
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: mkfs.jffs2
2005-02-24 13:20 ` mkfs.jffs2 Artem B. Bityuckiy
@ 2005-02-24 13:41 ` Narinder Kumar
0 siblings, 0 replies; 19+ messages in thread
From: Narinder Kumar @ 2005-02-24 13:41 UTC (permalink / raw)
To: Artem B. Bityuckiy, linux-mtd
Hi all,
I have finally mounted my dataflash's jffs2 partition. The
problem was that the driver of dataflash was taking page size in erase
size function (which was 1056 bytes) and mkfs.jffs2 takes the block
size. So i changed the erasesize in the driver to be block size which is
8 * page_size i,e ( 8 *1056) and then i mounted my device and it mounted
without any errors.
Thanx to all
Narinder
Artem B. Bityuckiy wrote:
>Please, erase your flash then mount *empty* flash. Then type 'dmesg'. You
>should find the information about the block size implied by JFFS2 there.
>
>--
>Best Regards,
>Artem B. Bityuckiy,
>St.-Petersburg, Russia.
>
>
>.
>
>
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: mkfs.jffs2
2005-06-07 9:32 mk.jffs2 Munira Ahmed
@ 2005-06-07 11:10 ` Jarkko Lavinen
0 siblings, 0 replies; 19+ messages in thread
From: Jarkko Lavinen @ 2005-06-07 11:10 UTC (permalink / raw)
To: Munira Ahmed; +Cc: linux-mtd@lists.infradead.org
On Tue, Jun 07, 2005 at 05:32:53PM +0800, ext Munira Ahmed wrote:
> Is there any manual page or tutorial on mk.jffs2 on the net. it
seems
Run mkfs.jffs2 without an argument to print its usage? (Sample below)
For example, I use following command for Nokia 770 test board with
Samsung 1Gbit chip with 128KiB erase block size. I create the image
without cleanmarkers because that is the way how N770's bootloader
engulfs the JFFS2 image to be flashed.
$ mkfs.jffs2 -r srcdir -o imagefile -e 128 -l -n
Jarkko Lavinen
$ ./mkfs.jffs2
mkfs.jffs2: Usage: mkfs.jffs2 [OPTIONS]
Make a JFFS2 file system image from an existing directory tree
Options:
-p, --pad[=SIZE] Pad output to SIZE bytes with 0xFF. If SIZE is
not specified, the output is padded to the end of
the final erase block
-r, -d, --root=DIR Build file system from directory DIR (default: cwd)
-s, --pagesize=SIZE Use page size (max data node size) SIZE (default: 4KiB)
-e, --eraseblock=SIZE Use erase block size SIZE (default: 64KiB)
-c, --cleanmarker=SIZE Size of cleanmarker (default 12)
-m, --compr-mode=MODE Select compression mode (default: priortiry)
-x, --disable-compressor=COMPRESSOR_NAME
Disable a compressor
-X, --enable-compressor=COMPRESSOR_NAME
Enable a compressor
-y, --compressor-priority=PRIORITY:COMPRESSOR_NAME
Set the priority of a compressor
-L, --list-compressors Show the list of the avaiable compressors
-t, --test-compression Call decompress and compare with the original (for test)
-n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock
-o, --output=FILE Output to FILE (default: stdout)
-l, --little-endian Create a little-endian filesystem
-b, --big-endian Create a big-endian filesystem
-D, --devtable=FILE Use the named FILE as a device table file
-f, --faketime Change all file times to '0' for regression testing
-q, --squash Squash permissions and owners making all files be owned by root
-U, --squash-uids Squash owners making all files be owned by root
-P, --squash-perms Squash permissions on all files
-h, --help Display this help text
-v, --verbose Verbose operation
-V, --version Display version information
-i, --incremental=FILE Parse FILE and generate appendage output for it
> that everything is inherently known to the community without proper
> documentation or manuals. I can't find any decent document that could
> give me a start.
>
>
> Where do I learn about jffs2 and mk.jffs2
>
>
>
> --
> Munira Ahmed
>
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2005-06-07 11:27 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-05 12:35 mkfs.jffs2 Kenneth Johansson
-- 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
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 ` mkfs.jffs2 Narinder Kumar
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
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
2001-08-22 21:00 mkfs.jffs2 Ashok M Padmanaban
2001-08-22 15:44 ` mkfs.jffs2 Russ Dill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox