LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded
User Name
Password
Linux - Embedded This forum is for the discussion of Linux and embedded devices.

Notices

Reply
 
LinkBack Search this Thread
Old 10-24-2011, 10:44 AM   #1
tompo
LQ Newbie
 
Registered: Oct 2011
Posts: 3

Rep: Reputation: Disabled
Question Can not write (nandwrite) to MTD devices ...


Hello everyone,

I have a problem with the MTD decives. I try to write to a MTD device which is on a NAND flash, therefore I use nandwrite. I got an error and found out that the MTD device is just read-only:

mtd5: 00100000 00004000 "NAND (RO) U-Boot Image"
mtd6: 00100000 00004000 "NAND (RO) DTB Image"
mtd7: 00400000 00004000 "NAND (RO) Linux Kernel Image"
mtd8: 00400000 00004000 "NAND (RO) Compressed RFS Image"
mtd9: 00f00000 00004000 "NAND (RW) JFFS2 Root File System"
mtd10: 00700000 00004000 "NAND (RW) Writable User area"

Of course that is a problem if I try to write on the devives .

How can I change the mtd device from read-only to read-write access?

Thank you for your help.
 
Old 11-18-2011, 04:27 AM   #2
davemguru
Member
 
Registered: Apr 2006
Location: London
Distribution: Pclos,Debian,Puppy,Fedora
Posts: 87

Rep: Reputation: 38
Quote:
Originally Posted by tompo View Post
Hello everyone,

I have a problem with the MTD decives. I try to write to a MTD device which is on a NAND flash, therefore I use nandwrite. I got an error and found out that the MTD device is just read-only:

mtd5: 00100000 00004000 "NAND (RO) U-Boot Image"
mtd6: 00100000 00004000 "NAND (RO) DTB Image"
mtd7: 00400000 00004000 "NAND (RO) Linux Kernel Image"
mtd8: 00400000 00004000 "NAND (RO) Compressed RFS Image"
mtd9: 00f00000 00004000 "NAND (RW) JFFS2 Root File System"
mtd10: 00700000 00004000 "NAND (RW) Writable User area"

Of course that is a problem if I try to write on the devives .

How can I change the mtd device from read-only to read-write access?

Thank you for your help.
http://wiki.openmoko.org/wiki/Nandwrite
and
http://wiki.openmoko.org/wiki/NAND_b...ring_BadBlocks
may shed some light on your problem. Sorry I am not more precise - I am learning this stuff myself.
 
Old 11-18-2011, 04:42 AM   #3
tompo
LQ Newbie
 
Registered: Oct 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thumbs up Solved

Hi davemguru,

thank you for your reply and the website links .

I forgot to post here, that I solved the problem. Sorry! The solution is that the DTB describes the MTDs as read-only. After changing this the nandwrite command works well.

Thanks again for you help.

Regards,
tompo
 
Old 01-20-2012, 04:08 AM   #4
sun_storm
LQ Newbie
 
Registered: Jan 2012
Posts: 1

Rep: Reputation: Disabled
Hi, tompo.

I have a similar problem, i can't write to /dev/mtd0

Tell me. How can solved this problem?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] What are the NAND(MTD) read and write commands? dbrazeau Linux - Software 3 11-05-2010 06:31 PM
Doesn't work: spawn cat <file> | ssh root@$ip mtd -r -e linux write - linux wtfman Programming 3 01-14-2010 09:43 AM
Does "mtd write" clear/erase the end of the mtd block by default? (no man page found) maddes.b Linux - Kernel 0 08-18-2009 11:44 AM
What is MTD devices? HmmLinux Linux - Newbie 3 04-11-2006 12:39 AM
What are MTD Devices aditya Linux - Newbie 2 11-14-2002 05:40 AM


All times are GMT -5. The time now is 12:52 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration