+static int env_nowhere_load(void)
+{
+ /*
+ * For SPL, setting env_valid = ENV_INVALID is enough, as env_get()
+ * searches default_environment array in that case.
+ * For U-Boot proper, import the default environment to allow reload.
+ */
+ if (!IS_ENABLED(CONFIG_SPL_BUILD))
+ env_set_default(NULL, 0);
+
+ gd->env_valid = ENV_INVALID;
+
+ return 0;
+}
+