In case of booting from serial loader (USB) we want to always use the
default environment in order to get a defined state that is
independent of any environment stored in persistent memory.
This way we can avoid corruption of the boot process during
development and manufacturing by existing environment settings in
flash.
Signed-off-by: Eberhard Stoll <eberhard.stoll@kontron.de>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
if (prio)
return ENVL_UNKNOWN;
+ if (CONFIG_IS_ENABLED(ENV_IS_NOWHERE) && is_boot_from_usb())
+ return ENVL_NOWHERE;
+
if (sl_mx6ul_is_spi_nor_boot() && CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH))
return ENVL_SPI_FLASH;
else if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC))
return ENVL_MMC;
- return ENVL_NOWHERE;
+ if (CONFIG_IS_ENABLED(ENV_IS_NOWHERE))
+ return ENVL_NOWHERE;
+
+ return ENVL_UNKNOWN;
}