Binary Nandwrite/read to Flash

Ricard Wanderlof ricard.wanderlof at axis.com
Thu Mar 13 09:53:12 EDT 2008


On Thu, 13 Mar 2008, Manuel Sahm wrote:

> Thank you,
>
> could you tell me the exact call:
>
> I have a NAND-Flash with PAGESSIZE = 0x800 and ERASEBLOCKSIZE=0x20000
>
> I want to write a file maybe called "test.txt" at adress 0x02000000 of the 
> NAND flash.

Something like

nandwrite -s 0x02000000 -p /dev/mtd0 test.txt

(mtd0 depending on which device your nandflash is)

(Note: you don't have to specify the padding size, nandwrite figures it 
out by querying mtd).

> And read it back to a file "test2.txt" afterwards.

Something like

nanddump -o -b -s 0x02000000 -l <filesize> -f test2.txt /dev/mtd0

where <filesize> is the size of your file.

/Ricard
--
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30



More information about the linux-mtd mailing list