NOR flash erasing, but not writing

Christopher Reder CReder at digitalcpt.com
Thu Jul 17 10:52:27 EDT 2008


I am running linux 2.6.21 on an embedded system.  I have a nor flash (AMD style) and am able to update the kernel by using u-boot.  I would like to be able to do update the kernel from userspace.

I have the mtd_debug utility as well as the mtd-utils like flash_cp and flash_eraseall.

Here are the steps I've tried:

1. flash_eraseall /dev/mtd2   (after doing this, I see that the kernel that was there is now erased)
2. flashcp uImage /dev/mtd2

after doing flashcp, it says that the verification failed which makes sense since it is erased, but not written.

I have also tried:  dd if=uImage of=/dev/mtd2 after doing an erase with no luck.

If I am able to read from the device and erase the device, what else do I need to do to write properly?  I understand that the commands are different and just because you can do one doesn't mean you can do the other, but I am at a loss at what else to try.  I am able to update through u-boot so the hardware is fine.

Thanks in advance for any help/suggestions.
Christopher



More information about the linux-mtd mailing list