
Dear Jerry Van Baren,
In message 49E335BB.4050609@ge.com you wrote:
- it works only on NOR flash, not on any media that can be accessed only in blocks
Not true: the offset merely needs to be aligned to the next block in that case: <next><crc><env><NUL>FFFFFFFFFFFF <next><crc><env><NUL>[undefined] ^^^^ offset of ------------------> ^^^^ 0xFFFFFFFF
All flash that I can recall seeing allows at least a limited number of rewrites to a block (the limited number getting smaller on successive generations), so two writes to the env start block (once to write the new env, a second time to rewrite the 0xFFFFFFFF to point to the superceeding env). If the flash didn't support two writes, that would be a show-stopper. Due to how people use flash, I don't think the number will ever go to one write (IIRC, 4 is typical of current generation NAND).
So what do we save, then? Instead of a single write we now need actually two...
BTW: what was the exact problem we were trying to solve? Saving the time it takes to erase one flash sector?
If we have to pay for this with introducing a new, incompatible environment format, and probably having to handle NOR flash and other storage media differently, I doubt if this is worth the effort.
That could very well be true.
;-)
Best regards,
Wolfgang Denk