All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vipin Malik <vmalik@danielind.com>
To: Subodh Nijsure <subodh@best.com>
Cc: mtd@infradead.org
Subject: Re: How is mtdblock created?
Date: Wed, 14 Feb 2001 10:10:33 -0600	[thread overview]
Message-ID: <3A8AADF9.E7FD6C9F@danielind.com> (raw)
In-Reply-To: 200102140924.BAA24199@shell9.ba.best.com

Oops! I'm glad that you asked that question. I forgot to include it into my howto.

In the mtd/util dir, there is a script file called, MAKEDEV.

Just run that scriptfile from /dev/ as:
sh /usr/src/mtd/util/MAKEDEV

This should create all your /dev/mtd0....n, /dev/mtdblock0....n, /dev/nftla,b,c,d
and /dev/nftla0,1,2,3 ... /dev/nftlb0,1,2,3 etc.

How did you create /dev/mtd0 in the first place?

Vipin


Subodh Nijsure wrote:

> > Then mount the file system by:
> > #mount -t jffs /dev/mtdblock0 /mnt/jffs (assuming /mnt/jffs exists, else
> > make it).
> >
> > *** Making partitions with CFI flash and working with multiple banks
> >     of FLASH:
> >
> > Unlike a "regular" block device, you cannot launch fdisk and create
> > partitions on /dev/mtdblock0,1,2,3...
> >
> > (As far as I know) CFI flash partitions have to be created and
> > compiled in the physmap.c file.
> >
>
> How are these /dev/mtdblock0...n devices created does one have to create
> them by hand are they are done as part of some module loading?
>
> When I do modprobe physmap I get following output
>
> sh-2.04# modprobe physmap
> physmap flash device: size 0x00400000 at address 0x28000000
> Call to cfi_probe received
> cfi_probe_new_chip  buswidth is 4 size 0x00400000
> Physically mapped flash: Found a coupled pair of CFI devices at location 0 in 16 bit mode
> cfip->qry[0] = '', cfip->qry[1] = '', cfip->qry[2] = ''
> Invalid CFI ident structure.
>
> cfi.chipsize is zero. This is bad. cfi.cfiq.DevSize is 0
> cfi_cfi_probe returned NULL

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you got NULL here, how did your code proceed to below? Your modprobe physmap should have
failed.


>
> mtd: Giving out device 0 to Physically mapped flash
> mtd: Giving out device 1 to SkyStream boot firmware
> mtd: Giving out device 2 to SkyStream Flash Bank
> sh-2.04# cat /proc/mtd
> mtd0: 00400000 "Physically mapped flash"
> mtd1: 00040000 "SkyStream boot firmware"
> mtd2: 003a0000 "SkyStream Flash Bank"

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is showing that your flash was detected ok and assigned to /dev/mtd0,1,2
If you can read the flash contents then I guess you are ok, but I'm a bit mistified.

Vipin

>
>
> Now when I execute command od /dev/mtd0 to dump containts of the flash,
> they match correctly.
>
> But I want to create the jffs file system (mkfs.jffs) and mount them
> but howto says I need /dev/mtdblockXX to do something like this,
>
>         mount -t jffs /dev/mtdblock0 /mnt/jffs
>
> How is /dev/mtdblock0 created?
>
> /Subodh
>
> To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org



To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

      reply	other threads:[~2001-02-14 15:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-13 20:14 Third cut of the MTD-JFFS HOWTO (with a name spelling correction) Vipin Malik
2001-02-13 19:55 ` David Woodhouse
2001-02-14  9:24 ` How is mtdblock created? Subodh Nijsure
2001-02-14 16:10   ` Vipin Malik [this message]

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=3A8AADF9.E7FD6C9F@danielind.com \
    --to=vmalik@danielind.com \
    --cc=mtd@infradead.org \
    --cc=subodh@best.com \
    /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 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.