* Can 256K erase blocks work with JFFS2?
@ 2004-02-15 9:53 Marc Singer
2004-02-15 11:08 ` David Woodhouse
0 siblings, 1 reply; 5+ messages in thread
From: Marc Singer @ 2004-02-15 9:53 UTC (permalink / raw)
To: linux-mtd
In struggling through final steps in proving a new kernel port, I'm
trying to mount a root filesystem so I can see a shell prompt. I've
got a mapping driver with partitions that appears to work correctly.
Yet, I'm concerned that the very large erase block size could be
causing problems.
When creating the jffs2 filesystem, if I set the erase block size to
256 then the filesystem created is twice the size of my total flash
capacity--can't use it. The default of 64 produces a modest
filesystem of 5MB.
I'm pretty sure of the erase size. There are two StrataFlash
28F640J3A chips wired for a 32 bit data bus. Each has 8MBytes
organized in 64 blocks. Moreover, empirical evidence shows that the
erase size of 256K.
The kernel will mount the filesystem as rootm but I don't get a shell.
I'm reasonably confident that the root is good because it has worked
when mounted over NFS. This new system uses the same CPU, but doesn't
yet have a working network driver.
So, I'm asking if I have a snowball's chance in hades with this. Or,
should I start working on other means of mounting a root filesystem?
TIA
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can 256K erase blocks work with JFFS2?
2004-02-15 9:53 Can 256K erase blocks work with JFFS2? Marc Singer
@ 2004-02-15 11:08 ` David Woodhouse
2004-02-15 16:54 ` Marc Singer
0 siblings, 1 reply; 5+ messages in thread
From: David Woodhouse @ 2004-02-15 11:08 UTC (permalink / raw)
To: Marc Singer; +Cc: linux-mtd
On Sun, 2004-02-15 at 01:53 -0800, Marc Singer wrote:
> When creating the jffs2 filesystem, if I set the erase block size to
> 256 then the filesystem created is twice the size of my total flash
> capacity--can't use it. The default of 64 produces a modest
> filesystem of 5MB.
256 would be a problem. 256KiB would be fine. Precisely what did you
tell mkfs.jffs2, and what version of mkfs.jffs2 is it? Only recent
versions will _assume_ you're lying if you tell it 256 bytes, and
silently assume 256KiB instead.
--
dwmw2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can 256K erase blocks work with JFFS2?
2004-02-15 11:08 ` David Woodhouse
@ 2004-02-15 16:54 ` Marc Singer
2004-02-15 17:05 ` David Woodhouse
2004-02-15 17:24 ` David Woodhouse
0 siblings, 2 replies; 5+ messages in thread
From: Marc Singer @ 2004-02-15 16:54 UTC (permalink / raw)
To: David Woodhouse; +Cc: linux-mtd
On Sun, Feb 15, 2004 at 11:08:16AM +0000, David Woodhouse wrote:
> On Sun, 2004-02-15 at 01:53 -0800, Marc Singer wrote:
> > When creating the jffs2 filesystem, if I set the erase block size to
> > 256 then the filesystem created is twice the size of my total flash
> > capacity--can't use it. The default of 64 produces a modest
> > filesystem of 5MB.
>
> 256 would be a problem. 256KiB would be fine. Precisely what did you
> tell mkfs.jffs2, and what version of mkfs.jffs2 is it? Only recent
> versions will _assume_ you're lying if you tell it 256 bytes, and
> silently assume 256KiB instead.
I see. The help isn't clear about what SIZE means.
elf@florence ~...coastal/arm > mkfs.jffs2 -v
mkfs.jffs2 revision 1.19
This version appears to have the code that understands that 256 means
KiB.
And, it still produces an image that is substantially larger that the
source data as well as being larger than the total available flash.
elf@florence ~...coastal/arm > mkfs.jffs2 -e 256kb -r root -o toucan.jffs
elf@florence ~...coastal/arm > ls -l toucan.jffs
-rw-rw-r-- 1 elf elf 18640820 Feb 15 08:52 toucan.jffs
elf@florence ~...coastal/arm > du -s root
5432 root
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can 256K erase blocks work with JFFS2?
2004-02-15 16:54 ` Marc Singer
@ 2004-02-15 17:05 ` David Woodhouse
2004-02-15 17:24 ` David Woodhouse
1 sibling, 0 replies; 5+ messages in thread
From: David Woodhouse @ 2004-02-15 17:05 UTC (permalink / raw)
To: Marc Singer; +Cc: linux-mtd
On Sun, 2004-02-15 at 08:54 -0800, Marc Singer wrote:
> mkfs.jffs2 revision 1.19
>
> This version appears to have the code that understands that 256 means
> KiB.
I don't think so. That wasn't added till v1.23, in March 2002.
> And, it still produces an image that is substantially larger that the
> source data as well as being larger than the total available flash.
>
> elf@florence ~...coastal/arm > mkfs.jffs2 -e 256kb -r root -o toucan.jffs
The -e option takes only numbers; the defaults in the help text do seem
to imply otherwise -- I should probably fix that. But even if I _did_
fix it to understand KiB/MiB, you're actually telling it above that you
want an erasesize of 256000 bits :)
Try '-e 262144' or '-e 0x40000'
--
dwmw2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can 256K erase blocks work with JFFS2?
2004-02-15 16:54 ` Marc Singer
2004-02-15 17:05 ` David Woodhouse
@ 2004-02-15 17:24 ` David Woodhouse
1 sibling, 0 replies; 5+ messages in thread
From: David Woodhouse @ 2004-02-15 17:24 UTC (permalink / raw)
To: Marc Singer; +Cc: linux-mtd
On Sun, 2004-02-15 at 08:54 -0800, Marc Singer wrote:
> elf@florence ~...coastal/arm > mkfs.jffs2 -e 256kb -r root -o toucan.jffs
I've just committed a change to v1.40 to accept KiB and MiB. I did
briefly make it accept 'kb' too but it was going to give you an erase
size of 256 * 1000 / 8 == 32000 bytes, which probably isn't useful... so
then I was going to have to add a warning for such erase sizes... so I
took it out again :)
dwmw2
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-02-15 17:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-15 9:53 Can 256K erase blocks work with JFFS2? Marc Singer
2004-02-15 11:08 ` David Woodhouse
2004-02-15 16:54 ` Marc Singer
2004-02-15 17:05 ` David Woodhouse
2004-02-15 17:24 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox