[PATCH] tools: mxsboot: pre-fill buffer with 0xff, not 0

Alessandro Rubini rubini at gnudd.com
Mon Dec 4 09:42:30 CET 2023


> But what about the bad block markers , do they get erased when you write 
> this U-Boot image into the NAND ?

The image includes OOB data, because the rom-mandated map is different
from normal standards. If OOB is zeroed, blocks appear as bad (correctly!).

By memsetting to 0xff, before filling data structures and checksums, we
get a binary that written with "nand write.raw" works properly (the rom
is happy with the format and boots) but doesn't mark blocks as bad.

[actually, only the first half-a-meg is with-oob, the trailing part is not,
and the image is partly written with "nand write.raw" and partly with
"nand write". Hairy things based on hairy vendor choices in hw/rom]

But tools/mxsboot works fine, and saved my day (or more).

thanks
/alessandro


More information about the U-Boot mailing list