I am using U-Boot 2020.04 to port ubuntu core on imx8m.
I have read https://ograblog.wordpress.com/2017/06/13/patching-u-boot-for-use-in-an-ubuntu-core-gadget-snap/ and it is written in this blog that CONFIG_SYS_REDUNDAND_ENVIRONMENT and CONFIG_ENV_IS_IN_FAT both need to be enabled in the U-Boot config, however below is the entry of SYS_REDUNDAND_ENVIRONMENT in Kconfig
bool "Enable redundant environment support"
depends on ENV_IS_IN_EEPROM || ENV_IS_IN_FLASH || ENV_IS_IN_MMC || \
ENV_IS_IN_NAND || ENV_IS_IN_SPI_FLASH || ENV_IS_IN_UBI
This means that CONFIG_SYS_REDUNDAND_ENVIRONMENT can not be enabled with CONFIG_ENV_IS_IN_FAT. I have checked the U-Boot code for dragonboard also and it has the same Kconfig.
Am I missing anything?
depends only means it will turn it on automatically alongside … you can indeed still enable CONFIG_ENV_IS_IN_FAT separately
PS: note though, that the design has changed with UC20, i’m not actually sure how the environment is handled there for custom gadgets
As far as I understand “depends on”, It doesn’t turn on anything automatically and parent config can only be enabled if “depends on” config conditions are satisfied. In this case, as SYS_REDUNDAND_ENVIRONMENT depends on ENV_IS_IN_EEPROM || ENV_IS_IN_FLASH || ENV_IS_IN_MMC || ENV_IS_IN_NAND || ENV_IS_IN_SPI_FLASH || ENV_IS_IN_UBI, It can not be enabled untill one of this option is enabled. AFAIK, Automatic enablement is the property of ‘select’ and not ‘depends on’ in Kconfig.
I have verified that 'depends on ’ is indeed working this way. Basically SYS_REDUNDAND_ENVIRONMENT is not selectable in U-Boot menuconfig until one of the dependable config is enabled.
that sounds like a bug to me then … it used to be possible to use both together and in fact the header bytes this adds to the env file are required … (at least in UC16 and 18 … as i said, UC20 was completely re-designed without my involvement)