public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* DiskOnChip 2000 and CVS Drivers
@ 2003-07-31 17:32 Philippe
  2003-08-01  9:55 ` David Woodhouse
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe @ 2003-07-31 17:32 UTC (permalink / raw)
  To: linux-mtd

Hi,

I'm a newbie to the MTD world.

My hardware :

  VIAC3 MotherBoard + DiskOnChip support
  DiskOnChip 2000 32MiB MD2202-D32 (linux adress 0xD0000, 0xD000 for the
dformat utility)

I'm running Linux 2.4.20 patched with mtd drivers from CVS (2003-07-28)
The patch was applied using the tool patchin.sh :
sh patchin.sh -c -j /usr/src/linux-2.4.20

Everything went fine.
I patched grub and installed the firmware into the DOC.
My DOC is now able to boot (LanBoot)

Everything works great under GRUB/NFTL.


Now I want to use two partitions (there is a similar post but it's
pretty old and there were no real answer) :
 - 2Mb (NFTL/EXT2) kernel + initrd.gz (RO)
 - 30Mb (JFFS/JFFS2) config files, log files etc... (RW)

I read (the last two weeks) that setting up JFFS2 on DOC is tricky. 
I saw several posts (from 2001) with patches to build a
FAKE_PARTITION_SYSTEM. I wasn't able to set it up with my 2.4.20 kernel
and MTD stuff.

I looked into the MTD stuff and saw that there is a NAND-Driver for the
DiskOnChip (nand/diskonchip.c). 

- Is this piece of code usable ?
- Is there any documentation or any howto which explain how to configure
the kernel to use the DiskOnChip with it?

Thank you and sorry to disturb the mailing list if I missed the answer.

Philippe

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

* Re: DiskOnChip 2000 and CVS Drivers
  2003-07-31 17:32 DiskOnChip 2000 and CVS Drivers Philippe
@ 2003-08-01  9:55 ` David Woodhouse
  2003-08-01 16:02   ` RE : " Philippe
  0 siblings, 1 reply; 4+ messages in thread
From: David Woodhouse @ 2003-08-01  9:55 UTC (permalink / raw)
  To: Philippe; +Cc: linux-mtd

On Thu, 2003-07-31 at 18:32, Philippe wrote:
> Now I want to use two partitions (there is a similar post but it's
> pretty old and there were no real answer) :
>  - 2Mb (NFTL/EXT2) kernel + initrd.gz (RO)
>  - 30Mb (JFFS/JFFS2) config files, log files etc... (RW)

There _is_ no real answer at the moment. We're working on it though.

The new DiskOnChip translation layer, INFTL, does contain a kind of
partitioning scheme of its own, which makes this kind of thing easier. I
think if we declare a 'binary partition' we should be able to use JFFS2
on it -- we're _supposed_ to have magic stuff in the spare area of each
block but we should be able to omit that since nothing will be actually
checking for it.

So I think what we need to do is make the DiskOnChip/INFTL code register
multiple partitions as separate MTD devices, according to what it finds
in the INFTL media header. 

M-Systems recommend that we use the original (non-partition-capable)
NFTL on the older devices, just as their tools do. I suppose if you're
using JFFS2 then compatibility with the status quo isn't really a
priority for you, so that's not an issue. It may affect the bootstrap
using their BIOS though -- I'm not sure. You may need to use Grub, which
doesn't yet have INFTL support; only NFTL.

> I read (the last two weeks) that setting up JFFS2 on DOC is tricky. 
> I saw several posts (from 2001) with patches to build a
> FAKE_PARTITION_SYSTEM. I wasn't able to set it up with my 2.4.20
> kernel and MTD stuff.

I merged some of that code already; all that remains is the fake
partitioning, and that should be fairly easy to patch in by hand if you
want it -- what did you try and in what way did you fail? That's your
best option for the moment -- use nftl_format with an NFTL size as you
desire, and hack the doc2000.c code to register a second partition on
which you use JFFS2.


> I looked into the MTD stuff and saw that there is a NAND-Driver for the
> DiskOnChip (nand/diskonchip.c). 
> 
> - Is this piece of code usable ?

Not really. I've been mounting JFFS2 on it -- it doesn't handle multiple
NAND devices in a single DiskOnChip yet, and doesn't do hardware ECC --
I've been using it with software ECC instead for now. You're unlikely to
get NFTL working with it for a while.

> - Is there any documentation or any howto which explain how to configure
> the kernel to use the DiskOnChip with it?

No -- I was going to finish the code before attempting to document it,
to prevent people from using it before it's ready :)

-- 
dwmw2

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

* RE : DiskOnChip 2000 and CVS Drivers
  2003-08-01  9:55 ` David Woodhouse
@ 2003-08-01 16:02   ` Philippe
  2003-08-01 16:48     ` David Woodhouse
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe @ 2003-08-01 16:02 UTC (permalink / raw)
  To: linux-mtd


Hi,
 
> I merged some of that code already; all that remains is the fake
> partitioning, and that should be fairly easy to patch in by hand if
you

I checked it today, as you told me I merged the FAKE_PART_CODE.
Everything seems OK (no compilation troubles etc...)

I'll test it next week. If Everything works as expected, i'll send a
diff against [kernel 2.4.20 + cvs / mtd patch]


> want it -- what did you try and in what way did you fail? That's your
> best option for the moment -- use nftl_format with an NFTL size as you
> desire, and hack the doc2000.c code to register a second partition on
> which you use JFFS2.

Well I had troubles using NFTL, let me explain :

I made two partition :
 - 1 - Boot : grub stuff + kernel + initrd + software
 - 2 - Conf/Save : every file wich may be used by my application

Everything was fine except two things :

a) when I turned off the machine -- when I launch the shutdown (via the
app), I do "sync", "umount" and then shutdown -h now -- Nothing was
saved on the DOC (I do not understand because when I use the same kernel
/ stuff on  my hard drive or on a CF/ide, everything is allright)

b) the sync process is very long (about 30sec)

> Not really. I've been mounting JFFS2 on it -- it doesn't handle
multiple
> NAND devices in a single DiskOnChip yet, and doesn't do hardware ECC
--
> I've been using it with software ECC instead for now. You're unlikely
to
> get NFTL working with it for a while.

Well, I don't mind about NFTL (for the boot partition) because my bootfs
should be read-only (kernel + initrd + tar.bz2)
I just want a Read only partition (bootfs) and a read/write partition
for all the conf files / data

Thank you for your help

See you

Philippe

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

* Re: RE : DiskOnChip 2000 and CVS Drivers
  2003-08-01 16:02   ` RE : " Philippe
@ 2003-08-01 16:48     ` David Woodhouse
  0 siblings, 0 replies; 4+ messages in thread
From: David Woodhouse @ 2003-08-01 16:48 UTC (permalink / raw)
  To: Philippe; +Cc: linux-mtd

On Fri, 2003-08-01 at 17:02, Philippe wrote:
> I checked it today, as you told me I merged the FAKE_PART_CODE.
> Everything seems OK (no compilation troubles etc...)

OK.

> I'll test it next week. If Everything works as expected, i'll send a
> diff against [kernel 2.4.20 + cvs / mtd patch]

OK, thanks. I probably won't merge it as-is, but it will be useful for
others in the meantime.
> a) when I turned off the machine -- when I launch the shutdown (via the
> app), I do "sync", "umount" and then shutdown -h now -- Nothing was
> saved on the DOC 

Hmmm. That sounds like a problem with the NFTL code. Were there any
error messages at the time this happened?

> b) the sync process is very long (about 30sec)

Some of that could possibly be avoided. See if it still happens with the
current CVS code.

-- 
dwmw2

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

end of thread, other threads:[~2003-08-01 16:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-31 17:32 DiskOnChip 2000 and CVS Drivers Philippe
2003-08-01  9:55 ` David Woodhouse
2003-08-01 16:02   ` RE : " Philippe
2003-08-01 16:48     ` David Woodhouse

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