All of lore.kernel.org
 help / color / mirror / Atom feed
* mtd devices
@ 2003-04-15 22:57 Jeremy Bowen
  2003-04-16  7:19 ` Eric DEJONC
  2003-04-16  9:52 ` Daniel Toussaint
  0 siblings, 2 replies; 4+ messages in thread
From: Jeremy Bowen @ 2003-04-15 22:57 UTC (permalink / raw)
  To: 'linux-mtd@lists.infradead.org'

Hi

I've seen various references to both 
1) "/dev/mtd/x" and 
2) "/dev/mtdx". 

My system uses the 1st format. Could someone please help me understand the
differences between these two formats and where they come from.

Thanks

Jeremy

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

* Re: mtd devices
  2003-04-15 22:57 mtd devices Jeremy Bowen
@ 2003-04-16  7:19 ` Eric DEJONC
  2003-04-16  9:52 ` Daniel Toussaint
  1 sibling, 0 replies; 4+ messages in thread
From: Eric DEJONC @ 2003-04-16  7:19 UTC (permalink / raw)
  To: Jeremy Bowen; +Cc: 'linux-mtd@lists.infradead.org'

Hi,
It doesn't change anything if you chose one format than the other. Special
files can be placed where you want and can have the name you want. The only
thing there is in the file is the major and minor num and a boolean that
indicates if it is a char device or a block device.

regards,
Eric

Jeremy Bowen a écrit :

> Hi
>
> I've seen various references to both
> 1) "/dev/mtd/x" and
> 2) "/dev/mtdx".
>
> My system uses the 1st format. Could someone please help me understand the
> differences between these two formats and where they come from.
>
> Thanks
>
> Jeremy
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: mtd devices
  2003-04-15 22:57 mtd devices Jeremy Bowen
  2003-04-16  7:19 ` Eric DEJONC
@ 2003-04-16  9:52 ` Daniel Toussaint
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Toussaint @ 2003-04-16  9:52 UTC (permalink / raw)
  To: Jeremy Bowen; +Cc: 'linux-mtd@lists.infradead.org'

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Jeremy,

1.) /dev/mtd/x

.. is what you get when you use devfs (device filesystem). In this case
your is configured with option CONFIG_DEVFS_FS=y.
Using devfs is generally better(and sometimes even a must) for embedded
systems - documentation about this is in
/kernelsource/Documentation/filesystems/devfs/
All device nodes are created on the fly, ONLY for devices that were
configured in the kernel and/or available on your system.
The naming scheme is a little different than the traditional one, but
make a lot more sense really.


2.) /dev/mtdx
....is a node that was created manually by someone with the command
"mknod" , and is what you see on most desktop/server linux distributions.
It's the way thing are done in unix in general. The drawback with this,
is that it takes up "real " space on your disk (or flash ... ) as
~ opposed to devfs, which
is only virtual, just like /proc.

By the way, I believe that Mandrake Linux is an exception to this, I've
noticed that they use (1) , in combination with devfs daemon.
devfsd daemon is a userspace program that makes a system based on devfs
compatible with the "old"  way.  

~From the userspace point of view , both formats are the same of course,
they still keep the same major/minor numbers.

Hope this could help you in some way , (I am really not an expert on this)

Greetings,
Daniel

Jeremy Bowen wrote:

|Hi
|
|I've seen various references to both
|1) "/dev/mtd/x" and
|2) "/dev/mtdx".
|
|My system uses the 1st format. Could someone please help me understand the
|differences between these two formats and where they come from.
|
|Thanks
|
|Jeremy
|
|______________________________________________________
|Linux MTD discussion mailing list
|http://lists.infradead.org/mailman/listinfo/linux-mtd/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org

iD8DBQE+nSfdoYsGjpwDV+QRAizEAJ9Zm09p2TD2+x6p/DRfnkwtj0P8swCfQVPA
C3O2Wt2nwNZ4vBEI0mlG138=
=0tl9
-----END PGP SIGNATURE-----

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

* MTD Devices
@ 2007-11-13 10:29 schardt
  0 siblings, 0 replies; 4+ messages in thread
From: schardt @ 2007-11-13 10:29 UTC (permalink / raw)
  To: Linux PPC Linux PPC

Hi again,

i have some problems to copy a cramfs image to flash.  the situation as
follows:

cat /proc/mtd:
dev:    size   erasesize  name
mtd0: 00180000 00010000 "kernel"
mtd1: 00280000 00010000 "rootfs"

cat /proc/partitions:
major minor  #blocks  name

 254     0      62720 xsa
 254     1       9840 xsa1
 254     2      52864 xsa2
  31     0       1536 mtdblock0
  31     1       2560 mtdblock1

ls -l /dev/mtd*:
crw-r--r--    1 root     root      90,   0 Jan  1 00:14 /dev/mtd0
crw-r--r--    1 root     root      90,   2 Jan  1 00:21 /dev/mtd1
brw-r--r--    1 root     root      31,   0 Jan  1 00:01 /dev/mtdblock0
brw-r--r--    1 root     root      31,   1 Jan  1 00:08 /dev/mtdblock1


now, imho it is possible to make a

- eraseall /dev/mtd1 to erase the flash
- dd if=cramfs.img of=/dev/mtd1 to copy image to flash

but if i read the mtd1 device back, the flash is emtpy :(((

what is my mistake ?

Georg



-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
Forschungszentrum Jülich GmbH
52425 Jülich

Sitz der Gesellschaft: Jülich
Eingetragen im Handelsregister des Amtsgerichts Düren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDirig'in Bärbel Brumme-Bothe
Geschäftsführung: Prof. Dr. Achim Bachem (Vorsitzender), Dr. Ulrich Krafft (stellv. 
Vorsitzender)
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------

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

end of thread, other threads:[~2007-11-13 10:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-15 22:57 mtd devices Jeremy Bowen
2003-04-16  7:19 ` Eric DEJONC
2003-04-16  9:52 ` Daniel Toussaint
  -- strict thread matches above, loose matches on Subject: below --
2007-11-13 10:29 MTD Devices schardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.