[uClinux-dev] How to confirm the mtd device has been added successfully? I need your help!

Patrice Kadionik kadionik at enseirb.fr
Wed Mar 19 07:58:37 EST 2003

Hi ,
I've just succeded to use MTD/JFFS2 on my M5407C3 board...I'll prepare a
HOWTO on this subject..
may this help the community...

you have to enable JFFS2 FS (see under /proc : # cat /proc/filesystems).
you have to create an JFFS2 image file with mkfs.jffs2 : # mkfs.jffs2 -d
my-directory -o jffs2.img
you copy it on your MTD partition (erase it before) : # erase /dev/mtd1
# cp jffs2.img /dev/mtd1
you mount then youy JFFS2 partition : mount -t jffs2 /dev/mtdblock1 /mnt
and it must appears under /mnt...

You have to check that MTD if OK...
# erase /dev/mtd1
under the dBUG monitor, you must have in the flash pages with $FF values
at the beginning of the mtd1 partition...
under ucliinux...create a file toto with the ASCII line 12345678...
and then copy this file on /dev/mtd1 : cp toto /dev/mtd1...
under dBUG, dump the begining of the mdt1 partition : you should have
$313233... appearing...

IMPORTANT : I cite the mtd1 partition...it's just an example to adapt to
your flash MTD partitionning ....be carefull, because you may erase the
dBUG monitor in the flash
read the MTD faq and the articles from ucdot.org around these subjects...

杨亚军 wrote:

> I want to support jffs on my 5272 board. I use mtd and create two
> partitons. But I can't mount it successfully. I guess that the mtd
> device have not benn added successfully. So I go to /proc and find
> that in /proc/devices, there is no mtd device's info. In /proc/mtd
> ,there are two mtd devices---two partitions's info.
> Have my mtd devices been added successfully?
> I need your help!

Patrice Kadionik. F6KQH / F4CUQ

+"Tout doit etre aussi simple que possible, pas seulement plus simple"+
+ Patrice Kadionik                http://www.enseirb.fr/~kadionik     +
+ ENSEIRB                         fax   : +33           +
+ PO BOX 99                       voice : +33           +
+ 33402 TALENCE Cedex             http://www.enseirb.fr               +
+ FRANCE                          mailto:kadionik at enseirb.fr          +

More information about the uClinux-dev mailing list