flash_erase ERROR!

dhlm83 at sapo.pt dhlm83 at sapo.pt
Thu Sep 22 06:15:11 EDT 2011


Hello.
Thanks for repply, and help is welcome.

Citando Brian Norris <xxxx at gmail.com>:

> On Mon, Sep 19, 2011 at 6:52 AM,  <xxxx at sapo.pt> wrote:
>> Hello.
>> This is my first post.
>>
>> I am using uClinux (kernel 2.4.34.5-uc0 , dist: 20110603)
>> I build a image to board NetBurner MOD5272.
>
> That's a very old (and dare I say unsupported?) kernel. There may be
> some things we can do to help, but generally, MTD developers don't
> support that old of code.

I am forced to use this kernel (2.4.x) by limitation of my target  
board, especially the only 2MB of flash.
I build successfully a 2.6.x image, but without my applications was  
already near the limit of memory.

>> The problem is: The flash_eraseall and flash_erase dont work.
>>     ......
>>     # flash_eraseall -j /dev/mtd5 0 0
>>     /bin/flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`;
>> please use it
>>     Access Error Exception 12: Error on data read
>>     SIGSEGV
>>     ......
>>
>>     ......
>>     # flash_erase -j -u -N /dev/mtd5 0 0
>>     libmtd: error!: MEMGETBADBLOCK ioctl failed
>>             error 25 (Inappropriate ioctl for device)
>>     flash_erase: error!: mtd_get_dev_info failed
>>     .....
>
> What version of mtd-utils do you have? If it's old, then "flash_erase"
> may not give a version # (try `flash_erase --version'). You could also
> check other utilities, like:
>
> nanddump --version
> nandwrite --version

The mtd-utils version is: in file mtd-utils.spec
      .....
      Version: 1.0
      Release: 1
      .....

  The flash_erase version:
      .....
      # flash_erase --version
      flash_erase version 2
      .....

I dont have nanddump and nandwrite utilities. My flash is NOR type  
(am29lv160db).
But in source files:
      nanddump.c: "$Revision: 1.29 $"
      nandwrite.c: "$Revision: 1.32 $"

>> Has anyone had this problem?
>> Someone may give clues to solve the problem?
>
> I'm guessing it's just that your kernel is really old. From the looks
> of it, your flash_eraseall is pretty recent. Just a quick check of
> some old kernel 2.4 code seems to tell me that MEMGETBADBLOCK didn't
> even exist in your kernel, so obviously the current mtd-utils will be
> incompatible.
>
> Brian

I think the mtd-utils version is the same to kernel 2.4.x and 2.6.x in  
my distro source.
This can not generate some compatibility issues?

In the past, mtd-utils have the utilities erase and erase_all. I think  
that utilities work with my kernel, is that possible?
You know what version of mtd-utils are available (erase and erase_all)?
I can try this version.

Best Regards.
Domingos Goncalves



More information about the linux-mtd mailing list