How to read/write in flash memories (MTD)?
jwboyer at jdub.homelinux.org
Fri Apr 1 09:34:21 EST 2005
On Thu, 2005-03-31 at 11:59 +0200, Garcia Jérémie wrote:
> Although I'm a newbie in linux kernel development, I'm in charge of adapting a Montavista LSP to fit our hardware. In our platform, we use 2 AMD flash memories (AM29LV) in which one we would like to process read/write operations. So I'm looking for a way to do that. I saw that at compilation time, there is MTD item which seems to be created for that. But I guess activate that will not be enough to reach my objective.
You need to enable MTD with the appropriate chip drivers and either the
MTD character device or the MTD block device (or both). These will
create /dev/mtdX and /dev/mtdblockX respectively. If you are using
devfs or sysfs + udev, they should show up in /dev. Otherwise, you'll
need to use mknod to create them.
> Indeed, we are developping an application (in the user-space) which will initiate operation on the 2 flash memories. So, how can I access them from my application?
> Please help me cause I'm getting lost in the linux sources....
I'm not sure what kind of operations you mean, but the block and char
devices allow read/write operation. If you are looking for a filesystem
to run on these devices, take a look at JFFS2. Cramfs or squashfs can
also be used, but they are read-only.
More information about the Linuxppc-dev