basic mtd use

Andrew Ebling ee71ae at
Mon Mar 12 09:37:47 EST 2001

Hi all,

I have been looking at MTD to use in a project, I have compiled it into
the kernel OK, but despite reading the source (I can't find any other kind
of documentation in the kernel tree ;) I cannot figure out how to put it
to real use.  I've had a good look at the MTD site and not found basic

What I want to do is this: limit the kernel to using just 16MB out of
256MB of memory at boot time and then use the remaining memory as a
ramdisk, formatted using a special application specific filesystem I am
writing.  (At the moment I'm looking at the "Use extra onboard memory as
MTD device" option in make config)  I also need to be able to read/write
to given addresses for simulation purposes.

Basically, I need a ramdisk which uses a specified physical address range,
separated from the memory that the kernel is running in and the MTD driver
seems the best way to do this.

My questions are:

- which devices to I need to create under /dev, with which major/minor

- what is the minimal set of modules I need to load in order to do the

- can I then use the MTD device just like any normal ramdisk?

- how difficult would it be to give the MTD driver a list of duff memory
locations (perhaps identified by the badram patch at bootup) that must not
be used?

Some misc suggestions:

- any chance of a single bzipped file of the mail archives that can be
downloaded and grepped for info?

- some stuff to go in ~/linux/Documentation to tell mere mortals how to
make basic use of the MTD driver.  (I appreciate this is still
experimental stuff and that it isn't ready for production use etc)  Even
if it is just 5 lines, this would be a great help and would help to cut
noise out of your mailing list! ;)

- a pointer to the above in the help given by make config.

Many Thanks,


To unsubscribe, send "unsubscribe mtd" to majordomo at

More information about the linux-mtd mailing list