June 25, 2024

Zynq - Using U-Boot to patch NAND

To my utter amazement, you can just do this from U-Boot.
I try:
nand write 8 0x300000 4
NAND write: device 0 offset 0x300000, size 0x4
 4 bytes written: OK
It turns out that by accident I chose a friendly address in flash. U-Boot insists on starting reads and writes on sector boundaries, and sectors (for this device anyway) are 2048 bytes in size.

So addresses must be 0, 0x800, 0x1000, 0x1800, ...

The size can be any value.


Feedback? Questions? Drop me a line!

Tom's Computer Info / [email protected]