Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Radha Mohan <radhamohan_ch@yahoo.com>
To: Rahanesh <rahanesh@tataelxsi.co.in>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Unale to  get MTD device info
Date: Mon, 24 Aug 2009 12:48:41 +0530 (IST)	[thread overview]
Message-ID: <323485.33669.qm@web94802.mail.in2.yahoo.com> (raw)
In-Reply-To: <4A923BC6.3000806@tataelxsi.co.in>


Hi,

Create char mtd devices

mknod /dev/mtd0 c 90 0
mknod /dev/mtd1 c 90 2
..
..
Note that the minor number increments by 2.
Before that you will need to confirm whether CONFIG_MTD_CHAR is set in your kernel or not. This will enable char device access
to your mtdblock device. Or else you will not be able to write to mtd0 char device.

You can erase and copy anything to the mtd devices. You can use "flashcp" from the mtd-utils. Else you can write your own code to write to
the flash. You can take help of the flashcp code in mtd-utils. 

-- Mohan

________________________________
From: Rahanesh <rahanesh@tataelxsi.co.in>
To: Radha Mohan <radhamohan_ch@yahoo.com>
Cc: linux-mtd@lists.infradead.org
Sent: Monday, 24 August, 2009 12:35:42 PM
Subject: Re: Unale to  get MTD device info

Hi Radha Mohan ,

Thanks a lot for responding.

I have few doubts regarding your reply.

In the /dev/ partition of Linux i cannot see any mtd char device. Only 
mtdblock is there.

Can i convert the block devices to character devices? if so how?

Is it possible for me to erase mtdblock0 and copy to mtdblock0 using any 
other utilities?

I am a newbie to all this. Please give your valuable suggestions

Thanks
Rahanesh


Radha Mohan wrote:
> hi rahanesh,
>
> The mtd-utils do not work on block devices like mtdblock0. Use mtd0 
> instead. The mtd0 is char device of mtdblock0.
>
> -- Mohan
>
> ------------------------------------------------------------------------
> *From:* Rahanesh <rahanesh@tataelxsi.co.in>
> *To:* linux-mtd@lists.infradead.org
> *Sent:* Monday, 24 August, 2009 10:53:06 AM
> *Subject:* Unale to get MTD device info
>
> Hi all,
>
> I have four mtdblocks in my flash .
> mtdblock0 -> Primary bootloader
> mtdblock1 -> uboot
> mtdblock2 -> JFFS
> mtdbloack3-> config
>
> During Linux booting , it mounts mtdblock2 to a temp folder which can 
> be seen as a part of ramdisk(root file system of linux)
>
> Now from Linux i need to flash a new jffs image to mtdblock2 itself.
>
> With the support from this mailing list i have copied mtd-utilities 
> package into Linux. Now i have flash_eraseall and flash_cp commands.
>
> But when i run flash_eraseall  i gett the following error
>
>
> flash_eraseall: /dev/mtdblock1: *unable to get MTD device info
>
> *Please help on this!!!!!!!
>
> Thanks
> Rahanesh
>
>
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
> ------------------------------------------------------------------------
> Looking for local information? Find it on Yahoo! Local 
> <http://in.rd.yahoo.com/tagline_local_1/*http://in.local.yahoo.com/>


      See the Web&#39;s breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz.yahoo.com/

  reply	other threads:[~2009-08-24  7:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-24  5:23 Unale to get MTD device info Rahanesh
     [not found] ` <136203.4177.qm@web94808.mail.in2.yahoo.com>
2009-08-24  7:05   ` Rahanesh
2009-08-24  7:18     ` Radha Mohan [this message]
2009-08-24  9:50       ` Rahanesh
2009-08-24 13:31         ` Radha Mohan

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=323485.33669.qm@web94802.mail.in2.yahoo.com \
    --to=radhamohan_ch@yahoo.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=rahanesh@tataelxsi.co.in \
    /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