Writing Linux kernel to MTD
Michal Ludvig
mludvig at logix.net.nz
Mon Feb 9 06:11:38 EST 2009
Ricard Wanderlof wrote:
>
> On Mon, 9 Feb 2009, Michal Ludvig wrote:
>
>> I've got some problems writing a linux kernel image to /dev/mtd1 both
>> using 'dd of=/dev/mtd1' or using nandwrite. In either case the kernel is
>> not bootable after such a write.
>> ...
>> When I write the kernel image directly from u-boot using 'nandw' command
>> it works fine and can be booted. However all attempts to write the image
>> from a running Linux to /dev/mtd1 failed so far. I always ended up with
>> an unbootable system:
>> ...
>> Interestingly even when I dump /dev/mtd1 using 'dd if=/dev/mtd1' or
>> 'nanddump -o' I get something very close to the originally written
>> kernel but not exactly the same. A number of bits here and there are
>> slightly different:
>> ---
>
> My instinctive reaction is that there may be a difference in the way the
> Linux and u-boot drivers access the NAND device in terms of bus timing
> etc, so that the Linux driver breaks the timing causing bad
> communication with the device. I.e., the timing setup of the Linux
> driver is at fault here.
Interesting idea, however I happily use UBIFS filesystem at the same
time in the same NAND Flash and observe no problems. If it's broken it's
broken in a very reliable and stable way...
> Another similar condition I have experienced is that due to a
> misconfiguration one of the control bits to the NAND flash was
> inadvertently mapped to a network indicator LED, causing NAND read/write
> to fail if network traffic occurred at the same time.
Just in case I disabled network altogether and did the write test from
UBIFSroot instead of from development NFSroot and it's still failing.
Any other ideas?
Michal
More information about the linux-mtd
mailing list