* Clarification on multiple mtdram devices
@ 2007-03-19 15:32 MikeW
2007-03-21 12:39 ` Clarification on multiple mtdram devices - HowTo MikeW
0 siblings, 1 reply; 4+ messages in thread
From: MikeW @ 2007-03-19 15:32 UTC (permalink / raw)
To: linux-mtd
>From a (much) earlier post, I note that the mtdram driver can emulate
several /dev/mtd's by "loading the driver more than once".
Does this mean modprobing *once* but then setting up multiple
device nodes with the same major number and different minor numbers ?
I presume this also implies that each device must have the same size & erasesize.
Regards,
MikeW
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Clarification on multiple mtdram devices - HowTo
2007-03-19 15:32 Clarification on multiple mtdram devices MikeW
@ 2007-03-21 12:39 ` MikeW
2007-03-21 13:21 ` Josh Boyer
0 siblings, 1 reply; 4+ messages in thread
From: MikeW @ 2007-03-21 12:39 UTC (permalink / raw)
To: linux-mtd
MikeW <mw_phil <at> yahoo.co.uk> writes:
>
>From a (much) earlier post, I note that the mtdram driver can emulate
>several /dev/mtd's by "loading the driver more than once".
>
>Does this mean modprobing *once* but then setting up multiple
>device nodes with the same major number and different minor numbers ?
>
>I presume this also implies that each device must have the same
size & erasesize.
>
> Regards,
> MikeW
Found out about doing this here:
http://electrons.psychogenic.com/modules/wordpress/rants/
2005/08/28/13/linux-on-the-go-exploring-ipaq-options.html
(I would like a section doing this properly on the MTD website FAQ
written by an authoritative person - please !)
>>>>>
To start we load a few modules, creating a fake 32M flash device
in RAM and ensure we have appropriate /dev/ entries:
# modprobe mtdcore
# modprobe mtdram total_size=32768 erase_size=256
# mkdir /dev/mtdblock ; for i in 0 1 2 3 ;
do mknod /dev/mtdblock/$i b 31 $i; done
Then we write the contents of one of the JFFS2 images
to the MTD RAM device, and take a look:
# dd if=gpe-image-h3600-20050407124742.rootfs.jffs2 of=/dev/mtdblock/0
# mkdir -p /mnt/ipaq/
# mount -t jffs2 /dev/mtdblock/0 /mnt/ipaq
# cd /mnt/ipaq; ls;
The output will be something like:
bin boot dev etc home lib media mnt proc sbin
sys tmp usr var
<<<<
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Clarification on multiple mtdram devices - HowTo
2007-03-21 12:39 ` Clarification on multiple mtdram devices - HowTo MikeW
@ 2007-03-21 13:21 ` Josh Boyer
2007-03-21 15:08 ` MikeW
0 siblings, 1 reply; 4+ messages in thread
From: Josh Boyer @ 2007-03-21 13:21 UTC (permalink / raw)
To: MikeW; +Cc: linux-mtd
On Wed, 2007-03-21 at 12:39 +0000, MikeW wrote:
>
> Found out about doing this here:
> http://electrons.psychogenic.com/modules/wordpress/rants/
> 2005/08/28/13/linux-on-the-go-exploring-ipaq-options.html
>
> (I would like a section doing this properly on the MTD website FAQ
> written by an authoritative person - please !)
> >>>>>
> To start we load a few modules, creating a fake 32M flash device
> in RAM and ensure we have appropriate /dev/ entries:
>
> # modprobe mtdcore
> # modprobe mtdram total_size=32768 erase_size=256
> # mkdir /dev/mtdblock ; for i in 0 1 2 3 ;
> do mknod /dev/mtdblock/$i b 31 $i; done
>
> Then we write the contents of one of the JFFS2 images
> to the MTD RAM device, and take a look:
>
> # dd if=gpe-image-h3600-20050407124742.rootfs.jffs2 of=/dev/mtdblock/0
> # mkdir -p /mnt/ipaq/
> # mount -t jffs2 /dev/mtdblock/0 /mnt/ipaq
> # cd /mnt/ipaq; ls;
This is about creating a single MTD with mtdram and effectively using
that for loopback. You had asked about creating multiple MTDs with
mtdram. So does this fully answer your question, or?
/me is a bit confused.
josh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Clarification on multiple mtdram devices - HowTo
2007-03-21 13:21 ` Josh Boyer
@ 2007-03-21 15:08 ` MikeW
0 siblings, 0 replies; 4+ messages in thread
From: MikeW @ 2007-03-21 15:08 UTC (permalink / raw)
To: linux-mtd
Josh Boyer <jwboyer <at> linux.vnet.ibm.com> writes:
>
>
> This is about creating a single MTD with mtdram and effectively using
> that for loopback. You had asked about creating multiple MTDs with
> mtdram. So does this fully answer your question, or?
>
> /me is a bit confused.
>
> josh
I wanted to create more than one MTD in RAM to emulate a board
with Flash memory split into several partitions, mtd0..n, mtdblock0..m
It's not immediately clear what (if any) relationship there is
between device numbers and partitions, and there's not much on the
MTD site.
I noted the existence of mtdram, but then wanted to know how best
to use it.
I noted that mtdram only appeared to be capable of creating one device,
so was looking for a way of creating several devices (mtd0...n).
I looked in the driver code but it confirmed that only one mtd
would exist, AFAICS.
>From the quoted item it looks as if you can create several mtds
by creating one mtdram and then splitting it up using mtdblock.
It would be useful if there was a proper 'howto' on this subject
on the website, since I have only been able to piece this
together by much searching.
So can some mtd drivers (mtdblock) subdivide mtd devices provided by
other drivers, for example ?
I have been looking for some kind of overall 'concept of operation'
but without much luck ATM !
If I *do* manage to put all the pieces together I will willingly
write it up on the site !
Regards,
MikeW
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-03-21 15:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-19 15:32 Clarification on multiple mtdram devices MikeW
2007-03-21 12:39 ` Clarification on multiple mtdram devices - HowTo MikeW
2007-03-21 13:21 ` Josh Boyer
2007-03-21 15:08 ` MikeW
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox