public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: MikeW <mw_phil@yahoo.co.uk>
To: linux-mtd@lists.infradead.org
Subject: Re: Clarification on multiple mtdram devices - HowTo
Date: Wed, 21 Mar 2007 12:39:54 +0000 (UTC)	[thread overview]
Message-ID: <loom.20070321T130947-321@post.gmane.org> (raw)
In-Reply-To: loom.20070319T162102-206@post.gmane.org

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
<<<<

  reply	other threads:[~2007-03-21 12:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-19 15:32 Clarification on multiple mtdram devices MikeW
2007-03-21 12:39 ` MikeW [this message]
2007-03-21 13:21   ` Clarification on multiple mtdram devices - HowTo Josh Boyer
2007-03-21 15:08     ` MikeW

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20070321T130947-321@post.gmane.org \
    --to=mw_phil@yahoo.co.uk \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox