X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=env%2Fnowhere.c;h=f654883c8acb1fa64b6667cada1943d491fe0c9f;hb=f39bfec230828a843bb53d0213709d47db1574df;hp=1d2ae85a57e0317cc76a20b9a9b6da6b29620573;hpb=7938822a6b75b69fff9793b6b1769dddf1249525;p=u-boot diff --git a/env/nowhere.c b/env/nowhere.c index 1d2ae85a57..f654883c8a 100644 --- a/env/nowhere.c +++ b/env/nowhere.c @@ -15,8 +15,20 @@ DECLARE_GLOBAL_DATA_PTR; -env_t *env_ptr; +/* + * Because we only ever have the default environment available we must mark + * it as invalid. + */ +static int env_nowhere_init(void) +{ + gd->env_addr = (ulong)&default_environment[0]; + gd->env_valid = ENV_INVALID; + + return 0; +} U_BOOT_ENV_LOCATION(nowhere) = { .location = ENVL_NOWHERE, + .init = env_nowhere_init, + ENV_NAME("nowhere") };