
Dear Sam,
In message CAKaJLVsWKpGeEuS=iZ7QCtZrDfUSA=8GZo3zJDr-VgW-MUCFzA@mail.gmail.com you wrote:
Right now U-Boot and SPL logs are cluttered with bogus warnings like these (on X15 board, but I'm pretty sure it should appear on many others):
Loading Environment from FAT... *** Warning - bad CRC, using default environment
I donpt want to question the purpose of your patch series in genral, but:
This is NOT a bogus warning - actually it is something which is not supposed to happen on any sane system. If it does on your board even after first boot and running "env save" at least once, then you have some problem either in the design or implementation of your board code.
So this is a very valid warning which means: FIX ME!
- If we have two sources for the environment (e.g. FAT partition on
SD card and some raw partition on eMMC), we shouldn't print error messages if we were unable to load the environment from one source
This needs specification.
If there are several potential sources for the environment, it can be assumed that the first one is supposed to be the primary one, so if this does not work, there _should_ be a warning (or even error) message before U-Boot falls back to alternative storage.
However, in such a case the "using default environment" is apparently wrong...
- We should probably print some human-readable information that we
didn't find the environment there, let's skip and look for next source (but don't print those warnings/failed messages)
For any attempt to read the environment from some storage device which fails, a warning SHALL be printed, because this is not supposed to happen.
- And only print the error message in case when U-Boot environment
wasn't found at all (on all possible sources).
Best regards,
Wolfgang Denk