Re: nandwrite/ubi memory corruption?

Michal Ludvig
2008-10-17T02:05:33Z

Michal Ludvig wrote:
> Ben Dooks wrote:
>> On Fri, Oct 17, 2008 at 10:43:57AM +1300, Michal Ludvig wrote:
>>> Ben Dooks wrote:
>>>> On Thu, Oct 16, 2008 at 11:10:29PM +1300, Michal Ludvig wrote:
>>>>> Hi all,
>>>>>
>>>>> I've got an ARM board with 64MB of NAND flash with 3 logical partitions
>>>>> and am experiencing (probably) memory corruption of UBI/UBIFS on
>>>>> /dev/mtd2 after writing data with nandwrite to /dev/mtd1.
>>>>> [...]
>>>>> s3c2410-nand s3c2410-nand: clock idle support enabled
>>>> hmm, could you try disabling the clock-idle support?
>>> How do I do that?
>> there should be a Kconfig entry to do it when the s3c2410 nand driver
>> is selected.
>
> Ah, I see. OK, with clock-idle off nandwrite didn't corrupt ubi/ubifs
> but the kernel still wouldn't boot:

It looks like if nandwrite writes some nonsense onto the flash.

I did:
~ # nanddump -o -b -f dump.pre-nandwrite /dev/mtd1
~ # nandwrite -p /dev/mtd1 uimage26
~ # nanddump -o -b -f dump.post-nandwrite /dev/mtd1

dump.post-nandwrite is different from dump.pre-nandwrite but doesn't
seem to have much in common with uimage26.

OTOH dump.pre-nandwrite contains the kernel image that has been stored
by u-boot's nandw. So the /dev/mtd1 offset is probably OK.

Any ideas on what's wrong?

Michal