
2024. 10. 16. 20:28 keltezéssel, Fabio Estevam írta:
Benjamin,
On Sun, Oct 13, 2024 at 9:39 PM Peng Fan peng.fan@nxp.com wrote:
Would you please give more background on this, I not got the point on why doing this?
I also do not understand the reason for this change. It is not clear by reading the commit log.
Please describe what exactly fails to work before the patch and what works after your change.
+#ifndef CONFIG_SYS_MMC_ENV_DEV +#define CONFIG_SYS_MMC_ENV_DEV 0 +#endif
I don't understand the need for this.
env/Kconfig has a default 0 for SYS_MMC_ENV_DEV.
You can use only one of config from CONFIG_ENV_IS_IN_MMC=y and CONFIG_ENV_IS_NOWHERE=y in U-boot config in same time.
If you like to use CONFIG_ENV_IS_NOWHERE=y, these codes in the patched source files will be not part of the build, and the autodetection of the boot mode will never work. At the moment it works only if you use CONFIG_ENV_IS_IN_MMC=y in U-boot config but it should work also in case of use CONFIG_ENV_IS_NOWHERE=y option also.
Other poblem is that CONFIG_SYS_MMC_ENV_DEV can be defined only if CONFIG_ENV_IS_IN_MMC=y is active in config of U-boot. It means, it needs to be manually defined in case when CONFIG_ENV_IS_NOWHERE=y is used, because the codes in the patched sources like to use it as a return value in some error/default cases.