blob: ea6c32eb3b77224eabf992cbd8ce333281ab4db4 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
wdenk0bc4a1a2002-09-18 11:09:59 +00002/*
Wolfgang Denkea882ba2010-06-20 23:33:59 +02003 * (C) Copyright 2000-2010
wdenk0bc4a1a2002-09-18 11:09:59 +00004 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 *
6 * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
7 * Andreas Heppel <aheppel@sysgo.de>
wdenk0bc4a1a2002-09-18 11:09:59 +00008 */
9
10#include <common.h>
wdenk0bc4a1a2002-09-18 11:09:59 +000011#include <command.h>
12#include <environment.h>
13#include <linux/stddef.h>
wdenk0bc4a1a2002-09-18 11:09:59 +000014
Wolfgang Denkd87080b2006-03-31 18:32:53 +020015DECLARE_GLOBAL_DATA_PTR;
16
Tom Rinieeba55c2017-08-19 22:27:57 -040017/*
18 * Because we only ever have the default environment available we must mark
19 * it as invalid.
20 */
21static int env_nowhere_init(void)
22{
23 gd->env_addr = (ulong)&default_environment[0];
24 gd->env_valid = ENV_INVALID;
25
26 return 0;
27}
28
Simon Glass4415f1d2017-08-03 12:21:58 -060029U_BOOT_ENV_LOCATION(nowhere) = {
30 .location = ENVL_NOWHERE,
Tom Rinieeba55c2017-08-19 22:27:57 -040031 .init = env_nowhere_init,
Simon Glassac358be2017-08-03 12:22:03 -060032 ENV_NAME("nowhere")
Simon Glass4415f1d2017-08-03 12:21:58 -060033};