Quote:
Originally Posted by geekmaster
The previous version sometimes copied too little data, which was worse. I will fix that, if I can figure out where to chop it, and I will add the cpio extraction seaniko7 posted to my thread too, I think. I need to track down this "mkimage" of which you speak, to test my changes...
|
Start at the tail and read toward the head of the file.
Erased flash (I.E: un-programmed locations in the erase block) are "FF" (all ones - not all zeros).
When you hit the first non-FF byte - call that end of file and throw everything skipped away.
Expect that prior (last of the FF sequence) to be on a 4-byte boundary).
The trimmed file will pass the mkimage internal checksum tests when everything works out as intended.