Forked from
Reform / reform-boundary-uboot
8027 commits behind the upstream repository.
-
Marcin Niestroj authored
In case we have restarted u-boot there is a chance that environment buffer contains old environment (from the previous boot). If UBI volume is zero size, ubi_volume_read() doesn't modify the buffer and exits successfully. We need to clear buffer manually before reading it from UBI, so the invalid CRC will cause setting default environment in case that the UBI volume is zero size. Signed-off-by:
Marcin Niestroj <m.niestroj@grinn-global.com>
Marcin Niestroj authoredIn case we have restarted u-boot there is a chance that environment buffer contains old environment (from the previous boot). If UBI volume is zero size, ubi_volume_read() doesn't modify the buffer and exits successfully. We need to clear buffer manually before reading it from UBI, so the invalid CRC will cause setting default environment in case that the UBI volume is zero size. Signed-off-by:
Marcin Niestroj <m.niestroj@grinn-global.com>
env_ubi.c 5.24 KiB