Re: [Yaffs] flash_eraseall

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
Subject: Re: [Yaffs] flash_eraseall
On Friday 03 February 2012 23:46:32 Salvatore Galfano wrote:
> Hi everybody,
>
> I've an issue concerning the "flash_eraseall" command. In particular I
>
> am simulating a Nand Flash using the module nandim like this:
> > modprobe nandsim first_id_byte=0x20 second_id_byte=0xa2
> > third_id_byte=0x00 fourth_id_byte=0x15
>
> If, after I mounted the Flash memory and wrote on it putting some
> folders and text file, I used the above command (i.e., flash_eraseall
> /dev/mtd0 ) then I would expect to find nothing into the memory (as if
> it was formatted), but I still have the directory tree and files (and
> when I open the latter there is something like <FF><FF> ... ).
> Is it normal? What is it due to?
> Thank you in advance for your avalaibility.


If you erase the flash after mounting yaffs then of course things will go
wrong.

When yaffs mounts it reads the flash and sets up some data structures. If you
then erase the flash while yaffs is mounted then the yaffs data structures
will not be consistent with the flash.

If you flash_eraseall while yaffs is not mounted then you will get the results
you are expecting.

-- Charles