blob: f654883c8acb1fa64b6667cada1943d491fe0c9f [file] [log] [blame]
wdenk0bc4a1a2002-09-18 11:09:59 +00001/*
Wolfgang Denkea882ba2010-06-20 23:33:59 +02002 * (C) Copyright 2000-2010
wdenk0bc4a1a2002-09-18 11:09:59 +00003 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
5 * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
6 * Andreas Heppel <aheppel@sysgo.de>
7
Wolfgang Denk3765b3e2013-10-07 13:07:26 +02008 * SPDX-License-Identifier: GPL-2.0+
wdenk0bc4a1a2002-09-18 11:09:59 +00009 */
10
11#include <common.h>
wdenk0bc4a1a2002-09-18 11:09:59 +000012#include <command.h>
13#include <environment.h>
14#include <linux/stddef.h>
wdenk0bc4a1a2002-09-18 11:09:59 +000015
Wolfgang Denkd87080b2006-03-31 18:32:53 +020016DECLARE_GLOBAL_DATA_PTR;
17
Tom Rinieeba55c2017-08-19 22:27:57 -040018/*
19 * Because we only ever have the default environment available we must mark
20 * it as invalid.
21 */
22static int env_nowhere_init(void)
23{
24 gd->env_addr = (ulong)&default_environment[0];
25 gd->env_valid = ENV_INVALID;
26
27 return 0;
28}
29
Simon Glass4415f1d2017-08-03 12:21:58 -060030U_BOOT_ENV_LOCATION(nowhere) = {
31 .location = ENVL_NOWHERE,
Tom Rinieeba55c2017-08-19 22:27:57 -040032 .init = env_nowhere_init,
Simon Glassac358be2017-08-03 12:22:03 -060033 ENV_NAME("nowhere")
Simon Glass4415f1d2017-08-03 12:21:58 -060034};