
Dear Rasmus,
In message ac9500de-d236-be83-04a8-8f68be1c7672@prevas.dk you wrote:
The CONFIG_ENV_IS_FOO means: if you use "env save", then U-Boot will write the config to external storage using the FOO storage device.
Wolfgang, you're wrong. What you're saying was once true, when the location was a "choice" in Kconfig, but it hasn't been that since fb69464eae. Nowadays one can select multiple possible backends, and only one of them will be used when doing "env save".
I know that. But that slection is made from the selected drivers enabled by the CONFIG_ENV_IS_* settings.
Later (208bd2b8), _NOWHERE was made non-mutually-exclusive with the real storage targets.
And this is a buf that should be fixed, as it makes no sense at all.
If you define CONFIG_ENV_IS_NOWHERE, I would for example expect that all "env save" related code is omitted as we will never need it.
I haven't checked, but that functionality does seem to exist - not depending on whether CONFIG_ENV_IS_NOWHERE is not selected, but whether any of the CONFIG_ENV_IS_<somehere> is. See the ENV_IS_IN_DEVICE logic in cmd/nvedit.c. So if you select CONFIG_ENV_IS_NOWHERE and not any of the others, I think the build works as you'd expect.
This is intransparent and error prone. This check must not be implemented somewhere in the code, but at Kconfig level.
Best regards,
Wolfgang Denk