[U-Boot] [PATCH v2] fw_setenv: avoid writing environment when nothing has changed

Rasmus Villemoes rasmus.villemoes at prevas.dk
Tue Oct 30 11:05:17 UTC 2018


On 2018-09-27 22:45, Rasmus Villemoes wrote:
> In the case where one deletes an already-non-existing variable, or sets
> a variable to the value it already has, there is no point in writing the
> environment back, thus reducing wear on the underlying storage
> device.
> 
> In the case of redundant environments, if the two environments
> differ (e.g. because one is corrupt), make sure that any call of
> fw_setenv causes the two to become synchronized, even if the fw_setenv
> call does not change anything in the good copy.
> 
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> ---
> Add logic to ensure a corrupt copy gets replaced, even if fw_setenv
> wouldn't change anything in the good copy.

ping.


More information about the U-Boot mailing list