
Dear Mike Frysinger,
In message 201012292139.05901.vapier@gentoo.org you wrote:
seems the new saveenv code in the non-redund case has been rewritten completely and doesn't support the same feature set as it used to.
...
so the difference is that the new code no longer supports envs which do not start on a sector boundary. it does this so that it doesn't memcpy() as much data out of the flash at the expense of doing more CPU bound math operations (mostly bit twiddling).
so the question is whether the old behavior should be restored. if it not,
The change was not intentional. Sorry.
I don't have a clear opinion if it's worth the effort to restore the old behavior - it seems it has never been used much (OK, you did).
the documentation should be tweaked to note these requirements and some simple CPP checks added to environment.h so that this issue turns into a build failure. after all, it's easy to detect an env offset that isnt at the start of the sector: #if (CONFIG_ENV_OFFSET & (CONFIG_ENV_SECT_SIZE - 1)) # error env offset not sector aligned #endif
I agree that adding such a test would be a good thing - please submit a patch. Or one to restore the old behaviour, if you prefer.
Thanks.
Wolfgang Denk