public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Eraseblock size in jffs2 ?
@ 2001-10-10 16:31 martin.kula
  2001-10-10 16:31 ` David Woodhouse
  0 siblings, 1 reply; 7+ messages in thread
From: martin.kula @ 2001-10-10 16:31 UTC (permalink / raw)
  To: linux-mtd

Hi

I have any questions.

1. How can I set eraseblock size for mkfs.jffs2 ?

I have DoC 24MB and line in /proc/mtd is:
dev:    size   erasesize  name
mtd0: 01800000 00002000 "DiskOnChip 2000"

2. Must I use erase command when I create jffs2 on the DoC ?
   Or better: Can I use next command line only for create jffs2 on
   the DoC ?
   # mkfs.jffs2 -e XXXXXX -d directory >/dev/nftla1

Thanks

Martin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Eraseblock size in jffs2 ?
  2001-10-10 16:31 Eraseblock size in jffs2 ? martin.kula
@ 2001-10-10 16:31 ` David Woodhouse
  2001-10-10 16:44   ` Tom McMillan
  2001-10-10 17:16   ` martin.kula
  0 siblings, 2 replies; 7+ messages in thread
From: David Woodhouse @ 2001-10-10 16:31 UTC (permalink / raw)
  To: martin.kula; +Cc: linux-mtd

martin.kula@deltaes.cz said:
>  1. How can I set eraseblock size for mkfs.jffs2 ?
> I have DoC 24MB and line in /proc/mtd is: dev:    size   erasesize
> name mtd0: 01800000 00002000 "DiskOnChip 2000"

	mkfs.jffs2 -e 0x2000


> 2. Must I use erase command when I create jffs2 on the DoC ?

You need to erase the device first. Use the 'eraseall' utility:
	eraseall /dev/mtd0
Then you can use dd to put the image on the device.

Unfortunately, JFFS2 doesn't yet work on the DiskOnChip, because it uses 
NAND flash. JFFS v1 should probably work, or you can fix up JFFS2 to work 
too.

--
dwmw2

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Eraseblock size in jffs2 ?
  2001-10-10 16:31 ` David Woodhouse
@ 2001-10-10 16:44   ` Tom McMillan
  2001-10-10 16:47     ` David Woodhouse
  2001-10-10 17:16   ` martin.kula
  1 sibling, 1 reply; 7+ messages in thread
From: Tom McMillan @ 2001-10-10 16:44 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd

David Woodhouse wrote:
> 
> Unfortunately, JFFS2 doesn't yet work on the DiskOnChip, because it uses
> NAND flash. JFFS v1 should probably work, or you can fix up JFFS2 to work
> too.
> 

Where, exactly?  Or at least, a starting point.  I've just started
looking into using JFFS2 with my DOC2000s.

_____________________________________________________________________
Tom McMillan                                                 AirFiber
tsm@airfiber.com                                   16510 Via Esprillo
PH: (858) 676-7301                                San Diego, CA 92127

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Eraseblock size in jffs2 ?
  2001-10-10 16:44   ` Tom McMillan
@ 2001-10-10 16:47     ` David Woodhouse
  0 siblings, 0 replies; 7+ messages in thread
From: David Woodhouse @ 2001-10-10 16:47 UTC (permalink / raw)
  To: Tom McMillan; +Cc: linux-mtd

tsm@airfiber.com said:
>  Where, exactly?  Or at least, a starting point.  I've just started
> looking into using JFFS2 with my DOC2000s.

Firstly, you need to deal with the restrictions imposed by NAND flash - 
you can only make ten individual write() calls to any given 512-byte page 
before the contents of that page become undefined until the next erase. 
Because dirent nodes are quite small, it's feasible that you could try to 
fit more than ten of them in a single page - basically, on the tenth write 
you need to also pad to the end of the page with free space.

Secondly, you want ECC on the nodes instead of just a CRC - you want to be 
able to _correct_ errors instead of just complaining about them.

That's quite a simple addition and can be implemented and tested without 
even playing with real hardware. Define two new node types and make the 
code deal with them accordingly. The actual ECC code is easy enough - 
there's plenty of example code around, including some in nand/nand_ecc.c.


--
dwmw2

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Eraseblock size in jffs2 ?
  2001-10-10 16:31 ` David Woodhouse
  2001-10-10 16:44   ` Tom McMillan
@ 2001-10-10 17:16   ` martin.kula
  2001-10-10 17:39     ` David Woodhouse
  1 sibling, 1 reply; 7+ messages in thread
From: martin.kula @ 2001-10-10 17:16 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd

Hi

If jffs2 doesn't work should I use the same procedure with jffs(v1)?
I'm very confused with it because when I use eraseall on the mtd0 device
than I erase  MBR and so  too ?
I won't be able to boot from this, will I ?

What filesystem is probably the best for DoC now ?
I can try jffs2 on a DoC when I will know what .... Mainly I can test it
;-)
But I'm finding some (pre)stable solution or me now ;o).

Thanks so much

Martin

PS. Sorry for my bad English ;-(




On Wed, 10 Oct 2001, David Woodhouse wrote:

> 
> 
> > 2. Must I use erase command when I create jffs2 on the DoC ?
> 
> You need to erase the device first. Use the 'eraseall' utility:
> 	eraseall /dev/mtd0
> Then you can use dd to put the image on the device.
> 
> Unfortunately, JFFS2 doesn't yet work on the DiskOnChip, because it uses 
> NAND flash. JFFS v1 should probably work, or you can fix up JFFS2 to work 
> too.
> 
> --
> dwmw2
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Eraseblock size in jffs2 ?
  2001-10-10 17:16   ` martin.kula
@ 2001-10-10 17:39     ` David Woodhouse
  2001-10-10 17:58       ` martin.kula
  0 siblings, 1 reply; 7+ messages in thread
From: David Woodhouse @ 2001-10-10 17:39 UTC (permalink / raw)
  To: martin.kula; +Cc: linux-mtd

martin.kula@deltaes.cz said:
> If jffs2 doesn't work should I use the same procedure with jffs(v1)?
> I'm very confused with it because when I use eraseall on the mtd0
> device than I erase  MBR and so  too ? I won't be able to boot from
> this, will I ?

Yes, it would take out all the firmware, but the firmware wouldn't have let 
you boot from JFFS or JFFS2 anyway.

> What filesystem is probably the best for DoC now ? 

Probably best just to use NFTL on it and a normal filesystem on top of that.


--
dwmw2

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Eraseblock size in jffs2 ?
  2001-10-10 17:39     ` David Woodhouse
@ 2001-10-10 17:58       ` martin.kula
  0 siblings, 0 replies; 7+ messages in thread
From: martin.kula @ 2001-10-10 17:58 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd

Hi

On Wed, 10 Oct 2001, David Woodhouse wrote:

> > I'm very confused with it because when I use eraseall on the mtd0
> > device than I erase  MBR and so  too ? I won't be able to boot from
> > this, will I ?
> 
> Yes, it would take out all the firmware, but the firmware wouldn't have let 
> you boot from JFFS or JFFS2 anyway.

Ohhh so !?! That it isn't the solution for me because I have a PC104
with a DoC only.

> 
> Probably best just to use NFTL on it and a normal filesystem on top of that.
> 

OK


Thanks

Martin

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-10-10 17:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-10 16:31 Eraseblock size in jffs2 ? martin.kula
2001-10-10 16:31 ` David Woodhouse
2001-10-10 16:44   ` Tom McMillan
2001-10-10 16:47     ` David Woodhouse
2001-10-10 17:16   ` martin.kula
2001-10-10 17:39     ` David Woodhouse
2001-10-10 17:58       ` martin.kula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox