1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * (C) Copyright 2000-2010 3*4882a593Smuzhiyun * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com> 6*4882a593Smuzhiyun * Andreas Heppel <aheppel@sysgo.de> 7*4882a593Smuzhiyun * 8*4882a593Smuzhiyun * SPDX-License-Identifier: GPL-2.0+ 9*4882a593Smuzhiyun */ 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun #include <env_callback.h> 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED 14*4882a593Smuzhiyun env_t environment __UBOOT_ENV_SECTION__ = { 15*4882a593Smuzhiyun ENV_CRC, /* CRC Sum */ 16*4882a593Smuzhiyun #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT 17*4882a593Smuzhiyun 1, /* Flags: valid */ 18*4882a593Smuzhiyun #endif 19*4882a593Smuzhiyun { 20*4882a593Smuzhiyun #elif defined(DEFAULT_ENV_INSTANCE_STATIC) 21*4882a593Smuzhiyun static char default_environment[] = { 22*4882a593Smuzhiyun #else 23*4882a593Smuzhiyun const uchar default_environment[] = { 24*4882a593Smuzhiyun #endif 25*4882a593Smuzhiyun #ifdef CONFIG_ENV_CALLBACK_LIST_DEFAULT 26*4882a593Smuzhiyun ENV_CALLBACK_VAR "=" CONFIG_ENV_CALLBACK_LIST_DEFAULT "\0" 27*4882a593Smuzhiyun #endif 28*4882a593Smuzhiyun #ifdef CONFIG_ENV_FLAGS_LIST_DEFAULT 29*4882a593Smuzhiyun ENV_FLAGS_VAR "=" CONFIG_ENV_FLAGS_LIST_DEFAULT "\0" 30*4882a593Smuzhiyun #endif 31*4882a593Smuzhiyun #ifdef CONFIG_USE_BOOTARGS 32*4882a593Smuzhiyun "bootargs=" CONFIG_BOOTARGS "\0" 33*4882a593Smuzhiyun #endif 34*4882a593Smuzhiyun #ifdef CONFIG_BOOTCOMMAND 35*4882a593Smuzhiyun "bootcmd=" CONFIG_BOOTCOMMAND "\0" 36*4882a593Smuzhiyun #endif 37*4882a593Smuzhiyun #ifdef CONFIG_RAMBOOTCOMMAND 38*4882a593Smuzhiyun "ramboot=" CONFIG_RAMBOOTCOMMAND "\0" 39*4882a593Smuzhiyun #endif 40*4882a593Smuzhiyun #ifdef CONFIG_NFSBOOTCOMMAND 41*4882a593Smuzhiyun "nfsboot=" CONFIG_NFSBOOTCOMMAND "\0" 42*4882a593Smuzhiyun #endif 43*4882a593Smuzhiyun #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0) 44*4882a593Smuzhiyun "bootdelay=" __stringify(CONFIG_BOOTDELAY) "\0" 45*4882a593Smuzhiyun #endif 46*4882a593Smuzhiyun #if defined(CONFIG_BAUDRATE) && (CONFIG_BAUDRATE >= 0) 47*4882a593Smuzhiyun "baudrate=" __stringify(CONFIG_BAUDRATE) "\0" 48*4882a593Smuzhiyun #endif 49*4882a593Smuzhiyun "video_lvds_rgb=" __stringify(lvds) "\0" 50*4882a593Smuzhiyun "video_hdmi=" __stringify(hdmi) "\0" 51*4882a593Smuzhiyun "video_mipi_edp=" __stringify(mipi) "\0" 52*4882a593Smuzhiyun #ifdef CONFIG_LOADS_ECHO 53*4882a593Smuzhiyun "loads_echo=" __stringify(CONFIG_LOADS_ECHO) "\0" 54*4882a593Smuzhiyun #endif 55*4882a593Smuzhiyun #ifdef CONFIG_ETHPRIME 56*4882a593Smuzhiyun "ethprime=" CONFIG_ETHPRIME "\0" 57*4882a593Smuzhiyun #endif 58*4882a593Smuzhiyun #ifdef CONFIG_IPADDR 59*4882a593Smuzhiyun "ipaddr=" __stringify(CONFIG_IPADDR) "\0" 60*4882a593Smuzhiyun #endif 61*4882a593Smuzhiyun #ifdef CONFIG_SERVERIP 62*4882a593Smuzhiyun "serverip=" __stringify(CONFIG_SERVERIP) "\0" 63*4882a593Smuzhiyun #endif 64*4882a593Smuzhiyun #ifdef CONFIG_SYS_AUTOLOAD 65*4882a593Smuzhiyun "autoload=" CONFIG_SYS_AUTOLOAD "\0" 66*4882a593Smuzhiyun #endif 67*4882a593Smuzhiyun #ifdef CONFIG_PREBOOT 68*4882a593Smuzhiyun "preboot=" CONFIG_PREBOOT "\0" 69*4882a593Smuzhiyun #endif 70*4882a593Smuzhiyun #ifdef CONFIG_ROOTPATH 71*4882a593Smuzhiyun "rootpath=" CONFIG_ROOTPATH "\0" 72*4882a593Smuzhiyun #endif 73*4882a593Smuzhiyun #ifdef CONFIG_GATEWAYIP 74*4882a593Smuzhiyun "gatewayip=" __stringify(CONFIG_GATEWAYIP) "\0" 75*4882a593Smuzhiyun #endif 76*4882a593Smuzhiyun #ifdef CONFIG_NETMASK 77*4882a593Smuzhiyun "netmask=" __stringify(CONFIG_NETMASK) "\0" 78*4882a593Smuzhiyun #endif 79*4882a593Smuzhiyun #ifdef CONFIG_HOSTNAME 80*4882a593Smuzhiyun "hostname=" __stringify(CONFIG_HOSTNAME) "\0" 81*4882a593Smuzhiyun #endif 82*4882a593Smuzhiyun #ifdef CONFIG_BOOTFILE 83*4882a593Smuzhiyun "bootfile=" CONFIG_BOOTFILE "\0" 84*4882a593Smuzhiyun #endif 85*4882a593Smuzhiyun #ifdef CONFIG_LOADADDR 86*4882a593Smuzhiyun "loadaddr=" __stringify(CONFIG_LOADADDR) "\0" 87*4882a593Smuzhiyun #endif 88*4882a593Smuzhiyun #ifdef CONFIG_CLOCKS_IN_MHZ 89*4882a593Smuzhiyun "clocks_in_mhz=1\0" 90*4882a593Smuzhiyun #endif 91*4882a593Smuzhiyun #if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0) 92*4882a593Smuzhiyun "pcidelay=" __stringify(CONFIG_PCI_BOOTDELAY)"\0" 93*4882a593Smuzhiyun #endif 94*4882a593Smuzhiyun #ifdef CONFIG_ENV_VARS_UBOOT_CONFIG 95*4882a593Smuzhiyun "arch=" CONFIG_SYS_ARCH "\0" 96*4882a593Smuzhiyun #ifdef CONFIG_SYS_CPU 97*4882a593Smuzhiyun "cpu=" CONFIG_SYS_CPU "\0" 98*4882a593Smuzhiyun #endif 99*4882a593Smuzhiyun #ifdef CONFIG_SYS_BOARD 100*4882a593Smuzhiyun "board=" CONFIG_SYS_BOARD "\0" 101*4882a593Smuzhiyun "board_name=" CONFIG_SYS_BOARD "\0" 102*4882a593Smuzhiyun #endif 103*4882a593Smuzhiyun #ifdef CONFIG_SYS_VENDOR 104*4882a593Smuzhiyun "vendor=" CONFIG_SYS_VENDOR "\0" 105*4882a593Smuzhiyun #endif 106*4882a593Smuzhiyun #ifdef CONFIG_SYS_SOC 107*4882a593Smuzhiyun "soc=" CONFIG_SYS_SOC "\0" 108*4882a593Smuzhiyun #endif 109*4882a593Smuzhiyun #ifdef CONFIG_SILENT_CONSOLE 110*4882a593Smuzhiyun "silent=enable\0" 111*4882a593Smuzhiyun #endif 112*4882a593Smuzhiyun #endif 113*4882a593Smuzhiyun #ifdef CONFIG_EXTRA_ENV_SETTINGS 114*4882a593Smuzhiyun CONFIG_EXTRA_ENV_SETTINGS 115*4882a593Smuzhiyun #endif 116*4882a593Smuzhiyun "\0" 117*4882a593Smuzhiyun #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED 118*4882a593Smuzhiyun } 119*4882a593Smuzhiyun #endif 120*4882a593Smuzhiyun }; 121