Skip to contentSkip to conversation

mtd emulation

DISCUSSION Sam Pham 4 participants 4 messages Apr 29, 2005 – May 2, 2005 Memory technology devices (MTD)

lore
Share & tools
lore

Sam Pham

author
#0 lore raw

I'd like to evaluate JFFS2. Has anyone done this before? Does linux have the capability of emulating mtd block device and mtd memory so that I can run JFFS2 on top of it without using the actual flash?

Thanks.

Sam

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#1 lore raw
Quoted 4 lines · Sam Pham

I'd like to evaluate JFFS2. Has anyone done this before? Does linux have the capability of emulating mtd block device and mtd memory so that I can run JFFS2 on top of it without using the actual flash?

I believe you can use MTD_MTDRAM for this. There are a few associated parameters (total size, erase block size) to be fiddled as well. See the the file linux-2.6.x/drivers/mtd/devices/mtdram.c

-R

#2 lore raw

Re: mtd emulation --> NAND?

In reply to Sam Pham
Quoted 5 lines · Sam Pham

I'd like to evaluate JFFS2. Has anyone done this before? Does linux have the capability of emulating mtd block device and mtd memory so that I can run JFFS2 on top of it without using the actual flash?

Further to this question, is there an emulation of NAND?

I use a "high level" mtd NAND emulation that I wrote for YAFFS testing. This just provides the NAND mtd functions and uses none of the mtd.

I'm hoping there's a NAND emulation that emulates NAND at a very low level by accepting ALE/CLE and byte read/writes. This would provide, say, emulation of a 256Mbyte NAND part while exercising the whole of nand.c etc. This allows complete testing of file system + mtd code without having any hardware on hand.

-- Charles

#3 lore raw

Re: mtd emulation --> NAND?

В Пнд, 02/05/2005 в 07:51 +1200, Charles Manning пишет:

Quoted 9 lines

I use a "high level" mtd NAND emulation that I wrote for YAFFS testing. This just provides the NAND mtd functions and uses none of the mtd.

I'm hoping there's a NAND emulation that emulates NAND at a very low level by accepting ALE/CLE and byte read/writes. This would provide, say, emulation of a 256Mbyte NAND part while exercising the whole of nand.c etc. This allows complete testing of file system + mtd code without having any hardware on hand.

You might take a look at drivers/mtd/nand/nandsim.c

It emulates NAND in RAM but I think it will be problematic to allocate 256 MiB of memory. But you may think of some trick... Nonetheless, I used it to emulate 64MiB flashes and it works fine and even may emulate some delays. I also may perform logging of NAND operations.

Cheers,
Artem.

Signature · 3 lines
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.