[Letux-kernel] gta04 - reading nand from u-boot

Josua Mayer josua.mayer at jm0.eu
Fri Jul 20 17:49:41 CEST 2018


Hi everybody,

my experiments have reached a point where I want to use nand, so I
started by setting it up from within linux, and then tried to boot.
And I was greeted by a ton of errors on the serial console:
fallback to NAND kernel

NAND read: device 0 offset 0x280000, size 0x5c0000
Error: Bad compare! failed
^^ This line keeps repeating seemingly endless.

So I notice two things:
- read starts at 0x280000: this matches the start of the kernel
partition as declared in devicetree.
- trying to read 0x5c0000 bytes: This should be enoufg for my kernel
image which is only 3.3MB, but maybe it should be as much as the kernel
partition size 0x400000.

So what is going wrong? Nothing obvious. So I started playing with the
nand read command:

nand read 0x82000000 0x0 0x240000
2359296 bytes read: OK

nand read 0x82000000 0x0 0x260000
2490368 bytes read: OK

nand read 0x82000000 0x0 0x280000
2621440 bytes read: OK

nand read 0x82000000 0x240000 0x20000
131072 bytes read: OK

nand read 0x82000000 0x280000 0x1   
NAND read: device 0 offset 0x280000, size 0x1
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
NAND read from offset 280000 failed -74
 0 bytes read: ERROR

^^ So I can't read beyond 0x27ffff

Has anyone seen this?
@Nikolaus does this work for you?

br
Josua Mayer




More information about the Letux-kernel mailing list